Skip to content

Commit

Permalink
take into account memory type DDR5
Browse files Browse the repository at this point in the history
Signed-off-by: Slice <[email protected]>
  • Loading branch information
SergeySlice committed Jan 13, 2024
1 parent ce3e437 commit 4b62853
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion buildme
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
4 changes: 3 additions & 1 deletion rEFIt_UEFI/Platform/smbios.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1573,6 +1573,7 @@ void PatchTableType17(const SmbiosInjectedSettings& smbiosSettings, XArray<UINT1
newSmbiosTable.Type17->MemoryType = 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;
}
Expand Down Expand Up @@ -1876,9 +1877,10 @@ void PatchTableType17(const SmbiosInjectedSettings& smbiosSettings, XArray<UINT1

// gSettings.MemorySpeed.S8Printf("%d", newSmbiosTable.Type17->Speed);

// 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;
}
Expand Down
2 changes: 1 addition & 1 deletion rEFIt_UEFI/Platform/spd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions rEFIt_UEFI/Settings/ConfigPlist/SMBIOSPlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,13 @@ class SmbiosPlistClass : public ConfigPlistAbstractClass
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");
}

};
Expand Down

0 comments on commit 4b62853

Please sign in to comment.