Index: branches/ErmaC/Trunk/i386/libsaio/gma.c =================================================================== --- branches/ErmaC/Trunk/i386/libsaio/gma.c (revision 2018) +++ branches/ErmaC/Trunk/i386/libsaio/gma.c (revision 2019) @@ -1,6 +1,8 @@ /* Original patch by Nawcom http://forum.voodooprojects.org/index.php/topic,1029.0.html + + Original Intel HDx000 code from valv */ #include "libsa.h" @@ -139,6 +141,10 @@ { 0x80860116, "Intel HD Graphics 3000 Mobile" }, { 0x80860122, "Intel HD Graphics 3000" }, { 0x80860126, "Intel HD Graphics 3000 Mobile" }, + { 0x80860152, "Intel HD Graphics 2500" }, + { 0x80860156, "Intel HD Graphics 2500 Mobile" }, + { 0x80860162, "Intel HD Graphics 4000" }, + { 0x80860166, "Intel HD Graphics 4000 Mobile" }, }; char *get_gma_model(uint32_t id) { @@ -292,6 +298,16 @@ devprop_add_value(device, "AAPL,tbl-info", HD3000_tbl_info, 18); devprop_add_value(device, "AAPL,os-info", HD3000_os_info, 20); } + else if (model == (char *)"Intel HD Graphics 4000") + { + devprop_add_value(device, "built-in", &BuiltIn, 1); + devprop_add_value(device, "class-code", ClassFix, 4); + device_id = 0x00000166; // Inject a valid mobile GPU device id instead of patching kexts + devprop_add_value(device, "device-id", (uint8_t*)&device_id, sizeof(device_id)); + devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-1", 10); + devprop_add_value(device, "AAPL,tbl-info", HD3000_tbl_info, 18); + devprop_add_value(device, "AAPL,os-info", HD3000_os_info, 20); + } stringdata = malloc(sizeof(uint8_t) * string->length); if (!stringdata) Index: branches/ErmaC/Trunk/i386/libsaio/pci.c =================================================================== --- branches/ErmaC/Trunk/i386/libsaio/pci.c (revision 2018) +++ branches/ErmaC/Trunk/i386/libsaio/pci.c (revision 2019) @@ -96,7 +96,6 @@ new->vendor_id = id & 0xffff; new->device_id = (id >> 16) & 0xffff; new->subsys_id.subsys_id = pci_config_read32(pci_addr, PCI_SUBSYSTEM_VENDOR_ID); - new->subclass = pci_config_read8(pci_addr, PCI_CLASS_PROG); new->class_id = pci_config_read16(pci_addr, PCI_CLASS_DEVICE); new->parent = start; @@ -203,7 +202,7 @@ { printf("%02x:%02x.%x [%04x%02x] [%04x:%04x] (subsys [%04x:%04x]):: %s\n", current->dev.bits.bus, current->dev.bits.dev, current->dev.bits.func, - current->class_id, current->subclass, current->vendor_id, current->device_id, + current->class_id, current->vendor_id, current->device_id, current->subsys_id.subsys.vendor_id, current->subsys_id.subsys.device_id, get_pci_dev_path(current)); dump_pci_dt(current->children); Index: branches/ErmaC/Trunk/i386/libsaio/pci.h =================================================================== --- branches/ErmaC/Trunk/i386/libsaio/pci.h (revision 2018) +++ branches/ErmaC/Trunk/i386/libsaio/pci.h (revision 2019) @@ -35,8 +35,7 @@ } subsys; uint32_t subsys_id; }subsys_id; - uint8_t revision; - uint8_t subclass; + uint16_t class_id; struct pci_dt_t *parent; Index: branches/ErmaC/Trunk/CHANGES =================================================================== --- branches/ErmaC/Trunk/CHANGES (revision 2018) +++ branches/ErmaC/Trunk/CHANGES (revision 2019) @@ -1,3 +1,4 @@ +- Merge Intel Graphics 4000 device IDs from Chimera (Commit 1999). - Merge more cparm's (security, stability, bugs fixes) improvements from his branch. http://forge.voodooprojects.org/p/chameleon/source/tree/HEAD/branches/cparm - Merge "Restart fix Removed" from trunk r1992 by Slice's patch