exclude Kernel support CPU patch as redundand and not correct

Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
SergeySlice 2020-05-09 11:55:33 +03:00
parent 7e2dcf5583
commit d5305c8cc8
8 changed files with 22 additions and 22 deletions

View File

@ -619,8 +619,6 @@
<string>0x010676</string>
<key>#ATIConnectorsController</key>
<string>6000</string>
<key>KernelCpu</key>
<false/>
<key>#ATIConnectorsData</key>
<string>000400000403000000010000210302040400000014020000000100000000040310000000100000000001000000000001</string>
<key>Debug</key>

View File

@ -713,7 +713,7 @@ CopyKernelAndKextPatches (IN OUT KERNEL_AND_KEXT_PATCHES *Dst,
if (Dst == NULL || Src == NULL) return FALSE;
Dst->KPDebug = Src->KPDebug;
Dst->KPKernelCpu = Src->KPKernelCpu;
// Dst->KPKernelCpu = Src->KPKernelCpu;
Dst->KPKernelLapic = Src->KPKernelLapic;
Dst->KPKernelXCPM = Src->KPKernelXCPM;
Dst->KPKernelPm = Src->KPKernelPm;
@ -915,12 +915,12 @@ FillinKextPatches (IN OUT KERNEL_AND_KEXT_PATCHES *Patches,
if (Prop != NULL || gBootChanged) {
Patches->KPDebug = IsPropertyTrue (Prop);
}
/*
Prop = GetProperty(DictPointer, "KernelCpu");
if (Prop != NULL || gBootChanged) {
Patches->KPKernelCpu = IsPropertyTrue (Prop);
}
*/
Prop = GetProperty(DictPointer, "KernelLapic");
if (Prop != NULL || gBootChanged) {
Patches->KPKernelLapic = IsPropertyTrue (Prop);

View File

@ -232,7 +232,7 @@ UINTN LOADER_ENTRY::searchProc(const char *procedure)
return procAddr;
}
#if 0
//TimeWalker - extended and corrected for systems up to Yosemite
//TODO - Slice: no more needed
VOID LOADER_ENTRY::KernelPatcher_64()
@ -576,7 +576,7 @@ VOID LOADER_ENTRY::KernelPatcher_32()
}
}
}
#endif
//Slice - FakeCPUID substitution, (c)2014
// _cpuid_set_info
//TODO remake to patterns
@ -1717,7 +1717,7 @@ BOOLEAN LOADER_ENTRY::KernelIvyE5XCPM()
DBG("KernelIvyE5XCPM() <===\n");
return TRUE;
}
#if 0
VOID Patcher_SSE3_6(VOID* kernelData)
{
UINT8* bytes = (UINT8*)kernelData;
@ -1863,6 +1863,7 @@ VOID Patcher_SSE3_7()
// not support yet
return;
}
#endif
VOID LOADER_ENTRY::Get_PreLink()
{
@ -2311,7 +2312,7 @@ LOADER_ENTRY::KernelAndKextsPatcherStart()
} else {
DBG_RT("Disabled\n");
}
/*
DBG_RT( "\nKernelCpu patch: ");
if (KernelAndKextPatches->KPKernelCpu) {
//
@ -2331,7 +2332,7 @@ LOADER_ENTRY::KernelAndKextsPatcherStart()
} else {
DBG_RT( "Disabled\n");
}
*/
//other method for KernelCPU patch is FakeCPUID
DBG_RT( "\nFakeCPUID patch: ");
if (KernelAndKextPatches->FakeCPUID) {

View File

@ -139,9 +139,9 @@ extern BOOLEAN SSSE3;
//UINT64 kernelsize;
VOID Patcher_SSE3_5(VOID* kernelData);
VOID Patcher_SSE3_6(VOID* kernelData);
VOID Patcher_SSE3_7();
//VOID Patcher_SSE3_5(VOID* kernelData);
//VOID Patcher_SSE3_6(VOID* kernelData);
//VOID Patcher_SSE3_7();
#include "../gui/menu_items/menu_items.h" // for LOADER_ENTRY
class LOADER_ENTRY;

View File

@ -390,7 +390,7 @@ class REFIT_ABSTRACT_MENU_ENTRY
const UINT8* Search4, const UINT8* Search10, const UINT8* ReplaceModel,
const UINT8* ReplaceExt, INT32 Len);
VOID KernelPatcher_32();
VOID KernelPatcher_64();
// VOID KernelPatcher_64();
VOID FilterKernelPatches();
VOID FilterKextPatches();
VOID FilterBootPatches();

