Chameleon

Chameleon Commit Details

Date:2011-07-03 21:35:58 (8 years 4 months ago)
Author:Evan Lojewski
Commit:1098
Parents: 1097
Message:Move DecodeKernel hook to after the kernel has been thinned
Changes:
M/trunk/i386/boot2/drivers.c

File differences

trunk/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;
}

Archive Download the corresponding diff file

Revision: 1098