From 13f5021fa443b20da587dbf371de1b1681f03fe8 Mon Sep 17 00:00:00 2001 From: LAbyOne Date: Tue, 25 May 2021 16:08:30 +0200 Subject: [PATCH 01/11] cleaned up code --- buildme | 42 +----------------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/buildme b/buildme index 6851a10bc..74c2e5d5f 100755 --- a/buildme +++ b/buildme @@ -462,47 +462,7 @@ select opt in "${options[@]}" break ;; "test build (no autogen, no boot files)") - Hackintool - break - ;; - "Get BitmaskDecode") - BitmaskDecode - break - ;; - "Get MaciASL") - MaciASL - break - ;; - "Get dmidecode") - dmidecode - break - ;; - "Get IOReg-Devices") - Get-IOReg-Devices - break - ;; - "Get NativeDisplayBrightness") - NDBrightness - break - ;; - "Get SSDTTime") - SSDTTime - break - ;; - "Get USBMap") - USBMap - break - ;; - "Get QtiASL") - QtiASL - break - ;; - "Get CsrDecode") - CsrDecode - break - ;; - "Get gibMacOS") - gibMacOS + buildCloverTest break ;; "back to buildme") From adb880456de7b0d855c3aaa6590771c66cf00b4f Mon Sep 17 00:00:00 2001 From: SergeySlice Date: Fri, 25 Jun 2021 20:58:38 +0300 Subject: [PATCH 02/11] initial value for KernelPM to be in menu Signed-off-by: SergeySlice --- rEFIt_UEFI/refit/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/rEFIt_UEFI/refit/main.cpp b/rEFIt_UEFI/refit/main.cpp index 2aef84f5e..c25fb9591 100644 --- a/rEFIt_UEFI/refit/main.cpp +++ b/rEFIt_UEFI/refit/main.cpp @@ -2956,6 +2956,7 @@ RefitMain (IN EFI_HANDLE ImageHandle, } // DBG("0: GlobalConfig.C3Latency=%x\n", gSettings.ACPI.SSDT._C3Latency); GlobalConfig.C3Latency = gSettings.ACPI.SSDT._C3Latency; + GlobalConfig.KPKernelPm = gSettings.KernelAndKextPatches._KPKernelPm; // DBG("0: gSettings.CPU.SavingMode=%x\n", gSettings.CPU.SavingMode); // ThemeX.FillByEmbedded(); //init XTheme before EarlyUserSettings { From 4e995a05e3fb09cf5f945e273110ed46d70ded50 Mon Sep 17 00:00:00 2001 From: jief666 Date: Thu, 1 Jul 2021 18:03:15 +0300 Subject: [PATCH 03/11] Restore correct loading order ConfigManager::LoadConfig(). --- rEFIt_UEFI/PlatformEFI/BootLog.cpp | 1 + rEFIt_UEFI/Settings/ConfigManager.cpp | 31 +++++++++++++-------------- rEFIt_UEFI/Settings/Self.cpp | 12 +++++------ 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/rEFIt_UEFI/PlatformEFI/BootLog.cpp b/rEFIt_UEFI/PlatformEFI/BootLog.cpp index e5299837d..a57279171 100644 --- a/rEFIt_UEFI/PlatformEFI/BootLog.cpp +++ b/rEFIt_UEFI/PlatformEFI/BootLog.cpp @@ -249,6 +249,7 @@ void EFIAPI MemLogCallback(IN INTN DebugMode, IN CHAR8 *LastMessage) } if ((DebugMode >= 1) && gSettings.Boot.DebugLog) { + SuspendMemLogCallback smc; SaveMessageToDebugLogFile(LastMessage); } } diff --git a/rEFIt_UEFI/Settings/ConfigManager.cpp b/rEFIt_UEFI/Settings/ConfigManager.cpp index 7bda56e26..00a486338 100644 --- a/rEFIt_UEFI/Settings/ConfigManager.cpp +++ b/rEFIt_UEFI/Settings/ConfigManager.cpp @@ -548,7 +548,7 @@ return Status; } /* - * Load a plist into configPlist global object, "transfer" the settings into gSettings and call afterGetUserSettings() + * Load a plist into configPlist global object * ConfName : name of the file, without .plist extension. File will be searched in OEM or main folder */ EFI_STATUS ConfigManager::LoadConfigPlist(const XStringW& ConfName) @@ -559,7 +559,7 @@ EFI_STATUS ConfigManager::LoadConfigPlist(const XStringW& ConfName) } /* - * Load a plist into smbiosPlist global object, "transfer" the settings into gSettings and call afterGetUserSettings() + * Load a plist into smbiosPlist global object * ConfName : name of the file, without .plist extension. File will be searched in OEM or main folder */ EFI_STATUS ConfigManager::LoadSMBIOSPlist(const XStringW& ConfName) @@ -886,7 +886,7 @@ EFI_STATUS ConfigManager::LoadConfig(const XStringW& ConfName) EFI_STATUS Status = LoadConfigPlist(ConfName); if ( EFI_ERROR(Status) ) { DBG("LoadConfigPlist return %s. Config not loaded\n", efiStrError(Status)); - return Status; + //return Status; // Let's try to continue with default values. } /*Status = */ LoadSMBIOSPlist(L"smbios"_XSW); // we don't need Status. If not loaded correctly, smbiosPlist is !defined and will be ignored by AssignOldNewSettings() @@ -900,19 +900,18 @@ EFI_STATUS ConfigManager::LoadConfig(const XStringW& ConfName) Model = GetDefaultModel(); } -// if ( !EFI_ERROR(Status) ) { -// gSettings.takeValueFrom(configPlist); - // TODO improve this (avoid to delete settings to re-import them !) - // restore default value for SMBIOS (delete values from configPlist) - SetDMISettingsForModel(Model, &gSettings, &GlobalConfig); - // import values from configPlist if they are defined - FillSmbiosWithDefaultValue(Model, configPlist.getSMBIOS()); - if ( smbiosPlist.SMBIOS.isDefined() ) { - // import values from smbiosPlist if they are defined - FillSmbiosWithDefaultValue(Model, smbiosPlist.SMBIOS); - } -// } - gSettings.takeValueFrom(configPlist); + if ( !EFI_ERROR(Status) ) { + gSettings.takeValueFrom(configPlist); // if load failed, keep default value. + } + // TODO improve this (avoid to delete settings to re-import them !) + // restore default value for SMBIOS (delete values from configPlist) + SetDMISettingsForModel(Model, &gSettings, &GlobalConfig); + // import values from configPlist if they are defined + FillSmbiosWithDefaultValue(Model, configPlist.getSMBIOS()); + if ( smbiosPlist.SMBIOS.isDefined() ) { + // import values from smbiosPlist if they are defined + FillSmbiosWithDefaultValue(Model, smbiosPlist.SMBIOS); + } applySettings(); return Status; diff --git a/rEFIt_UEFI/Settings/Self.cpp b/rEFIt_UEFI/Settings/Self.cpp index 1e4182722..c70caa29b 100644 --- a/rEFIt_UEFI/Settings/Self.cpp +++ b/rEFIt_UEFI/Settings/Self.cpp @@ -51,7 +51,7 @@ EFI_STATUS Self::__initialize(EFI_HANDLE SelfImageHandle, EFI_LOADED_IMAGE** Sel EFI_FILE* SelfVolumeRootDir = *SelfVolumeRootDirPtr; #ifdef JIEF_DEBUG - DBG("SelfVolumeRootDir = %lld\n", uintptr_t(SelfVolumeRootDir)); +// DBG("SelfVolumeRootDir = %lld\n", uintptr_t(SelfVolumeRootDir)); #endif // find the current directory @@ -69,8 +69,8 @@ EFI_STATUS Self::__initialize(EFI_HANDLE SelfImageHandle, EFI_LOADED_IMAGE** Sel *efiFileNamePtr = CloverDirFullPath.basename(); #ifdef JIEF_DEBUG - XStringW& efiFileName = *efiFileNamePtr; - DBG("efiFileName=%ls\n", efiFileName.wc_str()); +// XStringW& efiFileName = *efiFileNamePtr; +// DBG("efiFileName=%ls\n", efiFileName.wc_str()); #endif // History : if this Clover was started as BootX64.efi, redirect to /EFI/CLOVER @@ -87,7 +87,7 @@ EFI_STATUS Self::__initialize(EFI_HANDLE SelfImageHandle, EFI_LOADED_IMAGE** Sel if ( i != SIZE_T_MAX && i > 0 ) CloverDirFullPath.deleteCharsAtPos(i, SIZE_T_MAX); // keep getCloverDir() in sync ! #ifdef JIEF_DEBUG - DBG("SelfDirPath = %ls\n", CloverDirFullPath.wc_str()); +// DBG("SelfDirPath = %ls\n", CloverDirFullPath.wc_str()); #endif Status = SelfVolumeRootDir->Open(SelfVolumeRootDir, CloverDirPtr, CloverDirFullPath.wc_str(), EFI_FILE_MODE_READ, 0); @@ -96,8 +96,8 @@ EFI_STATUS Self::__initialize(EFI_HANDLE SelfImageHandle, EFI_LOADED_IMAGE** Sel return RETURN_LOAD_ERROR; } #ifdef JIEF_DEBUG - EFI_FILE* CloverDir = *CloverDirPtr; - DBG("CloverDir = %lld\n", uintptr_t(CloverDir)); +// EFI_FILE* CloverDir = *CloverDirPtr; +// DBG("CloverDir = %lld\n", uintptr_t(CloverDir)); #endif return EFI_SUCCESS; From d2e652bd4472ac36fc96f4c14a337c924da776a1 Mon Sep 17 00:00:00 2001 From: jief666 Date: Thu, 1 Jul 2021 18:16:54 +0300 Subject: [PATCH 04/11] Move some initializations in ConfigManager. --- rEFIt_UEFI/Settings/ConfigManager.cpp | 40 +++------------------------ rEFIt_UEFI/refit/main.cpp | 2 -- 2 files changed, 4 insertions(+), 38 deletions(-) diff --git a/rEFIt_UEFI/Settings/ConfigManager.cpp b/rEFIt_UEFI/Settings/ConfigManager.cpp index 00a486338..544f73375 100644 --- a/rEFIt_UEFI/Settings/ConfigManager.cpp +++ b/rEFIt_UEFI/Settings/ConfigManager.cpp @@ -1013,7 +1013,7 @@ EFI_STATUS ConfigManager::InitialisePlatform() GetCPUProperties(); DiscoverDevices(); -// GetMacAddress(&gConf.LanCardArrayNonConst); + //SavingMode if ( g_SmbiosDiscoveredSettings.EnabledCores ) { @@ -1025,45 +1025,13 @@ EFI_STATUS ConfigManager::InitialisePlatform() selfOem.initialize("config"_XS8, gFirmwareClover, GlobalConfig.OEMBoardFromSmbios, GlobalConfig.OEMProductFromSmbios, (INT32)(DivU64x32(gCPUStructure.CPUFrequency, Mega)), gConf.LanCardArray); Status = gConf.LoadConfig(L"config"_XSW); + GlobalConfig.C3Latency = gSettings.ACPI.SSDT._C3Latency; + GlobalConfig.KPKernelPm = gSettings.KernelAndKextPatches._KPKernelPm; + for ( size_t idx = 0 ; idx < GfxPropertiesArrayNonConst.size() ; ++idx ) { GfxPropertiesArrayNonConst[idx].LoadVBios = gSettings.Graphics.LoadVBios; } -// /* populate GfxPropertiesArrayNonConst */ -// GfxPropertiesArrayNonConst.setEmpty(); -// for ( size_t idx = 0 ; idx < m_Discoverer.GfxPropertiesArray.size() ; ++idx ) { -// GfxProperties* gfx = new GfxProperties; -// *gfx = GfxPropertiesArray[idx]; -// (*gfx).LoadVBios = gSettings.Graphics.LoadVBios; -// GfxPropertiesArrayNonConst.AddReference(gfx, true); -// } -// -// /* populate HdaPropertiesArrayNonConst */ -// HdaPropertiesArrayNonConst.setEmpty(); -// for ( size_t idx = 0 ; idx < m_Discoverer.HdaPropertiesArray.size() ; ++idx ) { -// HdaProperties* hda = new HdaProperties; -// *hda = HdaPropertiesArray[idx]; -// HdaPropertiesArrayNonConst.AddReference(hda, true); -// } -// -// /* populate LanCardArrayNonConst */ -// LanCardArrayNonConst.setEmpty(); -// GetUEFIMacAddress(); -//// if ( LanCardArrayNonConst.size() == 0 /*&& gSettings.RtVariables.GetLegacyLanAddress()*/ ) { -// for ( size_t idx = 0 ; idx < m_Discoverer.LanCardArray.size() ; ++idx ) { -// if ( !LanCardArrayNonConst.containsMacAddress(m_Discoverer.LanCardArray[idx].Mac)) { -// LanCardClass* lan = new LanCardClass; -// memcpy(&lan->MacAddress, m_Discoverer.LanCardArray[idx].Mac, sizeof(lan->MacAddress)); -// LanCardArrayNonConst.AddReference(lan, true); -// } -// } -//// } - -// // Why this overrides ? Should we remove the setting from config.plist ? -// gSettings.GUI.Mouse.PointerEnabled = TRUE; -// gSettings.GUI.Mouse.PointerSpeed = 2; -// gSettings.GUI.Mouse.DoubleClickTime = 500; //TODO - make it constant as nobody change it - if (gSettings.Devices.Audio.ResetHDA) ResetHDA(); #ifdef ENABLE_SECURE_BOOT diff --git a/rEFIt_UEFI/refit/main.cpp b/rEFIt_UEFI/refit/main.cpp index c25fb9591..16b6157f6 100644 --- a/rEFIt_UEFI/refit/main.cpp +++ b/rEFIt_UEFI/refit/main.cpp @@ -2955,8 +2955,6 @@ RefitMain (IN EFI_HANDLE ImageHandle, GetListOfConfigs(); } // DBG("0: GlobalConfig.C3Latency=%x\n", gSettings.ACPI.SSDT._C3Latency); - GlobalConfig.C3Latency = gSettings.ACPI.SSDT._C3Latency; - GlobalConfig.KPKernelPm = gSettings.KernelAndKextPatches._KPKernelPm; // DBG("0: gSettings.CPU.SavingMode=%x\n", gSettings.CPU.SavingMode); // ThemeX.FillByEmbedded(); //init XTheme before EarlyUserSettings { From e6617e34970c6087ab7ffbdaea0400d07e431d2e Mon Sep 17 00:00:00 2001 From: jief666 Date: Fri, 2 Jul 2021 16:15:06 +0300 Subject: [PATCH 05/11] Delete useless lines. --- rEFIt_UEFI/Settings/ConfigManager.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/rEFIt_UEFI/Settings/ConfigManager.cpp b/rEFIt_UEFI/Settings/ConfigManager.cpp index 544f73375..58f9437c2 100644 --- a/rEFIt_UEFI/Settings/ConfigManager.cpp +++ b/rEFIt_UEFI/Settings/ConfigManager.cpp @@ -740,9 +740,6 @@ void ConfigManager::applySettings() const } //gSettings.CPU.Turbo = gCPUStructure.Turbo; - if (configPlist.CPU.dgetSavingMode() != 0xFF) { //means not set - gSettings.CPU.SavingMode = configPlist.CPU.dgetSavingMode(); - } if ( gCPUStructure.Model >= CPU_MODEL_SKYLAKE_D ) { if ( !configPlist.CPU.getUseARTFreq().isDefined() ) From a634a8258cc4f5ad737280648dbabd15ae217678 Mon Sep 17 00:00:00 2001 From: jief666 Date: Fri, 2 Jul 2021 18:10:10 +0300 Subject: [PATCH 06/11] DumpNvram(). Debug messages in Self. Typo in BootLog.cpp Comment in XStringAbstract.h --- rEFIt_UEFI/Platform/Nvram.cpp | 39 ++++++++++++++++++--- rEFIt_UEFI/Platform/Nvram.h | 9 +++-- rEFIt_UEFI/PlatformEFI/BootLog.cpp | 2 +- rEFIt_UEFI/Settings/Self.cpp | 24 ++++++++----- rEFIt_UEFI/Settings/Self.h | 2 +- rEFIt_UEFI/cpp_foundation/XStringAbstract.h | 2 +- rEFIt_UEFI/refit/main.cpp | 5 +++ 7 files changed, 64 insertions(+), 19 deletions(-) diff --git a/rEFIt_UEFI/Platform/Nvram.cpp b/rEFIt_UEFI/Platform/Nvram.cpp index 5774c15a9..ce1f021e3 100755 --- a/rEFIt_UEFI/Platform/Nvram.cpp +++ b/rEFIt_UEFI/Platform/Nvram.cpp @@ -141,8 +141,7 @@ void *GetNvramVariable( XString8 GetNvramVariableAsXString8( IN CONST CHAR16 *VariableName, IN EFI_GUID *VendorGuid, - OUT UINT32 *Attributes OPTIONAL, - OUT UINTN *DataSize OPTIONAL) + OUT UINT32 *Attributes OPTIONAL) { EFI_STATUS Status; XString8 returnValue; @@ -166,9 +165,6 @@ XString8 GetNvramVariableAsXString8( returnValue.setEmpty(); } } - if (DataSize != NULL) { - *DataSize = IntDataSize; - } returnValue.dataSized(IntDataSize+1)[IntDataSize] = 0; returnValue.updateSize(); return returnValue; @@ -334,6 +330,39 @@ IsDeletableVariable ( return FALSE; } +#ifdef JIEF_DEBUG +EFI_STATUS +DumpNvram() +{ + EFI_STATUS Status = EFI_NOT_FOUND; + EFI_GUID Guid; + XStringW Name = L""_XSW; + UINTN Size; + + DbgHeader("DumpNvram"); + + ZeroMem (&Guid, sizeof(Guid)); + + do { + Size = Name.sizeInBytes(); + Status = gRT->GetNextVariableName(&Size, Name.dataSized(Size+1), &Guid); + if (Status == EFI_BUFFER_TOO_SMALL) { + Status = gRT->GetNextVariableName (&Size, Name.dataSized(Size+1), &Guid); + } + + if ( !EFI_ERROR(Status) ) { + XString8 s = GetNvramVariableAsXString8(Name.wc_str(), &Guid, NULL); + DBG("NVRAM : %s,%ls = '%s'\n", GuidLEToXString8(Guid).c_str(), Name.wc_str(), s.c_str()); + }else if ( Status != EFI_NOT_FOUND ) { + DBG("GetNextVariableName returns '%s'\n", efiStrError(Status)); + break; + } + } while( Status != EFI_NOT_FOUND ); + return Status; +} + +#endif + // Reset Native NVRAM by vit9696, reworked and implemented by Sherlocks EFI_STATUS ResetNativeNvram () diff --git a/rEFIt_UEFI/Platform/Nvram.h b/rEFIt_UEFI/Platform/Nvram.h index 7acf0af1c..819ac7a95 100644 --- a/rEFIt_UEFI/Platform/Nvram.h +++ b/rEFIt_UEFI/Platform/Nvram.h @@ -35,8 +35,7 @@ void XString8 GetNvramVariableAsXString8( IN CONST CHAR16 *VariableName, IN EFI_GUID *VendorGuid, - OUT UINT32 *Attributes OPTIONAL, - OUT UINTN *DataSize OPTIONAL + OUT UINT32 *Attributes OPTIONAL ); EFI_STATUS @@ -119,4 +118,10 @@ RemoveStartupDiskVolume (void); UINT64 GetEfiTimeInMs (IN EFI_TIME *T); +#ifdef JIEF_DEBUG +EFI_STATUS DumpNvram(); +#endif + + + #endif /* PLATFORM_NVRAM_H_ */ diff --git a/rEFIt_UEFI/PlatformEFI/BootLog.cpp b/rEFIt_UEFI/PlatformEFI/BootLog.cpp index a57279171..f2c919939 100644 --- a/rEFIt_UEFI/PlatformEFI/BootLog.cpp +++ b/rEFIt_UEFI/PlatformEFI/BootLog.cpp @@ -79,7 +79,7 @@ static EFI_FILE_PROTOCOL* gLogFile = NULL; int g_OpeningLogFile = 0; -// Avoid debug looping. TO be able to call DBG from inside function that DBG calls, we need to suspend callback to avoid a loop. +// Avoid debug looping. To be able to call DBG from inside function that DBG calls, we need to suspend callback to avoid a loop. // Just instanciante this, the destructor will restore the callback. class SuspendMemLogCallback { diff --git a/rEFIt_UEFI/Settings/Self.cpp b/rEFIt_UEFI/Settings/Self.cpp index c70caa29b..81ef95a11 100644 --- a/rEFIt_UEFI/Settings/Self.cpp +++ b/rEFIt_UEFI/Settings/Self.cpp @@ -21,7 +21,7 @@ #define DBG(...) DebugLog(DEBUG_SELF, __VA_ARGS__) #endif -EFI_STATUS Self::__initialize(EFI_HANDLE SelfImageHandle, EFI_LOADED_IMAGE** SelfLoadedImagePtr, EFI_SIMPLE_FILE_SYSTEM_PROTOCOL** SelfSimpleVolumePtr, EFI_FILE** SelfVolumeRootDirPtr, XStringW* CloverDirFullPathPtr, XStringW* efiFileNamePtr, EFI_FILE** CloverDirPtr) +EFI_STATUS Self::__initialize(bool debugMsg, EFI_HANDLE SelfImageHandle, EFI_LOADED_IMAGE** SelfLoadedImagePtr, EFI_SIMPLE_FILE_SYSTEM_PROTOCOL** SelfSimpleVolumePtr, EFI_FILE** SelfVolumeRootDirPtr, XStringW* CloverDirFullPathPtr, XStringW* efiFileNamePtr, EFI_FILE** CloverDirPtr) { EFI_STATUS Status; @@ -51,7 +51,7 @@ EFI_STATUS Self::__initialize(EFI_HANDLE SelfImageHandle, EFI_LOADED_IMAGE** Sel EFI_FILE* SelfVolumeRootDir = *SelfVolumeRootDirPtr; #ifdef JIEF_DEBUG -// DBG("SelfVolumeRootDir = %lld\n", uintptr_t(SelfVolumeRootDir)); + if ( debugMsg ) DBG("SelfVolumeRootDir = %lld\n", uintptr_t(SelfVolumeRootDir)); #endif // find the current directory @@ -69,8 +69,10 @@ EFI_STATUS Self::__initialize(EFI_HANDLE SelfImageHandle, EFI_LOADED_IMAGE** Sel *efiFileNamePtr = CloverDirFullPath.basename(); #ifdef JIEF_DEBUG -// XStringW& efiFileName = *efiFileNamePtr; -// DBG("efiFileName=%ls\n", efiFileName.wc_str()); + if ( debugMsg ) { + XStringW& efiFileName = *efiFileNamePtr; + DBG("efiFileName=%ls\n", efiFileName.wc_str()); + } #endif // History : if this Clover was started as BootX64.efi, redirect to /EFI/CLOVER @@ -87,7 +89,9 @@ EFI_STATUS Self::__initialize(EFI_HANDLE SelfImageHandle, EFI_LOADED_IMAGE** Sel if ( i != SIZE_T_MAX && i > 0 ) CloverDirFullPath.deleteCharsAtPos(i, SIZE_T_MAX); // keep getCloverDir() in sync ! #ifdef JIEF_DEBUG -// DBG("SelfDirPath = %ls\n", CloverDirFullPath.wc_str()); + if ( debugMsg ) { + DBG("SelfDirPath = %ls\n", CloverDirFullPath.wc_str()); + } #endif Status = SelfVolumeRootDir->Open(SelfVolumeRootDir, CloverDirPtr, CloverDirFullPath.wc_str(), EFI_FILE_MODE_READ, 0); @@ -96,8 +100,10 @@ EFI_STATUS Self::__initialize(EFI_HANDLE SelfImageHandle, EFI_LOADED_IMAGE** Sel return RETURN_LOAD_ERROR; } #ifdef JIEF_DEBUG -// EFI_FILE* CloverDir = *CloverDirPtr; -// DBG("CloverDir = %lld\n", uintptr_t(CloverDir)); + if ( debugMsg ) { + EFI_FILE* CloverDir = *CloverDirPtr; + DBG("CloverDir = %lld\n", uintptr_t(CloverDir)); + } #endif return EFI_SUCCESS; @@ -111,7 +117,7 @@ const EFI_FILE_PROTOCOL* Self::getCloverDirAndEfiFileName(EFI_HANDLE ImageHandle XStringW CloverDirFullPath; // full path of folder containing this efi. EFI_FILE* CloverDir; // opened folder containing this efi - /*EFI_STATUS Status = */__initialize(ImageHandle, &SelfLoadedImage, &SelfSimpleVolume, &SelfVolumeRootDir, &CloverDirFullPath, efiFileName, &CloverDir); + /*EFI_STATUS Status = */__initialize(false, ImageHandle, &SelfLoadedImage, &SelfSimpleVolume, &SelfVolumeRootDir, &CloverDirFullPath, efiFileName, &CloverDir); if ( efiFileName->isEmpty() ) { if ( CloverDir != NULL ) CloverDir->Close(CloverDir); return NULL; @@ -143,7 +149,7 @@ EFI_STATUS Self::_initialize() { // EFI_STATUS Status; - /*Status = */__initialize(m_SelfImageHandle, &m_SelfLoadedImage, &m_SelfSimpleVolume, &m_SelfVolumeRootDir, &m_CloverDirFullPath, &m_efiFileName, &m_CloverDir); + /*Status = */__initialize(true, m_SelfImageHandle, &m_SelfLoadedImage, &m_SelfSimpleVolume, &m_SelfVolumeRootDir, &m_CloverDirFullPath, &m_efiFileName, &m_CloverDir); if ( m_SelfLoadedImage == NULL ) log_technical_bug("Cannot get SelfLoadedImage"); if ( m_SelfLoadedImage->DeviceHandle == NULL ) log_technical_bug("m_SelfLoadedImage->DeviceHandle == NULL"); if ( m_SelfSimpleVolume == NULL ) log_technical_bug("Cannot get m_SelfSimpleVolume"); diff --git a/rEFIt_UEFI/Settings/Self.h b/rEFIt_UEFI/Settings/Self.h index ba5d6d24d..6f882cb72 100644 --- a/rEFIt_UEFI/Settings/Self.h +++ b/rEFIt_UEFI/Settings/Self.h @@ -20,7 +20,7 @@ class Self { // Class method, usable even without any instance of Self. protected: - static EFI_STATUS __initialize(EFI_HANDLE m_SelfImageHandle, EFI_LOADED_IMAGE** m_SelfLoadedImage, EFI_SIMPLE_FILE_SYSTEM_PROTOCOL** m_SelfSimpleVolumePtr, EFI_FILE** m_SelfVolumeRootDirPtr, XStringW* m_CloverDirFullPathPtr, XStringW* m_efiFileNamePtr, EFI_FILE** m_CloverDirPtr); + static EFI_STATUS __initialize(bool debugMsg, EFI_HANDLE m_SelfImageHandle, EFI_LOADED_IMAGE** m_SelfLoadedImage, EFI_SIMPLE_FILE_SYSTEM_PROTOCOL** m_SelfSimpleVolumePtr, EFI_FILE** m_SelfVolumeRootDirPtr, XStringW* m_CloverDirFullPathPtr, XStringW* m_efiFileNamePtr, EFI_FILE** m_CloverDirPtr); public: static const EFI_FILE_PROTOCOL* getCloverDirAndEfiFileName(EFI_HANDLE ImageHandle, XStringW* efiFileName); diff --git a/rEFIt_UEFI/cpp_foundation/XStringAbstract.h b/rEFIt_UEFI/cpp_foundation/XStringAbstract.h index ae9222d1d..580728810 100644 --- a/rEFIt_UEFI/cpp_foundation/XStringAbstract.h +++ b/rEFIt_UEFI/cpp_foundation/XStringAbstract.h @@ -921,7 +921,7 @@ public: } void updateSize() { #ifdef XSTRING_CACHING_OF_SIZE - super::__m_size = 0; + super::__m_size = 0; // Jief, TODO #endif } // diff --git a/rEFIt_UEFI/refit/main.cpp b/rEFIt_UEFI/refit/main.cpp index 16b6157f6..4c9af1c38 100644 --- a/rEFIt_UEFI/refit/main.cpp +++ b/rEFIt_UEFI/refit/main.cpp @@ -2878,6 +2878,11 @@ RefitMain (IN EFI_HANDLE ImageHandle, gConf.InitialisePlatform(); // DBG("5: GlobalConfig.C3Latency=%x\n", GlobalConfig.C3Latency); + +#ifdef JIEF_DEBUG + DumpNvram(); +#endif + /* * saving debug.log works from here */ From d1258c7dc08f8de032fc3b03fa52571fa7fe057e Mon Sep 17 00:00:00 2001 From: ShortArrow Date: Thu, 15 Jul 2021 08:56:44 +0900 Subject: [PATCH 07/11] Update README.md --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 382df1b21..2467c2f12 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,24 @@ # CloverBootloader Bootloader for macOS, Windows and Linux in UEFI and in legacy mode +# Features + +- Boot macOS, Windows, and Linux in UEFI or legacy mode on Mac or PC with UEFI or BIOS firmware +- Boot using UEFI firmware directly or CloverEFI UEFI firmware emulation +- Customizable GUI including themes, icons, fonts, background images, animations, and mouse pointers. +- Theme manager and theme repository at http://sourceforge.net/p/cloverefiboot/themes/ +- Native screen resolution in GUI +- Press Page Up or Page Down to change GUI resolution +- Press F1 for multilingual help, depending on language setting in configuration +- Press F2 to save preboot.log from GUI +- Press F4 to save original (OEM) ACPI tables into /EFI/CLOVER/ACPI/origin +- Press F5 to test DSDT patching +- Press F6 to save graphics firmware into /EFI/CLOVER/misc +- Press F10 to save screenshots from GUI +- Press F12 to eject CD/DVD +- GUI refreshes after CD/DVD insertion +- Ability to boot previously selected boot entry after default timeout +- Boot entries menu scrolls if screen resolution is too low for menu +- Create custom boot entries for personalizing boot entries and add support for other operating systems +- Create Clover boot entry in NVRAM with tool from GUI +- Launch EFI command shell from GUI +- Startup sound controlled by F8 and checked by F7 From cd1ff33b59611a50292aabca2e14c417af970b68 Mon Sep 17 00:00:00 2001 From: ShortArrow Date: Thu, 15 Jul 2021 08:58:56 +0900 Subject: [PATCH 08/11] Update README.md --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2467c2f12..8a46d4edb 100644 --- a/README.md +++ b/README.md @@ -8,17 +8,17 @@ Bootloader for macOS, Windows and Linux in UEFI and in legacy mode - Theme manager and theme repository at http://sourceforge.net/p/cloverefiboot/themes/ - Native screen resolution in GUI - Press Page Up or Page Down to change GUI resolution -- Press F1 for multilingual help, depending on language setting in configuration -- Press F2 to save preboot.log from GUI -- Press F4 to save original (OEM) ACPI tables into /EFI/CLOVER/ACPI/origin -- Press F5 to test DSDT patching -- Press F6 to save graphics firmware into /EFI/CLOVER/misc -- Press F10 to save screenshots from GUI -- Press F12 to eject CD/DVD +- Press **F1** for multilingual help, depending on language setting in configuration +- Press **F2** to save `preboot.log` from GUI +- Press **F4** to save original (OEM) ACPI tables into `/EFI/CLOVER/ACPI/origin` +- Press **F5** to test DSDT patching +- Press **F6** to save graphics firmware into `/EFI/CLOVER/misc` +- Press **F10** to save screenshots from GUI +- Press **F12** to eject CD/DVD - GUI refreshes after CD/DVD insertion - Ability to boot previously selected boot entry after default timeout - Boot entries menu scrolls if screen resolution is too low for menu - Create custom boot entries for personalizing boot entries and add support for other operating systems - Create Clover boot entry in NVRAM with tool from GUI - Launch EFI command shell from GUI -- Startup sound controlled by F8 and checked by F7 +- Startup sound controlled by **F8** and checked by **F7** From c7dd0cb8cb1a32d5174e6ea909c4e4d06de81642 Mon Sep 17 00:00:00 2001 From: Sherlocks Date: Sun, 25 Jul 2021 11:25:36 +0900 Subject: [PATCH 09/11] Update Platformdata --- README.md | 1 + rEFIt_UEFI/Platform/platformdata.cpp | 124 +++++++++++++-------------- 2 files changed, 63 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index 8a46d4edb..5f9ac55bc 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Bootloader for macOS, Windows and Linux in UEFI and in legacy mode - Press **F5** to test DSDT patching - Press **F6** to save graphics firmware into `/EFI/CLOVER/misc` - Press **F10** to save screenshots from GUI +- Press **F11** to reset NVRAM - Press **F12** to eject CD/DVD - GUI refreshes after CD/DVD insertion - Ability to boot previously selected boot entry after default timeout diff --git a/rEFIt_UEFI/Platform/platformdata.cpp b/rEFIt_UEFI/Platform/platformdata.cpp index a9fe72e61..d5f202668 100644 --- a/rEFIt_UEFI/Platform/platformdata.cpp +++ b/rEFIt_UEFI/Platform/platformdata.cpp @@ -101,15 +101,15 @@ PLATFORMDATA ApplePlatformData[] = "MacBook"_XS8, "1.0"_XS8, "451211MEF5X"_XS8, "MacBook-White"_XS8, 0x01, 0x60, 0x0f, 0, 0, 0x06, "k87"_XS8, "k87"_XS8, 0x72005 }, //MacBook8,1 / MacBook (Retina, 12-inch, Early 2015) - { "MacBook8,1"_XS8, "MB81.88Z.F000.B00.2004161538"_XS8, "189.0.0.0.0"_XS8, "Mac-BE0E8AC46FE800CC"_XS8, // Intel Core M-5Y51 @ 1.20 GHz + { "MacBook8,1"_XS8, "MB81.88Z.F000.B00.2106131842"_XS8, "427.140.8.0.0"_XS8, "Mac-BE0E8AC46FE800CC"_XS8, // Intel Core M-5Y51 @ 1.20 GHz "MacBook"_XS8, "1.0"_XS8, "C02RCE58GCN3"_XS8, "MacBook-Aluminum"_XS8, 0x02, 0x25, 0x0f, 0, 0, 0x87, "j92"_XS8, "j92"_XS8, 0xf0e007 }, //MacBook9,1 / MacBook (Retina, 12-inch, Early 2016) - { "MacBook9,1"_XS8, "MB91.88Z.F000.B00.2004240904"_XS8, "192.0.0.0.0"_XS8, "Mac-9AE82516C7C6B903"_XS8, // Intel Core m5-6Y54 @ 1.20 GHz + { "MacBook9,1"_XS8, "MB91.88Z.F000.B00.2106131743"_XS8, "429.140.8.0.0"_XS8, "Mac-9AE82516C7C6B903"_XS8, // Intel Core m5-6Y54 @ 1.20 GHz "MacBook"_XS8, "1.0"_XS8, "C02RM408HDNK"_XS8, "MacBook-Aluminum"_XS8, 0x02, 0x35, 0x0f, 0, 1, 0x06, "j93"_XS8, "j93"_XS8, 0xf0e007 }, // need EPCI //MacBook10,1 / MacBook (Retina, 12-inch, 2017) - { "MacBook10,1"_XS8, "MB101.88Z.F000.B00.2004240927"_XS8, "187.0.0.0.0"_XS8, "Mac-EE2EBD4B90B839A8"_XS8, // Intel Core i5-7Y54 @ 1.30 GHz + { "MacBook10,1"_XS8, "MB101.88Z.F000.B00.2106131834"_XS8, "429.140.8.0.0"_XS8, "Mac-EE2EBD4B90B839A8"_XS8, // Intel Core i5-7Y54 @ 1.30 GHz "MacBook"_XS8, "1.0"_XS8, "C02TQHACHH27"_XS8, "MacBook-Aluminum"_XS8, 0x02, 0x42, 0x0f, 0, 0, 0x12, "j122"_XS8, "j122"_XS8, 0xf08009 }, // need EPCI //MacBookPro1,1 / MacBook Pro (15-inch Glossy) @@ -181,99 +181,99 @@ PLATFORMDATA ApplePlatformData[] = "MacBook Pro"_XS8, "1.0"_XS8, "W88F9CDEDF93"_XS8, "MacBook-Aluminum"_XS8, 0x01, 0x70, 0x0f, 0, 0, 0x06, "k92"_XS8, "k92"_XS8, 0x7c005 }, //MacBookPro9,1 / MacBook Pro (15-inch, Mid 2012) - { "MacBookPro9,1"_XS8, "MBP91.88Z.F000.B00.2004121621"_XS8, "232.0.0.0.0"_XS8, "Mac-4B7AC7E43945597E"_XS8, // Intel Core i7-3720QM @ 2.60 GHz + { "MacBookPro9,1"_XS8, "MBP91.88Z.F000.B00.2106041716"_XS8, "422.0.0.0.0"_XS8, "Mac-4B7AC7E43945597E"_XS8, // Intel Core i7-3720QM @ 2.60 GHz "MacBook Pro"_XS8, "1.0"_XS8, "C02LW984F1G4"_XS8, "MacBook-Aluminum"_XS8, 0x02, 0x01, 0x0f, 0, 1, 0x75, "j31"_XS8, "j31"_XS8, 0x76006 }, // need EPCI //MacBookPro9,2 / MacBook Pro (13-inch, Mid 2012) - { "MacBookPro9,2"_XS8, "MBP91.88Z.F000.B00.2004121621"_XS8, "232.0.0.0.0"_XS8, "Mac-6F01561E16C75D06"_XS8, // Intel Core i5-3210M @ 2.50 GHz + { "MacBookPro9,2"_XS8, "MBP91.88Z.F000.B00.2106041716"_XS8, "422.0.0.0.0"_XS8, "Mac-6F01561E16C75D06"_XS8, // Intel Core i5-3210M @ 2.50 GHz "MacBook Pro"_XS8, "1.0"_XS8, "C02HA041DTY3"_XS8, "MacBook-Aluminum"_XS8, 0x02, 0x02, 0x0f, 0, 0, 0x44, "branch"_XS8, "j30"_XS8, 0x76006 }, //MacBookPro10,1 / MacBook Pro (Retina, 15-inch, Early 2013) - { "MacBookPro10,1"_XS8, "MBP101.88Z.F000.B00.2004121457"_XS8, "261.0.0.0.0"_XS8, "Mac-C3EC7CD22292981F"_XS8, // Intel Core i7-3740QM @ 2.70 GHz + { "MacBookPro10,1"_XS8, "MBP101.88Z.F000.B00.2106041718"_XS8, "422.0.0.0.0"_XS8, "Mac-C3EC7CD22292981F"_XS8, // Intel Core i7-3740QM @ 2.70 GHz "MacBook Pro"_XS8, "1.0"_XS8, "C02LHHACFFT4"_XS8, "MacBook-Aluminum"_XS8, 0x02, 0x03, 0x0f, 0, 0, 0x36, "d2"_XS8, "d2"_XS8, 0x74006 }, //MacBookPro10,2 / MacBook Pro (Retina, 13-inch, Early 2013) - { "MacBookPro10,2"_XS8, "MBP102.88Z.F000.B00.2004121456"_XS8, "284.0.0.0.0"_XS8, "Mac-AFD8A9D944EA4843"_XS8, // Intel Core i5-3230M @ 2.60 GHz + { "MacBookPro10,2"_XS8, "MBP102.88Z.F000.B00.2106041717"_XS8, "422.0.0.0.0"_XS8, "Mac-AFD8A9D944EA4843"_XS8, // Intel Core i5-3230M @ 2.60 GHz "MacBook Pro"_XS8, "1.0"_XS8, "C02K4HACFFRP"_XS8, "MacBook-Aluminum"_XS8, 0x02, 0x06, 0x0f, 0, 0, 0x59, "branch"_XS8, "d1"_XS8, 0x73007 }, //MacBookPro11,1 / MacBook Pro (Retina, 13-inch, Mid 2014) - { "MacBookPro11,1"_XS8, "MBP111.88Z.F000.B00.2004121458"_XS8, "160.0.0.0.0"_XS8, "Mac-189A3D4F975D5FFC"_XS8, // Intel Core i7-4558U @ 2.80 GHz + { "MacBookPro11,1"_XS8, "MBP111.88Z.F000.B00.2106131844"_XS8, "431.140.6.0.0"_XS8, "Mac-189A3D4F975D5FFC"_XS8, // Intel Core i7-4558U @ 2.80 GHz "MacBook Pro"_XS8, "1.0"_XS8, "C17N4HACG3QJ"_XS8, "MacBook-Aluminum"_XS8, 0x02, 0x16, 0x0f, 0, 0, 0x68, "j44"_XS8, "j44"_XS8, 0xf0b007 }, //MacBookPro11,2 / MacBook Pro (Retina, 15-inch, Mid 2014) - { "MacBookPro11,2"_XS8, "MBP112.88Z.F000.B00.2004121759"_XS8, "160.0.0.0.0"_XS8, "Mac-3CBD00234E554E41"_XS8, // Intel Core i7-4750HQ @ 2.00 GHz + { "MacBookPro11,2"_XS8, "MBP112.88Z.F000.B00.2106131836"_XS8, "431.140.6.0.0"_XS8, "Mac-3CBD00234E554E41"_XS8, // Intel Core i7-4750HQ @ 2.00 GHz "MacBook Pro"_XS8, "1.0"_XS8, "C02P9HACG9FT"_XS8, "MacBook-Aluminum"_XS8, 0x02, 0x18, 0x0f, 0, 0, 0x15, "j45"_XS8, "j45"_XS8, 0xf0b007 }, // need EPCI //MacBookPro11,3 / MacBook Pro (Retina, 15-inch, Mid 2014) - { "MacBookPro11,3"_XS8, "MBP112.88Z.F000.B00.2004121759"_XS8, "160.0.0.0.0"_XS8, "Mac-2BD1B31983FE1663"_XS8, // Intel Core i7-4870HQ @ 2.50 GHz + { "MacBookPro11,3"_XS8, "MBP112.88Z.F000.B00.2106131836"_XS8, "431.140.6.0.0"_XS8, "Mac-2BD1B31983FE1663"_XS8, // Intel Core i7-4870HQ @ 2.50 GHz "MacBook Pro"_XS8, "1.0"_XS8, "C02NNHACG3QP"_XS8, "MacBook-Aluminum"_XS8, 0x02, 0x19, 0x0f, 0, 0, 0x12, "j45g"_XS8, "j45g"_XS8, 0xf0d007 }, //MacBookPro11,4 / MacBook Pro (Retina, 15-inch, Mid 2015) - { "MacBookPro11,4"_XS8, "MBP114.88Z.F000.B00.2004161536"_XS8, "198.0.0.0.0"_XS8, "Mac-06F11FD93F0323C5"_XS8, // Intel Core i7-4770HQ @ 2.20 GHz + { "MacBookPro11,4"_XS8, "MBP114.88Z.F000.B00.2106131816"_XS8, "427.140.8.0.0"_XS8, "Mac-06F11FD93F0323C5"_XS8, // Intel Core i7-4770HQ @ 2.20 GHz "MacBook Pro"_XS8, "1.0"_XS8, "C02Q7HACG8WL"_XS8, "MacBook-Aluminum"_XS8, 0x02, 0x29, 0x0f, 0, 0, 0x23, "j145"_XS8, "j145"_XS8, 0xf07008 }, //MacBookPro11,5 / MacBook Pro (Retina, 15-inch, Mid 2015) - { "MacBookPro11,5"_XS8, "MBP114.88Z.F000.B00.2004161536"_XS8, "198.0.0.0.0"_XS8, "Mac-06F11F11946D27C5"_XS8, // Intel Core i7-4870HQ @ 2.50 GHz + { "MacBookPro11,5"_XS8, "MBP114.88Z.F000.B00.2106131816"_XS8, "427.140.8.0.0"_XS8, "Mac-06F11F11946D27C5"_XS8, // Intel Core i7-4870HQ @ 2.50 GHz "MacBook Pro"_XS8, "1.0"_XS8, "C02Q3HACG8WM"_XS8, "MacBook-Aluminum"_XS8, 0x02, 0x30, 0x0f, 0, 0, 0x02, "NA"_XS8, "NA"_XS8, 0xf0b007 }, // need rBR RPlt EPCI //MacBookPro12,1 / MacBook Pro (Retina, 13-inch, Early 2015) - { "MacBookPro12,1"_XS8, "MBP121.88Z.F000.B00.2004161539"_XS8, "191.0.0.0.0"_XS8, "Mac-E43C1C25D4880AD6"_XS8, // Intel Core i5-5257U @ 2.70 GHz + { "MacBookPro12,1"_XS8, "MBP121.88Z.F000.B00.2106131845"_XS8, "427.140.8.0.0"_XS8, "Mac-E43C1C25D4880AD6"_XS8, // Intel Core i5-5257U @ 2.70 GHz "MacBook Pro"_XS8, "1.0"_XS8, "C02Q51OSH1DP"_XS8, "MacBook-Aluminum"_XS8, 0x02, 0x28, 0x0f, 0, 0, 0x07, "j52"_XS8, "j52"_XS8, 0xf01008 }, //MacBookPro13,1 / MacBook Pro (13-inch, 2016, Two Thunderbolt 3 ports) - { "MacBookPro13,1"_XS8, "MBP131.88Z.F000.B00.2004240926"_XS8, "245.0.0.0.0"_XS8, "Mac-473D31EABEB93F9B"_XS8, // Intel Core i5-6360U @ 2.00 GHz + { "MacBookPro13,1"_XS8, "MBP131.88Z.F000.B00.2106131757"_XS8, "429.140.8.0.0"_XS8, "Mac-473D31EABEB93F9B"_XS8, // Intel Core i5-6360U @ 2.00 GHz "MacBook Pro"_XS8, "1.0"_XS8, "C02SLHACGVC1"_XS8, "MacBook-Aluminum"_XS8, - 0x02, 0x36, 0x0f, 0, 0, 0x98, "2016mb"_XS8, "j130"_XS8, 0xf02009 }, // need EPCI + 0x02, 0x36, 0x0f, 0, 1, 0x02, "2016mb"_XS8, "j130"_XS8, 0xf02009 }, // need EPCI //MacBookPro13,2 / MacBook Pro (13-inch, 2016, Four Thunderbolt 3 Ports) - { "MacBookPro13,2"_XS8, "MBP132.88Z.F000.B00.2004240825"_XS8, "267.0.0.0.0"_XS8, "Mac-66E35819EE2D0D05"_XS8, // Intel Core i5-6287U @ 3.10 GHz + { "MacBookPro13,2"_XS8, "MBP132.88Z.F000.B00.2106131817"_XS8, "429.140.8.0.0"_XS8, "Mac-66E35819EE2D0D05"_XS8, // Intel Core i5-6287U @ 3.10 GHz "MacBook Pro"_XS8, "1.0"_XS8, "C02SLHACGYFH"_XS8, "MacBook-Aluminum"_XS8, 0x02, 0x37, 0x0f, 0, 0, 0x21, "2016mb"_XS8, "j79"_XS8, 0xf02009 }, //MacBookPro13,3 / MacBook Pro (15-inch, 2016) - { "MacBookPro13,3"_XS8, "MBP133.88Z.F000.B00.2004241015"_XS8, "267.0.0.0.0"_XS8, "Mac-A5C67F76ED83108C"_XS8, // Intel Core i7-6920HQ @ 2.90 GHz + { "MacBookPro13,3"_XS8, "MBP133.88Z.F000.B00.2106131759"_XS8, "429.140.8.0.0"_XS8, "Mac-A5C67F76ED83108C"_XS8, // Intel Core i7-6920HQ @ 2.90 GHz "MacBook Pro"_XS8, "1.0"_XS8, "C02SLHACGTFN"_XS8, "MacBook-Aluminum"_XS8, 0x02, 0x38, 0x0f, 0, 0, 0x08, "2016mb"_XS8, "j80g"_XS8, 0xf04009 }, //MacBookPro14,1 / MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports) - { "MacBookPro14,1"_XS8, "MBP141.88Z.F000.B00.2004240928"_XS8, "207.0.0.0.0"_XS8, "Mac-B4831CEBD52A0C4C"_XS8, // Intel Core i5-7360U @ 2.30 GHz + { "MacBookPro14,1"_XS8, "MBP141.88Z.F000.B00.2106131822"_XS8, "429.140.8.0.0"_XS8, "Mac-B4831CEBD52A0C4C"_XS8, // Intel Core i5-7360U @ 2.30 GHz "MacBook Pro"_XS8, "1.0"_XS8, "C02TNHACHV29"_XS8, "MacBook-Aluminum"_XS8, 0x02, 0x43, 0x0f, 0, 0, 0x07, "2017mbp"_XS8, "j130a"_XS8, 0xf0b009 }, //MacBookPro14,2 / MacBook Pro (13-inch, 2017, Four Thunderbolt 3 Ports) - { "MacBookPro14,2"_XS8, "MBP142.88Z.F000.B00.2004240825"_XS8, "207.0.0.0.0"_XS8, "Mac-CAD6701F7CEA0921"_XS8, // Intel Core i5-7267U @ 3.09 GHz + { "MacBookPro14,2"_XS8, "MBP142.88Z.F000.B00.2106131822"_XS8, "429.140.8.0.0"_XS8, "Mac-CAD6701F7CEA0921"_XS8, // Intel Core i5-7267U @ 3.09 GHz "MacBook Pro"_XS8, "1.0"_XS8, "C02TQHACHV2N"_XS8, "MacBook-Aluminum"_XS8, 0x02, 0x44, 0x0f, 0, 0, 0x02, "2017mbp"_XS8, "j79a"_XS8, 0xf09009 }, //MacBookPro14,3 / MacBook Pro (15-inch, 2017) - { "MacBookPro14,3"_XS8, "MBP143.88Z.F000.B00.2004240928"_XS8, "207.0.0.0.0"_XS8, "Mac-551B86E5744E2388"_XS8, // Intel Core i7-7700HQ @ 2.80 GHz + { "MacBookPro14,3"_XS8, "MBP143.88Z.F000.B00.2106131834"_XS8, "429.140.8.0.0"_XS8, "Mac-551B86E5744E2388"_XS8, // Intel Core i7-7700HQ @ 2.80 GHz "MacBook Pro"_XS8, "1.0"_XS8, "C02TQHACHTD5"_XS8, "MacBook-Aluminum"_XS8, 0x02, 0x45, 0x0f, 0, 0, 0x01, "2017mbp"_XS8, "j80ga"_XS8, 0xf0a009 }, //MacBookPro15,1 / MacBook Pro (15-inch, 2018) - { "MacBookPro15,1"_XS8, "MBP151.88Z.F000.B00.2005132227"_XS8, "1037.120.87.0.0"_XS8, "Mac-937A206F2EE63C01"_XS8, // Intel Core i9-8950HK @ 2.90 GHz + { "MacBookPro15,1"_XS8, "MBP151.88Z.F000.B00.2107050205"_XS8, "715.0.57.0.0"_XS8, "Mac-937A206F2EE63C01"_XS8, // Intel Core i9-8950HK @ 2.90 GHz "MacBook Pro"_XS8, "1.0"_XS8, "C02X1HACKGYG"_XS8, "MacBook-Aluminum"_XS8, 0, 0, 0, 0, 0, 0, ""_XS8, "j680"_XS8, 0 }, //MacBookPro15,2 / MacBook Pro (13-inch, 2018, Four Thunderbolt 3 Ports) - { "MacBookPro15,2"_XS8, "MBP152.88Z.F000.B00.2005132218"_XS8, "1037.120.87.0.0"_XS8, "Mac-827FB448E656EC26"_XS8, // Intel Core i5-8259U @ 2.30 GHz + { "MacBookPro15,2"_XS8, "MBP152.88Z.F000.B00.2107050204"_XS8, "1715.0.57.0.0"_XS8, "Mac-827FB448E656EC26"_XS8, // Intel Core i5-8259U @ 2.30 GHz "MacBook Pro"_XS8, "1.0"_XS8, "C02X1HACJHCD"_XS8, "MacBook-Aluminum"_XS8, 0, 0, 0, 0, 0, 0, ""_XS8, "j132"_XS8, 0 }, //MacBookPro15,3 / MacBook Pro (15-inch, 2019) - { "MacBookPro15,3"_XS8, "MBP153.88Z.F000.B00.2005132208"_XS8, "1037.120.87.0.0"_XS8, "Mac-1E7E29AD0135F9BC"_XS8, // Intel Core i9-9980HK @ 2.40 GHz + { "MacBookPro15,3"_XS8, "MBP153.88Z.F000.B00.2107050204"_XS8, "1715.0.57.0.0"_XS8, "Mac-1E7E29AD0135F9BC"_XS8, // Intel Core i9-9980HK @ 2.40 GHz "MacBook Pro"_XS8, "1.0"_XS8, "C02X1HACLVCG"_XS8, "MacBook-Aluminum"_XS8, 0, 0, 0, 0, 0, 0, ""_XS8, "j780"_XS8, 0 }, //MacBookPro15,4 / MacBook Pro (13-inch, 2019, Two Thunderbolt 3 ports) - { "MacBookPro15,4"_XS8, "MBP154.88Z.F000.B00.2005132135"_XS8, "1037.120.87.0.0"_XS8, "Mac-53FDB3D8DB8CA971"_XS8, // Intel Core i7-8557U @ 1.70 GHz + { "MacBookPro15,4"_XS8, "MBP154.88Z.F000.B00.2107050236"_XS8, "1715.0.57.0.0"_XS8, "Mac-53FDB3D8DB8CA971"_XS8, // Intel Core i7-8557U @ 1.70 GHz "MacBook Pro"_XS8, "1.0"_XS8, "FVFYXHACL411"_XS8, "MacBook-Aluminum"_XS8, 0, 0, 0, 0, 0, 0, ""_XS8, "j213"_XS8, 0 }, //MacBookPro16,1 / MacBook Pro (16-inch, 2019) - { "MacBookPro16,1"_XS8, "MBP161.88Z.F000.B00.2005132259"_XS8, "1037.120.87.0.0"_XS8, "Mac-E1008331FDC96864"_XS8, // Intel Core i9-9980HK @ 2.40 GHz + { "MacBookPro16,1"_XS8, "MBP161.88Z.F000.B00.2107050239"_XS8, "1715.0.57.0.0"_XS8, "Mac-E1008331FDC96864"_XS8, // Intel Core i9-9980HK @ 2.40 GHz "MacBook Pro"_XS8, "1.0"_XS8, "C02ZPHACPG8W"_XS8, "MacBook-Aluminum"_XS8, 0, 0, 0, 0, 0, 0, ""_XS8, "j152f"_XS8, 0 }, //MacBookPro16,2 / MacBook Pro (13-inch, 2020, Four Thunderbolt 3 ports) - { "MacBookPro16,2"_XS8, "MBP162.88Z.F000.B00.2005132210"_XS8, "1037.120.87.0.0"_XS8, "Mac-5F9802EFE386AA28"_XS8, // Intel Core i7-1068NG7 @ 2.30 GHz type=0x060b + { "MacBookPro16,2"_XS8, "MBP162.88Z.F000.B00.2107050225"_XS8, "1715.0.57.0.0"_XS8, "Mac-5F9802EFE386AA28"_XS8, // Intel Core i7-1068NG7 @ 2.30 GHz type=0x060b "MacBook Pro"_XS8, "1.0"_XS8, "C02CLHACML7H"_XS8, "MacBook-Aluminum"_XS8, 0, 0, 0, 0, 0, 0, ""_XS8, "j214k"_XS8, 0 }, //MacBookPro16,3 / MacBook Pro (13-inch, 2020, Two Thunderbolt 3 ports) - { "MacBookPro16,3"_XS8, "MBP163.88Z.F000.B00.2005132118"_XS8, "1037.120.87.0.0"_XS8, "Mac-E7203C0F68AA0004"_XS8, // Intel Core i7-8557U @ 1.70 GHz + { "MacBookPro16,3"_XS8, "MBP163.88Z.F000.B00.2107050231"_XS8, "1715.0.57.0.0"_XS8, "Mac-E7203C0F68AA0004"_XS8, // Intel Core i7-8557U @ 1.70 GHz "MacBook Pro"_XS8, "1.0"_XS8, "C02CJHACP3XY"_XS8, "MacBook-Aluminum"_XS8, 0, 0, 0, 0, 0, 0, ""_XS8, "j223"_XS8, 0 }, //MacBookPro16,4 / MacBook Pro (16-inch, 2019) AMD Radeon Pro 5600M - { "MacBookPro16,4"_XS8, "MBP164.88Z.F000.B00.2008092231"_XS8, "1554.40.9.0.0"_XS8, "Mac-A61BADE1FDAD7B05"_XS8, // Intel Core i9-9880H @ 2.30 GHz + { "MacBookPro16,4"_XS8, "MBP164.88Z.F000.B00.2107050237"_XS8, "1715.0.57.0.0"_XS8, "Mac-A61BADE1FDAD7B05"_XS8, // Intel Core i9-9880H @ 2.30 GHz "MacBook Pro"_XS8, "1.0"_XS8, "C02CWHACMD6T"_XS8, "MacBook-Aluminum"_XS8, 0, 0, 0, 0, 0, 0, ""_XS8, "j215"_XS8, 0 }, //MacBookAir1,1 / MacBook Air (Original) @@ -301,39 +301,39 @@ PLATFORMDATA ApplePlatformData[] = "MacBook Air"_XS8, "1.0"_XS8, "C02GLHACDJWT"_XS8, "Air-Enclosure"_XS8, 0x01, 0x73, 0x0f, 0, 0, 0x66, "k21k78"_XS8, "k21"_XS8, 0x76005 }, // need EPCI //MacBookAir5,1 / MacBook Air (11-inch, Mid 2012) - { "MacBookAir5,1"_XS8, "MBA51.88Z.F000.B00.2004121449"_XS8, "263.0.0.0.0"_XS8, "Mac-66F35F19FE2A0D05"_XS8, // Intel Core i7-3667U @ 2.00 GHz + { "MacBookAir5,1"_XS8, "MBA51.88Z.F000.B00.2106041717"_XS8, "422.0.0.0.0"_XS8, "Mac-66F35F19FE2A0D05"_XS8, // Intel Core i7-3667U @ 2.00 GHz "MacBook Air"_XS8, "1.0"_XS8, "C02J6HACDRV6"_XS8, "Air-Enclosure"_XS8, 0x02, 0x04, 0x0f, 0, 0, 0x19, "j11j13"_XS8, "j11"_XS8, 0x7b006 }, // need EPCI //MacBookAir5,2 / MacBook Air (13-inch, Mid 2012) - { "MacBookAir5,2"_XS8, "MBA51.88Z.F000.B00.2004121449"_XS8, "263.0.0.0.0"_XS8, "Mac-2E6FAB96566FE58C"_XS8, // Intel Core i5-3427U @ 1.80 GHz + { "MacBookAir5,2"_XS8, "MBA51.88Z.F000.B00.2106041717"_XS8, "422.0.0.0.0"_XS8, "Mac-2E6FAB96566FE58C"_XS8, // Intel Core i5-3427U @ 1.80 GHz "MacBook Air"_XS8, "1.0"_XS8, "C02HA041DRVC"_XS8, "Air-Enclosure"_XS8, 0x02, 0x05, 0x0f, 0, 0, 0x09, "j11j13"_XS8, "j13"_XS8, 0x7b006 }, //MacBookAir6,1 / MacBook Air (11-inch, Mid 2013) - { "MacBookAir6,1"_XS8, "MBA61.88Z.F000.B00.2004121458"_XS8, "121.0.0.0.0"_XS8, "Mac-35C1E88140C3E6CF"_XS8, // Intel Core i7-4650U @ 1.70 GHz + { "MacBookAir6,1"_XS8, "MBA61.88Z.F000.B00.2106131852"_XS8, "431.140.6.0.0"_XS8, "Mac-35C1E88140C3E6CF"_XS8, // Intel Core i7-4650U @ 1.70 GHz "MacBook Air"_XS8, "1.0"_XS8, "C2QM6HACFKYN"_XS8, "Air-Enclosure"_XS8, 0x02, 0x12, 0x0f, 0, 1, 0x43, "j41j43"_XS8, "j41"_XS8, 0x7b007 }, // need EPCI //MacBookAir6,2 / MacBook Air (13-inch, Mid 2013) - { "MacBookAir6,2"_XS8, "MBA61.88Z.F000.B00.2004121458"_XS8, "121.0.0.0.0"_XS8, "Mac-7DF21CB3ED6977E5"_XS8, // Intel Core i5-4250U @ 1.30 GHz + { "MacBookAir6,2"_XS8, "MBA61.88Z.F000.B00.2106131852"_XS8, "431.140.6.0.0"_XS8, "Mac-7DF21CB3ED6977E5"_XS8, // Intel Core i5-4250U @ 1.30 GHz "MacBook Air"_XS8, "1.0"_XS8, "C02L9HACF5V7"_XS8, "Air-Enclosure"_XS8, 0x02, 0x13, 0x0f, 0, 0, 0x15, "j41j43"_XS8, "j43"_XS8, 0x7b007 }, //MacBookAir7,1 / MacBook Air (11-inch, Early 2015) - { "MacBookAir7,1"_XS8, "MBA71.88Z.F000.B00.2004161539"_XS8, "194.0.0.0.0"_XS8, "Mac-9F18E312C5C2BF0B"_XS8, // Intel Core i5-5250U @ 1.60 GHz + { "MacBookAir7,1"_XS8, "MBA71.88Z.F000.B00.2106131820"_XS8, "427.140.8.0.0"_XS8, "Mac-9F18E312C5C2BF0B"_XS8, // Intel Core i5-5250U @ 1.60 GHz "MacBook Air"_XS8, "1.0"_XS8, "C02PVHACGFWL"_XS8, "Air-Enclosure"_XS8, 0x02, 0x26, 0x0f, 0, 0, 0x02, "j110"_XS8, "j110"_XS8, 0x7b007 }, //MacBookAir7,2 / MacBook Air (13-inch, Early 2015) - { "MacBookAir7,2"_XS8, "MBA71.88Z.F000.B00.2004161539"_XS8, "426.0.0.0.0"_XS8, "Mac-937CB26E2E02BB01"_XS8, // Intel Core i7-5650U @ 2.20 GHz, i5-5250U CPU @ 1.60GHz + { "MacBookAir7,2"_XS8, "MBA71.88Z.F000.B00.2106131820"_XS8, "427.140.8.0.0"_XS8, "Mac-937CB26E2E02BB01"_XS8, // Intel Core i7-5650U @ 2.20 GHz, i5-5250U CPU @ 1.60GHz "MacBook Air"_XS8, "1.0"_XS8, "C02Q1HACG940"_XS8, "Air-Enclosure"_XS8, 0x02, 0x27, 0x0f, 0, 0, 0x02, "j113"_XS8, "j113"_XS8, 0xf0a008 }, //MacBookAir8,1 / MacBook Air (Retina, 13-inch, 2018) - { "MacBookAir8,1"_XS8, "MBA81.88Z.F000.B00.2005132104"_XS8, "1037.120.87.0.0"_XS8, "Mac-827FAC58A8FDFA22"_XS8, // Intel Core i5-8210Y @ 1.60 GHz + { "MacBookAir8,1"_XS8, "MBA81.88Z.F000.B00.2107050205"_XS8, "1715.0.57.0.0"_XS8, "Mac-827FAC58A8FDFA22"_XS8, // Intel Core i5-8210Y @ 1.60 GHz "MacBook Air"_XS8, "1.0"_XS8, "FVFXJHACJK77"_XS8, "Air-Enclosure"_XS8, 0, 0, 0, 0, 0, 0, ""_XS8, "j140k"_XS8, 0 }, //MacBookAir8,2 / MacBook Air (Retina, 13-inch, 2019) - { "MacBookAir8,2"_XS8, "MBA82.88Z.F000.B00.2005132224"_XS8, "1037.120.87.0.0"_XS8, "Mac-226CB3C6A851A671"_XS8, // Intel Core i5-8210Y @ 1.60 GHz + { "MacBookAir8,2"_XS8, "MBA82.88Z.F000.B00.2107050207"_XS8, "1715.0.57.0.0"_XS8, "Mac-226CB3C6A851A671"_XS8, // Intel Core i5-8210Y @ 1.60 GHz "MacBook Air"_XS8, "1.0"_XS8, "FVFXJHACLYWM"_XS8, "Air-Enclosure"_XS8, 0, 0, 0, 0, 0, 0, ""_XS8, "j140a"_XS8, 0 }, //MacBookAir9,1 / MacBook Air (Retina, 13-inch, 2020) - { "MacBookAir9,1"_XS8, "MBA91.88Z.F000.B00.2005132117"_XS8, "1037.120.87.0.0"_XS8, "Mac-0CFF9C7C2B63DF8D"_XS8, // Intel Core i5-1030NG7 @ 1.10 GHz + { "MacBookAir9,1"_XS8, "MBA91.88Z.F000.B00.2107050235"_XS8, "1715.0.57.0.0"_XS8, "Mac-0CFF9C7C2B63DF8D"_XS8, // Intel Core i5-1030NG7 @ 1.10 GHz "MacBook Air"_XS8, "1.0"_XS8, "FVFCCHACMNHP"_XS8, "Air-Enclosure"_XS8, 0, 0, 0, 0, 0, 0, ""_XS8, "j230k"_XS8, 0 }, //Macmini1,1 / Mac mini (Early 2006) @@ -365,19 +365,19 @@ PLATFORMDATA ApplePlatformData[] = "Mac mini"_XS8, "1.0"_XS8, "C07GWHACDKDJ"_XS8, "Mini-Aluminum"_XS8, 0x01, 0x77, 0x0f, 0, 0, 0x00, "NA"_XS8, "NA"_XS8, 0x7d005 }, // need rBR RPlt EPCI //Macmini6,1 / Mac mini (Late 2012) - { "Macmini6,1"_XS8, "MM61.88Z.F000.B00.2004121754"_XS8, "284.0.0.0.0"_XS8, "Mac-031AEE4D24BFF0B1"_XS8, // Intel Core i5-3210M @ 2.50 GHz + { "Macmini6,1"_XS8, "MM61.88Z.F000.B00.2106041717"_XS8, "422.0.0.0.0"_XS8, "Mac-031AEE4D24BFF0B1"_XS8, // Intel Core i5-3210M @ 2.50 GHz "Mac mini"_XS8, "1.0"_XS8, "C07JNHACDY3H"_XS8, "Mini-Aluminum"_XS8, 0x02, 0x07, 0x0f, 0, 0, 0x00, "NA"_XS8, "NA"_XS8, 0x7d006 }, // need rBR RPlt EPCI //Macmini6,2 / Mac mini Server (Late 2012) - { "Macmini6,2"_XS8, "MM61.88Z.F000.B00.2004121754"_XS8, "284.0.0.0.0"_XS8, "Mac-F65AE981FFA204ED"_XS8, // Intel Core i7-3615QM @ 2.30 GHz + { "Macmini6,2"_XS8, "MM61.88Z.F000.B00.2106041717"_XS8, "422.0.0.0.0"_XS8, "Mac-F65AE981FFA204ED"_XS8, // Intel Core i7-3615QM @ 2.30 GHz "Mac mini"_XS8, "1.0"_XS8, "C07JD041DWYN"_XS8, "Mini-Aluminum"_XS8, 0x02, 0x08, 0x0f, 0, 0, 0x01, "j50s"_XS8, "j50s"_XS8, 0x7d006 }, //Macmini7,1 / Mac mini (Late 2014) - { "Macmini7,1"_XS8, "MM71.88Z.F000.B00.2004161539"_XS8, "248.0.0.0.0"_XS8, "Mac-35C5E08120C7EEAF"_XS8, // Intel Core i5-4278U @ 2.60 GHz + { "Macmini7,1"_XS8, "MM71.88Z.F000.B00.2106131851"_XS8, "431.140.6.0.0"_XS8, "Mac-35C5E08120C7EEAF"_XS8, // Intel Core i5-4278U @ 2.60 GHz "Mac mini"_XS8, "1.0"_XS8, "C02NN7NHG1J0"_XS8, "Mini-Aluminum"_XS8, 0x02, 0x24, 0x0f, 0, 0, 0x32, "j64"_XS8, "j64"_XS8, 0xf04008 }, //Macmini8,1 / Mac mini (2018) - { "Macmini8,1"_XS8, "MM81.88Z.F000.B00.2005132145"_XS8, "1037.120.87.0.0"_XS8, "Mac-7BA5B2DFE22DDD8C"_XS8, // Intel Core i7-8700B @ 3.20 GHz + { "Macmini8,1"_XS8, "MM81.88Z.F000.B00.2107050205"_XS8, "1715.0.57.0.0"_XS8, "Mac-7BA5B2DFE22DDD8C"_XS8, // Intel Core i7-8700B @ 3.20 GHz "Mac mini"_XS8, "1.0"_XS8, "C07XL9WEJYVX"_XS8, "Mini-Aluminum"_XS8, 0, 0, 0, 0, 0, 0, ""_XS8, "j174"_XS8, 0 }, //iMac4,1 / iMac (20-inch, Early 2006) @@ -437,81 +437,81 @@ PLATFORMDATA ApplePlatformData[] = "iMac"_XS8, "1.9"_XS8, "W88GG136DHJQ"_XS8, "iMac-Aluminum"_XS8, 0x01, 0x72, 0x0f, 0, 0, 0x02, "k62"_XS8, "k62"_XS8, 0x75005 }, //iMac13,1 / iMac (21.5-inch, Late 2012) - { "iMac13,1"_XS8, "IM131.88Z.F000.B00.2004121616"_XS8, "291.0.0.0.0"_XS8, "Mac-00BE6ED71E35EB86"_XS8, // Intel Core i7-3770S @ 3.10 GHz + { "iMac13,1"_XS8, "IM131.88Z.F000.B00.2106041716"_XS8, "422.0.0.0.0"_XS8, "Mac-00BE6ED71E35EB86"_XS8, // Intel Core i7-3770S @ 3.10 GHz "iMac"_XS8, "1.0"_XS8, "C02JA041DNCT"_XS8, "iMac-Aluminum"_XS8, 0x02, 0x09, 0x0f, 0, 0, 0x05, "d8"_XS8, "d8"_XS8, 0x78006 }, //iMac13,2 / iMac (27-inch, Late 2012) - { "iMac13,2"_XS8, "IM131.88Z.F000.B00.2004121616"_XS8, "291.0.0.0.0"_XS8, "Mac-FC02E91DDD3FA6A4"_XS8, // Intel Core i5-3470 @ 3.20 GHz + { "iMac13,2"_XS8, "IM131.88Z.F000.B00.2106041716"_XS8, "422.0.0.0.0"_XS8, "Mac-FC02E91DDD3FA6A4"_XS8, // Intel Core i5-3470 @ 3.20 GHz "iMac"_XS8, "1.0"_XS8, "C02JB041DNCW"_XS8, "iMac-Aluminum"_XS8, 0x02, 0x11, 0x0f, 0, 0, 0x16, "d8"_XS8, "d8"_XS8, 0x79006 }, //iMac13,3 / iMac (21.5-inch, Early 2013) - not exists in server - { "iMac13,3"_XS8, "IM131.88Z.F000.B00.2002052050"_XS8, "290.0.0.0.0"_XS8, "Mac-7DF2A3B5E5D671ED"_XS8, // Intel Core i3-3225 @ 3.30 GHz + { "iMac13,3"_XS8, "IM131.88Z.F000.B00.2106041716"_XS8, "422.0.0.0.0"_XS8, "Mac-7DF2A3B5E5D671ED"_XS8, // Intel Core i3-3225 @ 3.30 GHz "iMac"_XS8, "1.0"_XS8, "C02KVHACFFYV"_XS8, "iMac-Aluminum"_XS8, 0x02, 0x13, 0x0f, 0, 0, 0x15, "d8"_XS8, "d8"_XS8, 0x79006 }, // need EPCI //iMac14,1 / iMac (21.5-inch, Late 2013) - { "iMac14,1"_XS8, "IM141.88Z.F000.B00.2004121453"_XS8, "143.0.0.0.0"_XS8, "Mac-031B6874CF7F642A"_XS8, // Intel Core i5-4570R @ 2.70 GHz + { "iMac14,1"_XS8, "IM141.88Z.F000.B00.2106131845"_XS8, "431.140.6.0.0"_XS8, "Mac-031B6874CF7F642A"_XS8, // Intel Core i5-4570R @ 2.70 GHz "iMac"_XS8, "1.0"_XS8, "D25LHACKF8J2"_XS8, "iMac-Aluminum"_XS8, 0x02, 0x14, 0x0f, 0, 0, 0x24, "j16j17"_XS8, "j16"_XS8, 0x79007 }, //iMac14,2 / iMac (27-inch, Late 2013) - { "iMac14,2"_XS8, "IM142.88Z.F000.B00.2004121453"_XS8, "143.0.0.0.0"_XS8, "Mac-27ADBB7B4CEE8E61"_XS8, // Intel Core i5-4570 @ 3.20 GHz + { "iMac14,2"_XS8, "IM142.88Z.F000.B00.2106131851"_XS8, "431.140.6.0.0"_XS8, "Mac-27ADBB7B4CEE8E61"_XS8, // Intel Core i5-4570 @ 3.20 GHz "iMac"_XS8, "1.0"_XS8, "D25LHACKF8JC"_XS8, "iMac-Aluminum"_XS8, 0x02, 0x15, 0x0f, 0, 0, 0x07, "j16j17"_XS8, "j17"_XS8, 0x7a007 }, //iMac14,3 / iMac (21.5-inch, Late 2013) - { "iMac14,3"_XS8, "IM143.88Z.F000.B00.2004121453"_XS8, "143.0.0.0.0"_XS8, "Mac-77EB7D7DAF985301"_XS8, // Intel Core i5-4570S @ 2.90 GHz + { "iMac14,3"_XS8, "IM143.88Z.F000.B00.2106131845"_XS8, "431.140.6.0.0"_XS8, "Mac-77EB7D7DAF985301"_XS8, // Intel Core i5-4570S @ 2.90 GHz "iMac"_XS8, "1.0"_XS8, "D25LHACKF8J3"_XS8, "iMac-Aluminum"_XS8, 0x02, 0x17, 0x0f, 0, 0, 0x07, "j16g"_XS8, "j16g"_XS8, 0x7a007 }, // need EPCI //iMac14,4 / iMac (21.5-inch, Mid 2014) - { "iMac14,4"_XS8, "IM144.88Z.F000.B00.2004121755"_XS8, "203.0.0.0.0"_XS8, "Mac-81E3E92DD6088272"_XS8, // Intel Core i5-4260U @ 1.40 GHz + { "iMac14,4"_XS8, "IM144.88Z.F000.B00.2106131820"_XS8, "431.140.6.0.0"_XS8, "Mac-81E3E92DD6088272"_XS8, // Intel Core i5-4260U @ 1.40 GHz "iMac"_XS8, "1.0"_XS8, "D25LHACKFY0T"_XS8, "iMac-Aluminum"_XS8, 0x02, 0x21, 0x0f, 0, 0, 0x92, "j70"_XS8, "j70"_XS8, 0x7a007 }, // need EPCI //iMac15,1 / iMac (Retina 5K, 27-inch, Mid 2015) - { "iMac15,1"_XS8, "IM151.88Z.F000.B00.2004121758"_XS8, "234.0.0.0.0"_XS8, "Mac-42FD25EABCABB274"_XS8, // Intel Core i5-4690 @ 3.50 GHz + { "iMac15,1"_XS8, "IM151.88Z.F000.B00.2106131818"_XS8, "431.140.6.0.0"_XS8, "Mac-42FD25EABCABB274"_XS8, // Intel Core i5-4690 @ 3.50 GHz "iMac"_XS8, "1.0"_XS8, "C02Q6HACFY10"_XS8, "iMac-Aluminum"_XS8, // i5: Mac-42FD25EABCABB274, i7: Mac-FA842E06C61E91C5 0x02, 0x22, 0x0f, 0, 0, 0x16, "j78j78am"_XS8, "j78"_XS8, 0xf00008 }, // i5: 2.22f16, i7: 2.23f11 //iMac16,1 / iMac (21.5-inch, Late 2015) - { "iMac16,1"_XS8, "IM161.88Z.F000.B00.2004161536"_XS8, "234.0.0.0.0"_XS8, "Mac-A369DDC4E67F1C45"_XS8, // Intel Core i5-5250U @ 1.60 GHz + { "iMac16,1"_XS8, "IM161.88Z.F000.B00.2106131802"_XS8, "427.140.8.0.0"_XS8, "Mac-A369DDC4E67F1C45"_XS8, // Intel Core i5-5250U @ 1.60 GHz "iMac"_XS8, "1.0"_XS8, "C02QQHACGF1J"_XS8, "iMac-Aluminum"_XS8, 0x02, 0x31, 0x0f, 0, 0, 0x37, "j117"_XS8, "j117"_XS8, 0xf00008 }, // need EPCI //iMac16,2 / iMac (Retina 4K, 21.5-inch, Late 2015) - { "iMac16,2"_XS8, "IM162.88Z.F000.B00.2004161536"_XS8, "234.0.0.0.0"_XS8, "Mac-FFE5EF870D7BA81A"_XS8, // Intel Core i5-5575R @ 2.80 GHz + { "iMac16,2"_XS8, "IM162.88Z.F000.B00.2106131845"_XS8, "427.140.8.0.0"_XS8, "Mac-FFE5EF870D7BA81A"_XS8, // Intel Core i5-5575R @ 2.80 GHz "iMac"_XS8, "1.0"_XS8, "C02PNHACGG78"_XS8, "iMac-Aluminum"_XS8, 0x02, 0x32, 0x0f, 0, 0, 0x21, "j94"_XS8, "j94"_XS8, 0xf00008 }, // need EPCI //iMac17,1 / iMac (Retina 5K, 27-inch, Late 2015) - { "iMac17,1"_XS8, "IM171.88Z.F000.B00.2004240904"_XS8, "178.0.0.0.0"_XS8, "Mac-B809C3757DA9BB8D"_XS8, // Intel Core i7-6700K @ 4.00 GHz + { "iMac17,1"_XS8, "IM171.88Z.F000.B00.2106131747"_XS8, "429.140.8.0.0"_XS8, "Mac-B809C3757DA9BB8D"_XS8, // Intel Core i7-6700K @ 4.00 GHz "iMac17,1"_XS8, "1.0"_XS8, "C02QFHACGG7L"_XS8, "iMac-Aluminum"_XS8, // i5: Mac-65CE76090165799A/Mac-DB15BD556843C820, i7: Mac-B809C3757DA9BB8D 0x02, 0x34, 0x0f, 0, 0, 0x03, "j95j95am"_XS8, "j95"_XS8, 0xf0c008 }, //Note: why? i5: 2.33f12 but for i7: 2.34f3 //iMac18,1 / iMac (21.5-inch, 2017) - { "iMac18,1"_XS8, "IM181.88Z.F000.B00.2004240927"_XS8, "183.0.0.0.0"_XS8, "Mac-4B682C642B45593E"_XS8, // Intel Core i5-7360U @ 2.30 GHz + { "iMac18,1"_XS8, "IM181.88Z.F000.B00.2106131817"_XS8, "429.140.8.0.0"_XS8, "Mac-4B682C642B45593E"_XS8, // Intel Core i5-7360U @ 2.30 GHz "iMac"_XS8, "1.0"_XS8, "C02TDHACH7JY"_XS8, "iMac-Aluminum"_XS8, 0x02, 0x39, 0x0f, 0, 0, 0x40, "j133_4_5"_XS8, "j135"_XS8, 0xf07009 }, // need RPlt EPCI //iMac18,2 / iMac (Retina 4K, 21.5-inch, 2017) - { "iMac18,2"_XS8, "IM183.88Z.F000.B00.2004240928"_XS8, "183.0.0.0.0"_XS8, "Mac-77F17D7DA9285301"_XS8, // Intel Core i5-7500 @ 3.40 GHz/i5-7400 @ 3.00GHz + { "iMac18,2"_XS8, "IM183.88Z.F000.B00.2106131835"_XS8, "429.140.8.0.0"_XS8, "Mac-77F17D7DA9285301"_XS8, // Intel Core i5-7500 @ 3.40 GHz/i5-7400 @ 3.00GHz "iMac"_XS8, "1.0"_XS8, "C02TDHACJ1G5"_XS8, "iMac-Aluminum"_XS8, 0x02, 0x40, 0x0f, 0, 0, 0x01, "j133_4_5"_XS8, "j134"_XS8, 0xf06009 }, //iMac18,3 / iMac (Retina 5K, 27-inch, 2017) - { "iMac18,3"_XS8, "IM183.88Z.F000.B00.2004240928"_XS8, "183.0.0.0.0"_XS8, "Mac-BE088AF8C5EB4FA2"_XS8, // Intel Core i7-7700K @ 4.20 GHz + { "iMac18,3"_XS8, "IM183.88Z.F000.B00.2106131835"_XS8, "429.140.8.0.0"_XS8, "Mac-BE088AF8C5EB4FA2"_XS8, // Intel Core i7-7700K @ 4.20 GHz "iMac"_XS8, "1.0"_XS8, "C02TDHACJ1GJ"_XS8, "iMac-Aluminum"_XS8, 0x02, 0x41, 0x0f, 0, 0, 0x02, "j133_4_5"_XS8, "j135"_XS8, 0xf07009 }, //iMac19,1 / iMac (Retina 5K, 27-inch, 2019) - { "iMac19,1"_XS8, "IM191.88Z.F000.B00.2004232100"_XS8, "1037.120.79.0.0"_XS8, "Mac-AA95B1DDAB278B95"_XS8, // Intel Core i9-9900K @ 3.60 GHz + { "iMac19,1"_XS8, "IM191.88Z.F000.B00.2106222356"_XS8, "1554.140.20.0.0"_XS8, "Mac-AA95B1DDAB278B95"_XS8, // Intel Core i9-9900K @ 3.60 GHz "iMac"_XS8, "1.0"_XS8, "C02Y9HACJV3P"_XS8, "iMac-Aluminum"_XS8, 0x02, 0x46, 0x0f, 0, 0, 0x12, "j138_9"_XS8, "j138"_XS8, 0xf0d009 }, //iMac19,2 / iMac (Retina 4K, 21.5-inch, 2019) - { "iMac19,2"_XS8, "IM191.88Z.F000.B00.2004232100"_XS8, "1037.120.79.0.0"_XS8, "Mac-63001698E7A34814"_XS8, // Intel Core i7-8700B @ 3.20 GHz + { "iMac19,2"_XS8, "IM191.88Z.F000.B00.2106222356"_XS8, "1554.140.20.0.0"_XS8, "Mac-63001698E7A34814"_XS8, // Intel Core i7-8700B @ 3.20 GHz "iMac"_XS8, "1.0"_XS8, "C02Y9HACJWDW"_XS8, "iMac-Aluminum"_XS8, 0x02, 0x47, 0x0f, 0, 0, 0x03, "j138_9"_XS8, "j138"_XS8, 0xf0d009 }, //iMac20,1 / iMac (Retina 5K, 27-inch, 2020) Intel Core i5-10500 @ 3.10 GHz - { "iMac20,1"_XS8, "IM201.88Z.F000.B00.2008092228"_XS8, "1554.40.9.0.0"_XS8, "Mac-CFF7D910A743CAAF"_XS8, + { "iMac20,1"_XS8, "IM201.88Z.F000.B00.2107050239"_XS8, "1715.0.57.0.0"_XS8, "Mac-CFF7D910A743CAAF"_XS8, "iMac"_XS8, "1.0"_XS8, "C02D3HACPN5T"_XS8, "iMac-Aluminum"_XS8, 0,0,0,0,0,0,""_XS8, "j185"_XS8, 0}, // 0x02, 0x46, 0x0f, 0, 0, 0x12, "j185"_XS8, "j185"_XS8, 0xf0d009 }, //iMac20,2 / iMac (Retina 5K, 27-inch, 2020) Intel Core i9-10910 @ 3.60 GHz - { "iMac20,2"_XS8, "IM201.88Z.F000.B00.2008092228"_XS8, "1554.40.9.0.0"_XS8, "Mac-AF89B6D9451A490B"_XS8, + { "iMac20,2"_XS8, "IM201.88Z.F000.B00.2107050239"_XS8, "1715.0.57.0.0"_XS8, "Mac-AF89B6D9451A490B"_XS8, "iMac"_XS8, "1.0"_XS8, "C02D2HAC046M"_XS8, "iMac-Aluminum"_XS8, 0,0,0,0,0,0,""_XS8, "j185"_XS8, 0}, // 0x02, 0x47, 0x0f, 0, 0, 0x03, "j185f"_XS8, "j185f"_XS8, 0xf0d009 }, //iMacPro1,1 /iMac Pro (2017) - { "iMacPro1,1"_XS8, "IMP11.88Z.F000.B00.2005132136"_XS8, "1037.120.87.0.0"_XS8, "Mac-7BA5B2D9E42DDD94"_XS8, // Intel Xeon W-2140B CPU @ 3.20 GHz + { "iMacPro1,1"_XS8, "IMP11.88Z.F000.B00.2107050205"_XS8, "1715.0.57.0.0"_XS8, "Mac-7BA5B2D9E42DDD94"_XS8, // Intel Xeon W-2140B CPU @ 3.20 GHz "iMac Pro"_XS8, "1.0"_XS8, "C02VVHACHX87"_XS8, "iMacPro-Aluminum"_XS8, 0, 0, 0, 0, 0, 0, ""_XS8, "j137"_XS8, 0 }, //MacPro1,1 / Mac Pro @@ -535,11 +535,11 @@ PLATFORMDATA ApplePlatformData[] = "MacPro"_XS8, "1.2"_XS8, "C07J77F7F4MC"_XS8, "Pro-Enclosure"_XS8, // Note: C07J50F7F4MC CK04000AHFC CG154TB9WU3 0x01, 0x39, 0x0f, 0, 0, 0x11, "k5"_XS8, "k5"_XS8, 0x7c002 }, //MacPro6,1 / Mac Pro (Late 2013) - { "MacPro6,1"_XS8, "MP61.88Z.F000.B00.2004121755"_XS8, "136.0.0.0.0"_XS8, "Mac-F60DEB81FF30ACF6"_XS8, // Intel Xeon E5-1650 v2 @ 3.50 GHz + { "MacPro6,1"_XS8, "MP61.88Z.F000.B00.2106101804"_XS8, "428.140.7.0.0"_XS8, "Mac-F60DEB81FF30ACF6"_XS8, // Intel Xeon E5-1650 v2 @ 3.50 GHz "MacPro"_XS8, "1.0"_XS8, "F5KLA770F9VM"_XS8, "Pro-Enclosure"_XS8, 0x02, 0x20, 0x0f, 0, 0, 0x18, "j90"_XS8, "j90"_XS8, 0xf0f006 }, //MacPro7,1 / Mac Pro (2019) - { "MacPro7,1"_XS8, "MP71.88Z.F000.B00.2005132104"_XS8, "1037.120.87.0.0"_XS8, "Mac-27AD2F918AE68F61"_XS8, // Intel Xeon W-3245M CPU @ 3.20 GHz + { "MacPro7,1"_XS8, "MP71.88Z.F000.B00.2107050205"_XS8, "1715.0.57.0.0"_XS8, "Mac-27AD2F918AE68F61"_XS8, // Intel Xeon W-3245M CPU @ 3.20 GHz "MacPro"_XS8, "1.0"_XS8, "F5KZNHACP7QM"_XS8, "Pro-Enclosure"_XS8, 0, 0, 0, 0, 0, 0, ""_XS8, "j16O"_XS8, 0 }, //Xserve1,1 / Xserve (Late 2006) From a0c543f100f2c962e785bdb4384b55f680280d87 Mon Sep 17 00:00:00 2001 From: Sherlocks Date: Sun, 25 Jul 2021 11:28:06 +0900 Subject: [PATCH 10/11] skip error msg when inject edid without custom --- rEFIt_UEFI/Settings/ConfigPlist/Config_Graphics.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rEFIt_UEFI/Settings/ConfigPlist/Config_Graphics.h b/rEFIt_UEFI/Settings/ConfigPlist/Config_Graphics.h index b14e70c9a..39d347aa3 100644 --- a/rEFIt_UEFI/Settings/ConfigPlist/Config_Graphics.h +++ b/rEFIt_UEFI/Settings/ConfigPlist/Config_Graphics.h @@ -93,7 +93,8 @@ public: if ( Inject.isDefined() ) { if ( Inject.value() ) { if ( !Custom.isDefined() ) { - xmlLiteParser->addWarning(generateErrors, S8Printf("Custom has to be defined if Inject is defined in dict '%s:%d'.", xmlPath.c_str(), keyPos.getLine())); +// Each patch of VID/PID/HSPW/VIS can work independently without custom values. +// xmlLiteParser->addWarning(generateErrors, S8Printf("Custom has to be defined if Inject is defined in dict '%s:%d'.", xmlPath.c_str(), keyPos.getLine())); // return false; // Allow this to be compatible with old way of reading settings. Can be put back when definitive switch is made }else{ if ( Custom.value().size() % 128 != 0 ) { From f7add0788f4d864ce1f1912af92d67b3f97076eb Mon Sep 17 00:00:00 2001 From: SergeySlice Date: Wed, 1 Sep 2021 19:38:35 +0300 Subject: [PATCH 11/11] secure check for ssdt length Signed-off-by: SergeySlice --- rEFIt_UEFI/Platform/AcpiPatcher.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rEFIt_UEFI/Platform/AcpiPatcher.cpp b/rEFIt_UEFI/Platform/AcpiPatcher.cpp index 9d27cd308..1b646420f 100644 --- a/rEFIt_UEFI/Platform/AcpiPatcher.cpp +++ b/rEFIt_UEFI/Platform/AcpiPatcher.cpp @@ -913,7 +913,7 @@ void DumpChildSsdt(EFI_ACPI_DESCRIPTION_HEADER *TableEntry, CONST CHAR16 *DirNam if (pacCount > 0 && pacCount % 3 == 0) { pacCount /= 3; - DBG(" (Found hidden SSDT %lld pcs)\n", pacCount); + DBG(" (Found hidden SSDT %lld pcs)\n", pacCount); while (pacCount-- > 0) { // Skip text marker and addr type tag @@ -937,8 +937,10 @@ void DumpChildSsdt(EFI_ACPI_DESCRIPTION_HEADER *TableEntry, CONST CHAR16 *DirNam CopyMem(&OemTableId[0], &((EFI_ACPI_DESCRIPTION_HEADER *)adr)->OemTableId, 8); OemTableId[8] = 0; stripTrailingSpaces(OemTableId); - DBG(" * %llu: '%s', '%s', Rev: %d, Len: %d ", adr, Signature, OemTableId, - ((EFI_ACPI_DESCRIPTION_HEADER *)adr)->Revision, ((EFI_ACPI_DESCRIPTION_HEADER *)adr)->Length); + int innLen = ((EFI_ACPI_DESCRIPTION_HEADER *)adr)->Length; + if (innLen < 0 || innLen > 0x20000) break; + DBG(" * %llu: '%s', '%s', Rev: %d, Len: %d ", adr, Signature, OemTableId, + ((EFI_ACPI_DESCRIPTION_HEADER *)adr)->Revision, innLen); for (k = 0; k < 16; k++) { DBG("%02hhX ", ((UINT8*)adr)[k]); }