From efe95c869ad080ef55d112c2cc3d27c1f9d7a3d1 Mon Sep 17 00:00:00 2001 From: vit9696 Date: Fri, 29 May 2020 00:32:37 +0300 Subject: [PATCH] Added improved CPU type detection for newer CPU types --- Changelog.md | 5 +++-- Include/Apple/IndustryStandard/AppleMachoImage.h | 1 + Include/Intel/IndustryStandard/ProcessorInfo.h | 6 ++++++ Library/OcCpuLib/AppleCpuSupport.c | 5 +++++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index c9820ae9..d4a62a4d 100644 --- a/Changelog.md +++ b/Changelog.md @@ -32,8 +32,9 @@ OpenCore Changelog - Renamed `Block` to `Delete` in `ACPI`,`DeviceProperties`, and `NVRAM` - Added MacBookPro16,2 and MacBookPro16,3 model codes - Added PCI device scanning policy support (e.g. VIRTIO) -- AudioDxe: Playback performance improvements -- DataBase: Update builtin firmware versions +- Improved playback performance in AudioDxe +- Updated builtin firmware versions for SMBIOS and the rest +- Added improved CPU type detection for newer CPU types #### v0.5.8 - Fixed invalid CPU object reference in SSDT-PLUG diff --git a/Include/Apple/IndustryStandard/AppleMachoImage.h b/Include/Apple/IndustryStandard/AppleMachoImage.h index 49b7da08..09364b54 100644 --- a/Include/Apple/IndustryStandard/AppleMachoImage.h +++ b/Include/Apple/IndustryStandard/AppleMachoImage.h @@ -262,6 +262,7 @@ enum { MachCpuFamilyIntelKabyLake = 0x0F817246, MachCpuFamilyIntelCoffeeLake = MachCpuFamilyIntelKabyLake, MachCpuFamilyIntelIceLake = 0x38435547, + MachCpuFamilyIntelCometLake = 0x1CF8A03E, // // The following synonyms are deprecated: // diff --git a/Include/Intel/IndustryStandard/ProcessorInfo.h b/Include/Intel/IndustryStandard/ProcessorInfo.h index 4160ce19..0feaa1c8 100755 --- a/Include/Intel/IndustryStandard/ProcessorInfo.h +++ b/Include/Intel/IndustryStandard/ProcessorInfo.h @@ -188,6 +188,12 @@ enum { #define CPU_MODEL_COFFEELAKE_ULT 0x9E #define CPU_MODEL_COFFEELAKE_ULX 0x9E #define CPU_MODEL_COFFEELAKE_DT 0x9E +#define CPU_MODEL_ICELAKE_Y 0x7D +#define CPU_MODEL_ICELAKE_U 0x7E +#define CPU_MODEL_ICELAKE_SP 0x9F /* Some variation of Ice Lake */ +#define CPU_MODEL_COMETLAKE_S 0xA5 /* desktop CometLake */ +#define CPU_MODEL_COMETLAKE_Y 0xA5 /* aka 10th generation Amber Lake Y */ +#define CPU_MODEL_COMETLAKE_U 0xA6 #define CPU_SOCKET_UNKNOWN 0x02 #define CPU_SOCKET_PGA478 0x0F diff --git a/Library/OcCpuLib/AppleCpuSupport.c b/Library/OcCpuLib/AppleCpuSupport.c index 6fba3bc3..dc6c67bd 100644 --- a/Library/OcCpuLib/AppleCpuSupport.c +++ b/Library/OcCpuLib/AppleCpuSupport.c @@ -509,6 +509,11 @@ InternalDetectAppleProcessorType ( // case CPU_MODEL_KABYLAKE: // 0x8E case CPU_MODEL_COFFEELAKE: // 0x9E + case CPU_MODEL_COMETLAKE_S: // 0xA5 FIXME - unknown, for now + case CPU_MODEL_COMETLAKE_U: // 0xA6 FIXME - unknown, for now + case CPU_MODEL_ICELAKE_Y: // 0x7D FIXME - unknown, for now + case CPU_MODEL_ICELAKE_U: // 0x7E FIXME - unknown, for now + case CPU_MODEL_ICELAKE_SP: // 0x9F FIXME - unknown, for now if (AppleMajorType == AppleProcessorMajorM3) { // MB101 (m3 7Y32) return AppleProcessorTypeCoreM3Type7; // 0x0C07 -- GitLab