Chameleon

Chameleon Commit Details

Date:2010-08-21 03:29:26 (13 years 7 months ago)
Author:Azimutz
Commit:401
Parents: 400
Message:Same as rev 400.
Changes:
M/branches/azimutz/Chazileon/i386/boot2/drivers.c
M/branches/azimutz/Chazileon/i386/libsaio/acpi_patcher.c
M/branches/azimutz/Chazileon/TODO
M/branches/azimutz/Chazileon/i386/libsaio/ati.c
M/branches/azimutz/Chazileon/i386/boot2/options.c
M/branches/azimutz/Chazileon/i386/libsaio/pci_root.c
M/branches/azimutz/Chazileon/i386/libsaio/stringTable.c

File differences

branches/azimutz/Chazileon/TODO
88
99
1010
11
11
1212
1313
1414
......
1717
1818
1919
20
20
2121
2222
2323
......
3131
3232
3333
34
34
3535
3636
3737
- 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 (was the pb smith had in
his first tries) and take it for the DSDT path as is.
his first tries) and take it for the DSDT path as is.
Then we have the case where no DSDT path was set where we run our usual DSDT search algorithm to find this file.
In the latter case, the file has to be named DSDT.aml and be in one of the / /Extra or bt(0,0)/Extra directory.
Whatever the path was hardcoded in the DSDT option or was automatically found, we extract the path part of
the DSDT file that has been successfully found and we run a loop to enumerate all other acpi files in the same directory.
Now for each acpi file found, we should compare the name with an existing acpi table found in the system that
we would normally load and replace this usual injection by the content of the file.
we would normally load and replace this usual injection by the content of the file.
Once DropDSDT=y is set, no other acpi table than dsdt is loaded, then it is the responsibility of user
to provide any other acpi table.
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/Chazileon/i386/libsaio/acpi_patcher.c
130130
131131
132132
133
133
134134
135135
136136
fd = open(dirSpecDSDT,0);
if (fd >= 0)
{
printf("ACPI file search cache hit: file found at %s\n", dirSpecDSDT);
verbose("ACPI file search cache hit: file found at %s\n", dirSpecDSDT);
goto success_fd;
}
}
branches/azimutz/Chazileon/i386/libsaio/pci_root.c
110110
111111
112112
113
113
114114
115115
116116
rootuid = 0; // ... default uid to 0.
}
else
printf("Found UID value on ACPI Table provided by user...\n");
verbose("Found UID value on ACPI Table provided by user...\n");
out:
verbose("Using PCI-Root-UID value: %d\n", rootuid);
out_out:
branches/azimutz/Chazileon/i386/libsaio/ati.c
432432
433433
434434
435
435
436436
437437
438438
......
745745
746746
747747
748
748
749749
750750
751751
if (!device || !ati_dev) {
return 0;
}
printf("dumping pci config space, 256 bytes\n"); //Azi:ATI
verbose("dumping pci config space, 256 bytes\n"); //Azi:ATI
config_space = malloc(256);
for (i=0; i<=255; i++) {
config_space[i] = pci_config_read8( ati_dev->dev.addr, i);
}
if (bios[0] == 0x55 && bios[1] == 0xaa) {
printf("Found bios image\n"); //Azi: found image on card.
verbose("Found bios image\n"); //Azi: found image on card.
bios_size = bios[2] * 512;
struct pci_rom_pci_header_t *rom_pci_header;
branches/azimutz/Chazileon/i386/libsaio/stringTable.c
702702
703703
704704
705
705
706706
707707
708708
}
else
{
printf("No override config provided!\n");
verbose("No override config provided!\n");
ret = -1;
}
return ret;
branches/azimutz/Chazileon/i386/boot2/drivers.c
161161
162162
163163
164
164
165165
166166
167167
long LoadDrivers( char * dirSpec )
{
char dirSpecExtra[128];
chardirSpecExtra[128];
const char *override_pathfolder = NULL; // full path to a folder.
intfd = 0, len = 0;
branches/azimutz/Chazileon/i386/boot2/options.c
13051305
13061306
13071307
1308
1309
1308
1309
13101310
13111311
13121312
......
13161316
13171317
13181318
1319
1320
1319
1320
13211321
13221322
13231323
else
return -1;
// Needed to enable search for override Boot.plist on OS specific folders
// from loadOverrideConfig(). Find out which version mac os we're booting.
// Needed here to enable search for override Boot.plist on OS specific folders.
// Find out which Mac OS version we're booting.
if (!loadConfigFile("/System/Library/CoreServices/SystemVersion.plist", &systemVersion))
{
if (getValueForKey(kProductVersion, &value, &len, &systemVersion))
strncpy(gMacOSVersion, value, MIN(len, 4));
gMacOSVersion[MIN(len, 4)] = '\0';
}
} // doesn't print to screen here!
}
//Azi: implemented at loadOverrideConfig.
// Load config table specified by the user, or use the default.
//if (!getValueForBootKey(cp, "config", &val, &cnt)) {

Archive Download the corresponding diff file

Revision: 401