Chameleon

Chameleon Commit Details

Date:2010-04-16 18:14:03 (9 years 2 months ago)
Author:Andy Vandijck
Commit:140
Parents: 139
Message:
Changes:
M/branches/andyvand/i386/boot2/boot.h
M/branches/andyvand/i386/libsaio/pci.c
M/branches/andyvand/i386/libsaio/pci_root.c
M/branches/andyvand/i386/boot2/drivers.c
M/branches/andyvand/package/Kexts/ATAPortInjector.kext/Contents/Info.plist
M/branches/andyvand/i386/libsaio/915resolution.c
M/branches/andyvand/revision
M/branches/andyvand/doc/BootHelp.txt
M/branches/andyvand/i386/boot2/mboot.c
M/branches/andyvand/i386/libsaio/gma.c

File differences

branches/andyvand/doc/BootHelp.txt
2424
2525
2626
27
28
29
27
28
29
3030
3131
3232
......
4141
4242
4343
44
45
46
47
44
45
46
47
4848
49
50
51
52
49
50
51
52
5353
54
55
54
55
56
5657
57
58
59
58
59
60
61
62
6063
61
64
6265
63
64
65
66
67
68
66
67
68
6969
70
71
70
71
72
73
74
7275
73
74
75
76
77
76
77
78
79
7880
79
80
81
82
81
82
83
84
8385
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
86
12187
122
123
124
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
125126
126
127
128
127
128
129
129130
130
131
132
133
134
135
136
137
131
132
133
134
135
136
137
138
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.
config=<file> 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) <alias> [;hd(m,n) <alias2> ...]
arch=<i386/x86_64> 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=<value> Use an alternate value for PciRoot (default value 0).
PciRoot=<value> 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/<vendorid>_<devid>.rom)
UseNvidiaROM=Yes|No Use an alternate Nvidia ROM image
(path: /Extra/<vendorid>_<devid>.rom)
VBIOS=Yes|No Inject VBIOS to device-properties.
GraphicsEnabler=Yes|No Automatic device-properties generation for graphics cards.
VideoROM=<file> 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=<file> 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=<file> 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=<file> Use an alternate DSDT.aml file
(default path: /DSDT.aml /Extra/DSDT.aml).
SSDT=<file_prefix> Use alternative DSDT-X.aml file prefix
(default prefix: /SSDT /Extra/SSDT).
HPET=<file> Use an alternate HPET.aml file
(default path: /HPET.aml /Extra/HPET.aml).
SBST=<file> Use an alternate SBST.aml file
(default path: /SBST.aml /Extra/SBST.aml).
ECDT=<file> Use an alternate ECDT.aml file
(default path: /ECDT.aml /Extra/ECDT.aml).
ASFT=<file> Use an alternate ASFT.aml file
(default path: /ASFT.aml /Extra/ASFT.aml).
DMAR=<file> Use an alternate DMAR.aml file
(default path: /DMAR.aml /Extra/DMAR.aml).
APIC=<file> Use an alternate APIC.aml file
(default path: /APIC.aml /Extra/APIC.aml).
MCFG=<file> Use an alternate MCFG.aml file
(default path: /MCFG.aml /Extra/MCFG.aml).
FADT=<file> Use an alternate FADT.aml file
(default path: /FADT.aml /Extra/FADT.aml).
PMProfile=<0-7> Set preferred power management profile.
SMBIOS=<file> 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=<file> Use an alternate DSDT.aml file
(default path: /DSDT.aml /Extra/DSDT.aml)
HPET=<file> Use an alternate HPET.aml file
(default path: /HPET.aml /Extra/HPET.aml)
SBST=<file> Use an alternate SBST.aml file
(default path: /DSDT.aml /Extra/SBST.aml)
ECDT=<file> Use an alternate ECDT.aml file
(default path: /ECDT.aml /Extra/ECDT.aml)
DSDT=<file> Use an alternate DSDT.aml file
(default path: /DSDT.aml /Extra/DSDT.aml)
ASFT=<file> Use an alternate ASFT.aml file
(default path: /ASFT.aml /Extra/ASFT.aml)
DMAR=<file> Use an alternate DMAR.aml file
(default path: /DMAR.aml /Extra/DMAR.aml)
FADT=<file> Use an alternate FADT.aml file
(default path: /FADT.aml /Extra/FADT.aml)
APIC=<file> Use an alternate APIC.aml file
(default path: /APIC.aml /Extra/APIC.aml)
MCFG=<file> 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=<file> 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=<UUID> Set manually the system id UUID,
SMUUID in smbios config (reserved field) isn't used.
SystemType=<n> 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.
branches/andyvand/i386/libsaio/gma.c
5555
5656
5757
58
59
5860
5961
6062
......
109111
110112
111113
114
112115
113116
114117
......
132135
133136
134137
138
135139
136
140
137141
138142
139143
{ 0x80862A03, "GMAX3100" },
{ 0x80862A12, "GMAX3100" },
{ 0x80862A13, "GMAX3100" },
{ 0x80862A42, "GMAX3100" },
{ 0x80862A43, "GMAX3100" },
};
char *get_gma_model(uint32_t id) {
} 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);
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)
{
branches/andyvand/i386/libsaio/pci_root.c
66
77
88
9
10
11
9
10
11
1212
1313
1414
#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)
branches/andyvand/i386/libsaio/915resolution.c
9898
9999
100100
101
102
103
104
101105
102
103106
104107
105108
case 0x2a008086:
type = CT_965GM;
break;
case 0x2a408086:
type = CT_965GM;
break;
default:
type = CT_UNKWN;
break;
branches/andyvand/i386/libsaio/pci.c
99
1010
1111
12
13
14
12
13
14
1515
1616
1717
#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)
branches/andyvand/i386/boot2/boot.h
114114
115115
116116
117
117
118118
119119
120120
......
202202
203203
204204
205
205206
206207
207208
#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
*/
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
branches/andyvand/i386/boot2/drivers.c
8484
8585
8686
87
8788
8889
8990
......
163164
164165
165166
167
166168
167169
168170
......
173175
174176
175177
178
179
180
181
182
183
176184
177185
178186
......
236244
237245
238246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
239278
240279
241280
};
long (*LoadExtraDrivers_p)(FileLoadDrivers_t FileLoadDrivers_p);
long (*LoadTestingDrivers_p)(FileLoadDrivers_t FileLoadDrivers_p);
static unsigned long Alder32( unsigned char * buffer, long length );
long LoadDrivers( char * dirSpec )
{
char dirSpecExtra[1024];
bool loadTestDrivers = false;
if ( InitDriverSupport() != 0 )
return 0;
(*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) {
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
{
branches/andyvand/i386/boot2/mboot.c
5151
5252
5353
54
5455
5556
5657
......
336337
337338
338339
340
339341
340342
341343
......
503505
504506
505507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
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
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.
}
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;
}
branches/andyvand/package/Kexts/ATAPortInjector.kext/Contents/Info.plist
270270
271271
272272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290273
291274
292275
<key>Supported Transfer Modes</key>
<string>0x3f061d</string>
</dict>
<key>ICH7 ATA/100</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.driver.AppleIntelPIIXATA</string>
<key>Controller Name</key>
<string>ICH7 ATA/100</string>
<key>IOClass</key>
<string>AppleIntelPIIXATARoot</string>
<key>IOPCIPrimaryMatch</key>
<string>0x27df8086</string>
<key>IOProbeScore</key>
<integer>2000</integer>
<key>IOProviderClass</key>
<string>IOPCIDevice</string>
<key>Supported Transfer Modes</key>
<string>0x3f061d</string>
</dict>
<key>ICH7 Serial ATA</key>
<dict>
<key>CFBundleIdentifier</key>
branches/andyvand/revision
1
1
69:70
69:119

Archive Download the corresponding diff file

Revision: 140