Index: branches/andyvand/doc/BootHelp.txt =================================================================== --- branches/andyvand/doc/BootHelp.txt (revision 139) +++ branches/andyvand/doc/BootHelp.txt (revision 140) @@ -24,9 +24,9 @@ Example: mach_kernel rd=disk0s1 -v "Graphics Mode"="1920x1200x32" -If the computer won't start up properly, you may be able to start it up -using safe mode. Type -x to start up in safe mode, which ignores all -cached driver files. +If the computer won't start up properly, you may be able to start it up using +safe mode. Type -x to start up in safe mode, which ignores all cached +driver files. Special booter hotkeys: F5 Rescans optical drive. @@ -41,97 +41,98 @@ config= Use an alternate Boot.plist file. Options useful in the com.apple.Boot.plist file: - Wait=Yes|No Prompt for a key press before starting the kernel. - "Quiet Boot"=Yes|No Use quiet boot mode (no messages or prompt). - Timeout=8 Number of seconds to pause at the boot: prompt. - "Instant Menu"=Yes Force displaying the partition selection menu. + Wait=Yes|No Prompt for a key press before starting the kernel. + "Quiet Boot"=Yes|No Use quiet boot mode (no messages or prompt). + Timeout=8 Number of seconds to pause at the boot: prompt. + "Instant Menu"=Yes Force displaying the partition selection menu. - "Default Partition" Sets the default boot partition, - =hd(x,y) where 'x' & 'y' are the disk and partition numbers. - "Hide Partition" Remove unwanted partition(s) from the boot menu. - =hd(x,y) [hd(m,n)] only non mac osx boot partitions can be hidden. + "Default Partition" Sets the default boot partition, + =hd(x,y) where 'x' is the disk number, 'y' the partition number. + "Hide Partition" Remove unwanted partition(s) from the boot menu. + =hd(x,y) [hd(m,n)] - "Rename Partition" Rename partition(s) for the boot menu. - =hd(x,y) [;hd(m,n) ...] + arch= Force ABI to 32/64 bit and load 32/64 bit kernel. + -x32 Enable forcing 32 bit ABI only and load 32 bit kernel. + -x64 Enable forcing 64 bit ABI and load 64 bit kernel. - GUI=No Disable the GUI (enabled by default). - "Boot Banner"=Yes|No Show boot banner in GUI mode (enabled by default). - "Legacy Logo"=Yes|No Use the legacy grey apple logo (disabled by default). + LoadTestDrivers=Yes|No Enable loading of test drivers from /Test/Extensions(.mkext) + + GUI=No Disable the GUI (enabled by default). + "Boot Banner"=Yes|No Show boot banner in GUI mode (enabled by default). + "Legacy Logo"=Yes|No Use the legacy grey apple logo (disabled by default). - PciRoot= Use an alternate value for PciRoot (default value 0). + PciRoot= Use an alternate value for PciRoot. (default value: 0). - GraphicsEnabler=Yes|No Automatic device-properties generation for gfx cards. - UseAtiROM=Yes|No Use an alternate Ati ROM image - (path: /Extra/_.rom) - UseNvidiaROM=Yes|No Use an alternate Nvidia ROM image - (path: /Extra/_.rom) - VBIOS=Yes|No Inject VBIOS to device-properties. + GraphicsEnabler=Yes|No Automatic device-properties generation for graphics cards. + VideoROM= Use an alternate ROM image (default path: /NVIDIA.ROM). + VBIOS=Yes|No Inject VBIOS to device-properties. - EthernetBuiltIn=Yes|No Automatic "built-in"=yes device-properties generation - for ethernet interfaces. + EthernetBuiltIn=Yes|No Automatic "built-in"=yes device-properties generation + for ethernet interfaces. + UpdateACPIVersion=Yes Enable ACPI V1 to ACPI V4 upgrade (disabled by default). + FixRestart=Yes Enable the restart fix (disabled by default). + ForceHPET=Yes Force HPET on (disabled by default). - USBBusFix=Yes Enable the EHCI and UHCI fixes (disabled by default). - USBLegacyOff=Yes Enable the force USB legacy off fix (disabled by default). - EHCIacquire=Yes Enable the EHCI fix (disabled by default). - UHCIreset=Yes Enable the UHCI fix (disabled by default). - ForceHPET=Yes|No Force Enable HPET. + USBBusFix=Yes Enable the EHCI and UHCI fixes (disabled by default). + EHCIacquire=Yes Enable the EHCI fix (disabled by default). + UHCIreset=Yes Enable the UHCI fix (disabled by default). + USBLegacyOff=Yes Force USB Legacy off (disabled by default). - Wake=No Disable wake up after hibernation (default: enabled). - ForceWake=Yes Force using the sleepimage (disabled by default). - WakeImage= Use an alternate sleepimage file. - (default path is /private/var/vm/sleepimage). + Wake=No Disable wake up after hibernation (enbaled by default). + ForceWake=Yes Force using the sleepimage (disabled by default). + WakeImage= Use an alternate sleepimage file + (default path is /private/var/vm/sleepimage). - UpdateACPI=Yes Upgrade automatically ACPI V1 tables to ACPI V4 tables. - DropSSDT=Yes Skip the SSDT tables while relocating the ACPI tables. - DropHPET=Yes Skip the HPET table while relocating the ACPI tables. - DropSLIC=Yes Skip the SLIC table while relocating the ACPI tables. - DropSBST=Yes Skip the SBST table while relocating the ACPI tables. - DropECDT=Yes Skip the ECDT table while relocating the ACPI tables. - DropASFT=Yes Skip the ASF! table while relocating the ACPI tables. - DropDMAR=Yes Skip the DMAR table while relocating the ACPI tables. - oemDSDT=Yes Use the standard DSDT and ACPI tables. - oemSSDT=Yes Use the standard SSDT tables. - oemHPET=Yes Use the standard HPET table. - oemSBST=Yes Use the standard SBST table. - oemECDT=Yes Use the standard ECDT table. - oemASFT=Yes Use the standard ASF! table. - oemDMAR=Yes Use the standard DMAR table. - oemAPIC=Yes Use the standard APIC table. - oemMCFG=Yes Use the standard MCFG table. - DSDT= Use an alternate DSDT.aml file - (default path: /DSDT.aml /Extra/DSDT.aml). - SSDT= Use alternative DSDT-X.aml file prefix - (default prefix: /SSDT /Extra/SSDT). - HPET= Use an alternate HPET.aml file - (default path: /HPET.aml /Extra/HPET.aml). - SBST= Use an alternate SBST.aml file - (default path: /SBST.aml /Extra/SBST.aml). - ECDT= Use an alternate ECDT.aml file - (default path: /ECDT.aml /Extra/ECDT.aml). - ASFT= Use an alternate ASFT.aml file - (default path: /ASFT.aml /Extra/ASFT.aml). - DMAR= Use an alternate DMAR.aml file - (default path: /DMAR.aml /Extra/DMAR.aml). - APIC= Use an alternate APIC.aml file - (default path: /APIC.aml /Extra/APIC.aml). - MCFG= Use an alternate MCFG.aml file - (default path: /MCFG.aml /Extra/MCFG.aml). - FADT= Use an alternate FADT.aml file - (default path: /FADT.aml /Extra/FADT.aml). + PMProfile=<0-7> Set preferred power management profile. - SMBIOS= Use an alternate smbios.plist file - (default path: /smbios.plist /Extra/smbios.plist - bt(0,0)/Extra/smbios.plist). + oemDSDT=Yes Use standard DSDT and don't patch ACPI. + oemHPET=Yes Use standard HPET table. + oemSSDT=Yes Use standard SSDT tables. + oemHPET=Yes Use standard HPET table. + oemSBST=Yes Use standard SBST table. + oemECDT=Yes Use standard ECDT table. + oemASFT=Yes Use standard ASF! table. + oemDMAR=Yes Use standard DMAR table. + oemFADT=Yes Use standard FADT table. + oemAPIC=Yes Use standard APIC table. + oemMCFG=Yes Use standard MCFG table. + DropSSDT=Yes Skip the SSDT tables while relocating the ACPI tables. + DropHPET=Yes Skip the HPET table while relocating the ACPI tables. + DropSLIC=Yes Skip the SLIC table while relocating the ACPI tables. + DropSBST=Yes Skip the SBST table while relocating the ACPI tables. + DropECDT=Yes Skip the ECDT table while relocating the ACPI tables. + DropASFT=Yes Skip the ASF! table while relocating the ACPI tables. + DropDMAR=Yes Skip the DMAR table while relocating the ACPI tables. + DSDT= Use an alternate DSDT.aml file + (default path: /DSDT.aml /Extra/DSDT.aml) + HPET= Use an alternate HPET.aml file + (default path: /HPET.aml /Extra/HPET.aml) + SBST= Use an alternate SBST.aml file + (default path: /DSDT.aml /Extra/SBST.aml) + ECDT= Use an alternate ECDT.aml file + (default path: /ECDT.aml /Extra/ECDT.aml) + DSDT= Use an alternate DSDT.aml file + (default path: /DSDT.aml /Extra/DSDT.aml) + ASFT= Use an alternate ASFT.aml file + (default path: /ASFT.aml /Extra/ASFT.aml) + DMAR= Use an alternate DMAR.aml file + (default path: /DMAR.aml /Extra/DMAR.aml) + FADT= Use an alternate FADT.aml file + (default path: /FADT.aml /Extra/FADT.aml) + APIC= Use an alternate APIC.aml file + (default path: /APIC.aml /Extra/APIC.aml) + MCFG= Use an alternate MCFG.aml file + (default path: /MCFG.aml /Extra/MCFG.aml) - SMBIOSdefaults=No Don't use the Default values for SMBIOS overriding - if smbios.plist doesn't exist, factory - values are kept. + SMBIOS= Use an alternate smbios.plist file + (default path: /smbios.plist /Extra/smbios.plist + bt(0,0)/Extra/smbios.plist). - "Scan Single Drive" Scan the drive only where the booter got loaded from. - =Yes|No Fix rescan pbs when using a DVD reader in AHCI mode. - Rescan=Yes Enable CD-ROM rescan mode. - "Rescan Prompt"=Yes Prompts for enable CD-ROM rescan mode. - SystemId= Set manually the system id UUID, - SMUUID in smbios config (reserved field) isn't used. - SystemType= Set the system type where n is between 0..6 - (default =1 (Desktop) + SMBIOSdefaults=No Don't use the Default values for SMBIOS overriding + if smbios.plist doesn't exist, factory + values are kept. + + "Scan Single Drive" Scan the drive only where the booter got loaded from. + =Yes|No Fix rescan issues when using a DVD reader in AHCI mode. + Rescan=Yes Enable CD-ROM rescan mode. + "Rescan Prompt"=Yes Prompts for enable CD-ROM rescan mode. Index: branches/andyvand/i386/libsaio/gma.c =================================================================== --- branches/andyvand/i386/libsaio/gma.c (revision 139) +++ branches/andyvand/i386/libsaio/gma.c (revision 140) @@ -55,6 +55,8 @@ { 0x80862A03, "GMAX3100" }, { 0x80862A12, "GMAX3100" }, { 0x80862A13, "GMAX3100" }, + { 0x80862A42, "GMAX3100" }, + { 0x80862A43, "GMAX3100" }, }; char *get_gma_model(uint32_t id) { @@ -109,6 +111,7 @@ } else if (model == (char *)"Desktop GMA950") { BuiltIn = 0x01; devprop_add_value(device, "built-in", &BuiltIn, 1); + devprop_add_value(device, "class-code", ClassFix, 4); } else if (model == (char *)"GMAX3100") { devprop_add_value(device, "AAPL,HasPanel",GMAX3100_vals[0], 4); devprop_add_value(device, "AAPL,SelfRefreshSupported",GMAX3100_vals[1], 4); @@ -132,8 +135,9 @@ devprop_add_value(device, "AAPL01,PixelFormat",GMAX3100_vals[19], 4); devprop_add_value(device, "AAPL01,Refresh",GMAX3100_vals[20], 4); devprop_add_value(device, "AAPL01,Stretch",GMAX3100_vals[21], 4); + devprop_add_value(device, "class-code", ClassFix, 4); } - + stringdata = malloc(sizeof(uint8_t) * string->length); if(!stringdata) { Index: branches/andyvand/i386/libsaio/pci_root.c =================================================================== --- branches/andyvand/i386/libsaio/pci_root.c (revision 139) +++ branches/andyvand/i386/libsaio/pci_root.c (revision 140) @@ -6,9 +6,9 @@ #include "boot.h" #include "bootstruct.h" -#ifndef DEBUG_PCIROOT -#define DEBUG_PCIROOT 1 -#endif +// #ifndef DEBUG_PCIROOT +// #define DEBUG_PCIROOT 1 +// #endif #if DEBUG_PCIROOT #define DBG(x...) printf(x) Index: branches/andyvand/i386/libsaio/915resolution.c =================================================================== --- branches/andyvand/i386/libsaio/915resolution.c (revision 139) +++ branches/andyvand/i386/libsaio/915resolution.c (revision 140) @@ -98,8 +98,11 @@ case 0x2a008086: type = CT_965GM; break; + + case 0x2a408086: + type = CT_965GM; + break; - default: type = CT_UNKWN; break; Index: branches/andyvand/i386/libsaio/pci.c =================================================================== --- branches/andyvand/i386/libsaio/pci.c (revision 139) +++ branches/andyvand/i386/libsaio/pci.c (revision 140) @@ -9,9 +9,9 @@ #include "pci.h" #include "pci_root.h" -#ifndef DEBUG_PCI -#define DEBUG_PCI 1 -#endif +// #ifndef DEBUG_PCIROOT +// #define DEBUG_PCIROOT 1 +// #endif #if DEBUG_PCI #define DBG(x...) printf(x) Index: branches/andyvand/i386/boot2/boot.h =================================================================== --- branches/andyvand/i386/boot2/boot.h (revision 139) +++ branches/andyvand/i386/boot2/boot.h (revision 140) @@ -114,7 +114,7 @@ #define kHidePartition "Hide Partition" /* disk.c */ #define kRenamePartition "Rename Partition" /* disk.c */ #define kRestartFix "RestartFix" /* dsdt_patcher.c */ - +#define kLoadTestDrivers "LoadTestDrivers" /* drivers.c */ /* * Flags to the booter or kernel */ @@ -202,6 +202,7 @@ allows other code to cause additional drivers to be loaded. */ extern long (*LoadExtraDrivers_p)(FileLoadDrivers_t FileLoadDrivers_p); +extern long (*LoadTestingDrivers_p)(FileLoadDrivers_t FileLoadDrivers_p); /* * options.c Index: branches/andyvand/i386/boot2/drivers.c =================================================================== --- branches/andyvand/i386/boot2/drivers.c (revision 139) +++ branches/andyvand/i386/boot2/drivers.c (revision 140) @@ -84,6 +84,7 @@ }; long (*LoadExtraDrivers_p)(FileLoadDrivers_t FileLoadDrivers_p); +long (*LoadTestingDrivers_p)(FileLoadDrivers_t FileLoadDrivers_p); static unsigned long Alder32( unsigned char * buffer, long length ); @@ -163,6 +164,7 @@ long LoadDrivers( char * dirSpec ) { char dirSpecExtra[1024]; + bool loadTestDrivers = false; if ( InitDriverSupport() != 0 ) return 0; @@ -173,6 +175,12 @@ (*LoadExtraDrivers_p)(&FileLoadDrivers); } + // Load test drivers if a hook has been installed. + if (LoadTestingDrivers_p != NULL) + { + (*LoadTestingDrivers_p)(&FileLoadDrivers); + } + if ( gBootFileType == kNetworkDeviceType ) { if (NetLoadDrivers(dirSpec) != 0) { @@ -236,6 +244,37 @@ strcat(gExtensionsSpec, "System/Library/"); FileLoadDrivers(gExtensionsSpec, 0); } + + // Check wether or not to load Test drivers (disabled by default) + if (getBoolForKey(kLoadTestDrivers, &loadTestDrivers, &bootInfo->bootConfig) && loadTestDrivers) + { + // First try to load Test extensions from the ramdisk if isn't aliased as bt(0,0). + if (gRAMDiskVolume && !gRAMDiskBTAliased) + { + strcpy(dirSpecExtra, "rd(0,0)/Test/"); + FileLoadDrivers(dirSpecExtra, 0); + } + + // Next try to load Test extensions (if enabled explicitly in booter) from the selected root partition. + strcpy(dirSpecExtra, "/Test/"); + if (FileLoadDrivers(dirSpecExtra, 0) != 0) + { + // If failed, then try to load Test extensions from the boot partition + // in case we have a separate booter partition or a bt(0,0) aliased ramdisk. + if ( !(gBIOSBootVolume->biosdev == gBootVolume->biosdev && gBIOSBootVolume->part_no == gBootVolume->part_no) + || (gRAMDiskVolume && gRAMDiskBTAliased) ) + { + // First try a specfic OS version folder ie 10.5 + sprintf(dirSpecExtra, "bt(0,0)/Test/%s/", &gMacOSVersion); + if (FileLoadDrivers(dirSpecExtra, 0) != 0) + { + // Next we'll try the base + strcpy(dirSpecExtra, "bt(0,0)/Test/"); + FileLoadDrivers(dirSpecExtra, 0); + } + } + } + } } else { Index: branches/andyvand/i386/boot2/mboot.c =================================================================== --- branches/andyvand/i386/boot2/mboot.c (revision 139) +++ branches/andyvand/i386/boot2/mboot.c (revision 140) @@ -51,6 +51,7 @@ unsigned int byteCount, void * buffer ); int multiboot_get_ramdisk_info(int biosdev, struct driveInfo *dip); static long multiboot_LoadExtraDrivers(FileLoadDrivers_t FileLoadDrivers_p); +static long multiboot_LoadTestingDrivers(FileLoadDrivers_t FileLoadDrivers_p); // Starts off in the multiboot context 1 MB high but eventually gets into low memory // and winds up with a bootdevice in eax which is all that boot() wants @@ -336,6 +337,7 @@ p_get_ramdisk_info = &multiboot_get_ramdisk_info; p_ramdiskReadBytes = &multibootRamdiskReadBytes; LoadExtraDrivers_p = &multiboot_LoadExtraDrivers; + LoadTestingDrivers_p = &multiboot_LoadTestingDrivers; // Since we call multiboot ourselves, its return address will be correct. // That is unless it's inlined in which case it does not matter. @@ -503,3 +505,35 @@ } return 0; } + +static long multiboot_LoadTestingDrivers(FileLoadDrivers_t FileLoadDrivers_p) +{ + char extensionsSpec[1024]; + int ramdiskUnit; + for(ramdiskUnit = 0; ramdiskUnit < gMI->mi_mods_count; ++ramdiskUnit) + { + int partCount; // unused + BVRef ramdiskChain = diskScanBootVolumes(0x100 + ramdiskUnit, &partCount); + if(ramdiskChain == NULL) + { + verbose("Ramdisk contains no partitions\n"); + continue; + } + for(; ramdiskChain != NULL; ramdiskChain = ramdiskChain->next) + { + sprintf(extensionsSpec, "rd(%d,%d)/Test/", ramdiskUnit, ramdiskChain->part_no); + struct dirstuff *extradir = opendir(extensionsSpec); + closedir(extradir); + if(extradir != NULL) + { + int ret = FileLoadDrivers_p(extensionsSpec, 0 /* this is a kext root dir, not a kext with plugins */); + if(ret != 0) + { + verbose("FileLoadDrivers failed on a ramdisk\n"); + return ret; + } + } + } + } + return 0; +} Index: branches/andyvand/package/Kexts/ATAPortInjector.kext/Contents/Info.plist =================================================================== --- branches/andyvand/package/Kexts/ATAPortInjector.kext/Contents/Info.plist (revision 139) +++ branches/andyvand/package/Kexts/ATAPortInjector.kext/Contents/Info.plist (revision 140) @@ -270,23 +270,6 @@ Supported Transfer Modes 0x3f061d - ICH7 ATA/100 - - CFBundleIdentifier - com.apple.driver.AppleIntelPIIXATA - Controller Name - ICH7 ATA/100 - IOClass - AppleIntelPIIXATARoot - IOPCIPrimaryMatch - 0x27df8086 - IOProbeScore - 2000 - IOProviderClass - IOPCIDevice - Supported Transfer Modes - 0x3f061d - ICH7 Serial ATA CFBundleIdentifier Index: branches/andyvand/revision =================================================================== --- branches/andyvand/revision (revision 139) +++ branches/andyvand/revision (revision 140) @@ -1 +1 @@ -69:70 \ No newline at end of file +69:119 \ No newline at end of file