mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2025-02-01 22:41:28 +01:00
add a possibility to set custom SmbiosVersion
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
parent
6221b7560f
commit
27c22a82e3
@ -932,6 +932,8 @@
|
||||
</array>
|
||||
<key>SMBIOS</key>
|
||||
<dict>
|
||||
<key>#SmbiosVersion</key>
|
||||
<integer>0x0206</integer>
|
||||
<key>#Slots</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
@ -922,8 +922,9 @@ typedef struct {
|
||||
BOOLEAN UserChange;
|
||||
BOOLEAN QEMU;
|
||||
// SMBIOS TYPE17
|
||||
UINT16 SmbiosVersion;
|
||||
INT8 Attribute;
|
||||
INT8 Pad17[3];
|
||||
INT8 Pad17[1];
|
||||
CHAR8 MemoryManufacturer[64];
|
||||
CHAR8 MemorySerialNumber[64];
|
||||
CHAR8 MemoryPartNumber[64];
|
||||
|
@ -4464,6 +4464,9 @@ ParseSMBIOSSettings(
|
||||
DBG ("Using ProductName from clover: %a\n", gSettings.ProductName);
|
||||
}
|
||||
|
||||
Prop = GetProperty(DictPointer, "SmbiosVersion");
|
||||
gSettings.SmbiosVersion = (UINT16)GetPropertyInteger(Prop, 0x204);
|
||||
|
||||
// Check for BiosVersion and BiosReleaseDate by Sherlocks
|
||||
Prop = GetProperty (DictPointer, "BiosVersion");
|
||||
if (Prop != NULL) {
|
||||
|
@ -1086,7 +1086,7 @@ VOID PatchTableType11()
|
||||
AsciiStrnCatS(OEMString, MAX_OEM_STRING, gSettings.RomVersion, iStrLen(gSettings.RomVersion, 64));
|
||||
AsciiStrCatS(OEMString, MAX_OEM_STRING, "\n EFI Version:");
|
||||
AsciiStrnCatS(OEMString, MAX_OEM_STRING, gSettings.EfiVersion, iStrLen(gSettings.EfiVersion, 64));
|
||||
AsciiStrCatS(OEMString, MAX_OEM_STRING, "\n Board-ID : ");
|
||||
AsciiStrCatS(OEMString, MAX_OEM_STRING, "\n Board-ID : ");
|
||||
AsciiStrnCatS(OEMString, MAX_OEM_STRING, gSettings.BoardNumber, iStrLen(gSettings.BoardNumber, 64));
|
||||
AsciiSPrint(TempRev, MAX_OEM_STRING, "\n⌘ Powered by Clover v2.5k %s\n", gFirmwareRevision);
|
||||
AsciiStrCatS(OEMString, MAX_OEM_STRING, TempRev);
|
||||
@ -1156,7 +1156,7 @@ VOID PatchTableType16()
|
||||
ZeroMem((VOID*)newSmbiosTable.Type16, MAX_TABLE_SIZE);
|
||||
CopyMem((VOID*)newSmbiosTable.Type16, (VOID*)SmbiosTable.Type16, TableSize);
|
||||
newSmbiosTable.Type16->Hdr.Handle = mHandle16;
|
||||
// Slice - I am not sure I want these values
|
||||
// Slice - I am not sure if I want these values
|
||||
// newSmbiosTable.Type16->Location = MemoryArrayLocationProprietaryAddonCard;
|
||||
// newSmbiosTable.Type16->Use = MemoryArrayUseSystemMemory;
|
||||
// newSmbiosTable.Type16->MemoryErrorCorrection = MemoryErrorCorrectionMultiBitEcc;
|
||||
@ -1992,9 +1992,17 @@ EFI_STATUS PrepatchSmbios()
|
||||
Current = (UINT8*)Smbios; //begin fill tables from here
|
||||
SmbiosEpsNew->TableAddress = (UINT32)(UINTN)Current;
|
||||
SmbiosEpsNew->EntryPointLength = sizeof(SMBIOS_TABLE_ENTRY_POINT); // no matter on other versions
|
||||
SmbiosEpsNew->MajorVersion = 2;
|
||||
SmbiosEpsNew->MinorVersion = 4;
|
||||
SmbiosEpsNew->SmbiosBcdRevision = 0x24; //Slice - we want to have v2.6 but Apple still uses 2.4
|
||||
if (gSettings.SmbiosVersion != 0) {
|
||||
SmbiosEpsNew->MajorVersion = (UINT8)(gSettings.SmbiosVersion >> 8);
|
||||
SmbiosEpsNew->MinorVersion = (UINT8)(gSettings.SmbiosVersion & 0xFF);
|
||||
SmbiosEpsNew->SmbiosBcdRevision = (SmbiosEpsNew->MajorVersion << 4) + SmbiosEpsNew->MinorVersion;
|
||||
}
|
||||
else {
|
||||
//old behavior
|
||||
SmbiosEpsNew->MajorVersion = 2;
|
||||
SmbiosEpsNew->MinorVersion = 4;
|
||||
SmbiosEpsNew->SmbiosBcdRevision = 0x24; //Slice - we want to have v2.6 but Apple still uses 2.4, let it be default value
|
||||
}
|
||||
|
||||
//Create space for SPD
|
||||
//gRAM = AllocateZeroPool(sizeof(MEM_STRUCTURE));
|
||||
|
Loading…
Reference in New Issue
Block a user