Chameleon

Chameleon Commit Details

Date:2010-07-22 18:35:55 (13 years 8 months ago)
Author:mozo
Commit:197
Parents: 196
Message:Fixed memory deallocation error while adding SSDTs into RSDT/XSDT. Fixed improper DSDT parsing algorithm in acpi_find_cpu_names. Improvements in memory detection algo, thank to Azimutz. Using my own algo for CPU type injections (need testing and testers, especially with newer i7, i5, i3 cpus, show me chameleon log). + latest zef's safe mode fix
Changes:
M/branches/mozodojo/i386/boot2/drivers.c

File differences

branches/mozodojo/i386/boot2/drivers.c
258258
259259
260260
261
261
262262
263263
264
265
264
265
266
267
266268
267269
268270
269271
270272
271273
272
274
273275
274276
275277
......
290292
291293
292294
293
294
295
296
297
295
298296
299297
300298
301
299
302300
303301
304302
// FileLoadMKext
static long
FileLoadMKext( const char * dirSpec )
FileLoadMKext( const char * dirSpec, const char * extDirSpec )
{
long ret, flags, time, time2;
ret = GetFileInfo(dirSpec, "Extensions.mkext", &flags, &time);
char altDirSpec[512];
sprintf (altDirSpec, "%s%s", dirSpec, extDirSpec);
ret = GetFileInfo(altDirSpec, "Extensions.mkext", &flags, &time);
if ((ret == 0) && ((flags & kFileTypeMask) == kFileTypeFlat))
{
ret = GetFileInfo(dirSpec, "Extensions", &flags, &time2);
if ((ret != 0) || ((flags & kFileTypeMask) != kFileTypeDirectory) ||
(((gBootMode & kBootModeSafe) == 0) && (time == (time2 + 1))))
{
sprintf(gDriverSpec, "%sExtensions.mkext", dirSpec);
sprintf(gDriverSpec, "%sExtensions.mkext", altDirSpec);
verbose("LoadDrivers: Loading from [%s]\n", gDriverSpec);
if (LoadDriverMKext(gDriverSpec) == 0) return 0;
}
if ( !plugin )
{
char altDirSpec[512];
// First try 10.6's path for loading Extensions.mkext.
sprintf(altDirSpec, "%sCaches/com.apple.kext.caches/Startup/", dirSpec);
if (FileLoadMKext(altDirSpec) == 0)
if (FileLoadMKext(dirSpec, "Caches/com.apple.kext.caches/Startup/") == 0)
return 0;
// Next try the legacy path.
else if (FileLoadMKext(dirSpec) == 0)
else if (FileLoadMKext(dirSpec, "") == 0)
return 0;
strcat(dirSpec, "Extensions");

Archive Download the corresponding diff file

Revision: 197