View File

@ -308,7 +308,7 @@ typedef struct {
typedef struct KERNEL_AND_KEXT_PATCHES
{
BOOLEAN KPDebug;
BOOLEAN KPKernelCpu;
// BOOLEAN KPKernelCpu;
BOOLEAN KPKernelLapic;
BOOLEAN KPKernelXCPM;
BOOLEAN KPKernelPm;

View File

@ -379,7 +379,7 @@ VOID DumpKernelAndKextPatches(KERNEL_AND_KEXT_PATCHES *Patches)
DBG("Kernel and Kext Patches at %p:\n", Patches);
DBG("\tAllowed: %c\n", gSettings.KextPatchesAllowed ? 'y' : 'n');
DBG("\tDebug: %c\n", Patches->KPDebug ? 'y' : 'n');
DBG("\tKernelCpu: %c\n", Patches->KPKernelCpu ? 'y' : 'n');
// DBG("\tKernelCpu: %c\n", Patches->KPKernelCpu ? 'y' : 'n');
DBG("\tKernelLapic: %c\n", Patches->KPKernelLapic ? 'y' : 'n');
DBG("\tKernelXCPM: %c\n", Patches->KPKernelXCPM ? 'y' : 'n');
DBG("\tKernelPm: %c\n", Patches->KPKernelPm ? 'y' : 'n');

View File

@ -288,8 +288,9 @@ VOID FillInputs(BOOLEAN New)
InputItemsCount = 44;
InputItems[InputItemsCount].ItemType = BoolValue; //44
InputItems[InputItemsCount++].BValue = gSettings.KextPatchesAllowed;
InputItems[InputItemsCount].ItemType = BoolValue; //45
InputItems[InputItemsCount++].BValue = gSettings.KernelAndKextPatches.KPKernelCpu;
// InputItems[InputItemsCount].ItemType = BoolValue; //45
// InputItems[InputItemsCount++].BValue = gSettings.KernelAndKextPatches.KPKernelCpu;
InputItemsCount++; //vacant place for id = 45
InputItems[InputItemsCount].ItemType = BoolValue; //46
InputItems[InputItemsCount++].BValue = gSettings.KernelAndKextPatches.KPAppleIntelCPUPM;
InputItems[InputItemsCount].ItemType = BoolValue; //47
@ -796,10 +797,10 @@ VOID ApplyInputs(VOID)
gSettings.KextPatchesAllowed = InputItems[i].BValue;
gBootChanged = TRUE;
}
i++; //45
i++; //45 - vacant
if (InputItems[i].Valid) {
gSettings.KernelAndKextPatches.KPKernelCpu = InputItems[i].BValue;
gBootChanged = TRUE;
// gSettings.KernelAndKextPatches.KPKernelCpu = InputItems[i].BValue;
// gBootChanged = TRUE;
}
i++; //46
if (InputItems[i].Valid) {
@ -2140,7 +2141,7 @@ REFIT_ABSTRACT_MENU_ENTRY* SubMenuBinaries()
SubScreen->AddMenuInfo_f("----------------------");
SubScreen->AddMenuItemInput(104, "Fake CPUID:", TRUE);
// SubScreen->AddMenuItemInput(108, "Kernel patching allowed", FALSE);
SubScreen->AddMenuItemInput(45, "Kernel Support CPU", FALSE);
// SubScreen->AddMenuItemInput(45, "Kernel Support CPU", FALSE);
SubScreen->AddMenuItemInput(91, "Kernel Lapic", FALSE);
SubScreen->AddMenuItemInput(105, "Kernel XCPM", FALSE);
SubScreen->AddMenuItemInput(48, "Kernel PM", FALSE);