Index: tags/2.0/version =================================================================== --- tags/2.0/version (revision 1688) +++ tags/2.0/version (revision 1689) @@ -1 +1 @@ -1.6.0 +2.0 \ No newline at end of file Index: tags/2.0/i386/libsaio/gma.c =================================================================== --- tags/2.0/i386/libsaio/gma.c (revision 1688) +++ tags/2.0/i386/libsaio/gma.c (revision 1689) @@ -1,8 +1,6 @@ /* Original patch by Nawcom http://forum.voodooprojects.org/index.php/topic,1029.0.html - - Original Intel HDx000 code from valv */ #include "libsa.h" @@ -23,6 +21,7 @@ #define DBG(x...) #endif + uint8_t GMAX3100_vals[22][4] = { { 0x01,0x00,0x00,0x00 }, { 0x01,0x00,0x00,0x00 }, @@ -47,65 +46,6 @@ { 0x00,0x00,0x00,0x00 } }; -uint8_t HD2000_vals[16][4] = { - { 0x00,0x00,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x14,0x00,0x00,0x00 }, - { 0xfa,0x00,0x00,0x00 }, - { 0x2c,0x01,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x14,0x00,0x00,0x00 }, - { 0xf4,0x01,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x01,0x00,0x00,0x00 }, -}; - -uint8_t HD3000_vals[16][4] = { - { 0x00,0x00,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x14,0x00,0x00,0x00 }, - { 0xfa,0x00,0x00,0x00 }, - { 0x2c,0x01,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x14,0x00,0x00,0x00 }, - { 0xf4,0x01,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x00,0x00,0x00,0x00 }, - { 0x01,0x00,0x00,0x00 }, -}; - -uint8_t HD2000_tbl_info[18] = { - 0x30,0x44,0x02,0x02,0x02,0x02,0x00,0x00,0x00, - 0x00,0x01,0x02,0x02,0x02,0x00,0x01,0x02,0x02 -}; -uint8_t HD2000_os_info[20] = { - 0x30,0x49,0x01,0x11,0x11,0x11,0x08,0x00,0x00,0x01, - 0xf0,0x1f,0x01,0x00,0x00,0x00,0x10,0x07,0x00,0x00 -}; - -// The following values came from a Sandy Bridge MacBook Air -uint8_t HD3000_tbl_info[18] = { - 0x30,0x44,0x02,0x02,0x02,0x02,0x00,0x00,0x00, - 0x00,0x02,0x02,0x02,0x02,0x01,0x01,0x01,0x01 -}; - -// The following values came from a Sandy Bridge MacBook Air -uint8_t HD3000_os_info[20] = { - 0x30,0x49,0x01,0x12,0x12,0x12,0x08,0x00,0x00,0x01, - 0xf0,0x1f,0x01,0x00,0x00,0x00,0x10,0x07,0x00,0x00 -}; - uint8_t reg_TRUE[] = { 0x01, 0x00, 0x00, 0x00 }; uint8_t reg_FALSE[] = { 0x00, 0x00, 0x00, 0x00 }; @@ -127,12 +67,6 @@ { 0x80862A13, "GMAX3100" }, { 0x80862A42, "GMAX3100" }, { 0x80862A43, "GMAX3100" }, - { 0x80860102, "Intel HD Graphics 2000" }, - { 0x80860106, "Intel HD Graphics 2000 Mobile" }, - { 0x80860112, "Intel HD Graphics 3000" }, - { 0x80860116, "Intel HD Graphics 3000 Mobile" }, - { 0x80860122, "Intel HD Graphics 3000" }, - { 0x80860126, "Intel HD Graphics 3000 Mobile" }, }; char *get_gma_model(uint32_t id) { @@ -154,7 +88,6 @@ char *model; uint8_t BuiltIn = 0x00; uint8_t ClassFix[4] = { 0x00, 0x00, 0x03, 0x00 }; - unsigned int device_id; devicepath = get_pci_dev_path(gma_dev); @@ -162,7 +95,6 @@ regs = (uint8_t *) (bar[0] & ~0x0f); model = get_gma_model((gma_dev->vendor_id << 16) | gma_dev->device_id); - device_id = gma_dev->device_id; verbose("Intel %s [%04x:%04x] :: %s\n", model, gma_dev->vendor_id, gma_dev->device_id, devicepath); @@ -223,67 +155,6 @@ devprop_add_value(device, "AAPL01,Stretch", GMAX3100_vals[21], 4); devprop_add_value(device, "class-code", ClassFix, 4); } - else if (model == (char *)"Intel HD Graphics 2000 Mobile") - { - devprop_add_value(device, "class-code", ClassFix, 4); - devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-1", 10); - devprop_add_value(device, "AAPL00,PixelFormat", HD2000_vals[0], 4); - devprop_add_value(device, "AAPL00,T1", HD2000_vals[1], 4); - devprop_add_value(device, "AAPL00,T2", HD2000_vals[2], 4); - devprop_add_value(device, "AAPL00,T3", HD2000_vals[3], 4); - devprop_add_value(device, "AAPL00,T4", HD2000_vals[4], 4); - devprop_add_value(device, "AAPL00,T5", HD2000_vals[5], 4); - devprop_add_value(device, "AAPL00,T6", HD2000_vals[6], 4); - devprop_add_value(device, "AAPL00,T7", HD2000_vals[7], 4); - devprop_add_value(device, "AAPL00,LinkType", HD2000_vals[8], 4); - devprop_add_value(device, "AAPL00,LinkFormat", HD2000_vals[9], 4); - devprop_add_value(device, "AAPL00,DualLink", HD2000_vals[10], 4); - devprop_add_value(device, "AAPL00,Dither", HD2000_vals[11], 4); - devprop_add_value(device, "AAPL00,DataJustify", HD3000_vals[12], 4); - devprop_add_value(device, "graphic-options", HD2000_vals[13], 4); - devprop_add_value(device, "AAPL,tbl-info", HD2000_tbl_info, 18); - devprop_add_value(device, "AAPL,os-info", HD2000_os_info, 20); - } - else if (model == (char *)"Intel HD Graphics 3000 Mobile") - { - devprop_add_value(device, "class-code", ClassFix, 4); - devprop_add_value(device, "hda-gfx", (uint8_t *)"onboard-1", 10); - devprop_add_value(device, "AAPL00,PixelFormat", HD3000_vals[0], 4); - devprop_add_value(device, "AAPL00,T1", HD3000_vals[1], 4); - devprop_add_value(device, "AAPL00,T2", HD3000_vals[2], 4); - devprop_add_value(device, "AAPL00,T3", HD3000_vals[3], 4); - devprop_add_value(device, "AAPL00,T4", HD3000_vals[4], 4); - devprop_add_value(device, "AAPL00,T5", HD3000_vals[5], 4); - devprop_add_value(device, "AAPL00,T6", HD3000_vals[6], 4); - devprop_add_value(device, "AAPL00,T7", HD3000_vals[7], 4); - devprop_add_value(device, "AAPL00,LinkType", HD3000_vals[8], 4); - devprop_add_value(device, "AAPL00,LinkFormat", HD3000_vals[9], 4); - devprop_add_value(device, "AAPL00,DualLink", HD3000_vals[10], 4); - devprop_add_value(device, "AAPL00,Dither", HD3000_vals[11], 4); - devprop_add_value(device, "AAPL00,DataJustify", HD3000_vals[12], 4); - devprop_add_value(device, "graphic-options", HD3000_vals[13], 4); - 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 2000") - { - devprop_add_value(device, "built-in", &BuiltIn, 1); - devprop_add_value(device, "class-code", ClassFix, 4); - 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", HD2000_tbl_info, 18); - devprop_add_value(device, "AAPL,os-info", HD2000_os_info, 20); - } - else if (model == (char *)"Intel HD Graphics 3000") - { - devprop_add_value(device, "built-in", &BuiltIn, 1); - devprop_add_value(device, "class-code", ClassFix, 4); - device_id = 0x00000126; // 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: tags/2.0/i386/libsaio/nvidia.c =================================================================== --- tags/2.0/i386/libsaio/nvidia.c (revision 1688) +++ tags/2.0/i386/libsaio/nvidia.c (revision 1689) @@ -801,7 +801,6 @@ { 0x10DE1040, "GeForce GT 520" }, // 1050 - 105F { 0x10DE1050, "GeForce GT 520M" }, - { 0x10DE1056, "Quadro NVS 4200M" }, // 1060 - 106F // 1070 - 107F // 1080 - 108F @@ -809,7 +808,6 @@ { 0x10DE1081, "GeForce GTX 570" }, { 0x10DE1082, "GeForce GTX 560 Ti" }, { 0x10DE1083, "D13U" }, - { 0x10DE1086, "GeForce GTX 570" }, { 0x10DE1088, "GeForce GTX 590" }, // 1090 - 109F { 0x10DE1098, "D13U" }, Index: tags/2.0/i386/libsaio/ati.c =================================================================== --- tags/2.0/i386/libsaio/ati.c (revision 1688) +++ tags/2.0/i386/libsaio/ati.c (revision 1689) @@ -398,6 +398,8 @@ { 0x9589, 0x30001462, CHIP_FAMILY_RV630, "ATI Radeon HD 3610", kNull }, + { 0x9589, 0x30001642, CHIP_FAMILY_RV630, "ATI Radeon HD 3610", kNull }, + { 0x9589, 0x0E41174B, CHIP_FAMILY_RV630, "ATI Radeon HD 3600 Series", kNull }, { 0x9589, 0x30001787, CHIP_FAMILY_RV630, "ATI Radeon HD 3600 Series", kNull }, @@ -408,7 +410,7 @@ { 0x9598, 0xB3831002, CHIP_FAMILY_RV635, "ATI All-in-Wonder HD", kNull }, - { 0x9598, 0x30001043, CHIP_FAMILY_RV635, "ATI Radeon HD 3730", kNull }, + { 0x9598, 0x30001043, CHIP_FAMILY_RV635, "HD3730", kNull }, { 0x9598, 0x30011043, CHIP_FAMILY_RV635, "ATI Radeon HD 4570", kNull }, { 0x9598, 0x3000148C, CHIP_FAMILY_RV635, "ATI Radeon HD 3730", kNull }, @@ -478,8 +480,7 @@ { 0x689C, 0x30201682, CHIP_FAMILY_HEMLOCK, "ATI Radeon HD 5970", kUakari }, - { 0x68A1, 0x144D103C, CHIP_FAMILY_CYPRESS, "ATI Mobility Radeon HD 5850", kNomascus }, - { 0x68A1, 0x1522103C, CHIP_FAMILY_CYPRESS, "ATI Mobility Radeon HD 5850", kHoolock }, + { 0x68A1, 0x144D103C, CHIP_FAMILY_CYPRESS, "ATI Mobility Radeon HD 5800", kNomascus }, { 0x68A8, 0x050E1025, CHIP_FAMILY_CYPRESS, "AMD Radeon HD 6850M", kUakari }, @@ -489,24 +490,17 @@ { 0x68B8, 0x29911682, CHIP_FAMILY_JUNIPER, "ATI Radeon HD 5770", kVervet }, { 0x68B8, 0x1482174B, CHIP_FAMILY_JUNIPER, "ATI Radeon HD 5770", kVervet }, - { 0x68B8, 0xE144174B, CHIP_FAMILY_JUNIPER, "ATI Radeon HD 5770", kHoolock }, { 0x68B8, 0xE147174B, CHIP_FAMILY_JUNIPER, "ATI Radeon HD 5770", kVervet }, { 0x68B8, 0x21D71458, CHIP_FAMILY_JUNIPER, "ATI Radeon HD 5770", kVervet }, { 0x68B8, 0x200B1787, CHIP_FAMILY_JUNIPER, "ATI Radeon HD 5770", kVervet }, { 0x68B8, 0x22881787, CHIP_FAMILY_JUNIPER, "ATI Radeon HD 5770", kVervet }, - - { 0x68BF, 0x220E1458, CHIP_FAMILY_JUNIPER, "ATI Radeon HD 6750", kVervet }, - + { 0x68C0, 0x1594103C, CHIP_FAMILY_REDWOOD, "AMD Radeon HD 6570M", kNull }, - { 0x68C0, 0x392717AA, CHIP_FAMILY_REDWOOD, "ATI Mobility Radeon HD 5730", kNull }, - { 0x68C1, 0x033E1025, CHIP_FAMILY_REDWOOD, "ATI Mobility Radeon HD 5650", kNull }, - { 0x68C1, 0x9071104D, CHIP_FAMILY_REDWOOD, "ATI Mobility Radeon HD 5650", kEulemur }, - { 0x68C8, 0x2306103C, CHIP_FAMILY_REDWOOD, "ATI FirePro V4800 (FireGL)", kNull }, { 0x68D8, 0x03561043, CHIP_FAMILY_REDWOOD, "ATI Radeon HD 5670", kBaboon }, @@ -556,61 +550,23 @@ { 0x6718, 0x31301682, CHIP_FAMILY_CAYMAN, "AMD Radeon HD 6970", kNull }, - { 0x6738, 0x00D01002, CHIP_FAMILY_BARTS, "AMD Radeon HD 6870", kDuckweed }, - { 0x6738, 0x21FA1002, CHIP_FAMILY_BARTS, "AMD Radeon HD 6870", kDuckweed }, { 0x6738, 0x67381002, CHIP_FAMILY_BARTS, "AMD Radeon HD 6870", kDuckweed }, - - { 0x6738, 0x21FA1458, CHIP_FAMILY_BARTS, "AMD Radeon HD 6870", kDuckweed }, - { 0x6738, 0x31031682, CHIP_FAMILY_BARTS, "AMD Radeon HD 6870", kDuckweed }, - { 0x6738, 0x31041682, CHIP_FAMILY_BARTS, "AMD Radeon HD 6870", kDuckweed }, - - { 0x6738, 0xE178174B, CHIP_FAMILY_BARTS, "AMD Radeon HD 6870", kDuckweed }, - - { 0x6738, 0x20101787, CHIP_FAMILY_BARTS, "AMD Radeon HD 6870", kDuckweed }, - { 0x6738, 0x23051787, CHIP_FAMILY_BARTS, "AMD Radeon HD 6870", kDuckweed }, - { 0x6739, 0x67391002, CHIP_FAMILY_BARTS, "AMD Radeon HD 6850", kDuckweed }, { 0x6739, 0x21F81458, CHIP_FAMILY_BARTS, "AMD Radeon HD 6850", kDuckweed }, - - { 0x6739, 0x24411462, CHIP_FAMILY_BARTS, "AMD Radeon HD 6850", kDuckweed }, - - { 0x6739, 0x31101682, CHIP_FAMILY_BARTS, "AMD Radeon HD 6850", kDuckweed }, - { 0x6739, 0xE177174B, CHIP_FAMILY_BARTS, "AMD Radeon HD 6850", kDuckweed }, - { 0x6740, 0x1657103C, CHIP_FAMILY_TURKS, "AMD Radeon HD 6770M", kNull }, - { 0x6740, 0x165A103C, CHIP_FAMILY_TURKS, "AMD Radeon HD 6770M", kNull }, { 0x6741, 0x050E1025, CHIP_FAMILY_TURKS, "AMD Radeon HD 6650M", kNull }, { 0x6741, 0x05131025, CHIP_FAMILY_TURKS, "AMD Radeon HD 6650M", kNull }, { 0x6741, 0x1646103C, CHIP_FAMILY_TURKS, "AMD Radeon HD 6750M", kNull }, - { 0x6741, 0x9080104D, CHIP_FAMILY_TURKS, "AMD Radeon HD 6630M", kNull }, - - { 0x6758, 0x67581002, CHIP_FAMILY_TURKS, "AMD Radeon HD 6670", kBulrushes }, - - { 0x6758, 0x22051458, CHIP_FAMILY_TURKS, "AMD Radeon HD 6670", kBulrushes }, - - { 0x6758, 0xE194174B, CHIP_FAMILY_TURKS, "AMD Radeon HD 6670", kBulrushes }, - - { 0x6758, 0x31811682, CHIP_FAMILY_TURKS, "AMD Radeon HD 6670", kBulrushes }, - { 0x6758, 0x31831682, CHIP_FAMILY_TURKS, "AMD Radeon HD 6670", kBulrushes }, - - { 0x6758, 0xE1941746, CHIP_FAMILY_TURKS, "AMD Radeon HD 6670", kBulrushes }, - { 0x6759, 0xE193174B, CHIP_FAMILY_TURKS, "AMD Radeon HD 6570", kNull }, - { 0x6760, 0x04CC1028, CHIP_FAMILY_CAICOS, "AMD Radeon HD 6490M", kNull }, - - { 0x6760, 0x1CB21043, CHIP_FAMILY_CAICOS, "AMD Radeon HD 6470M", kNull }, - - { 0x6779, 0x64501092, CHIP_FAMILY_CAICOS, "AMD Radeon HD 6450", kBulrushes }, + { 0x6760, 0x1CB21043, CHIP_FAMILY_RV730, "AMD Radeon HD 6470M", kNull }, - { 0x6779, 0xE164174B, CHIP_FAMILY_CAICOS, "AMD Radeon HD 6450", kBulrushes }, - /* standard/default models */ { 0x9400, 0x00000000, CHIP_FAMILY_R600, "ATI Radeon HD 2900 XT", kNull }, { 0x9405, 0x00000000, CHIP_FAMILY_R600, "ATI Radeon HD 2900 GT", kNull }, @@ -694,23 +650,18 @@ { 0x6718, 0x00000000, CHIP_FAMILY_CAYMAN, "AMD Radeon HD 6970 Series", kNull }, { 0x6719, 0x00000000, CHIP_FAMILY_CAYMAN, "AMD Radeon HD 6950 Series", kNull }, - { 0x6720, 0x00000000, CHIP_FAMILY_BARTS, "AMD Radeon HD 6900M Series", kNull }, - { 0x6738, 0x00000000, CHIP_FAMILY_BARTS, "AMD Radeon HD 6870 Series", kDuckweed }, { 0x6739, 0x00000000, CHIP_FAMILY_BARTS, "AMD Radeon HD 6850 Series", kDuckweed }, { 0x673E, 0x00000000, CHIP_FAMILY_BARTS, "AMD Radeon HD 6790 Series", kNull }, { 0x6740, 0x00000000, CHIP_FAMILY_TURKS, "AMD Radeon HD 6700M Series", kNull }, { 0x6741, 0x00000000, CHIP_FAMILY_TURKS, "AMD Radeon HD 6600M/6700M Series", kNull }, - - { 0x6758, 0x00000000, CHIP_FAMILY_TURKS, "AMD Radeon HD 6670 Series", kBulrushes }, + + { 0x6758, 0x00000000, CHIP_FAMILY_TURKS, "AMD Radeon HD 6670 Series", kNull }, { 0x6759, 0x00000000, CHIP_FAMILY_TURKS, "AMD Radeon HD 6500 Series", kNull }, - - { 0x6760, 0x00000000, CHIP_FAMILY_CAICOS, "AMD Radeon HD 6400M Series", kNull }, - { 0x6761, 0x00000000, CHIP_FAMILY_CAICOS, "AMD Radeon HD 6430M Series", kNull }, { 0x6770, 0x00000000, CHIP_FAMILY_CAICOS, "AMD Radeon HD 6400 Series", kNull }, - { 0x6779, 0x00000000, CHIP_FAMILY_CAICOS, "AMD Radeon HD 6450 Series", kBulrushes }, + { 0x6779, 0x00000000, CHIP_FAMILY_CAICOS, "AMD Radeon HD 6450 Series", kNull }, { 0x0000, 0x00000000, CHIP_FAMILY_UNKNOW, NULL, kNull } }; @@ -1321,8 +1272,7 @@ if (!card->info->device_id || !card->info->cfg_name) { - verbose("Unsupported ATI card! Device ID: [%04x:%04x] Subsystem ID: [%08x] \n", - pci_dev->vendor_id, pci_dev->device_id, pci_dev->subsys_id); + printf("Unsupported card!\n"); return false; } @@ -1330,7 +1280,7 @@ card->mmio = (uint8_t *)(pci_config_read32(pci_dev->dev.addr, PCI_BASE_ADDRESS_2) & ~0x0f); card->io = (uint8_t *)(pci_config_read32(pci_dev->dev.addr, PCI_BASE_ADDRESS_4) & ~0x03); - verbose("ATI Framebuffer Addr: @0x%08X MMIO Addr: @0x%08X I/O Port Addr: @0x%08X ROM Addr: @0x%08X\n", + verbose("Framebuffer @0x%08X MMIO @0x%08X I/O Port @0x%08X ROM Addr @0x%08X\n", card->fb, card->mmio, card->io, pci_config_read32(pci_dev->dev.addr, PCI_ROM_ADDRESS)); card->posted = radeon_card_posted(); @@ -1344,7 +1294,7 @@ { if (!load_vbios_file(kUseAtiROM, pci_dev->vendor_id, pci_dev->device_id, pci_dev->subsys_id.subsys_id)) { - verbose("reading Video BIOS from %s", card->posted ? "legacy space" : "PCI ROM"); + verbose("reading VBIOS from %s", card->posted ? "legacy space" : "PCI ROM"); if (card->posted) read_vbios(false); else @@ -1370,27 +1320,25 @@ { // use the device fb key on radeon_cards, to retrive the default name from card_configs. card->cfg_name = card_configs[card->info->cfg_name].name; - // Uncommented the following line and added verbose for debugging AtiPorts issues on some cards - card->ports = card_configs[card->info->cfg_name].ports; - // Report number of ports card reports - verbose("Card reported ports: %d\n", card->ports); + // and leave ports alone! +// card->ports = card_configs[card->info->cfg_name].ports; // which means one of the fb's or kNull - verbose("Framebuffer set to: %s using device's default.\n", card->cfg_name); + verbose("Framebuffer set to device's default: %s\n", card->cfg_name); } else { // else, use the fb name returned by AtiConfig. - verbose("Framebuffer set to: %s using AtiConfig=%s\n", card->cfg_name, card->cfg_name); + verbose("(AtiConfig) Framebuffer set to: %s\n", card->cfg_name); } - + // Check AtiPorts key for nr of ports, card->ports = getIntForKey(kAtiPorts, &n_ports, &bootInfo->chameleonConfig); // if a value bigger than 0 ?? is found, (do we need >= 0 ?? that's null FB on card_configs) if (n_ports > 0) { card->ports = n_ports; // use it. - verbose("Number of ports set to: %d using AtiPorts=%d\n", card->ports, card->ports); + verbose("(AtiPorts) Nr of ports set to: %d\n", card->ports); } else// if (card->cfg_name > 0) // do we want 0 ports if fb is kNull or mistyped ? { @@ -1399,7 +1347,7 @@ if (strcmp(card->cfg_name, card_configs[i].name) == 0) card->ports = card_configs[i].ports; // default - verbose("Number of ports set to: %d using framebuffer's default.\n", card->ports); + verbose("Nr of ports set to framebuffer's default: %d\n", card->ports); } // else // card->ports = 2/1 ?; // set a min if 0 ports ? @@ -1455,11 +1403,11 @@ stringlength = string->length; // ------------------------------------------------- - verbose("%s %dMB [%04x:%04x] (subsys [%04x:%04x]) (%s:%s) :: %s\n", - card->info->model_name, (uint32_t)(card->vram_size / (1024 * 1024)), + verbose("ATI %s %s %dMB (%s) [%04x:%04x] (subsys [%04x:%04x]):: %s\n", + chip_family_name[card->info->chip_family], card->info->model_name, + (uint32_t)(card->vram_size / (1024 * 1024)), card->cfg_name, ati_dev->vendor_id, ati_dev->device_id, ati_dev->subsys_id.subsys.vendor_id, ati_dev->subsys_id.subsys.device_id, - chip_family_name[card->info->chip_family], card->cfg_name, devicepath); free(card); Index: tags/2.0/i386/libsaio/fake_efi.c =================================================================== --- tags/2.0/i386/libsaio/fake_efi.c (revision 1688) +++ tags/2.0/i386/libsaio/fake_efi.c (revision 1689) @@ -73,7 +73,7 @@ */ /* Identify ourselves as the EFI firmware vendor */ -static EFI_CHAR16 const FIRMWARE_VENDOR[] = {'C','h','i','m','e','r','a','_','1','.','5', 0}; +static EFI_CHAR16 const FIRMWARE_VENDOR[] = {'C','h','a','m','e','l','e','o','n','_','2','.','0', 0}; static EFI_UINT32 const FIRMWARE_REVISION = 132; /* FIXME: Find a constant for this. */ /* Default platform system_id (fix by IntVar) */ @@ -525,7 +525,6 @@ EFI_CHAR16* ret16 = 0; size_t len = 0; Node *node; - node = DT__FindNode("/", false); @@ -621,21 +620,6 @@ } /* - * Populate the chosen node - */ -void setupChosenNode() -{ - Node *chosenNode; - chosenNode = DT__FindNode("/chosen", false); - if (chosenNode == 0) - stop("Couldn't get chosen node"); - - int bootUUIDLength = strlen(gBootUUIDString); - if (bootUUIDLength) - DT__AddProperty(chosenNode, "boot-uuid", bootUUIDLength + 1, gBootUUIDString); -} - -/* * Load the smbios.plist override config file if any */ static void setupSmbiosConfigFile(const char *filename) @@ -699,9 +683,6 @@ gST64->Hdr.CRC32 = 0; gST64->Hdr.CRC32 = crc32(0L, gST64, gST64->Hdr.HeaderSize); } - - // Setup the chosen node - setupChosenNode(); } void saveOriginalSMBIOS(void) Index: tags/2.0/i386/boot2/prompt.c =================================================================== --- tags/2.0/i386/boot2/prompt.c (revision 1688) +++ tags/2.0/i386/boot2/prompt.c (revision 1689) @@ -28,7 +28,7 @@ #include -char bootBanner[] = "\nDarwin/x86 boot v" I386BOOT_VERSION " - Chimera v" I386BOOT_CHAMELEONVERSION " r" I386BOOT_CHAMELEONREVISION "\n" +char bootBanner[] = "\nDarwin/x86 boot v" I386BOOT_VERSION " - Chameleon v" I386BOOT_CHAMELEONVERSION " r" I386BOOT_CHAMELEONREVISION "\n" "Build date: " I386BOOT_BUILDDATE "\n" "%dMB memory\n"; Index: tags/2.0/i386/boot2/boot.c =================================================================== --- tags/2.0/i386/boot2/boot.c (revision 1688) +++ tags/2.0/i386/boot2/boot.c (revision 1689) @@ -72,7 +72,7 @@ static char gCacheNameAdler[64 + 256]; char *gPlatformName = gCacheNameAdler; -char gRootDevice[ROOT_DEVICE_SIZE]; +char gRootDevice[512]; char gMKextName[512]; char gMacOSVersion[8]; static char gBootKernelCacheFile[512]; Index: tags/2.0/i386/boot2/boot.h =================================================================== --- tags/2.0/i386/boot2/boot.h (revision 1688) +++ tags/2.0/i386/boot2/boot.h (revision 1689) @@ -147,7 +147,6 @@ * A global set by boot() to record the device that the booter * was loaded from. */ -#define ROOT_DEVICE_SIZE 512 extern int gBIOSDev; extern long gBootMode; extern bool sysConfigValid; @@ -225,11 +224,9 @@ /* * options.c */ -extern char gBootUUIDString[]; - -extern int getBootOptions(bool firstRun); -extern int processBootOptions(); -extern int selectAlternateBootDevice(int bootdevice); +extern int getBootOptions(bool firstRun); +extern int processBootOptions(); +extern int selectAlternateBootDevice(int bootdevice); extern bool promptForRescanOption(void); void showHelp(); Index: tags/2.0/i386/boot2/options.c =================================================================== --- tags/2.0/i386/boot2/options.c (revision 1688) +++ tags/2.0/i386/boot2/options.c (revision 1689) @@ -1062,7 +1062,6 @@ //========================================================================== -char gBootUUIDString[32+4+1] = ""; // UUID of the boot volume e.g. 5EB1869F-C4FA-3502-BDEB-3B8ED5D87292 extern unsigned char chainbootdev; extern unsigned char chainbootflag; @@ -1071,9 +1070,6 @@ int argLen = argName ? strlen(argName) : 0; int len = argLen + cnt + 1; // +1 to account for space - if (argName) - len++; // +1 to account for '=' - if (len > *cntRemainingP) { error("Warning: boot arguments too long, truncating\n"); return false; @@ -1084,8 +1080,8 @@ *argP += argLen; *argP[0] = '='; (*argP)++; + len++; // +1 to account for '=' } - strncpy( *argP, val, cnt ); *argP += cnt; *argP[0] = ' '; @@ -1103,10 +1099,9 @@ const char *userString, // Typed-in boot arguments const char *kernelFlags, // Kernel flags from config table const char *configTable, - char **argP, // Output value - int *cntRemainingP, // Output count - char *foundVal, // found value - int foundValSize // max found value size + char **argP, // Output value + int *cntRemainingP, // Output count + char *foundVal // found value ) { const char *val; @@ -1123,9 +1118,10 @@ copyArgument(argName, val, cnt, argP, cntRemainingP); found = true; } - if (found && foundVal) - strlcpy(foundVal, val, foundValSize); - return found; + if (found && foundVal) { + strlcpy(foundVal, val, cnt+1); + } + return found; } // Maximum config table value size @@ -1134,15 +1130,17 @@ int processBootOptions() { - const char *cp = gBootArgs; - const char *val = 0; - const char *kernel; - int cnt; - int userCnt; - int cntRemaining; - char *argP; - char *configKernelFlags; - char *valueBuffer; + const char * cp = gBootArgs; + const char * val = 0; + const char * kernel; + int cnt; + int userCnt; + int cntRemaining; + char * argP; + char uuidStr[64]; + bool uuidSet = false; + char * configKernelFlags; + char * valueBuffer; valueBuffer = malloc(VALUE_SIZE); @@ -1198,12 +1196,16 @@ gOverrideKernel = false; if (( kernel = extractKernelName((char **)&cp) )) { - strlcpy( bootInfo->bootFile, kernel, sizeof(bootInfo->bootFile) ); + strcpy( bootInfo->bootFile, kernel ); + gOverrideKernel = true; } else { if ( getValueForKey( kKernelNameKey, &val, &cnt, &bootInfo->bootConfig ) ) { strlcpy( bootInfo->bootFile, val, cnt+1 ); + if (strcmp( bootInfo->bootFile, kDefaultKernel ) != 0) { + gOverrideKernel = true; + } } else { - strlcpy( bootInfo->bootFile, kDefaultKernel, sizeof(bootInfo->bootFile) ); + strcpy( bootInfo->bootFile, kDefaultKernel ); } } @@ -1219,34 +1221,35 @@ configKernelFlags = malloc(cnt + 1); strlcpy(configKernelFlags, val, cnt + 1); - // boot-uuid can be set either on the command-line or in the config file - if (!processBootArgument(kBootUUIDKey, cp, configKernelFlags, bootInfo->config, - &argP, &cntRemaining, gBootUUIDString, sizeof(gBootUUIDString))) { + if (processBootArgument(kBootUUIDKey, cp, configKernelFlags, bootInfo->config, &argP, &cntRemaining, 0)) { + // boot-uuid was set either on the command-line + // or in the config file. + uuidSet = true; + } else { + // // Try an alternate method for getting the root UUID on boot helper partitions. // if (gBootVolume->flags & kBVFlagBooter) { - // Load the configuration store in the boot helper partition - if (loadHelperConfig(&bootInfo->helperConfig) == 0) + if((loadHelperConfig(&bootInfo->helperConfig) == 0) + && getValueForKey(kHelperRootUUIDKey, &val, &cnt, &bootInfo->helperConfig) ) { - val = getStringForKey(kHelperRootUUIDKey, &bootInfo->helperConfig); - if (val != NULL) - strlcpy(gBootUUIDString, val, sizeof(gBootUUIDString)); + getValueForKey(kHelperRootUUIDKey, &val, &cnt, &bootInfo->helperConfig); + copyArgument(kBootUUIDKey, val, cnt, &argP, &cntRemaining); + uuidSet = true; } } - // Try to get the volume uuid string - if (!strlen(gBootUUIDString) && gBootVolume->fs_getuuid) - gBootVolume->fs_getuuid(gBootVolume, gBootUUIDString); - - // If we have the volume uuid add it to the commandline arguments - if (strlen(gBootUUIDString)) - copyArgument(kBootUUIDKey, gBootUUIDString, strlen(gBootUUIDString), &argP, &cntRemaining); + if (!uuidSet && gBootVolume->fs_getuuid && gBootVolume->fs_getuuid (gBootVolume, uuidStr) == 0) { + verbose("Setting boot-uuid to: %s\n", uuidStr); + copyArgument(kBootUUIDKey, uuidStr, strlen(uuidStr), &argP, &cntRemaining); + uuidSet = true; + } + } - if (!processBootArgument(kRootDeviceKey, cp, configKernelFlags, bootInfo->config, - &argP, &cntRemaining, gRootDevice, ROOT_DEVICE_SIZE)) { + if (!processBootArgument(kRootDeviceKey, cp, configKernelFlags, bootInfo->config, &argP, &cntRemaining, gRootDevice)) { cnt = 0; if ( getValueForKey( kBootDeviceKey, &val, &cnt, &bootInfo->chameleonConfig)) { valueBuffer[0] = '*'; @@ -1254,7 +1257,7 @@ strlcpy(valueBuffer + 1, val, cnt); val = valueBuffer; } else { - if (strlen(gBootUUIDString)) { + if (uuidSet) { val = "*uuid"; cnt = 5; } else { @@ -1273,11 +1276,10 @@ /* * Removed. We don't need this anymore. * - if (!processBootArgument(kPlatformKey, cp, configKernelFlags, bootInfo->config, - &argP, &cntRemaining, gPlatformName, sizeof(gCacheNameAdler))) { - getPlatformName(gPlatformName); - copyArgument(kPlatformKey, gPlatformName, strlen(gPlatformName), &argP, &cntRemaining); - } + if (!processBootArgument(kPlatformKey, cp, configKernelFlags, bootInfo->config, &argP, &cntRemaining, gPlatformName)) { + getPlatformName(gPlatformName); + copyArgument(kPlatformKey, gPlatformName, strlen(gPlatformName), &argP, &cntRemaining); + } */ if (!getValueForBootKey(cp, kSafeModeFlag, &val, &cnt) && @@ -1321,9 +1323,9 @@ } if ( getValueForKey( kMKextCacheKey, &val, &cnt, &bootInfo->bootConfig ) ) + { strlcpy(gMKextName, val, cnt + 1); - else - gMKextName[0]=0; + } free(configKernelFlags); free(valueBuffer); @@ -1335,24 +1337,18 @@ //========================================================================== // Load the help file and display the file contents on the screen. -static void showTextBuffer(char *buf_orig, int size) +static void showTextBuffer(char *buf, int size) { char *bp; - char * buf; - int line; - int line_offset; - int c; + int line; + int line_offset; + int c; if (bootArgs->Video.v_display != VGA_TEXT_MODE) { - showInfoBox( "Press q to continue, space for next page.\n",buf_orig ); + showInfoBox( "Press q to quit\n",buf ); return; } - // Create a copy so that we don't mangle the original - buf = malloc(size + 1); - memcpy(buf, buf_orig, size); - - bp = buf; while (size-- > 0) { if (*bp == '\n') { Index: tags/2.0/package/Scripts/Standard/postinstall =================================================================== --- tags/2.0/package/Scripts/Standard/postinstall (revision 1688) +++ tags/2.0/package/Scripts/Standard/postinstall (revision 1689) @@ -50,7 +50,6 @@ echo "bootdisk: Disk device is ${bootdisk}" echo "bootrdisk: Disk raw device is ${bootrdisk}" echo "diskloader: Disk loader is ${diskloader}" -echo "diskloaderdualboot: Disk loader is ${diskloaderdualboot}" echo "partitionloaderhfs: Partition loader is ${partitionloaderhfs}" echo "partitionloaderfat: Partition loader is ${partitionloaderfat}" echo "filesystemloader: Filesystem loader is ${filesystemloader}" @@ -292,14 +291,14 @@ #--------------------------------------------------------------------- if [ ${disksignature} == "00000000" ]; then - echo "Executing command: ${bootvolume}/usr/sbin/fdisk440 -u -f ${bootvolume}/usr/standalone/i386/${diskloader} -y ${bootdisk}" - "${bootvolume}/usr/sbin/fdisk440" -u -f "${bootvolume}/usr/standalone/i386/${diskloader}" -y ${bootdisk} + echo "Executing command: fdisk440 -u -f /usr/standalone/i386/${diskloader} -y ${bootdisk}" + fdisk440 -u -f "${bootvolume}/usr/standalone/i386/${diskloader}" -y ${bootdisk} else #--------------------------------------------------------------------- - # If it exists then Windows is also installed on the HDD and we need to write $diskloaderdualboot + # If it exists then Windows is also installed on the HDD and we need to write boot0hfs #--------------------------------------------------------------------- - echo "Executing command: ${bootvolume}/usr/sbin/fdisk440 -u -f {bootvolume}/usr/standalone/i386/${diskloaderdualboot} -y ${bootdisk}" - "${bootvolume}/usr/sbin/fdisk440" -u -f "${bootvolume}/usr/standalone/i386/${diskloaderdualboot}" -y ${bootdisk} + echo "Executing command: fdisk440 -u -f /usr/standalone/i386/${diskloaderdualboot} -y ${bootdisk}" + fdisk440 -u -f "${bootvolume}/usr/standalone/i386/${diskloaderdualboot}" -y ${bootdisk} fi else echo "Diskupdate is false, so no stage 0 file was written" @@ -318,8 +317,8 @@ echo "Executing command: cp /usr/standalone/i386/${filesystemloader} ${bootvolume}" cp "${bootvolume}/usr/standalone/i386/${filesystemloader}" "${bootvolume}" -echo "Executing command: "${bootvolume}/usr/bin/chflags" hidden ${bootvolume}/${filesystemloader}" -"${bootvolume}/usr/bin/chflags" hidden "${bootvolume}/${filesystemloader}" +echo "Executing command: ${bootresources}/Tools/SetFile -a V ${bootvolume}/${filesystemloader}" +"${bootresources}/Tools/SetFile" -a V "${bootvolume}/${filesystemloader}" echo "-----------------------------------------------" echo "" @@ -333,7 +332,7 @@ if [ ${disksignature} == "00000000" ]; then # echo "Windows is not installed so let's change the active partition" - partitionactive=$( "${bootvolume}/usr/sbin/fdisk440" -d ${bootrdisk} | grep -n "*" | awk -F: '{print $1}') + partitionactive=$( fdisk440 -d ${bootrdisk} | grep -n "*" | awk -F: '{print $1}') echo "Current Active Partition: ${partitionactive}" if [ "${partitionactive}" = "${bootslice}" ]; then @@ -343,7 +342,7 @@ # BadAxe requires EFI partition to be flagged active. # but it doesn't' hurt to do it for any non-windows partition. - "${bootvolume}/usr/sbin/fdisk440" -e ${bootrdisk} <<-MAKEACTIVE + fdisk440 -e ${bootrdisk} <<-MAKEACTIVE print flag ${bootslice} write @@ -358,4 +357,8 @@ echo "" echo "" +# hide boot file +chflags hidden "${3}/boot" +echo "boot file hidden ${3}/boot" + exit Index: tags/2.0/Makefile =================================================================== --- tags/2.0/Makefile (revision 1688) +++ tags/2.0/Makefile (revision 1689) @@ -142,9 +142,9 @@ @echo "#define I386BOOT_VERSION \"5.0.132\"" > $@ @echo "#define I386BOOT_BUILDDATE \"`date \"+%Y-%m-%d %H:%M:%S\"`\"" >> $@ @echo "#define I386BOOT_CHAMELEONVERSION \"`cat version`\"" >> $@ -## @echo "#define I386BOOT_CHAMELEONREVISION \"`svnversion -n | tr -d [:alpha:]`\"" >> $@ - @echo "#define I386BOOT_CHAMELEONREVISION \"1394\"" >> $@ + @echo "#define I386BOOT_CHAMELEONREVISION \"`svnversion -n | tr -d [:alpha:]`\"" >> $@ + .PHONY: $(SYMROOT)/i386/vers.h .PHONY: config .PHONY: clean