From 4b62853daaca03f0de364922ad0866112fb53c48 Mon Sep 17 00:00:00 2001 From: Slice Date: Sat, 13 Jan 2024 20:28:01 +0300 Subject: [PATCH] take into account memory type DDR5 Signed-off-by: Slice --- buildme | 2 +- rEFIt_UEFI/Platform/smbios.cpp | 4 +++- rEFIt_UEFI/Platform/spd.cpp | 2 +- rEFIt_UEFI/Settings/ConfigPlist/SMBIOSPlist.h | 6 ++++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/buildme b/buildme index a7aaea9b3..647a7ba1f 100755 --- a/buildme +++ b/buildme @@ -30,7 +30,7 @@ end tell tell application "Terminal" activate set bounds of window 1 to {0, 23, 615, 420} - set current settings of window 1 to settings set "Pro" +# set current settings of window 1 to settings set "Pro" # set font name of window 1 to "Monaco" # set font size of window 1 to "11" # set normal text color of window 1 to {3341, 35186, 50092} diff --git a/rEFIt_UEFI/Platform/smbios.cpp b/rEFIt_UEFI/Platform/smbios.cpp index 493652bd3..bee893454 100644 --- a/rEFIt_UEFI/Platform/smbios.cpp +++ b/rEFIt_UEFI/Platform/smbios.cpp @@ -1573,6 +1573,7 @@ void PatchTableType17(const SmbiosInjectedSettings& smbiosSettings, XArrayMemoryType = smbiosSettings.Memory.getSlotInfoForSlotID(UserIndex).Type; if ((newSmbiosTable.Type17->MemoryType != MemoryTypeDdr2) && (newSmbiosTable.Type17->MemoryType != MemoryTypeDdr4) && + (newSmbiosTable.Type17->MemoryType != MemoryTypeDdr5) && (newSmbiosTable.Type17->MemoryType != MemoryTypeDdr)) { newSmbiosTable.Type17->MemoryType = MemoryTypeDdr3; } @@ -1876,9 +1877,10 @@ void PatchTableType17(const SmbiosInjectedSettings& smbiosSettings, XArraySpeed); - // Assume DDR3 unless explicitly set to DDR2/DDR/DDR4 + // Assume DDR3 unless explicitly set to DDR2/DDR/DDR4/DDR5 if ((newSmbiosTable.Type17->MemoryType != MemoryTypeDdr2) && (newSmbiosTable.Type17->MemoryType != MemoryTypeDdr4) && + (newSmbiosTable.Type17->MemoryType != MemoryTypeDdr5) && (newSmbiosTable.Type17->MemoryType != MemoryTypeDdr)) { newSmbiosTable.Type17->MemoryType = MemoryTypeDdr3; } diff --git a/rEFIt_UEFI/Platform/spd.cpp b/rEFIt_UEFI/Platform/spd.cpp index 2c58d117f..dcf3f7e81 100644 --- a/rEFIt_UEFI/Platform/spd.cpp +++ b/rEFIt_UEFI/Platform/spd.cpp @@ -24,7 +24,7 @@ #ifndef DEBUG_SPD #ifndef DEBUG_ALL -#define DEBUG_SPD 0 +#define DEBUG_SPD 1 #else #define DEBUG_SPD DEBUG_ALL #endif diff --git a/rEFIt_UEFI/Settings/ConfigPlist/SMBIOSPlist.h b/rEFIt_UEFI/Settings/ConfigPlist/SMBIOSPlist.h index f5cf1b3de..8ae0b6162 100644 --- a/rEFIt_UEFI/Settings/ConfigPlist/SMBIOSPlist.h +++ b/rEFIt_UEFI/Settings/ConfigPlist/SMBIOSPlist.h @@ -146,11 +146,13 @@ public: return MemoryTypeDdr3; } else if (Type.value().isEqualIC("DDR4")) { return MemoryTypeDdr4; - } else if (Type.value().isEqualIC("DDR")) { + } else if (Type.value().isEqualIC("DDR5")) { + return MemoryTypeDdr5; + } else /*if (Type.value().isEqualIC("DDR"))*/ { return MemoryTypeDdr; } // Cannot happen if validate has been done properly. - panic("invalid DDRx value"); + //panic("invalid DDRx value"); } };