Index: branches/ErmaC/Enoch/i386/libsaio/pci_root.c =================================================================== --- branches/ErmaC/Enoch/i386/libsaio/pci_root.c (revision 2884) +++ branches/ErmaC/Enoch/i386/libsaio/pci_root.c (revision 2885) @@ -8,9 +8,9 @@ #include "bootstruct.h" #if DEBUG_PCIROOT -#define DBG(x...) printf(x) + #define DBG(x...) printf(x) #else -#define DBG(x...) + #define DBG(x...) #endif static int rootuid = 10; //value means function wasnt ran yet Index: branches/ErmaC/Enoch/i386/libsaio/nvidia.c =================================================================== --- branches/ErmaC/Enoch/i386/libsaio/nvidia.c (revision 2884) +++ branches/ErmaC/Enoch/i386/libsaio/nvidia.c (revision 2885) @@ -1252,7 +1252,7 @@ // { 0x10DE11E7, "GeForce " }, // GK106M // 11F0 - 11FF { 0x10DE11FA, "Quadro K4000" }, - { 0x10DE11FC, "Quadro 2100M" }, + { 0x10DE11FC, "Quadro K2100M" }, { 0x10DE11FF, "NB1Q" }, // // 1200 - 120F { 0x10DE1200, "GeForce GTX 560 Ti" }, @@ -1323,6 +1323,7 @@ { 0x10DE134E, "GeForce 930MX" }, // GM108M { 0x10DE134F, "GeForce 920MX" }, // GM108M { 0x10DE137A, "Quadro K620M/M500M" }, // GM108GLM + { 0x10DE137B, "Quadro M520" }, { 0x10DE137D, "GeForce 940A" }, // GM108M { 0x10DE1380, "GeForce GTX 750 Ti" }, { 0x10DE1381, "GeForce GTX 750" }, @@ -1345,6 +1346,8 @@ { 0x10DE13B1, "Quadro M1000M" }, // GM107GLM { 0x10DE13B2, "Quadro M600M" }, // GM107GLM { 0x10DE13B3, "Quadro K2200M" }, // GM107GLM + { 0x10DE13B4, "Quadro M620" }, + { 0x10DE13B6, "Quadro M1200" }, { 0x10DE13B9, "NVS 810" }, // GM107GL { 0x10DE13BA, "Quadro K2200" }, { 0x10DE13BB, "Quadro K620" }, @@ -1376,6 +1379,7 @@ { 0x10DE1427, "GeForce GTX 965M" }, // GM206M { 0x10DE1430, "Quadro M2000" }, // { 0x10DE1431, "Tesla M4" }, // GM206GL + { 0x10DE1436, "Quadro M2200" }, // { 0x10DE143F, "Graphics Device" }, // // { 0x10DE1600, "Graphics Device" }, // // { 0x10DE1601, "Graphics Device" }, // @@ -1425,12 +1429,16 @@ { 0x10DE1BB0, "Quadro P5000" }, // GP104GL // { 0x10DE1BB1, "Graphics Device" }, // GP104GL // { 0x10DE1BB4, "Graphics Device" }, // GP104GL + { 0x10DE1BB6, "Quadro P5000" }, + { 0x10DE1BB7, "Quadro P4000" }, + { 0x10DE1BB8, "Quadro P3000" }, { 0x10DE1BE0, "GeForce GTX 1080" }, //GP104M { 0x10DE1BE1, "GeForce GTX 1070" }, //GP104M // { 0x10DE1C00, "Graphics Device" }, // GP106 // { 0x10DE1C01, "Graphics Device" }, // GP106 { 0x10DE1C02, "GeForce GTX 1060"}, // GP106 { 0x10DE1C03, "GeForce GTX 1060"}, // GP106 +// { 0x10DE1C07, "NVIDIA CMP6-1"}, // { 0x10DE1c20, "GeForce GTX 1060" }, //GP106M // { 0x10DE1C30, "Graphics Device" }, // GP106GL { 0x10DE1C60, "GeForce GTX 1060" }, // GP106M @@ -1438,6 +1446,9 @@ // { 0x10DE1C80, "Graphics Device" }, // GP107 // { 0x10DE1C81, "Graphics Device" }, // GP107 { 0x10DE1C82, "GeForce GTX 1050 Ti"}, // GP107 + // 1D00 - 1EFFF + { 0x10DE1D10, "GeForce MX150"}, + }; static nvidia_card_info_t nvidia_card_exceptions[] = { @@ -1610,6 +1621,8 @@ { 0x10DE1140, 0x10280565, "Dell GeForce GT 630M" }, { 0x10DE1140, 0x10280568, "Dell GeForce GT 630M" }, { 0x10DE1140, 0x144DC0D5, "Samsung GeForce GT 630M" }, + { 0x10DE1140, 0x17AA2200, "NVS 5200M" }, + { 0x10DE1140, 0x17AA2213, "GeForce GT 720M" }, { 0x10DE1140, 0x17AA500D, "Lenovo GeForce GT 620M" }, { 0x10DE1140, 0x1B0A20DD, "Pegatron GeForce GT 620M" }, { 0x10DE1140, 0x1B0A20FD, "Pegatron GeForce GT 620M" }, Index: branches/ErmaC/Enoch/i386/libsaio/ati.c =================================================================== --- branches/ErmaC/Enoch/i386/libsaio/ati.c (revision 2884) +++ branches/ErmaC/Enoch/i386/libsaio/ati.c (revision 2885) @@ -104,9 +104,9 @@ {"Maguro", 1}, {"MaguroS", 6}, /* AMD8000Controller */ + {"Exmoor", 6}, {"Baladi", 6}, /* AMD9000Controller */ - {"Exmoor", 6}, {"MalteseS", 1}, {"Lagotto", 4}, {"GreyhoundS", 1}, @@ -114,14 +114,23 @@ {"Basset", 4}, {"Greyhound", 6}, {"Labrador", 6}, + /* AMD9300Controller */ + {"FlueveSWIP", 4}, /* AMD9500Controller */ - {"Elqui", 5}, {"Acre", 3}, + {"Dayman", 6}, + {"Guariba", 6}, + {"Huallaga", 3}, + {"Orinoco", 5}, + /* AMD9510Controller */ {"Berbice", 5}, + /* AMD9515Controller */ + {"Mazaruni", 5}, + {"Longavi", 5}, + /* AMD9520Controller */ + {"Elqui", 5}, {"Caroni", 5}, - {"Florin", 6}, - {"Dayman", 6}, - {"Guariba", 6} + {"Florin", 6} }; static radeon_card_info_t radeon_cards[] = { @@ -259,6 +268,7 @@ { 0x6763, 0x00000000, CHIP_FAMILY_CAICOS, "AMD Radeon E6460 Series", kHydrilla }, { 0x6768, 0x00000000, CHIP_FAMILY_CAICOS, "AMD Radeon HD 6400M Series", kHydrilla }, { 0x6770, 0x00000000, CHIP_FAMILY_CAICOS, "AMD Radeon HD 6400 Series", kBulrushes }, + { 0x6771, 0x00000000, CHIP_FAMILY_CAICOS, "AMD Radeon HD 8490", kBulrushes }, { 0x6772, 0x00000000, CHIP_FAMILY_CAICOS, "AMD Radeon HD 7400A Series", kBulrushes }, { 0x6778, 0x00000000, CHIP_FAMILY_CAICOS, "AMD Radeon HD 7000 Series", kBulrushes }, { 0x6779, 0x00000000, CHIP_FAMILY_CAICOS, "AMD Radeon HD 6450/7450/8450/R5 230", kBulrushes }, @@ -325,8 +335,20 @@ { 0x6985, 0x00000000, CHIP_FAMILY_GREENLAND, "AMD Radeon Polaris 12", kNull }, { 0x6986, 0x00000000, CHIP_FAMILY_GREENLAND, "AMD Radeon Polaris 12", kNull }, { 0x6987, 0x00000000, CHIP_FAMILY_GREENLAND, "AMD Radeon Polaris 12", kNull }, + { 0x6995, 0x00000000, CHIP_FAMILY_GREENLAND, "AMD Radeon Polaris 12", kNull }, { 0x699F, 0x00000000, CHIP_FAMILY_GREENLAND, "AMD Radeon Polaris 12", kNull }, + // Vega 10 + { 0x6860, 0x00000000, CHIP_FAMILY_VEGA10, "AMD Radeon Vega 10", kNull }, + { 0x6861, 0x00000000, CHIP_FAMILY_VEGA10, "AMD Radeon Vega 10", kNull }, + { 0x6862, 0x00000000, CHIP_FAMILY_VEGA10, "AMD Radeon Vega 10", kNull }, + { 0x6863, 0x00000000, CHIP_FAMILY_VEGA10, "AMD Radeon Vega 10", kNull }, + { 0x6864, 0x00000000, CHIP_FAMILY_VEGA10, "AMD Radeon Vega 10", kNull }, + { 0x6867, 0x00000000, CHIP_FAMILY_VEGA10, "AMD Radeon Vega 10", kNull }, + { 0x6868, 0x00000000, CHIP_FAMILY_VEGA10, "AMD Radeon Vega 10", kNull }, + { 0x686C, 0x00000000, CHIP_FAMILY_VEGA10, "AMD Radeon Vega 10", kNull }, + { 0x687F, 0x00000000, CHIP_FAMILY_VEGA10, "AMD Radeon Vega 10", kNull }, + // PITCAIRN { 0x6800, 0x00000000, CHIP_FAMILY_PITCAIRN, "AMD Radeon HD 7970M", kBuri }, // Mobile { 0x6801, 0x00000000, CHIP_FAMILY_PITCAIRN, "AMD Radeon HD 8970M Series", kFutomaki }, // Mobile @@ -916,6 +938,9 @@ "Ellesmere", "Baffin", "Greenland", + "Vega10", +// "Vega11", +// "Navi", "" }; Index: branches/ErmaC/Enoch/i386/libsaio/ati.h =================================================================== --- branches/ErmaC/Enoch/i386/libsaio/ati.h (revision 2884) +++ branches/ErmaC/Enoch/i386/libsaio/ati.h (revision 2885) @@ -92,13 +92,14 @@ CHIP_FAMILY_PITCAIRN, CHIP_FAMILY_VERDE, CHIP_FAMILY_OLAND, + /* Sea Islands */ CHIP_FAMILY_HAINAN, CHIP_FAMILY_BONAIRE, CHIP_FAMILY_KAVERI, CHIP_FAMILY_KABINI, CHIP_FAMILY_HAWAII, - /* ... */ CHIP_FAMILY_MULLINS, + /* Volcanic Islands */ CHIP_FAMILY_TOPAZ, CHIP_FAMILY_AMETHYST, CHIP_FAMILY_TONGA, @@ -108,6 +109,7 @@ CHIP_FAMILY_ELLESMERE, /* Polaris 10 */ CHIP_FAMILY_BAFFIN, /* Polaris 11 */ CHIP_FAMILY_GREENLAND, /* Polaris 12 */ + CHIP_FAMILY_VEGA10, /* Vega 10 */ CHIP_FAMILY_LAST } ati_chip_family_t; @@ -199,9 +201,9 @@ kMaguro, kMaguroS, /* AMD8000Controller */ + kExmoor, kBaladi, /* AMD9000Controller */ - kExmoor, kMalteseS, kLagotto, kGreyhoundS, @@ -209,14 +211,23 @@ kBasset, kGreyhound, kLabrador, + /* AMD9300Controller */ + kFleuveSWIP, /* AMD9500Controller */ - kElqui, kAcre, + kDayman, + kGuariba, + kHuallaga, + kOrinoco, + /* AMD9510Controller*/ kBerbice, + /* AMD9515Controller */ + kMazaruni, + kLongavi, + /* AMD9520Controller */ + kElqui, kCaroni, kFlorin, - kDayman, - kGuariba, kCfgEnd } config_name_t; Index: branches/ErmaC/Enoch/i386/boot2/modules.c =================================================================== --- branches/ErmaC/Enoch/i386/boot2/modules.c (revision 2884) +++ branches/ErmaC/Enoch/i386/boot2/modules.c (revision 2885) @@ -16,11 +16,11 @@ #ifdef CONFIG_MODULES #if CONFIG_MODULE_DEBUG -#define DBG(x...) printf(x) -#define DBGPAUSE() getchar() + #define DBG(x...) printf(x) + #define DBGPAUSE() getchar() #else -#define DBG(x...) -#define DBGPAUSE() + #define DBG(x...) + #define DBGPAUSE() #endif static inline void rebase_location(UInt32 *location, char *base, int type); Index: branches/ErmaC/Enoch/i386/boot2/kernel_patcher_internal.c =================================================================== --- branches/ErmaC/Enoch/i386/boot2/kernel_patcher_internal.c (revision 2884) +++ branches/ErmaC/Enoch/i386/boot2/kernel_patcher_internal.c (revision 2885) @@ -743,15 +743,28 @@ verbose("\tFound Yosemite Lapic Version panic at 0x%08X\n", (unsigned int)patchLocation); break; } - // Bronya: El Capitan 10.11 Lapic Version + // Bronya: El Capitan 10.11 Lapic Version/10.12/10.13 else if (bytes[i + 0] == 0xff && bytes[i + 1] == 0x50 && bytes[i + 2] == 0x08 && bytes[i + 38] == 0x31 && bytes[i + 39] == 0xc0) { - patchLocation = i + 40; - verbose("\tFound El Capitan Lapic Version panic at 0x%08X\n", (unsigned int)patchLocation); + patchLocation = i + 40; + + if (kernelOSVer >= MacOSVer2Int("10.13") && kernelOSVer < MacOSVer2Int("10.14")) + { + verbose("\tFound High Sierra Lapic Version panic at 0x%08X\n", (unsigned int)patchLocation); + } + else if (kernelOSVer >= MacOSVer2Int("10.12") && kernelOSVer < MacOSVer2Int("10.13")) + { + verbose("\tFound Sierra Lapic Version panic at 0x%08X\n", (unsigned int)patchLocation); + } + else + { + verbose("\tFound El Capitan Lapic Version panic at 0x%08X\n", (unsigned int)patchLocation); + } + break; } } @@ -1343,46 +1356,18 @@ PatchApplied = false; // High Sierra onward, need to use 10.12 instead of 10.13. kernel bug? + // if (kernelOSVer >= MacOSVer2Int("10.13") && kernelOSVer < MacOSVer2Int("10.14")) if (kernelOSVer >= MacOSVer2Int("10.12")) { for (Index = 0; Index < 0x1000000; ++Index) { - if (Bytes[Index] == 0xE8 - && Bytes[Index + 1] == 0x25 - && Bytes[Index + 2] == 0x00 - && Bytes[Index + 3] == 0x00 - && Bytes[Index + 4] == 0x00 - && Bytes[Index + 5] == 0xEB - && Bytes[Index + 6] == 0x05 - && Bytes[Index + 7] == 0xE8 - && Bytes[Index + 8] == 0x7E - && Bytes[Index + 9] == 0x05 - && Bytes[Index + 10] == 0x00 - && Bytes[Index + 11] == 0x00) - { - Bytes[Index + 5] = 0x90; - Bytes[Index + 6] = 0x90; - count++; - - verbose("\tFound High Sierra EXT pattern: patched!\n"); - PatchApplied = true; - break; - } - } - } - - // Sierra onward - if (kernelOSVer >= MacOSVer2Int("10.12")) - { - for (Index = 0; Index < 0x1000000; ++Index) - { - if ((kernelOSVer >= MacOSVer2Int("10.12")) - && (Bytes[Index] == 0xC3 + // High Sierra + if (Bytes[Index] == 0xC3 && Bytes[Index + 1] == 0x48 && Bytes[Index + 2] == 0x85 && Bytes[Index + 3] == 0xDB && Bytes[Index + 4] == 0x74 - && Bytes[Index + 5] == 0x71 + && Bytes[Index + 5] == 0x69 && Bytes[Index + 6] == 0x48 && Bytes[Index + 7] == 0x8B && Bytes[Index + 8] == 0x03 @@ -1392,24 +1377,36 @@ && Bytes[Index + 12] == 0xFF && Bytes[Index + 13] == 0x50 && Bytes[Index + 14] == 0x28 - && Bytes[Index + 15] == 0x48)) + && Bytes[Index + 15] == 0x48) { Bytes[Index + 4] = 0xEB; Bytes[Index + 5] = 0x12; count++; - verbose("\tFound Sierra SIP pattern: patched!\n"); + verbose("\tFound High Sierra SIP pattern: patched!\n"); + + if (PatchApplied) + { + break; + } + PatchApplied = true; - break; } - // High Sierra onward, need to use 10.12 instead of 10.13. kernel bug? - if ((kernelOSVer >= MacOSVer2Int("10.12")) - && (Bytes[Index] == 0xC3 + } + } + + // Sierra + if (kernelOSVer >= MacOSVer2Int("10.12") && kernelOSVer < MacOSVer2Int("10.13")) + { + for (Index = 0; Index < 0x1000000; ++Index) + { + // High Sierra + if (Bytes[Index] == 0xC3 && Bytes[Index + 1] == 0x48 && Bytes[Index + 2] == 0x85 && Bytes[Index + 3] == 0xDB && Bytes[Index + 4] == 0x74 - && Bytes[Index + 5] == 0x69 + && Bytes[Index + 5] == 0x71 && Bytes[Index + 6] == 0x48 && Bytes[Index + 7] == 0x8B && Bytes[Index + 8] == 0x03 @@ -1419,110 +1416,31 @@ && Bytes[Index + 12] == 0xFF && Bytes[Index + 13] == 0x50 && Bytes[Index + 14] == 0x28 - && Bytes[Index + 15] == 0x48)) + && Bytes[Index + 15] == 0x48) { Bytes[Index + 4] = 0xEB; Bytes[Index + 5] = 0x12; count++; - verbose("\tFound High Sierra SIP pattern: patched!\n"); - PatchApplied = true; - break; - } - } - } + verbose("\tFound Sierra SIP pattern: patched!\n"); - if (kernelOSVer >= MacOSVer2Int("10.12")) - { - for (Index = 0; Index < 0x1000000; ++Index) - { - if (Bytes[Index] == 0xE8 - && Bytes[Index + 1] == 0x25 - && Bytes[Index + 2] == 0x00 - && Bytes[Index + 3] == 0x00 - && Bytes[Index + 4] == 0x00 - && Bytes[Index + 5] == 0xEB - && Bytes[Index + 6] == 0x05 - && Bytes[Index + 7] == 0xE8 - && Bytes[Index + 8] == 0xCE - && Bytes[Index + 9] == 0x02 - && Bytes[Index + 10] == 0x00 - && Bytes[Index + 11] == 0x00) - { - Bytes[Index + 5] = 0x90; - Bytes[Index + 6] = 0x90; - count++; + if (PatchApplied) + { + break; + } - verbose("\tFound Sierra EXT (Yosemite) pattern: patched!\n"); PatchApplied = true; - break; } } } - if (kernelOSVer <= MacOSVer2Int("10.12.3")) - { - for (Index = 0; Index < 0x1000000; ++Index) - { - if (Bytes[Index] == 0xE8 - && Bytes[Index + 1] == 0x25 - && Bytes[Index + 2] == 0x00 - && Bytes[Index + 3] == 0x00 - && Bytes[Index + 4] == 0x00 - && Bytes[Index + 5] == 0xEB - && Bytes[Index + 6] == 0x05 - && Bytes[Index + 7] == 0xE8 - && Bytes[Index + 8] == 0x7E - && Bytes[Index + 9] == 0x05 - && Bytes[Index + 10] == 0x00 - && Bytes[Index + 11] == 0x00) - { - Bytes[Index + 5] = 0x90; - Bytes[Index + 6] = 0x90; - count++; - - verbose("\tFound Sierra EXT (<= 10.12.4) pattern: patched!\n"); - PatchApplied = true; - break; - } - } - } - - if (kernelOSVer >= MacOSVer2Int("10.12.4")) - { - for (Index = 0; Index < 0x1000000; ++Index) - { - if (Bytes[Index] == 0xE8 - && Bytes[Index + 1] == 0x25 - && Bytes[Index + 2] == 0x00 - && Bytes[Index + 3] == 0x00 - && Bytes[Index + 4] == 0x00 - && Bytes[Index + 5] == 0xEB - && Bytes[Index + 6] == 0x05 - && Bytes[Index + 7] == 0xE8 - && Bytes[Index + 8] == 0x9E - && Bytes[Index + 9] == 0x05 - && Bytes[Index + 10] == 0x00 - && Bytes[Index + 11] == 0x00) - { - Bytes[Index + 5] = 0x90; - Bytes[Index + 6] = 0x90; - count++; - - verbose("\tFound Sierra (> = 10.12.4) EXT pattern: patched!\n"); - PatchApplied = true; - break; - } - } - } - - // El Capitan/Yosemite + // Yosemite/El Capitan if (kernelOSVer >= MacOSVer2Int("10.10") && kernelOSVer < MacOSVer2Int("10.12")) { for (Index = 0; Index < 0x1000000; ++Index) { // El Capitan - if (Bytes[Index] == 0xC3 + if (Bytes[Index] == 0xC3 && Bytes[Index + 1] == 0x48 && Bytes[Index + 2] == 0x85 && Bytes[Index + 3] == 0xDB @@ -1559,32 +1477,46 @@ PatchApplied = true; } - // Yosemite and El Capitan - if ((kernelOSVer >= MacOSVer2Int("10.10") && kernelOSVer < MacOSVer2Int("10.12")) - && (Bytes[Index] == 0xE8 + } + } + + // Yosemite onward. + // Yosemite/EL Capitan/Sierra/High Sierra + // if (kernelOSVer >= MacOSVer2Int("10.10") && kernelOSVer < MacOSVer2Int("10.14")) + if (kernelOSVer >= MacOSVer2Int("10.10")) + { + + for (Index = 0; Index < 0x1000000; ++Index) + { + if (Bytes[Index] == 0xE8 && Bytes[Index + 1] == 0x25 && Bytes[Index + 2] == 0x00 && Bytes[Index + 3] == 0x00 && Bytes[Index + 4] == 0x00 && Bytes[Index + 5] == 0xEB && Bytes[Index + 6] == 0x05 - && Bytes[Index + 7] == 0xE8 - && Bytes[Index + 8] == 0xCE - && Bytes[Index + 9] == 0x02 - && Bytes[Index + 10] == 0x00 - && Bytes[Index + 11] == 0x00)) + && Bytes[Index + 7] == 0xE8) { Bytes[Index + 5] = 0x90; Bytes[Index + 6] = 0x90; count++; - if (kernelOSVer < MacOSVer2Int("10.11")) - { - verbose("\tFound Yosemite EXT pattern: patched!\n"); + + if (kernelOSVer >= MacOSVer2Int("10.13") && kernelOSVer < MacOSVer2Int("10.14")) + { + verbose("\tFound High Sierra EXT pattern: patched!\n"); } - else + else if (kernelOSVer >= MacOSVer2Int("10.12") && kernelOSVer < MacOSVer2Int("10.13")) { + verbose("\tFound Sierra EXT pattern: patched!\n"); + } + else if (kernelOSVer >= MacOSVer2Int("10.11") && kernelOSVer < MacOSVer2Int("10.12")) + { verbose("\tFound EL Capitan EXT pattern: patched!\n"); } + else + { + verbose("\tFound Yosemite EXT pattern: patched!\n"); + } if (PatchApplied) { @@ -1602,7 +1534,7 @@ for (Index = 0; Index < 0x1000000; ++Index) { - if (Bytes[Index] == 0xC6 + if (Bytes[Index] == 0xC6 && Bytes[Index + 1] == 0xE8 && Bytes[Index + 2] == 0x30 && Bytes[Index + 3] == 0x00 @@ -1647,7 +1579,7 @@ && Bytes[Index + 9] == 0xDF) { Bytes[Index + 5] = 0x90; - Bytes[Index + 6] = 0x90; + Bytes[Index + 6] = 0x90; count++; verbose("\tFound Lion EXT pattern: patched!\n");