Chameleon

Chameleon Commit Details

Date:2011-07-12 19:39:44 (12 years 9 months ago)
Author:Azimutz
Commit:1146
Parents: 1145
Message:Sync with trunk (r1145). Add nVidia dev id's, 0DF4 for "GeForce GT 450M" (issue 99) and 1251 for "GeForce GTX 560M" (thanks to oSxFr33k for testing).
Changes:
C/trunk/BLOCKERS → /branches/azimutz/trunkGraphicsEnablerModules/BLOCKERS
M/branches/azimutz/trunkGraphicsEnablerModules/doc/README
M/branches/azimutz/trunkGraphicsEnablerModules/i386/modules/GraphicsEnabler/AMDGraphicsEnabler/ati.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/modules/GraphicsEnabler/IntelGraphicsEnabler/gma.c
M/branches/azimutz/trunkGraphicsEnablerModules/TODO
M/branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/modules.c
M/branches/azimutz/trunkGraphicsEnablerModules/CHANGES
M/branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/pci_root.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/stringTable.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/modules/GraphicsEnabler/ATiGraphicsEnabler/ati.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/gui.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/fake_efi.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/usb.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/modules/GraphicsEnabler/IntelGraphicsEnabler/IntelGraphicsEnabler.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/device_inject.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/libsa/zalloc.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/saio_internal.h
M/branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/ramdisk.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/modules/GraphicsEnabler/ATiGraphicsEnabler/ATiGraphicsEnabler.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/options.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/xml.c
M/branches/azimutz/trunkGraphicsEnablerModules/doc/BootHelp.txt
M/branches/azimutz/trunkGraphicsEnablerModules
M/branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/xml.h
M/branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/boot.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/boot.h
M/branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/bootstruct.h
M/branches/azimutz/trunkGraphicsEnablerModules/i386/modules/GraphicsEnabler/NVIDIAGraphicsEnabler/nvidia.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/sys.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/drivers.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/acpi_patcher.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/mboot.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/platform.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/spd.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/modules/GraphicsEnabler/NVIDIAGraphicsEnabler/NVIDIAGraphicsEnabler.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/cpu.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/disk.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/pci_setup.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/smbios.c
M/branches/azimutz/trunkGraphicsEnablerModules/doc/User_Guide_src/Chameleon 2 v0.5.docx
M/branches/azimutz/trunkGraphicsEnablerModules/i386/modules/Resolution/edid.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/graphics.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/modules/GraphicsEnabler/AMDGraphicsEnabler/AMDGraphicsEnabler.c

File differences

branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/xml.c
114114
115115
116116
117
118117
119118
120119
......
149148
150149
151150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
152185
153186
154187
......
169202
170203
171204
172
205
173206
174207
175208
......
266299
267300
268301
269
270
271
272
273
302
303
304
305
306
274307
275308
276309
......
819852
820853
821854
822
855
823856
824857
825858
......
10641097
10651098
10661099
1100
1101
1102
1103
1104
10671105
10681106
10691107
......
10711109
10721110
10731111
1112
1113
1114
1115
1116
1117
10741118
10751119
10761120
......
10781122
10791123
10801124
1125
1126
1127
1128
1129
1130
1131
10811132
10821133
10831134
......
11021153
11031154
11041155
1156
1157
1158
1159
1160
1161
1162
11051163
11061164
11071165
......
11091167
11101168
11111169
1170
1171
1172
1173
1174
11121175
11131176
11141177
11151178
1116
1179
11171180
11181181
11191182
11201183
11211184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
static long ParseTagInteger(char *buffer, TagPtr *tag);
static long ParseTagData(char *buffer, TagPtr *tag);
static long ParseTagDate(char *buffer, TagPtr *tag);
static long ParseTagBoolean(char *buffer, TagPtr *tag, long type);
static long GetNextTag(char *buffer, char **tag, long *start);
static long FixDataMatchingTag(char *buffer, char *tag);
static TagPtr NewTag(void);
return 0;
}
//==========================================================================
// XMLGetProperty
TagPtr
XMLGetKey( TagPtr dict, int id )
{
TagPtr tagList, tag;
if (dict->type != kTagTypeDict) return 0;
tag = 0;
int element = 0;
tagList = dict->tag;
while (tagList && element != id)
{
tag = tagList;
tagList = tag->tagNext;
if ((tag->type != kTagTypeKey) || (tag->string == 0)) continue;
element++;
if(id == element) return tag;
}
return 0;
}
TagPtr XMLGetValueForKey(TagPtr key)
{
if (!key ||
key->type != kTagTypeKey) return 0;
return key->tag;
}
// XMLGetTag(int index)
// XMLTagCount( TagPtr dict )
&& (dict->type != kTagTypeArray)// If we are an array, any element is valid
) continue;
if(tag->type == kTagTypeKey) printf("Located key %s\n", tag->string);
//if(tag->type == kTagTypeKey) printf("Located key %s\n", tag->string);
count++;
}
pos = 0;
char *configBuffer;
configBuffer = malloc(strlen(buffer)+1);
strcpy(configBuffer, buffer);
int strlength = strlen(buffer);
configBuffer = malloc(strlength+1);
bcopy(buffer, configBuffer, strlength);
configBuffer[strlength] = 0;
buffer_start = configBuffer;
while (1)
//==========================================================================
// ParseTagBoolean
static long
long
ParseTagBoolean( char * buffer, TagPtr * tag, long type )
{
TagPtr tmpTag;
}
/*** Cast functions ***/
bool XMLIsArray(TagPtr entry)
{
return entry && (entry->type == kTagTypeArray);
}
TagPtr XMLCastArray(TagPtr dict)
{
if(!dict) return NULL;
else return NULL;
}
bool XMLIsDict(TagPtr entry)
{
return entry && (entry->type == kTagTypeDict);
}
TagPtr XMLCastDict(TagPtr dict)
{
if(!dict) return NULL;
else return NULL;
}
bool XMLIsString(TagPtr entry)
{
return entry &&
((entry->type == kTagTypeString) ||
(entry->type == kTagTypeKey));
}
char* XMLCastString(TagPtr dict)
{
if(!dict) return NULL;
}
}
bool XMLIsBoolean(TagPtr entry)
{
return entry &&
((entry->type == kTagTypeTrue) ||
(entry->type == kTagTypeFalse));
}
bool XMLCastBoolean(TagPtr dict)
{
if(!dict) return false;
return false;
}
bool XMLIsInteger(TagPtr entry)
{
return entry && (entry->type == kTagTypeInteger);
}
int XMLCastInteger(TagPtr dict)
{
if(!dict)
{
printf("XMLCastInteger: null dict\n");
//printf("XMLCastInteger: null dict\n");
return 0;
}
if(dict->type == kTagTypeInteger) return (int)(dict->string);
return 0;
}
bool XMLAddTagToDictionary(TagPtr dict, char* key, TagPtr value)
{
if (!dict || dict->type != kTagTypeDict) return false;
TagPtr tmpTag;
char* string;
tmpTag = NewTag();
if (tmpTag == 0)
{
return false;
}
string = NewSymbol(key);
if (string == 0)
{
XMLFreeTag(tmpTag);
return false;
}
tmpTag->type = kTagTypeKey;
tmpTag->string = string;
tmpTag->tag = value;
tmpTag->offset = 0;
tmpTag->tagNext = 0;
TagPtr tagList = dict->tag;
if(!tagList)
{
// First tag
dict->tag = tmpTag;
return true;
}
while(tagList && tagList->tagNext) tagList = tagList->tagNext;
if(tagList)
{
tagList->tagNext = tmpTag;
return true;
}
return false;
}
branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/xml.h
8484
8585
8686
87
88
89
8790
8891
8992
......
9598
9699
97100
101
102
103
104
105
106
107
108
109
98110
99111
100112
......
106118
107119
108120
121
122
123
124
125
109126
TagPtr XMLGetProperty( TagPtr dict, const char * key );
TagPtr XMLGetElement( TagPtr dict, int id );
TagPtr XMLGetKey( TagPtr dict, int id );
TagPtr XMLGetValueForKey(TagPtr key);
int XMLTagCount( TagPtr dict );
bool XMLIsType(TagPtr dict, enum xmltype type);
TagPtr XMLCastDict ( TagPtr dict );
TagPtr XMLCastArray( TagPtr dict );
bool XMLIsBoolean(TagPtr entry);
bool XMLIsString (TagPtr entry);
bool XMLIsInteger(TagPtr entry);
bool XMLIsDict (TagPtr entry);
bool XMLIsArray (TagPtr entry);
bool XMLAddTagToDictionary(TagPtr dict, char* key, TagPtr value);
long XMLParseNextTag(char *buffer, TagPtr *tag);
void XMLFreeTag(TagPtr tag);
char* XMLDecode(const char *in);
//
long XMLParseFile( char * buffer, TagPtr * dict );
//==========================================================================
// ParseTag*
long ParseTagBoolean( char * buffer, TagPtr * tag, long type );
#endif /* __LIBSAIO_XML_H */
branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/bootstruct.h
131131
132132
133133
134
135
134
135
136136
137137
138138
char * configEnd; // pointer to end of config files
char config[CONFIG_SIZE];
config_file_t bootConfig; // boot.plist
config_file_t overrideConfig; // additional boot.plist which can override bootConfig keys
config_file_t bootConfig; // com.apple.Boot.plist
config_file_t chameleonConfig; // org.chameleon.Boot.plist which can override bootConfig keys
config_file_t themeConfig; // theme.plist
config_file_t smbiosConfig; // smbios.plist
config_file_t helperConfig; // boot helper partition's boot.plist
branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/acpi_patcher.c
237237
238238
239239
240
241
242
240
241
242
243243
244244
245245
......
603603
604604
605605
606
606
607607
608608
609609
......
625625
626626
627627
628
628
629629
630630
631631
......
713713
714714
715715
716
716
717717
718718
719719
......
737737
738738
739739
740
741
742
740
741
742
743743
744744
745745
bool c3_enabled = false;
bool c4_enabled = false;
getBoolForKey(kEnableC2States, &c2_enabled, &bootInfo->bootConfig);
getBoolForKey(kEnableC3States, &c3_enabled, &bootInfo->bootConfig);
getBoolForKey(kEnableC4States, &c4_enabled, &bootInfo->bootConfig);
getBoolForKey(kEnableC2States, &c2_enabled, &bootInfo->chameleonConfig);
getBoolForKey(kEnableC3States, &c3_enabled, &bootInfo->chameleonConfig);
getBoolForKey(kEnableC4States, &c4_enabled, &bootInfo->chameleonConfig);
c2_enabled = c2_enabled | (fadt->C2_Latency < 100);
c3_enabled = c3_enabled | (fadt->C3_Latency < 1000);
// Restart Fix
if (Platform.CPU.Vendor == 0x756E6547) {/* Intel */
fix_restart = true;
getBoolForKey(kRestartFix, &fix_restart, &bootInfo->bootConfig);
getBoolForKey(kRestartFix, &fix_restart, &bootInfo->chameleonConfig);
} else {
verbose ("Not an Intel platform: Restart Fix not applied !!!\n");
fix_restart = false;
memcpy(fadt_mod, fadt, fadt->Length);
}
// Determine system type / PM_Model
if ( (value=getStringForKey(kSystemType, &bootInfo->bootConfig))!=NULL)
if ( (value=getStringForKey(kSystemType, &bootInfo->chameleonConfig))!=NULL)
{
if (Platform.Type > 6)
{
int len = 0;
// Try using the file specified with the DSDT option
if (getValueForKey(kDSDT, &filename, &len, &bootInfo->bootConfig))
if (getValueForKey(kDSDT, &filename, &len, &bootInfo->chameleonConfig))
{
sprintf(dirSpec, filename);
}
// SSDT Options
bool drop_ssdt=false, generate_pstates=false, generate_cstates=false;
getBoolForKey(kDropSSDT, &drop_ssdt, &bootInfo->bootConfig);
getBoolForKey(kGeneratePStates, &generate_pstates, &bootInfo->bootConfig);
getBoolForKey(kGenerateCStates, &generate_cstates, &bootInfo->bootConfig);
getBoolForKey(kDropSSDT, &drop_ssdt, &bootInfo->chameleonConfig);
getBoolForKey(kGeneratePStates, &generate_pstates, &bootInfo->chameleonConfig);
getBoolForKey(kGenerateCStates, &generate_cstates, &bootInfo->chameleonConfig);
{
int i;
branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/spd.c
269269
270270
271271
272
272
273273
274274
275275
smbus_dev->vendor_id, smbus_dev->device_id, mmio, base, hostc);
//Azi: no use for this!
// getBoolForKey("DumpSPD", &dump, &bootInfo->bootConfig);
// getBoolForKey("DumpSPD", &dump, &bootInfo->chameleonConfig);
// needed at least for laptops
bool fullBanks = Platform.DMI.MemoryModules == Platform.DMI.CntMemorySlots;
branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/pci_root.c
5454
5555
5656
57
57
5858
5959
6060
6161
62
62
6363
6464
6565
6666
67
67
6868
6969
7070
71
71
7272
7373
7474
if (rootuid < 10) return rootuid;
rootuid = 0;/* default uid = 0 */
if (getValueForKey(kPCIRootUID, &val, &len, &bootInfo->bootConfig)) {
if (getValueForKey(kPCIRootUID, &val, &len, &bootInfo->chameleonConfig)) {
if (isdigit(val[0])) rootuid = val[0] - '0';
goto out;
}
/* Chameleon compatibility */
else if (getValueForKey("PciRoot", &val, &len, &bootInfo->bootConfig)) {
else if (getValueForKey("PciRoot", &val, &len, &bootInfo->chameleonConfig)) {
if (isdigit(val[0])) rootuid = val[0] - '0';
goto out;
}
/* PCEFI compatibility */
else if (getValueForKey("-pci0", &val, &len, &bootInfo->bootConfig)) {
else if (getValueForKey("-pci0", &val, &len, &bootInfo->chameleonConfig)) {
rootuid = 0;
goto out;
}
else if (getValueForKey("-pci1", &val, &len, &bootInfo->bootConfig)) {
else if (getValueForKey("-pci1", &val, &len, &bootInfo->chameleonConfig)) {
rootuid = 1;
goto out;
}
branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/usb.c
6767
6868
6969
70
70
7171
7272
7373
7474
7575
76
77
78
76
77
78
7979
8080
8181
......
207207
208208
209209
210
210
211211
212212
213213
bool fix_ehci, fix_uhci, fix_usb, fix_legacy;
fix_ehci = fix_uhci = fix_usb = fix_legacy = false;
if (getBoolForKey(kUSBBusFix, &fix_usb, &bootInfo->bootConfig))
if (getBoolForKey(kUSBBusFix, &fix_usb, &bootInfo->chameleonConfig))
{
fix_ehci = fix_uhci = fix_legacy = fix_usb;// Disable all if none set
}
else
{
getBoolForKey(kEHCIacquire, &fix_ehci, &bootInfo->bootConfig);
getBoolForKey(kUHCIreset, &fix_uhci, &bootInfo->bootConfig);
getBoolForKey(kLegacyOff, &fix_legacy, &bootInfo->bootConfig);
getBoolForKey(kEHCIacquire, &fix_ehci, &bootInfo->chameleonConfig);
getBoolForKey(kUHCIreset, &fix_uhci, &bootInfo->chameleonConfig);
getBoolForKey(kLegacyOff, &fix_legacy, &bootInfo->chameleonConfig);
}
struct pciList* current = usbList;
boolalwaysHardBIOSReset;
alwaysHardBIOSReset = false;
if (!getBoolForKey(kEHCIhard, &alwaysHardBIOSReset, &bootInfo->bootConfig)) {
if (!getBoolForKey(kEHCIhard, &alwaysHardBIOSReset, &bootInfo->chameleonConfig)) {
alwaysHardBIOSReset = true;
}
branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/device_inject.c
5555
5656
5757
58
58
5959
6060
6161
/* Use the static "device-properties" boot config key contents if available,
* otheriwse use the generated one.
*/
if (!getValueForKey(kDeviceProperties, &val, &cnt, &bootInfo->bootConfig) && string)
if (!getValueForKey(kDeviceProperties, &val, &cnt, &bootInfo->chameleonConfig) && string)
{
val = (const char*)string;
cnt = strlength * 2;
branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/sys.c
7878
7979
8080
81
82
8183
8284
8385
......
335337
336338
337339
340
338341
339342
340343
......
822825
823826
824827
825
828
826829
827830
828831
......
841844
842845
843846
847
848
849
844850
845851
846852
extern int multiboot_partition;
extern int multiboot_partition_set;
extern int multiboot_skip_partition;
extern int multiboot_skip_partition_set;
struct devsw {
const char * name;
for (idx = len; idx && (name[idx] != '/' && name[idx] != '\\'); idx--) {}
if (idx == 0) {
if(name[idx] == '/' || name[idx] == '\\') ++name; // todo: ensure other functions handel \ properly
gMakeDirSpec[0] = '/';
gMakeDirSpec[1] = '\0';
} else {
* to override the default selection.
* We accept only kBVFlagSystemVolume or kBVFlagForeignBoot volumes.
*/
char *val = XMLDecode(getStringForKey(kDefaultPartition, &bootInfo->bootConfig));
char *val = XMLDecode(getStringForKey(kDefaultPartition, &bootInfo->chameleonConfig));
if (val) {
for ( bvr = chain; bvr; bvr = bvr->next ) {
if (matchVolumeToString(bvr, val, false)) {
*/
for ( bvr = chain; bvr; bvr = bvr->next )
{
if (multiboot_skip_partition_set) {
if (bvr->part_no == multiboot_skip_partition) continue;
}
if ( bvr->flags & kBVFlagPrimary && bvr->biosdev == gBIOSDev ) foundPrimary = true;
// zhell -- Undo a regression that was introduced from r491 to 492.
// if gBIOSBootVolume is set already, no change is required
branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/platform.c
4747
4848
4949
50
50
5151
5252
5353
else
bootInfo->memDetect = true;
/* manually */
getBoolForKey(kUseMemDetect, &bootInfo->memDetect, &bootInfo->bootConfig);
getBoolForKey(kUseMemDetect, &bootInfo->memDetect, &bootInfo->chameleonConfig);
if (bootInfo->memDetect) {
if (dram_controller_dev != NULL) {
branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/cpu.c
266266
267267
268268
269
269
270270
271271
272272
} else {
cpuFrequency = tscFrequency;
}
if ((getValueForKey(kbusratio, &newratio, &len, &bootInfo->bootConfig)) && (len <= 4)) {
if ((getValueForKey(kbusratio, &newratio, &len, &bootInfo->chameleonConfig)) && (len <= 4)) {
max_ratio = atoi(newratio);
max_ratio = (max_ratio * 10);
if (len >= 3) max_ratio = (max_ratio + 5);
branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/disk.c
15681568
15691569
15701570
1571
1571
15721572
15731573
15741574
......
17471747
17481748
17491749
1750
1750
17511751
17521752
17531753
char* val = 0;
int len;
getValueForKey(kHidePartition, &raw, &len, &bootInfo->bootConfig);
getValueForKey(kHidePartition, &raw, &len, &bootInfo->chameleonConfig);
if(raw)
{
val = XMLDecode(raw);
if ( !str || strMaxLen <= 0)
return false;
aliasList = XMLDecode(getStringForKey(kRenamePartition, &bootInfo->bootConfig));
aliasList = XMLDecode(getStringForKey(kRenamePartition, &bootInfo->chameleonConfig));
if ( !aliasList )
return false;
branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/pci_setup.c
1818
1919
2020
21
22
21
22
2323
2424
2525
do_eth_devprop = do_enable_hpet = false;
getBoolForKey(kEthernetBuiltIn, &do_eth_devprop, &bootInfo->bootConfig);
getBoolForKey(kForceHPET, &do_enable_hpet, &bootInfo->bootConfig);
getBoolForKey(kEthernetBuiltIn, &do_eth_devprop, &bootInfo->chameleonConfig);
getBoolForKey(kForceHPET, &do_enable_hpet, &bootInfo->chameleonConfig);
while (current)
{
branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/smbios.c
723723
724724
725725
726
726
727727
728728
729729
bzero(buffer, SMB_ALLOC_SIZE);
structPtr->new = (SMBStructHeader *)buffer;
getBoolForKey(kSMBIOSdefaults, &setSMB, &bootInfo->bootConfig);
getBoolForKey(kSMBIOSdefaults, &setSMB, &bootInfo->chameleonConfig);
if (setSMB)
setDefaultSMBData();
branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/stringTable.c
2828
2929
3030
31
3132
3233
3334
......
496497
497498
498499
499
500
500501
501502
502503
503
504
505
506
504507
505508
506
509
507510
508511
509512
......
607610
608611
609612
610
611
612613
613
614
615
616614
617615
618616
......
639637
640638
641639
642
640
643641
644642
645643
646644
647
645
648646
649647
650
651
652
653
654
655
648
649
650
651
652
653
654
656655
657656
658657
......
661660
662661
663662
663
664
665
666
667
668
669
670
664671
665672
666673
#include "bootstruct.h"
#include "libsaio.h"
#include "boot.h"
#include "xml.h"
extern char *Language;
if (config->canOverride)
{
if (getValueForConfigTableKey(&bootInfo->overrideConfig, key, &overrideVal, &overrideSize))
if (getValueForConfigTableKey(&bootInfo->chameleonConfig, key, &overrideVal, &overrideSize))
{
override = true;
if (ret && (strcmp(key, "Kernel") == 0) && (strcmp(overrideVal, "mach_kernel") == 0))
// NOTE: Values are defined by apple as being in com.apple.Boot.plist
// kHelperRootUUIDKey, kKernelArchKey, kMKextCacheKey, kKernelCacheKey, kKernelNameKey, kKernelFlagsKey
if (ret && (strcmp(key, kKernelNameKey) == 0) && (strcmp(overrideVal, "mach_kernel") == 0))
override = false;
if (ret && (strcmp(key, "Kernel Flags") == 0) && (overrideSize == 0))
if (ret && (strcmp(key, kKernelFlagsKey) == 0) && (overrideSize == 0))
override = false;
if (override)
int loadSystemConfig(config_file_t *config)
{
char *dirspec[] = {
"/Extra/com.apple.Boot.plist",
"bt(0,0)/Extra/com.apple.Boot.plist",
"/Library/Preferences/SystemConfiguration/com.apple.Boot.plist",
"/com.apple.boot.P/Library/Preferences/SystemConfiguration/com.apple.Boot.plist",
"/com.apple.boot.R/Library/Preferences/SystemConfiguration/com.apple.Boot.plist",
"/com.apple.boot.S/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
};
int i, fd, count, ret=-1;
return ret;
}
/* loadOverrideConfig
/* loadChameleonConfig
*
* Returns 0 - successful.
* -1 - unsuccesful.
*/
int loadOverrideConfig(config_file_t *config)
int loadChameleonConfig(config_file_t *config)
{
char *dirspec[] = {
"rd(0,0)/Extra/com.apple.Boot.plist",
"/Extra/com.apple.Boot.plist",
"/Library/Preferences/SystemConfiguration/com.apple.Boot.plist",
"/com.apple.boot.P/Library/Preferences/SystemConfiguration/com.apple.Boot.plist",
"/com.apple.boot.R/Library/Preferences/SystemConfiguration/com.apple.Boot.plist",
"/com.apple.boot.S/Library/Preferences/SystemConfiguration/com.apple.Boot.plist"
"rd(0,0)/Extra/org.chameleon.Boot.plist",
"bt(0,0)/Extra/org.chameleon.Boot.plist",
"/Extra/org.chameleon.Boot.plist",
"rd(0,0)/Extra/com.apple.Boot.plist", /* DEPRECIATED */
"bt(0,0)/Extra/com.apple.Boot.plist", /* DEPRECIATED */
"/Extra/com.apple.Boot.plist" /* DEPRECIATED */
};
int i, fd, count, ret=-1;
{
if ((fd = open(dirspec[i], 0)) >= 0)
{
// Check for depreciated file names and annoy the user about it.
if(strstr(dirspec[i], "com.apple.Boot.plist"))
{
printf("%s is depreciated.\n", dirspec[i]);
dirspec[i][strlen(dirspec[i]) - strlen("com.apple.Boot.plist")] = 0;
printf("Please use the file %sorg.chameleon.Boot.plist instead.\n", dirspec[i]);
pause();
}
// read file
count = read(fd, config->plist, IO_CONFIG_DATA_SIZE);
close(fd);
branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/fake_efi.c
490490
491491
492492
493
493
494494
495495
496496
......
630630
631631
632632
633
633
634634
635635
636636
// unable to determine UUID for host. Error: 35 fix
// Rek: new SMsystemid option conforming to smbios notation standards, this option should
// belong to smbios config only ...
const char *sysId = getStringForKey(kSystemID, &bootInfo->bootConfig);
const char *sysId = getStringForKey(kSystemID, &bootInfo->chameleonConfig);
EFI_CHAR8*ret = getUUIDFromString(sysId);
if (!sysId || !ret) // try bios dmi info UUID extraction
extern void scan_mem();
// Take in account user overriding
if (getValueForKey(kSMBIOSKey, &override_pathname, &len, &bootInfo->bootConfig) && len > 0)
if (getValueForKey(kSMBIOSKey, &override_pathname, &len, &bootInfo->chameleonConfig) && len > 0)
{
// Specify a path to a file, e.g. SMBIOS=/Extra/macProXY.plist
sprintf(dirSpecSMBIOS, override_pathname);
branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/saio_internal.h
162162
163163
164164
165
165
166166
167167
168168
extern int loadConfigFile(const char *configFile, config_file_t *configBuff);
extern int loadSystemConfig(config_file_t *configBuff);
extern int loadHelperConfig(config_file_t *configBuff);
extern int loadOverrideConfig(config_file_t *configBuff);
extern int loadChameleonConfig(config_file_t *configBuff);
extern char * newString(const char *oldString);
extern char * getNextArg(char ** ptr, char * val);
extern int ParseXMLFile( char * buffer, TagPtr * dict );
branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/graphics.c
10361036
10371037
10381038
1039
1039
10401040
10411041
10421042
char * propStr;
unsigned long count = 0;
propStr = newStringForKey( (char *) propKey , &bootInfo->bootConfig );
propStr = newStringForKey( (char *) propKey , &bootInfo->chameleonConfig );
if ( propStr )
{
char * delimiter = propStr;
branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/drivers.c
8888
8989
9090
91
92
93
94
95
91
92
93
94
95
96
9697
9798
9899
......
102103
103104
104105
105
106
106107
107108
108109
......
209210
210211
211212
212
213
214
213
215214
216
217
215
216
217
218
219
220
221
218222
219
223
220224
221225
222
223
226
227
228
229
230
231
224232
225233
226
227
228
229
230
231
234
235
232236
233
234
237
238
239
240
241
242
235243
244
245
246
247
248
249
250
236251
237
238
239
240
241
242
243252
244253
245254
......
288297
289298
290299
291
300
292301
293302
294303
......
346355
347356
348357
358
349359
350360
351361
352
362
353363
354364
355365
......
385395
386396
387397
388
398
389399
390400
391401
......
431441
432442
433443
434
444
435445
436446
437447
......
445455
446456
447457
448
458
449459
460
461
450462
451463
452464
453465
454
455466
456467
457
468
469
458470
459471
460472
......
464476
465477
466478
467
479
468480
481
482
469483
470484
471485
472
473486
474487
475488
476
477489
478490
479491
480492
481493
482494
483
484495
485496
486497
......
490501
491502
492503
493
494504
495505
496506
......
538548
539549
540550
541
551
542552
543553
544554
......
581591
582592
583593
594
595
596
584597
585598
586599
......
713726
714727
715728
716
729
717730
718731
719732
......
733746
734747
735748
736
737
738
739
749
750
740751
752
741753
742754
743755
756
744757
745758
746759
......
816829
817830
818831
819
820
832
833
834
835
836
837
838
839
840
821841
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
842
843
844
845
846
847
848
849
850
851
839852
/*static*/ unsigned long Adler32( unsigned char * buffer, long length );
static long FileLoadDrivers(char *dirSpec, long plugin);
static long NetLoadDrivers(char *dirSpec);
static long LoadDriverMKext(char *fileSpec);
static long LoadDriverPList(char *dirSpec, char *name, long bundleType);
static long LoadMatchedModules(void);
long FileLoadDrivers(char *dirSpec, long plugin);
long NetLoadDrivers(char *dirSpec);
long LoadDriverMKext(char *fileSpec);
long LoadDriverPList(char *dirSpec, char *name, long bundleType);
long LoadMatchedModules(void);
static long MatchPersonalities(void);
static long MatchLibraries(void);
#ifdef NOTDEF
static long ParseXML(char *buffer, ModulePtr *module, TagPtr *personalities);
static long InitDriverSupport(void);
static ModulePtr gModuleHead, gModuleTail;
ModulePtr gModuleHead, gModuleTail;
static TagPtr gPersonalityHead, gPersonalityTail;
static char * gExtensionsSpec;
static char * gDriverSpec;
}
}
}
// Also try to load Extensions from boot helper partitions.
if (gBootVolume->flags & kBVFlagBooter)
if(!gHaveKernelCache)
{
strcpy(dirSpecExtra, "/com.apple.boot.P/System/Library/");
if (FileLoadDrivers(dirSpecExtra, 0) != 0)
// Don't load main driver (from /System/Library/Extentions) if gHaveKernelCache is set.
// since these drivers will already be in the kernel cache.
// NOTE: when gHaveKernelCache, xnu cannot (by default) load *any* extra kexts from the bootloader.
// The /Extra code is not disabled in this case due to a kernel patch that allows for this to happen.
// Also try to load Extensions from boot helper partitions.
if (gBootVolume->flags & kBVFlagBooter)
{
strcpy(dirSpecExtra, "/com.apple.boot.R/System/Library/");
strcpy(dirSpecExtra, "/com.apple.boot.P/System/Library/");
if (FileLoadDrivers(dirSpecExtra, 0) != 0)
{
strcpy(dirSpecExtra, "/com.apple.boot.S/System/Library/");
FileLoadDrivers(dirSpecExtra, 0);
strcpy(dirSpecExtra, "/com.apple.boot.R/System/Library/");
if (FileLoadDrivers(dirSpecExtra, 0) != 0)
{
strcpy(dirSpecExtra, "/com.apple.boot.S/System/Library/");
FileLoadDrivers(dirSpecExtra, 0);
}
}
}
}
if (gMKextName[0] != '\0')
{
verbose("LoadDrivers: Loading from [%s]\n", gMKextName);
if ( LoadDriverMKext(gMKextName) != 0 )
if (gMKextName[0] != '\0')
{
error("Could not load %s\n", gMKextName);
return -1;
verbose("LoadDrivers: Loading from [%s]\n", gMKextName);
if ( LoadDriverMKext(gMKextName) != 0 )
{
error("Could not load %s\n", gMKextName);
return -1;
}
}
else
{
strcpy(gExtensionsSpec, dirSpec);
strcat(gExtensionsSpec, "System/Library/");
FileLoadDrivers(gExtensionsSpec, 0);
}
}
else
{
strcpy(gExtensionsSpec, dirSpec);
strcat(gExtensionsSpec, "System/Library/");
FileLoadDrivers(gExtensionsSpec, 0);
}
}
else
{
//==========================================================================
// FileLoadDrivers
static long
long
FileLoadDrivers( char * dirSpec, long plugin )
{
long ret, length, flags, time, bundleType;
return result;
}
//==========================================================================
//
static long
long
NetLoadDrivers( char * dirSpec )
{
long tries;
//==========================================================================
// loadDriverMKext
static long
long
LoadDriverMKext( char * fileSpec )
{
unsigned long driversAddr, driversLength;
//==========================================================================
// LoadDriverPList
static long
long
LoadDriverPList( char * dirSpec, char * name, long bundleType )
{
long length, executablePathLength, bundlePathLength;
do {
// Save the driver path.
sprintf(gFileSpec, "%s/%s/%s", dirSpec, name,
if(name) sprintf(gFileSpec, "%s/%s/%s", dirSpec, name,
(bundleType == kCFBundleType2) ? "Contents/MacOS/" : "");
else sprintf(gFileSpec, "%s/%s", dirSpec,
(bundleType == kCFBundleType2) ? "Contents/MacOS/" : "");
executablePathLength = strlen(gFileSpec) + 1;
tmpExecutablePath = malloc(executablePathLength);
if (tmpExecutablePath == 0) break;
strcpy(tmpExecutablePath, gFileSpec);
sprintf(gFileSpec, "%s/%s", dirSpec, name);
if(name) sprintf(gFileSpec, "%s/%s", dirSpec, name);
else sprintf(gFileSpec, "%s", dirSpec);
bundlePathLength = strlen(gFileSpec) + 1;
tmpBundlePath = malloc(bundlePathLength);
// Construct the file spec to the plist, then load it.
sprintf(gFileSpec, "%s/%s/%sInfo.plist", dirSpec, name,
if(name) sprintf(gFileSpec, "%s/%s/%sInfo.plist", dirSpec, name,
(bundleType == kCFBundleType2) ? "Contents/" : "");
else sprintf(gFileSpec, "%s/%sInfo.plist", dirSpec,
(bundleType == kCFBundleType2) ? "Contents/" : "");
length = LoadFile(gFileSpec);
if (length == -1) break;
length = length + 1;
buffer = malloc(length);
if (buffer == 0) break;
strlcpy(buffer, (char *)kLoadAddr, length);
// Parse the plist.
ret = ParseXML(buffer, &module, &personalities);
if (ret != 0) { break; }
// Allocate memory for the driver path and the plist.
module->executablePath = tmpExecutablePath;
if ((module->executablePath == 0) || (module->bundlePath == 0) || (module->plistAddr == 0))
break;
// Save the driver path in the module.
//strcpy(module->driverPath, tmpDriverPath);
tmpExecutablePath = 0;
//==========================================================================
// LoadMatchedModules
static long
long
LoadMatchedModules( void )
{
TagPtr prop;
//}
// Make make in the image area.
execute_hook("LoadMatchedModules", module, &length, executableAddr, NULL);
driverLength = sizeof(DriverInfo) + module->plistLength + length + module->bundlePathLength;
driverAddr = AllocateKernelMemory(driverLength);
ParseXML( char * buffer, ModulePtr * module, TagPtr * personalities )
{
long length, pos;
TagPtr moduleDict, required;
TagPtr moduleDict;
ModulePtr tmpModule;
pos = 0;
if (length == -1) return -1;
required = XMLGetProperty(moduleDict, kPropOSBundleRequired);
if ( (required == 0) ||
(required->type != kTagTypeString) ||
!strcmp(required->string, "Safe Boot"))
#if 0 /** remove this check. **/
if (strcmp(XMLCastString(XMLGetProperty(moduleDict, kPropOSBundleRequired)), "Safe Boot") == 0)
{
// Don't load Safe Boot kexts. NOTE: -x should be check too.
XMLFreeTag(moduleDict);
return -2;
}
#endif
tmpModule = malloc(sizeof(Module));
if (tmpModule == 0)
return -1;
}
}
// Notify modules that the kernel has been decompressed, is about to be decoded
ret = ThinFatFile(&binary, &len);
if (ret == 0 && len == 0 && archCpuType==CPU_TYPE_X86_64)
{
archCpuType=CPU_TYPE_I386;
ret = ThinFatFile(&binary, &len);
}
// Notify modules that the kernel has been decompressed and thinned, is about to be decoded
execute_hook("DecodeKernel", (void*)binary, NULL, NULL, NULL);
ret = ThinFatFile(&binary, &len);
if (ret == 0 && len == 0 && archCpuType==CPU_TYPE_X86_64)
{
archCpuType=CPU_TYPE_I386;
ret = ThinFatFile(&binary, &len);
}
ret = DecodeMachO(binary, rentry, raddr, rsize);
if (ret<0 && archCpuType==CPU_TYPE_X86_64)
{
archCpuType=CPU_TYPE_I386;
ret = DecodeMachO(binary, rentry, raddr, rsize);
}
return ret;
ret = DecodeMachO(binary, rentry, raddr, rsize);
if (ret<0 && archCpuType==CPU_TYPE_X86_64)
{
archCpuType=CPU_TYPE_I386;
ret = DecodeMachO(binary, rentry, raddr, rsize);
}
return ret;
}
branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/mboot.c
1212
1313
1414
15
16
1517
1618
1719
......
414416
415417
416418
417
419
418420
419421
420422
423
424
425
426
427
428
429
430
431
432
433
421434
422435
423436
int multiboot_timeout_set=0;
int multiboot_partition=0;
int multiboot_partition_set=0;
int multiboot_skip_partition=0;
int multiboot_skip_partition_set=0;
// Global multiboot info, if using multiboot.
struct multiboot_info *gMI;
int intVal = strtol(val, &endptr, 0);
if(*val != '\0' && (*endptr == '\0' || *endptr == ' ' || *endptr == '\t'))
{
printf("Default partition overridden to %d with timeout=%s\n", intVal, val);
printf("Default partition overridden to %d with partno=%s\n", intVal, val);
multiboot_partition = intVal;
multiboot_partition_set = 1;
}
}
if(getValueForBootKey(mi->mi_cmdline, "skip_partno", &val, &size))
{
char *endptr;
int intVal = strtol(val, &endptr, 0);
if(*val != '\0' && (*endptr == '\0' || *endptr == ' ' || *endptr == '\t'))
{
printf("Skipping partition %d with skip_partno=%s\n", intVal, val);
multiboot_skip_partition = intVal;
multiboot_skip_partition_set = 1;
}
}
}
if(doSelectDevice)
branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/boot.c
9393
9494
9595
96
97
98
99
100
101
10296
10397
10498
......
154148
155149
156150
151
152
157153
158
159
154
155
160156
161
157
158
162159
163160
164161
......
166163
167164
168165
169
170
171
166
172167
173168
174169
......
184179
185180
186181
187
182
188183
189184
190185
......
265260
266261
267262
268
263
269264
270265
271266
......
300295
301296
302297
303
298
304299
305
300
306301
307302
308303
309304
310
305
311306
312307
313308
......
318313
319314
320315
321
316
322317
323318
324319
325320
326321
327
322
328323
329324
330325
331326
332
327
333328
334329
335330
......
356351
357352
358353
359
354
360355
361356
362357
......
376371
377372
378373
379
374
380375
381376
382377
......
433428
434429
435430
436
431
437432
438433
439434
440435
436
437
438
439
440
441
441442
443
444
442445
443446
444447
445
448
446449
447450
448451
449452
450453
451454
452
455
453456
454457
455458
......
461464
462465
463466
464
467
465468
466469
467470
......
485488
486489
487490
488
489
491
492
493
490494
491
495
496
497
498
499
500
492501
493502
494503
......
527536
528537
529538
530
539
531540
532541
533542
......
547556
548557
549558
550
551
552559
553
560
561
554562
555563
556564
565
557566
558567
559568
......
566575
567576
568577
569
578
570579
571580
572
581
573582
574583
575584
......
592601
593602
594603
595
604
596605
597606
598607
*/
#define kBootErrorTimeout 5
/*
* Default path to kernel cache file
*/
//Slice - first one for Leopard
#define kDefaultCachePathLeo "/System/Library/Caches/com.apple.kernelcaches/"
#define kDefaultCachePathSnow "/System/Library/Caches/com.apple.kext.caches/Startup/"
//==========================================================================
// Zero the BSS.
// Notify modules that the kernel has been decoded
execute_hook("DecodedKernel", (void*)binary, NULL, NULL, NULL);
setupFakeEfi();
// Load boot drivers from the specifed root path.
if (!gHaveKernelCache)
LoadDrivers("/");
//if (!gHaveKernelCache)
LoadDrivers("/");
execute_hook("DriversLoaded", (void*)binary, NULL, NULL, NULL);
clearActivityIndicator();
if (gErrors) {
printf("Pausing %d seconds...\n", kBootErrorTimeout);
sleep(kBootErrorTimeout);
}
setupFakeEfi();
md0Ramdisk();
verbose("Starting Darwin %s\n",( archCpuType == CPU_TYPE_I386 ) ? "x86" : "x86_64");
}
bool dummyVal;
if (getBoolForKey(kWaitForKeypressKey, &dummyVal, &bootInfo->bootConfig) && dummyVal) {
if (getBoolForKey(kWaitForKeypressKey, &dummyVal, &bootInfo->chameleonConfig) && dummyVal) {
printf("Press any key to continue...");
getchar();
}
bool firstRun = true;
bool instantMenu;
bool rescanPrompt;
unsigned int allowBVFlags = kBVFlagSystemVolume|kBVFlagForeignBoot;
unsigned int allowBVFlags = kBVFlagSystemVolume | kBVFlagForeignBoot;
unsigned int denyBVFlags = kBVFlagEFISystem;
// Set reminder to unload the PXE base code. Neglect to unload
setBootGlobals(bvChain);
// Load boot.plist config file
status = loadSystemConfig(&bootInfo->bootConfig);
status = loadChameleonConfig(&bootInfo->chameleonConfig);
if (getBoolForKey(kQuietBootKey, &quiet, &bootInfo->bootConfig) && quiet) {
if (getBoolForKey(kQuietBootKey, &quiet, &bootInfo->chameleonConfig) && quiet) {
gBootMode |= kBootModeQuiet;
}
// Override firstRun to get to the boot menu instantly by setting "Instant Menu"=y in system config
if (getBoolForKey(kInsantMenuKey, &instantMenu, &bootInfo->bootConfig) && instantMenu) {
if (getBoolForKey(kInsantMenuKey, &instantMenu, &bootInfo->chameleonConfig) && instantMenu) {
firstRun = false;
}
gEnableCDROMRescan = false;
// Enable it with Rescan=y in system config
if (getBoolForKey(kRescanKey, &gEnableCDROMRescan, &bootInfo->bootConfig) && gEnableCDROMRescan) {
if (getBoolForKey(kRescanKey, &gEnableCDROMRescan, &bootInfo->chameleonConfig) && gEnableCDROMRescan) {
gEnableCDROMRescan = true;
}
// Ask the user for Rescan option by setting "Rescan Prompt"=y in system config.
rescanPrompt = false;
if (getBoolForKey(kRescanPromptKey, &rescanPrompt , &bootInfo->bootConfig) && rescanPrompt && biosDevIsCDROM(gBIOSDev)) {
if (getBoolForKey(kRescanPromptKey, &rescanPrompt , &bootInfo->chameleonConfig) && rescanPrompt && biosDevIsCDROM(gBIOSDev)) {
gEnableCDROMRescan = promptForRescanOption();
}
// Enable touching a single BIOS device only if "Scan Single Drive"=y is set in system config.
if (getBoolForKey(kScanSingleDriveKey, &gScanSingleDrive, &bootInfo->bootConfig) && gScanSingleDrive) {
if (getBoolForKey(kScanSingleDriveKey, &gScanSingleDrive, &bootInfo->chameleonConfig) && gScanSingleDrive) {
gScanSingleDrive = true;
}
useGUI = true;
// Override useGUI default
getBoolForKey(kGUIKey, &useGUI, &bootInfo->bootConfig);
getBoolForKey(kGUIKey, &useGUI, &bootInfo->chameleonConfig);
if (useGUI && initGUI())
{
// initGUI() returned with an error, disabling GUI.
bool tryresume;
bool tryresumedefault;
bool forceresume;
bool usecache;
bool usecache = false;//true;
// additional variable for testing alternate kernel image locations on boot helper partitions.
char bootFileSpec[512];
} else {
archCpuType = CPU_TYPE_I386;
}
if (getValueForKey(karch, &val, &len, &bootInfo->bootConfig)) {
if (getValueForKey(karch, &val, &len, &bootInfo->chameleonConfig)) {
if (strncmp(val, "i386", 4) == 0) {
archCpuType = CPU_TYPE_I386;
}
}
if (getValueForKey(kKernelArchKey, &val, &len, &bootInfo->chameleonConfig)) {
if (strncmp(val, "i386", 4) == 0) {
archCpuType = CPU_TYPE_I386;
}
}
//archCpuType = CPU_TYPE_I386;
// Notify moduals that we are attempting to boot
execute_hook("PreBoot", NULL, NULL, NULL, NULL);
if (!getBoolForKey (kWake, &tryresume, &bootInfo->bootConfig)) {
if (!getBoolForKey (kWake, &tryresume, &bootInfo->chameleonConfig)) {
tryresume = true;
tryresumedefault = true;
} else {
tryresumedefault = false;
}
if (!getBoolForKey (kForceWake, &forceresume, &bootInfo->bootConfig)) {
if (!getBoolForKey (kForceWake, &forceresume, &bootInfo->chameleonConfig)) {
forceresume = false;
}
while (tryresume) {
const char *tmp;
BVRef bvr;
if (!getValueForKey(kWakeImage, &val, &len, &bootInfo->bootConfig))
if (!getValueForKey(kWakeImage, &val, &len, &bootInfo->chameleonConfig))
val="/private/var/vm/sleepimage";
// Do this first to be sure that root volume is mounted
HibernateBoot((char *)val);
break;
}
if(getBoolForKey(kUseKernelCache, &usecache, &bootInfo->bootConfig) && usecache) {
getBoolForKey(kUseKernelCache, &usecache, &bootInfo->chameleonConfig);
if(usecache) {
if (getValueForKey(kKernelCacheKey, &val, &len, &bootInfo->bootConfig)) {
strlcpy(gBootKernelCacheFile, val, len+1);
if(val[0] == '\\')
{
len--;
val++;
}
strlcpy(gBootKernelCacheFile, val, len+1);
}
else {
//Lion
// Reset cache name.
bzero(gCacheNameAdler + 64, sizeof(gCacheNameAdler) - 64);
sprintf(gCacheNameAdler + 64, "%s,%s", gRootDevice, bootInfo->bootFile);
sprintf(gCacheNameAdler + 64, "%s,%s", gRootDevice, bootInfo->chameleonConfig);
adler32 = Adler32((unsigned char *)gCacheNameAdler, sizeof(gCacheNameAdler));
verbose("Loading Darwin %s\n", gMacOSVersion);
if (trycache) do {
// if we haven't found the kernel yet, don't use the cache
ret = GetFileInfo(NULL, bootInfo->bootFile, &flags, &kerneltime);
if ((ret != 0) || ((flags & kFileTypeMask) != kFileTypeFlat)) {
if(ret != 0) kerneltime = 0;
else if ((flags & kFileTypeMask) != kFileTypeFlat) {
trycache = 0;
break;
}
ret = GetFileInfo(NULL, gBootKernelCacheFile, &flags, &cachetime);
if ((ret != 0) || ((flags & kFileTypeMask) != kFileTypeFlat)
|| (cachetime < kerneltime)) {
trycache = 0;
break;
}
if (kerneltime > exttime) {
if (ret == 0 && kerneltime > exttime) {
exttime = kerneltime;
}
if (cachetime != (exttime + 1)) {
if (ret == 0 && cachetime != (exttime + 1)) {
trycache = 0;
break;
}
if (ret >= 0)
break;
verbose("Kernel cache did not loaded %s\n ", bootFile);
verbose("Kernel cache did not load %s\n ", bootFile);
}
bootFile = bootInfo->bootFile;
branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/boot.h
3030
3131
3232
33
34
35
3336
37
38
39
40
41
42
43
44
3445
3546
3647
......
3849
3950
4051
52
4153
4254
4355
#define __BOOT2_BOOT_H
#include "libsaio.h"
/*
* Paths used by chameleon
*/
//kernel cache
#define kDefaultCachePathLeo "/System/Library/Caches/com.apple.kernelcaches/"
#define kDefaultCachePathSnow "/System/Library/Caches/com.apple.kext.caches/Startup/"
// Lion installer
#define kLionInstallerDataFolder "/Mac OS X Install Data/"
#define kLionInstallerPlist kLionInstallerDataFolder "com.apple.Boot.plist"
/*
* Keys used in system Boot.plist
*/
#define kTextModeKey"Text Mode"
#define kQuietBootKey"Quiet Boot"
#define kKernelFlagsKey"Kernel Flags"
#define kKernelArchKey "Kernel Architecture"
#define karch"arch"/* boot.c */
#define kProductVersion"ProductVersion"/* boot.c */
#define kMKextCacheKey"MKext Cache"
branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/modules.c
177177
178178
179179
180
180
181181
182182
183183
......
210210
211211
212212
213
214
215213
216214
217215
......
223221
224222
225223
226
224
227225
228226
229227
......
457455
458456
459457
458
460459
461460
462461
......
477476
478477
479478
480
479
481480
482481
483482
if(module_start && module_start != (void*)0xFFFFFFFF)
{
// Notify the system that it was laoded
module_loaded(module, NULL, NULL, 0, 0 /*moduleName, moduleVersion, moduleCompat*/);
module_loaded(module, NULL, NULL, 0, 0 /*moduleName, NULL, moduleVersion, moduleCompat*/);
(*module_start)();// Start the module
DBG("Module %s Loaded.\n", module); DBGPAUSE();
}
*/
long long add_symbol(char* symbol, long long addr, char is64)
{
if(is64) return 0xFFFFFFFF; // Fixme
// This only can handle 32bit symbols
symbolList_t* entry;
//DBG("Adding symbol %s at 0x%X\n", symbol, addr);
entry->addr = (UInt32)addr;
entry->symbol = symbol;
if(strcmp(symbol, "start") == 0)
if(!is64 && strcmp(symbol, "start") == 0)
{
return addr;
}
case LC_LOAD_DYLIB:
case LC_LOAD_WEAK_DYLIB ^ LC_REQ_DYLD:
// Required modules
dylibCommand = binary + binaryIndex;
char* module = binary + binaryIndex + ((UInt32)*((UInt32*)&dylibCommand->dylib.name));
// Possible enhancments: verify version
break;
case LC_ID_DYLIB:
dylibCommand = binary + binaryIndex;
//dylibCommand = binary + binaryIndex;
/*moduleName =binary + binaryIndex + ((UInt32)*((UInt32*)&dylibCommand->dylib.name));
moduleVersion =dylibCommand->dylib.current_version;
moduleCompat =dylibCommand->dylib.compatibility_version;
branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/gui.c
678678
679679
680680
681
681
682682
683683
684684
......
861861
862862
863863
864
864
865865
866866
867867
......
18121812
18131813
18141814
1815
1815
18161816
18171817
18181818
......
18471847
18481848
18491849
1850
1850
18511851
18521852
18531853
intlen;
chardirspec[256];
getValueForKey( "Theme", &theme_name, &len, &bootInfo->bootConfig );
getValueForKey( "Theme", &theme_name, &len, &bootInfo->chameleonConfig );
if ((strlen(theme_name) + 27) > sizeof(dirspec)) {
return 1;
}
drawInfoMenuItems();
//Azi: make this info more accessible.
getBoolForKey(kShowInfoKey, &shoWinfo, &bootInfo->bootConfig);
getBoolForKey(kShowInfoKey, &shoWinfo, &bootInfo->chameleonConfig);
if (shoWinfo && showBootBanner) // no boot banner, no showinfo.
{
bool legacy_logo;
uint16_t x, y;
if (getBoolForKey("Legacy Logo", &legacy_logo, &bootInfo->bootConfig) && legacy_logo) {
if (getBoolForKey("Legacy Logo", &legacy_logo, &bootInfo->chameleonConfig) && legacy_logo) {
usePngImage = false;
} else if (bootImageData == NULL) {
loadBootGraphics();
setVideoMode(GRAPHICS_MODE, 0);
}
if (getValueForKey("-checkers", &dummyVal, &length, &bootInfo->bootConfig)) {
if (getValueForKey("-checkers", &dummyVal, &length, &bootInfo->chameleonConfig)) {
drawCheckerBoard();
} else {
// Fill the background to 75% grey (same as BootX).
branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/ramdisk.c
2626
2727
2828
29
29
3030
3131
3232
int len;
if(getValueForKey(kMD0Image, &override_filename, &len,
&bootInfo->bootConfig))
&bootInfo->chameleonConfig))
{
// Use user specified md0 file
sprintf(filename, "%s", override_filename);
branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/options.c
710710
711711
712712
713
713
714714
715715
716716
......
778778
779779
780780
781
781
782782
783783
784784
......
789789
790790
791791
792
792
793793
794794
795795
......
876876
877877
878878
879
879
880880
881881
882882
......
11141114
11151115
11161116
1117
1117
11181118
11191119
11201120
......
11831183
11841184
11851185
1186
11871186
1188
1187
1188
11891189
11901190
11911191
......
12401240
12411241
12421242
1243
1243
12441244
12451245
12461246
12471247
12481248
1249
12491250
12501251
12511252
12521253
1253
1254
12541255
12551256
12561257
......
13101311
13111312
13121313
1313
1314
1314
1315
13151316
1316
1317
13171318
13181319
1319
1320
13201321
13211322
13221323
// Allow user to override default timeout.
if (multiboot_timeout_set) {
timeout = multiboot_timeout;
} else if (!getIntForKey(kTimeoutKey, &timeout, &bootInfo->bootConfig)) {
} else if (!getIntForKey(kTimeoutKey, &timeout, &bootInfo->chameleonConfig)) {
/* If there is no timeout key in the file use the default timeout
which is different for CDs vs. hard disks. However, if not booting
a CD and no config file could be loaded set the timeout
int cnt;
int optionKey;
if (getValueForKey(kCDROMPromptKey, &val, &cnt, &bootInfo->bootConfig)) {
if (getValueForKey(kCDROMPromptKey, &val, &cnt, &bootInfo->chameleonConfig)) {
prompt = malloc(cnt + 1);
strncat(prompt, val, cnt);
} else {
free(name);
}
if (getIntForKey( kCDROMOptionKey, &optionKey, &bootInfo->bootConfig )) {
if (getIntForKey( kCDROMOptionKey, &optionKey, &bootInfo->chameleonConfig )) {
// The key specified is a special key.
} else {
// Default to F8.
if (!(gBootMode & kBootModeQuiet)) {
// Check if "Boot Banner"=N switch is present in config file.
getBoolForKey(kBootBannerKey, &showBootBanner, &bootInfo->bootConfig);
getBoolForKey(kBootBannerKey, &showBootBanner, &bootInfo->chameleonConfig);
if (showBootBanner) {
// Display banner and show hardware info.
gprintf(&gui.screen, bootBanner + 1, (bootInfo->convmem + bootInfo->extmem) / 1024);
} else if (getValueForBootKey(kernelFlags, argName, &val, &cnt)) {
// Don't copy; these values will be copied at the end of argument processing.
found = true;
} else if (getValueForKey(argName, &val, &cnt, &bootInfo->bootConfig)) {
} else if (getValueForKey(argName, &val, &cnt, &bootInfo->chameleonConfig)) {
copyArgument(argName, val, cnt, argP, cntRemainingP);
found = true;
}
// Load com.apple.Boot.plist from the selected volume
// and use its contents to override default bootConfig.
// This is not a mandatory opeartion anymore.
loadOverrideConfig(&bootInfo->overrideConfig);
loadSystemConfig(&bootInfo->bootConfig);
loadChameleonConfig(&bootInfo->chameleonConfig);
// Use the kernel name specified by the user, or fetch the name
// in the config table, or use the default if not specified.
uuidSet = true;
}
}
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)) {
cnt = 0;
if ( getValueForKey( kBootDeviceKey, &val, &cnt, &bootInfo->bootConfig)) {
if ( getValueForKey( kBootDeviceKey, &val, &cnt, &bootInfo->chameleonConfig)) {
valueBuffer[0] = '*';
cnt++;
strlcpy(valueBuffer + 1, val, cnt);
if(!shouldboot)
{
gVerboseMode = getValueForKey( kVerboseModeFlag, &val, &cnt, &bootInfo->bootConfig ) ||
getValueForKey( kSingleUserModeFlag, &val, &cnt, &bootInfo->bootConfig );
gVerboseMode = getValueForKey( kVerboseModeFlag, &val, &cnt, &bootInfo->chameleonConfig ) ||
getValueForKey( kSingleUserModeFlag, &val, &cnt, &bootInfo->chameleonConfig );
gBootMode = ( getValueForKey( kSafeModeFlag, &val, &cnt, &bootInfo->bootConfig ) ) ?
gBootMode = ( getValueForKey( kSafeModeFlag, &val, &cnt, &bootInfo->chameleonConfig ) ) ?
kBootModeSafe : kBootModeNormal;
if ( getValueForKey( kIgnoreCachesFlag, &val, &cnt, &bootInfo->bootConfig ) ) {
if ( getValueForKey( kIgnoreCachesFlag, &val, &cnt, &bootInfo->chameleonConfig ) ) {
gBootMode = kBootModeSafe;
}
}
branches/azimutz/trunkGraphicsEnablerModules/i386/modules/Resolution/edid.c
239239
240240
241241
242
242
243243
244244
245245
246246
247
247
248248
249249
250250
//int val;
static UInt32 xResolution, yResolution, bpResolution;
/*
if(getIntForKey(kScreenWidth, &val, &bootInfo->bootConfig))
if(getIntForKey(kScreenWidth, &val, &bootInfo->chameleonConfig))
{
xResolution = val;
}
if(getIntForKey(kScreenHeight, &val, &bootInfo->bootConfig))
if(getIntForKey(kScreenHeight, &val, &bootInfo->chameleonConfig))
{
yResolution = val;
}
branches/azimutz/trunkGraphicsEnablerModules/i386/modules/GraphicsEnabler/NVIDIAGraphicsEnabler/NVIDIAGraphicsEnabler.c
3131
3232
3333
34
34
3535
3636
3737
char *devicepath = get_pci_dev_path(current);
bool do_gfx_devprop = true;
getBoolForKey(kGraphicsEnablerKey, &do_gfx_devprop, &bootInfo->bootConfig);
getBoolForKey(kGraphicsEnablerKey, &do_gfx_devprop, &bootInfo->chameleonConfig);
if (do_gfx_devprop && (current->vendor_id == PCI_VENDOR_ID_NVIDIA))
{
branches/azimutz/trunkGraphicsEnablerModules/i386/modules/GraphicsEnabler/NVIDIAGraphicsEnabler/nvidia.c
6868
6969
7070
71
72
71
72
7373
7474
7575
......
109109
110110
111111
112
113
114
115
112116
113117
114118
......
11971201
11981202
11991203
1200
1204
12011205
12021206
12031207
......
13151319
13161320
13171321
1318
1322
13191323
13201324
13211325
......
13241328
13251329
13261330
1327
1331
13281332
13291333
13301334
......
13421346
13431347
13441348
1345
1349
13461350
13471351
13481352
......
13831387
13841388
13851389
1386
1390
13871391
13881392
13891393
#define kUseNvidiaROM"UseNvidiaROM"
#define kVBIOS"VBIOS"
#define kdcfg0"display_0"
#define kdcfg1"display_1"
#define kDcfg0"display_0"
#define kDcfg1"display_1"
#define NVIDIA_ROM_SIZE 0x10000
#define PATCH_ROM_SUCCESS 1
static struct nv_chipsets_t NVKnownChipsets[] = {
{ 0x00000000, "Unknown" },
// temporary placement
{ 0x10DE0DF4, "GeForce GT 450M" }, // mine + issue #99
{ 0x10DE1251, "GeForce GTX 560M" }, // Asus G74SX
//========================================
// 0040 - 004F
{ 0x10DE0040, "GeForce 6800 Ultra" },
{ 0x10DE0041, "GeForce 6800" },
rom = malloc(NVIDIA_ROM_SIZE);
sprintf(nvFilename, "/Extra/%04x_%04x.rom", (uint16_t)nvda_dev->vendor_id, (uint16_t)nvda_dev->device_id);
if (getBoolForKey(kUseNvidiaROM, &doit, &bootInfo->bootConfig) && doit) {
if (getBoolForKey(kUseNvidiaROM, &doit, &bootInfo->chameleonConfig) && doit) {
verbose("Looking for nvidia video bios file %s\n", nvFilename);
nvBiosOveride = load_nvidia_bios_file(nvFilename, rom, NVIDIA_ROM_SIZE);
if (nvBiosOveride > 0) {
sprintf(biosVersion, "%s", (nvBiosOveride > 0) ? nvFilename : version_str);
sprintf(kNVCAP, "NVCAP_%04x", nvda_dev->device_id);
if (getValueForKey(kNVCAP, &value, &len, &bootInfo->bootConfig) && len == NVCAP_LEN * 2) {
if (getValueForKey(kNVCAP, &value, &len, &bootInfo->chameleonConfig) && len == NVCAP_LEN * 2) {
uint8_tnew_NVCAP[NVCAP_LEN];
if (hex2bin(value, new_NVCAP, NVCAP_LEN) == 0) {
}
}
if (getValueForKey(kdcfg0, &value, &len, &bootInfo->bootConfig) && len == DCFG0_LEN * 2){
if (getValueForKey(kDcfg0, &value, &len, &bootInfo->chameleonConfig) && len == DCFG0_LEN * 2){
uint8_t new_dcfg0[DCFG0_LEN];
}
if (getValueForKey(kdcfg1, &value, &len, &bootInfo->bootConfig) && len == DCFG1_LEN * 2){
if (getValueForKey(kDcfg1, &value, &len, &bootInfo->chameleonConfig) && len == DCFG1_LEN * 2){
uint8_t new_dcfg1[DCFG1_LEN];
// devprop_add_value(device, "@1,connector-type",connector_type_1, 4);
//end Nvidia HDMI Audio
if (getBoolForKey(kVBIOS, &doit, &bootInfo->bootConfig) && doit) {
if (getBoolForKey(kVBIOS, &doit, &bootInfo->chameleonConfig) && doit) {
devprop_add_value(device, "vbios", rom, (nvBiosOveride > 0) ? nvBiosOveride : (rom[2] * 512));
}
branches/azimutz/trunkGraphicsEnablerModules/i386/modules/GraphicsEnabler/IntelGraphicsEnabler/gma.c
4646
4747
4848
49
50
49
50
5151
5252
5353
......
107107
108108
109109
110
111
112
110
111
113112
114113
115114
......
160159
161160
162161
163
164
162
163
165164
166165
167166
{ 0x00,0x00,0x00,0x00 }
};
uint8_t reg_TRUE[]= { 0x01 ,0x00 ,0x00 ,0x00 };
uint8_t reg_FALSE[] = { 0x00,0x00,0x00,0x00 };
uint8_t reg_TRUE[]= { 0x01, 0x00, 0x00, 0x00 };
uint8_t reg_FALSE[] = { 0x00, 0x00, 0x00, 0x00 };
static struct gma_gpu_t KnownGPUS[] = {
{ 0x00000000, "Unknown"},
if (!device)
{
printf("Failed initializing dev-prop string dev-entry, press any key...\n");
getchar();
printf("Failed initializing dev-prop string dev-entry.\n");
pause();
return false;
}
stringdata = malloc(sizeof(uint8_t) * string->length);
if (!stringdata)
{
printf("no stringdata press a key...\n");
getchar();
printf("No stringdata.\n");
pause();
return false;
}
branches/azimutz/trunkGraphicsEnablerModules/i386/modules/GraphicsEnabler/IntelGraphicsEnabler/IntelGraphicsEnabler.c
3030
3131
3232
33
33
3434
3535
3636
char *devicepath = get_pci_dev_path(current);
bool do_gfx_devprop = true;
getBoolForKey(kGraphicsEnablerKey, &do_gfx_devprop, &bootInfo->bootConfig);
getBoolForKey(kGraphicsEnablerKey, &do_gfx_devprop, &bootInfo->chameleonConfig);
if (do_gfx_devprop && (current->vendor_id == PCI_VENDOR_ID_INTEL))
{
branches/azimutz/trunkGraphicsEnablerModules/i386/modules/GraphicsEnabler/ATiGraphicsEnabler/ATiGraphicsEnabler.c
3232
3333
3434
35
35
3636
3737
3838
char *devicepath = get_pci_dev_path(current);
bool do_gfx_devprop = true;
getBoolForKey(kGraphicsEnablerKey, &do_gfx_devprop, &bootInfo->bootConfig);
getBoolForKey(kGraphicsEnablerKey, &do_gfx_devprop, &bootInfo->chameleonConfig);
// AMD ?? i don't find any vga 1022 vendor!.. thou ATI isn't used anymore!
if (do_gfx_devprop && (current->vendor_id == PCI_VENDOR_ID_ATI))
branches/azimutz/trunkGraphicsEnablerModules/i386/modules/GraphicsEnabler/ATiGraphicsEnabler/ati.c
717717
718718
719719
720
720
721721
722722
723723
devprop_add_value(device, (char *) ati_name_1[0], (uint8_t *)tmp, strlen(tmp) + 1);
sprintf(tmp, "bt(0,0)/Extra/%04x_%04x.rom", (uint16_t)ati_dev->vendor_id, (uint16_t)ati_dev->device_id);
if (getBoolForKey(kUseAtiROMKey, &doit, &bootInfo->bootConfig) && doit) {
if (getBoolForKey(kUseAtiROMKey, &doit, &bootInfo->chameleonConfig) && doit) {
verbose("looking for ati video bios file %s\n", tmp);
rom = malloc(0x20000);
rom_size = load_ati_bios_file(tmp, rom, 0x20000);
branches/azimutz/trunkGraphicsEnablerModules/i386/modules/GraphicsEnabler/AMDGraphicsEnabler/AMDGraphicsEnabler.c
3030
3131
3232
33
33
3434
3535
3636
char *devicepath = get_pci_dev_path(current);
bool do_gfx_devprop = true;
getBoolForKey(kGraphicsEnablerKey, &do_gfx_devprop, &bootInfo->bootConfig);
getBoolForKey(kGraphicsEnablerKey, &do_gfx_devprop, &bootInfo->chameleonConfig);
if (do_gfx_devprop && (current->vendor_id == PCI_VENDOR_ID_ATI))
{
branches/azimutz/trunkGraphicsEnablerModules/i386/modules/GraphicsEnabler/AMDGraphicsEnabler/ati.c
212212
213213
214214
215
215216
216217
217218
......
900901
901902
902903
903
904
904905
905906
906907
......
11681169
11691170
11701171
1171
1172
11721173
11731174
11741175
......
11931194
11941195
11951196
1196
1197
11971198
11981199
11991200
static radeon_card_info_t radeon_cards[] = {
//Azi: added devices
// temporary placement
// issue #88
{ 0x6741,0x1646103C,CHIP_FAMILY_TURKS,/*???*/"AMD Radeon HD 6600M Series",kNull},
// issue #89
char file_name[24];
bool do_load = false;
getBoolForKey(key, &do_load, &bootInfo->bootConfig);
getBoolForKey(key, &do_load, &bootInfo->chameleonConfig);
if (!do_load)
return false;
get_vram_size();
getBoolForKey(kATYbinimage, &add_vbios, &bootInfo->bootConfig);
getBoolForKey(kATYbinimage, &add_vbios, &bootInfo->chameleonConfig);
if (add_vbios)
{
atN = 0;
card->cfg_name = getStringForKey(kAtiConfig, &bootInfo->bootConfig);
card->cfg_name = getStringForKey(kAtiConfig, &bootInfo->chameleonConfig);
if (!card->cfg_name)
{
card->cfg_name = card_configs[card->info->cfg_name].name;
branches/azimutz/trunkGraphicsEnablerModules/i386/libsa/zalloc.c
6060
6161
6262
63
63
6464
6565
6666
size_t zalloced_size;
#endif
#define ZALLOC_NODES16384
#define ZALLOC_NODES32767 /* was 16384 */
static void malloc_error(char *addr, size_t size, const char *file, int line)
{
branches/azimutz/trunkGraphicsEnablerModules/BLOCKERS
1
2
3
4
5
6
7
8
9
10
11
Memory Allocation Error on boot1 loading /boot: http://forge.voodooprojects.org/p/chameleon/issues/101/
Nvidia GT 540M && 310M : can't find rom to patch : http://forge.voodooprojects.org/p/chameleon/issues/99/
** This is also http://forge.voodooprojects.org/p/chameleon/issues/48/
** GT 440 --> http://forge.voodooprojects.org/p/chameleon/issues/98/
Extra Kext Loading dependency error: http://forge.voodooprojects.org/p/chameleon/issues/94/
AMD reported issues in cpu.c http://forge.voodooprojects.org/p/chameleon/issues/92/
Make Package: http://forge.voodooprojects.org/p/chameleon/issues/82/
SMBus : http://forge.voodooprojects.org/p/chameleon/issues/10/
=== Done ===
Multi Booting: http://forge.voodooprojects.org/p/chameleon/issues/62/
branches/azimutz/trunkGraphicsEnablerModules/TODO
11
22
3
4
35
46
5
6
7
87
98
109
......
2120
2221
2322
23
24
25
2426
2527
2628
......
5052
5153
5254
53
55
5456
5557
5658
TODO List for Chameleon Boot Loader
====================================
- Fix boot prompt parsing.
- Bring code closer to coding_standards.txt.
- Create a dummy module for any modules that are compiled in. This is needed for linking modules with
dependencies that are not compiled in.
- Fix the module system when booting chameleon with multiboot. Cleanup the xcode 4 fix.
- Integrate Prasys current work on options and quick shortcut modified version of 18seven
DONE
- Create a dummy module for any modules that are compiled in. This is needed for linking modules with
dependencies that are not compiled in.
- Add a more sophisticated acpi loading mechanism to enable loading custom acpi tables when dsdtdrop=y
Here's a specification to think about:
First we must care about if a forced DSDT full path has been specified
The preferred internal behavior of the log info ioreg buffer
would be to store the messages in a consolidated buffer then only write once,
this buffer (i.e just before call the kernel) with flushLogToIOREG();
this buffer (i.e just before call the kernel) with flushLogToIOREG();
The other public function for writing chameleon boot info data would be:
verbose() should incorporate a call to logMessageToIOREG()
branches/azimutz/trunkGraphicsEnablerModules/doc/User_Guide_src/Chameleon 2 v0.5.docx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
76176
77177
78178
79179
80180
81
82
83
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
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
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713181
714182
715183
716184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
=
@@ -959,1255 +1179,6 @@
"}2
@@ -3266,6 +2237,1035 @@
"}2
branches/azimutz/trunkGraphicsEnablerModules/doc/BootHelp.txt
4141
4242
4343
44
44
4545
4646
4747
Additional useful command-line options:
config=<file> Use an alternate Boot.plist file.
Options useful in the com.apple.Boot.plist file:
Options useful in the org.chameleon.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.
branches/azimutz/trunkGraphicsEnablerModules/doc/README
1313
1414
1515
16
16
1717
1818
1919
Features
--------
- Device Property Injection via device-properties string in com.apple.Boot.plist
- Device Property Injection via device-properties string in org.chameleon.Boot.plist
- hybrid boot0+boot1h loaders for both MBR and GPT partitioned disks.
- automatic FSB detection code even for recent AMD CPUs.
- Apple Software RAID support.
branches/azimutz/trunkGraphicsEnablerModules/CHANGES
1
12
23
34
- Renamed com.apple.Boot.plist to org.chameleon.Boot.plist.
- Added "ShowInfo" key (enabled by default for now), which enables/disables the display of
partition and resolution related info, on the Gui.
This info may not play well with some custom themes.

Archive Download the corresponding diff file

Revision: 1146