mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-30 12:43:41 +01:00
implemented setting for MemoryRank,
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
parent
5864939127
commit
b816917205
@ -989,6 +989,8 @@
|
||||
<string>MacBook1,1</string>
|
||||
<key>#LocationInChassis</key>
|
||||
<string>MLB</string>
|
||||
<key>#MemoryRank</key>
|
||||
<integer>2</integer>
|
||||
<key>#Memory</key>
|
||||
<dict>
|
||||
<key>Modules</key>
|
||||
|
@ -922,6 +922,8 @@ typedef struct {
|
||||
BOOLEAN UserChange;
|
||||
BOOLEAN QEMU;
|
||||
// SMBIOS TYPE17
|
||||
INT8 Attribute;
|
||||
INT8 Pad17[3];
|
||||
CHAR8 MemoryManufacturer[64];
|
||||
CHAR8 MemorySerialNumber[64];
|
||||
CHAR8 MemoryPartNumber[64];
|
||||
|
@ -5985,6 +5985,9 @@ GetUserSettings(
|
||||
gSettings.TrustSMBIOS = TRUE;
|
||||
}
|
||||
}
|
||||
Prop = GetProperty(DictPointer, "MemoryRank");
|
||||
gSettings.Attribute = GetPropertyInteger(Prop, -1); //1==Single Rank, 2 == Dual Rank, 0==undefined -1 == keep as is
|
||||
|
||||
// Inject memory tables into SMBIOS
|
||||
Prop = GetProperty (DictPointer, "Memory");
|
||||
if (Prop != NULL){
|
||||
|
@ -1227,6 +1227,9 @@ VOID GetTableType17()
|
||||
if (SmbiosTable.Type17->Size > 0) {
|
||||
gRAM.SMBIOS[Index].InUse = TRUE;
|
||||
gRAM.SMBIOS[Index].ModuleSize = SmbiosTable.Type17->Size;
|
||||
if (SmbiosTable.Type17->Size == 0x7FFF) {
|
||||
gRAM.SMBIOS[Index].ModuleSize = SmbiosTable.Type17->ExtendedSize;
|
||||
}
|
||||
}
|
||||
// Determine if module frequency is sane value
|
||||
if ((SmbiosTable.Type17->Speed > 0) && (SmbiosTable.Type17->Speed <= MAX_RAM_FREQUENCY)) {
|
||||
@ -1668,6 +1671,9 @@ VOID PatchTableType17()
|
||||
// DBG("mTotalSystemMemory = %d\n", mTotalSystemMemory);
|
||||
}
|
||||
newSmbiosTable.Type17->MemoryErrorInformationHandle = 0xFFFF;
|
||||
if (gSettings.Attribute != -1) {
|
||||
newSmbiosTable.Type17->Attributes = gSettings.Attribute;
|
||||
}
|
||||
mHandle17[gRAMCount++] = LogSmbiosTable(newSmbiosTable);
|
||||
}
|
||||
if (mTotalSystemMemory > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user