Chameleon

Chameleon Commit Details

Date:2011-07-05 12:29:04 (8 years 4 months ago)
Author:Azimutz
Commit:1114
Parents: 1113
Message:Sync with trunk (r1102) for testing.
Changes:
M/branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/boot.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/modules.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/libsa/zalloc.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/xml.c
M/branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/drivers.c
M/branches/azimutz/trunkGraphicsEnablerModules

File differences

branches/azimutz/trunkGraphicsEnablerModules/i386/libsaio/xml.c
11131113
11141114
11151115
1116
1116
11171117
11181118
11191119
{
if(!dict)
{
printf("XMLCastInteger: null dict\n");
//printf("XMLCastInteger: null dict\n");
return 0;
}
if(dict->type == kTagTypeInteger) return (int)(dict->string);
branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/drivers.c
816816
817817
818818
819
820
819
820
821
822
823
824
825
826
827
821828
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
829
830
831
832
833
834
835
836
837
838
839839
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/boot.c
376376
377377
378378
379
379
380380
381381
382382
......
485485
486486
487487
488
489
488
489
490
490491
491
492
493
494
492495
493496
494497
......
566569
567570
568571
569
572
570573
571574
572
575
573576
574577
575578
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];
HibernateBoot((char *)val);
break;
}
if(getBoolForKey(kUseKernelCache, &usecache, &bootInfo->bootConfig) && usecache) {
getBoolForKey(kUseKernelCache, &usecache, &bootInfo->bootConfig);
if(usecache) {
if (getValueForKey(kKernelCacheKey, &val, &len, &bootInfo->bootConfig)) {
strlcpy(gBootKernelCacheFile, val, len+1);
//ugly hack. FIX THIS
if(strcmp(val, "\\kernelcache") == 0) strlcpy(gBootKernelCacheFile, "kernelcache", sizeof("kernelcache"));
else strlcpy(gBootKernelCacheFile, val, len+1);
}
else {
//Lion
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;
}
branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/modules.c
210210
211211
212212
213
214
215213
216214
217215
......
223221
224222
225223
226
224
227225
228226
229227
*/
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;
}
branches/azimutz/trunkGraphicsEnablerModules/i386/libsa/zalloc.c
4646
4747
4848
49
49
5050
5151
5252
......
6060
6161
6262
63
63
6464
6565
6666
static zmem * zalloced;
static zmem * zavailable;
static short availableNodes, allocedNodes, totalNodes;
static unsigned short availableNodes, allocedNodes, totalNodes;
static char * zalloc_base;
static char * zalloc_end;
static void (*zerror)(char *, size_t, const char *, int);
size_t zalloced_size;
#endif
#define ZALLOC_NODES16384
#define ZALLOC_NODES32768 /* was 16384 */
static void malloc_error(char *addr, size_t size, const char *file, int line)
{

Archive Download the corresponding diff file

Revision: 1114