Chameleon

Chameleon Commit Details

Date:2011-07-05 14:58:04 (8 years 13 days ago)
Author:Azimutz
Commit:1115
Parents: 1114
Message:Nice going... first commit, then test... dohoo Revert to r1096 (synced with trunk r1095).
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
819
820
821
822
820823
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
824
825
826
827
828
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
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);
}
// Notify modules that the kernel has been decompressed and thinned, is about to be decoded
execute_hook("DecodeKernel", (void*)binary, NULL, NULL, NULL);
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;
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;
}
branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/boot.c
376376
377377
378378
379
379
380380
381381
382382
......
485485
486486
487487
488
489
490
488
489
491490
492
493
494
491
495492
496493
497494
......
569566
570567
571568
572
569
573570
574571
575
572
576573
577574
578575
bool tryresume;
bool tryresumedefault;
bool forceresume;
bool usecache = false; //true;
bool usecache;
// additional variable for testing alternate kernel image locations on boot helper partitions.
char bootFileSpec[512];
HibernateBoot((char *)val);
break;
}
getBoolForKey(kUseKernelCache, &usecache, &bootInfo->bootConfig);
if(usecache) {
if(getBoolForKey(kUseKernelCache, &usecache, &bootInfo->bootConfig) && usecache) {
if (getValueForKey(kKernelCacheKey, &val, &len, &bootInfo->bootConfig)) {
//ugly hack. FIX THIS
if(strcmp(val, "\\kernelcache") == 0) strlcpy(gBootKernelCacheFile, "kernelcache", sizeof("kernelcache"));
else strlcpy(gBootKernelCacheFile, val, len+1);
strlcpy(gBootKernelCacheFile, val, len+1);
}
else {
//Lion
trycache = 0;
break;
}
if (ret == 0 && kerneltime > exttime) {
if (kerneltime > exttime) {
exttime = kerneltime;
}
if (ret == 0 && cachetime != (exttime + 1)) {
if (cachetime != (exttime + 1)) {
trycache = 0;
break;
}
branches/azimutz/trunkGraphicsEnablerModules/i386/boot2/modules.c
210210
211211
212212
213
214
213215
214216
215217
......
221223
222224
223225
224
226
225227
226228
227229
*/
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(!is64 && strcmp(symbol, "start") == 0)
if(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 unsigned short availableNodes, allocedNodes, totalNodes;
static 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_NODES32768 /* was 16384 */
#define ZALLOC_NODES16384
static void malloc_error(char *addr, size_t size, const char *file, int line)
{

Archive Download the corresponding diff file

Revision: 1115