mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-23 11:35:19 +01:00
Merge pull request #63 from Florin9doi/p12_32gb_ram
Try to fix the issues with 32GB modules; 3rd try
This commit is contained in:
commit
2bf7bca6ac
@ -1364,8 +1364,10 @@ VOID PatchTableType17()
|
|||||||
if (gRAM.User[UserIndex].ModuleSize > 0x7FFF) {
|
if (gRAM.User[UserIndex].ModuleSize > 0x7FFF) {
|
||||||
newSmbiosTable.Type17->Size = 0x7FFF;
|
newSmbiosTable.Type17->Size = 0x7FFF;
|
||||||
newSmbiosTable.Type17->ExtendedSize = gRAM.User[UserIndex].ModuleSize;
|
newSmbiosTable.Type17->ExtendedSize = gRAM.User[UserIndex].ModuleSize;
|
||||||
|
mTotalSystemMemory += newSmbiosTable.Type17->ExtendedSize; //Mb
|
||||||
} else {
|
} else {
|
||||||
newSmbiosTable.Type17->Size = (UINT16)gRAM.User[UserIndex].ModuleSize;
|
newSmbiosTable.Type17->Size = (UINT16)gRAM.User[UserIndex].ModuleSize;
|
||||||
|
mTotalSystemMemory += newSmbiosTable.Type17->Size; //Mb
|
||||||
}
|
}
|
||||||
newSmbiosTable.Type17->MemoryType = gRAM.User[UserIndex].Type;
|
newSmbiosTable.Type17->MemoryType = gRAM.User[UserIndex].Type;
|
||||||
if ((newSmbiosTable.Type17->MemoryType != MemoryTypeDdr2) &&
|
if ((newSmbiosTable.Type17->MemoryType != MemoryTypeDdr2) &&
|
||||||
@ -1375,7 +1377,6 @@ VOID PatchTableType17()
|
|||||||
}
|
}
|
||||||
DBG("%a %a %dMHz %dMB(Ext:%dMB)\n", bankLocator, deviceLocator, newSmbiosTable.Type17->Speed,
|
DBG("%a %a %dMHz %dMB(Ext:%dMB)\n", bankLocator, deviceLocator, newSmbiosTable.Type17->Speed,
|
||||||
newSmbiosTable.Type17->Size, newSmbiosTable.Type17->ExtendedSize);
|
newSmbiosTable.Type17->Size, newSmbiosTable.Type17->ExtendedSize);
|
||||||
mTotalSystemMemory += newSmbiosTable.Type17->Size; //Mb
|
|
||||||
mMemory17[gRAMCount] = (UINT16)mTotalSystemMemory;
|
mMemory17[gRAMCount] = (UINT16)mTotalSystemMemory;
|
||||||
// DBG("mTotalSystemMemory = %d\n", mTotalSystemMemory);
|
// DBG("mTotalSystemMemory = %d\n", mTotalSystemMemory);
|
||||||
} else {
|
} else {
|
||||||
@ -1632,7 +1633,12 @@ VOID PatchTableType17()
|
|||||||
} else {
|
} else {
|
||||||
newSmbiosTable.Type17->Speed = (UINT16)gRAM.SPD[SPDIndex].Frequency;
|
newSmbiosTable.Type17->Speed = (UINT16)gRAM.SPD[SPDIndex].Frequency;
|
||||||
}
|
}
|
||||||
newSmbiosTable.Type17->Size = (UINT16)gRAM.SPD[SPDIndex].ModuleSize;
|
if (gRAM.SPD[SPDIndex].ModuleSize > 0x7FFF) {
|
||||||
|
newSmbiosTable.Type17->Size = 0x7FFF;
|
||||||
|
newSmbiosTable.Type17->ExtendedSize = gRAM.SPD[SPDIndex].ModuleSize;
|
||||||
|
} else {
|
||||||
|
newSmbiosTable.Type17->Size = (UINT16)gRAM.SPD[SPDIndex].ModuleSize;
|
||||||
|
}
|
||||||
newSmbiosTable.Type17->MemoryType = gRAM.SPD[SPDIndex].Type;
|
newSmbiosTable.Type17->MemoryType = gRAM.SPD[SPDIndex].Type;
|
||||||
}
|
}
|
||||||
if (trustSMBIOS && gRAM.SMBIOS[SMBIOSIndex].InUse &&
|
if (trustSMBIOS && gRAM.SMBIOS[SMBIOSIndex].InUse &&
|
||||||
@ -1676,8 +1682,13 @@ VOID PatchTableType17()
|
|||||||
newSmbiosTable.Type17->MemoryType = 0; //MemoryTypeUnknown;
|
newSmbiosTable.Type17->MemoryType = 0; //MemoryTypeUnknown;
|
||||||
} else {
|
} else {
|
||||||
insertingEmpty = FALSE;
|
insertingEmpty = FALSE;
|
||||||
DBG("%a %a %dMHz %dMB\n", bankLocator, deviceLocator, newSmbiosTable.Type17->Speed, newSmbiosTable.Type17->Size);
|
DBG("%a %a %dMHz %dMB(Ext:%dMB)\n", bankLocator, deviceLocator, newSmbiosTable.Type17->Speed,
|
||||||
mTotalSystemMemory += newSmbiosTable.Type17->Size; //Mb
|
newSmbiosTable.Type17->Size, newSmbiosTable.Type17->ExtendedSize);
|
||||||
|
if (newSmbiosTable.Type17->Size == 0x7FFF) {
|
||||||
|
mTotalSystemMemory += newSmbiosTable.Type17->ExtendedSize; //Mb
|
||||||
|
} else {
|
||||||
|
mTotalSystemMemory += newSmbiosTable.Type17->Size; //Mb
|
||||||
|
}
|
||||||
mMemory17[gRAMCount] = (UINT16)mTotalSystemMemory;
|
mMemory17[gRAMCount] = (UINT16)mTotalSystemMemory;
|
||||||
// DBG("mTotalSystemMemory = %d\n", mTotalSystemMemory);
|
// DBG("mTotalSystemMemory = %d\n", mTotalSystemMemory);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user