From 489f4c5a44adedeee64f5f7c2c914c5a71d56499 Mon Sep 17 00:00:00 2001 From: Sherlocks Date: Thu, 12 Dec 2019 23:51:55 +0900 Subject: [PATCH] Added NoRomInfo key to disable rom info in hardware overview in system profiler --- CloverPackage/CloverV2/EFI/CLOVER/config-sample.plist | 2 ++ rEFIt_UEFI/Platform/Platform.h | 3 +++ rEFIt_UEFI/Platform/Settings.c | 5 +++++ rEFIt_UEFI/Platform/smbios.c | 4 +++- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CloverPackage/CloverV2/EFI/CLOVER/config-sample.plist b/CloverPackage/CloverV2/EFI/CLOVER/config-sample.plist index a5fc3282c..1f75f2ad9 100644 --- a/CloverPackage/CloverV2/EFI/CLOVER/config-sample.plist +++ b/CloverPackage/CloverV2/EFI/CLOVER/config-sample.plist @@ -961,6 +961,8 @@ IM131.88Z.F000.B00.1907241303 #EfiVersion 288.0.0.0.0 + #NoRomInfo + #SerialNumber C02JBSAMDNCW #Family diff --git a/rEFIt_UEFI/Platform/Platform.h b/rEFIt_UEFI/Platform/Platform.h index 0c9dd30bb..4d80e207b 100644 --- a/rEFIt_UEFI/Platform/Platform.h +++ b/rEFIt_UEFI/Platform/Platform.h @@ -940,6 +940,9 @@ typedef struct { BOOLEAN UseARTFreq; // SMBIOS TYPE133 UINT64 PlatformFeature; + + // PatchTableType11 + BOOLEAN NoRomInfo; // OS parameters CHAR8 Language[16]; diff --git a/rEFIt_UEFI/Platform/Settings.c b/rEFIt_UEFI/Platform/Settings.c index e53357552..fd99db029 100644 --- a/rEFIt_UEFI/Platform/Settings.c +++ b/rEFIt_UEFI/Platform/Settings.c @@ -4821,6 +4821,11 @@ ParseSMBIOSSettings( gSettings.ChassisType = (UINT8)GetPropertyInteger (Prop, gSettings.ChassisType); DBG ("ChassisType: 0x%x\n", gSettings.ChassisType); } + + Prop = GetProperty (DictPointer, "NoRomInfo"); + if (Prop != NULL) { + gSettings.NoRomInfo = IsPropertyTrue (Prop); + } } EFI_STATUS diff --git a/rEFIt_UEFI/Platform/smbios.c b/rEFIt_UEFI/Platform/smbios.c index 457bb6cbf..e91216f90 100644 --- a/rEFIt_UEFI/Platform/smbios.c +++ b/rEFIt_UEFI/Platform/smbios.c @@ -2042,7 +2042,9 @@ VOID PatchSmbios(VOID) //continue PatchTableType4(); // PatchTableType6(); PatchTableType9(); - PatchTableType11(); + if (!gSettings.NoRomInfo) { + PatchTableType11(); + } PatchTableTypeSome(); PatchTableType17(); PatchTableType16();