mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-12-25 16:37:42 +01:00
Added modern Intel CPUID
This commit is contained in:
parent
edd3864b10
commit
400640b902
@ -249,7 +249,9 @@ extern "C" {
|
||||
#define CPU_MODEL_ATOM_TM 0x86 /* Tremont */
|
||||
#define CPU_MODEL_KABYLAKE1 0x8E /* Kabylake Mobile */
|
||||
#define CPU_MODEL_KABYLAKE2 0x9E /* Kabylake Dektop, CoffeeLake */
|
||||
#define CPU_MODEL_COMETLAKE 0xA6
|
||||
#define CPU_MODEL_COMETLAKE_S 0x9F /* desktop Comet Lake */
|
||||
#define CPU_MODEL_COMETLAKE_Y 0xA5 /* aka 10th generation Amber Lake Y */
|
||||
#define CPU_MODEL_COMETLAKE_U 0xA6
|
||||
|
||||
#define CPU_VENDOR_INTEL 0x756E6547
|
||||
#define CPU_VENDOR_AMD 0x68747541
|
||||
|
@ -236,6 +236,13 @@ SSDT_TABLE *generate_pss_ssdt(UINTN Number)
|
||||
case CPU_MODEL_KABYLAKE1:
|
||||
case CPU_MODEL_KABYLAKE2:
|
||||
case CPU_MODEL_CANNONLAKE:
|
||||
case CPU_MODEL_ICELAKE_A:
|
||||
case CPU_MODEL_ICELAKE_C:
|
||||
case CPU_MODEL_ICELAKE_D:
|
||||
case CPU_MODEL_ICELAKE:
|
||||
case CPU_MODEL_COMETLAKE_S:
|
||||
case CPU_MODEL_COMETLAKE_Y:
|
||||
case CPU_MODEL_COMETLAKE_U:
|
||||
{
|
||||
maximum.Control.Control = RShiftU64(AsmReadMsr64(MSR_PLATFORM_INFO), 8) & 0xff;
|
||||
if (gSettings.MaxMultiplier) {
|
||||
@ -297,7 +304,14 @@ SSDT_TABLE *generate_pss_ssdt(UINTN Number)
|
||||
(gCPUStructure.Model == CPU_MODEL_GOLDMONT) ||
|
||||
(gCPUStructure.Model == CPU_MODEL_KABYLAKE1) ||
|
||||
(gCPUStructure.Model == CPU_MODEL_KABYLAKE2) ||
|
||||
(gCPUStructure.Model == CPU_MODEL_CANNONLAKE)) {
|
||||
(gCPUStructure.Model == CPU_MODEL_CANNONLAKE) ||
|
||||
(gCPUStructure.Model == CPU_MODEL_ICELAKE_A) ||
|
||||
(gCPUStructure.Model == CPU_MODEL_ICELAKE_C) ||
|
||||
(gCPUStructure.Model == CPU_MODEL_ICELAKE_D) ||
|
||||
(gCPUStructure.Model == CPU_MODEL_ICELAKE) ||
|
||||
(gCPUStructure.Model == CPU_MODEL_COMETLAKE_S) ||
|
||||
(gCPUStructure.Model == CPU_MODEL_COMETLAKE_Y) ||
|
||||
(gCPUStructure.Model == CPU_MODEL_COMETLAKE_U)) {
|
||||
j = i << 8;
|
||||
p_states[p_states_count].Frequency = (UINT32)(100 * i);
|
||||
} else {
|
||||
|
@ -312,9 +312,16 @@ VOID GetCPUProperties (VOID)
|
||||
case CPU_MODEL_ATOM_X3:
|
||||
case CPU_MODEL_SKYLAKE_D:
|
||||
case CPU_MODEL_SKYLAKE_S:
|
||||
case CPU_MODEL_CANNONLAKE:
|
||||
case CPU_MODEL_KABYLAKE1:
|
||||
case CPU_MODEL_KABYLAKE2:
|
||||
case CPU_MODEL_CANNONLAKE:
|
||||
case CPU_MODEL_ICELAKE_A:
|
||||
case CPU_MODEL_ICELAKE_C:
|
||||
case CPU_MODEL_ICELAKE_D:
|
||||
case CPU_MODEL_ICELAKE:
|
||||
case CPU_MODEL_COMETLAKE_S:
|
||||
case CPU_MODEL_COMETLAKE_Y:
|
||||
case CPU_MODEL_COMETLAKE_U:
|
||||
msr = AsmReadMsr64(MSR_CORE_THREAD_COUNT); //0x35
|
||||
DBG("MSR 0x35 %16llX\n", msr);
|
||||
gCPUStructure.Cores = (UINT8)bitfield((UINT32)msr, 31, 16);
|
||||
@ -490,6 +497,13 @@ VOID GetCPUProperties (VOID)
|
||||
case CPU_MODEL_KABYLAKE1:
|
||||
case CPU_MODEL_KABYLAKE2:
|
||||
case CPU_MODEL_CANNONLAKE:
|
||||
case CPU_MODEL_ICELAKE_A:
|
||||
case CPU_MODEL_ICELAKE_C:
|
||||
case CPU_MODEL_ICELAKE_D:
|
||||
case CPU_MODEL_ICELAKE:
|
||||
case CPU_MODEL_COMETLAKE_S:
|
||||
case CPU_MODEL_COMETLAKE_Y:
|
||||
case CPU_MODEL_COMETLAKE_U:
|
||||
gCPUStructure.TSCFrequency = MultU64x32(gCPUStructure.CurrentSpeed, Mega); //MHz -> Hz
|
||||
gCPUStructure.CPUFrequency = gCPUStructure.TSCFrequency;
|
||||
|
||||
@ -1361,6 +1375,14 @@ UINT16 GetAdvancedCpuType ()
|
||||
case CPU_MODEL_SKYLAKE_S:
|
||||
case CPU_MODEL_KABYLAKE1:
|
||||
case CPU_MODEL_KABYLAKE2:
|
||||
case CPU_MODEL_CANNONLAKE:
|
||||
case CPU_MODEL_ICELAKE_A:
|
||||
case CPU_MODEL_ICELAKE_C:
|
||||
case CPU_MODEL_ICELAKE_D:
|
||||
case CPU_MODEL_ICELAKE:
|
||||
case CPU_MODEL_COMETLAKE_S:
|
||||
case CPU_MODEL_COMETLAKE_Y:
|
||||
case CPU_MODEL_COMETLAKE_U:
|
||||
if (AsciiStrStr(gCPUStructure.BrandString, "Core(TM) i3"))
|
||||
return 0x905; // Core i3 - Apple doesn't use it
|
||||
if (AsciiStrStr(gCPUStructure.BrandString, "Core(TM) i5"))
|
||||
|
Loading…
Reference in New Issue
Block a user