OpenCorePlatform: Fix partial platform data update
@@ -718,7 +718,6 @@ OcLoadPlatformSupport (
ExposeOem = (Config->Misc.Security.ExposeSensitiveData & OCS_EXPOSE_OEM_INFO) != 0;
- if (ExposeOem || Config->PlatformInfo.UpdateSmbios) {
Status = OcSmbiosTablePrepare (&SmbiosTable);
if (!EFI_ERROR (Status)) {
OcSmbiosExtractOemInfo (
@@ -731,8 +730,23 @@ OcLoadPlatformSupport (
Config->PlatformInfo.UseRawUuidEncoding,
ExposeOem
);
+ } else {
+ UseOemSerial = FALSE;
+ UseOemUuid = FALSE;
+ UseOemMlb = FALSE;
+ UseOemRom = FALSE;
+ }
+
+ DEBUG ((
+ DEBUG_INFO,
+ "OC: PlatformInfo auto %d OEM SN %d OEM UUID %d OEM MLB %d OEM ROM %d\n",
+ Config->PlatformInfo.Automatic,
+ UseOemSerial,
+ UseOemUuid,
+ UseOemMlb,
+ UseOemRom
+ ));
- if (Config->PlatformInfo.UpdateSmbios) {
if (Config->PlatformInfo.Automatic) {
if (!UseOemSerial) {
AsciiStrCpyS (
@@ -762,6 +776,8 @@ OcLoadPlatformSupport (
}
}
+ if (!EFI_ERROR (Status)) {
+ if (Config->PlatformInfo.UpdateSMBIOS) {
SmbiosUpdateMode = OcSmbiosGetUpdateMode (
OC_BLOB_GET (&Config->PlatformInfo.UpdateSmbiosMode)
);
@@ -778,7 +794,6 @@ OcLoadPlatformSupport (
} else {
DEBUG ((DEBUG_WARN, "OC: Unable to obtain SMBIOS - %r\n", Status));
}
- }
if (Config->PlatformInfo.UpdateDataHub) {
OcPlatformUpdateDataHub (Config, CpuInfo, UsedMacInfo);
