Chameleon

Chameleon Commit Details

Date:2016-05-17 22:07:01 (3 years 6 months ago)
Author:ErmaC
Commit:2818
Parents: 2817
Message:sync with trunk (fix kernel path and print CsrActiveConfig to bdmesg by Zenit432 + prevent infinite loop in setupChosenNode() by Zenit432 + kernel path by Micky1979)
Changes:
M/branches/ErmaC/Enoch/i386/boot2/boot.c
M/branches/ErmaC/Enoch/i386/libsaio/fake_efi.c

File differences

branches/ErmaC/Enoch/i386/libsaio/fake_efi.c
718718
719719
720720
721
721
722722
723723
724724
......
772772
773773
774774
775
776
777
778
779
780
781
775782
783
776784
785
786
777787
778788
779789
// Pike R. Alpha - 12 October 2014
//
UInt8 index = 0;
EFI_UINT16 PMTimerValue = 0;
EFI_UINT16 PMTimerValue = 0, PMRepeatCount = 0xffff;
#if RANDOMSEED
EFI_UINT32 randomValue = 0, cpuTick = 0;
if (esi < ecx)// cmp%ecx,%esi
{
/*
* This is a workaround to prevent an infinite loop
* if PMTimer is not at port 0x408 - zenith432
*/
if (PMRepeatCount)
{
--PMRepeatCount;
continue;// jb0x17e55(retry)
}
}
else
PMRepeatCount = 0xffff;
cpuTick = (EFI_UINT32) getCPUTick();// callq0x121a7
//printf("value: 0x%x\n", getCPUTick());
branches/ErmaC/Enoch/i386/boot2/boot.c
140140
141141
142142
143
144
145
146
143147
144148
145149
......
189193
190194
191195
192
196
193197
194198
195199
......
208212
209213
210214
211
215
212216
213
217
214218
215219
216220
217221
218222
219223
224
220225
221226
222227
......
858863
859864
860865
861
866
862867
863868
864869
malloc_init(0, 0, 0, malloc_error);
}
// =========================================================================
//==========================================================================
// ExecKernel - Load the kernel image (mach-o) and jump to its entry point.
if ( MacOSVerCurrent >= MacOSVer2Int("10.11") ) // El Capitan and Up!
{
// ErmaC
intcrsValue;
intcsrValue;
#if 0
/*
bootArgs->flags|= kBootArgsFlagCSRActiveConfig;
// Set limit to 7bit
if ( getIntForKey(kCsrActiveConfig, &crsValue, &bootInfo->chameleonConfig) && (crsValue >= 0 && crsValue <= 127) )
if ( getIntForKey(kCsrActiveConfig, &csrValue, &bootInfo->chameleonConfig) && (csrValue >= 0 && csrValue <= 127) )
{
bootArgs->csrActiveConfig= crsValue;
bootArgs->csrActiveConfig= csrValue;
}
else
{
// zenith432
bootArgs->csrActiveConfig= 0x67;
}
verbose("CsrActiveConfig set to 0x%x\n", bootArgs->csrActiveConfig);
bootArgs->csrCapabilities= CSR_VALID_FLAGS;
bootArgs->boot_SMC_plimit= 0;
}
// bootFile must start with a / if it not start with a device name
if (!bootFileWithDevice && (bootInfo->bootFile)[0] != '/')
{
if ( !YOSEMITE || !ELCAPITAN ) //Is not Yosemite 10.10 or El Capitan 10.11
if ( MacOSVerCurrent < MacOSVer2Int("10.10") ) // Micky1979 - Is prior to Yosemite 10.10
{
snprintf(bootFile, sizeof(bootFile), "/%s", bootInfo->bootFile); // append a leading /
}

Archive Download the corresponding diff file

Revision: 2818