69 IN OC_GLOBAL_CONFIG *Config
73 CONST CHAR8 *SystemProductName;
74 CONST CHAR8 *SystemMemoryStatus;
75 CONST CHAR8 *AsciiSystemUUID;
80 SystemProductName =
OC_BLOB_GET (&Config->PlatformInfo.Generic.SystemProductName);
82 DEBUG ((DEBUG_WARN,
"PlatformInfo->Generic->SystemProductName has unknown model set!\n"));
86 SystemMemoryStatus =
OC_BLOB_GET (&Config->PlatformInfo.Generic.SystemMemoryStatus);
87 if ( (AsciiStrCmp (SystemMemoryStatus,
"Auto") != 0)
88 && (AsciiStrCmp (SystemMemoryStatus,
"Upgradable") != 0)
89 && (AsciiStrCmp (SystemMemoryStatus,
"Soldered") != 0))
91 DEBUG ((DEBUG_WARN,
"PlatformInfo->Generic->SystemMemoryStatus is borked (Can only be Auto, Upgradable, or Soldered)!\n"));
95 AsciiSystemUUID =
OC_BLOB_GET (&Config->PlatformInfo.Generic.SystemUuid);
96 if ( (AsciiSystemUUID[0] !=
'\0')
97 && (AsciiStrCmp (AsciiSystemUUID,
"OEM") != 0)
100 DEBUG ((DEBUG_WARN,
"PlatformInfo->Generic->SystemUUID is borked (Can only be empty, special string OEM or valid UUID)!\n"));
106 DEBUG ((DEBUG_WARN,
"PlatformInfo->Generic->ProcessorType is borked!\n"));
119 IN OC_GLOBAL_CONFIG *Config
123 BOOLEAN IsAutomaticEnabled;
124 CONST CHAR8 *UpdateSMBIOSMode;
130 DEBUG ((DEBUG_VERBOSE,
"config loaded into %a!\n", __func__));
134 UpdateSMBIOSMode =
OC_BLOB_GET (&Config->PlatformInfo.UpdateSmbiosMode);
135 if ( (AsciiStrCmp (UpdateSMBIOSMode,
"TryOverwrite") != 0)
136 && (AsciiStrCmp (UpdateSMBIOSMode,
"Create") != 0)
137 && (AsciiStrCmp (UpdateSMBIOSMode,
"Overwrite") != 0)
138 && (AsciiStrCmp (UpdateSMBIOSMode,
"Custom") != 0))
140 DEBUG ((DEBUG_WARN,
"PlatformInfo->UpdateSMBIOSMode is borked (Can only be TryOverwrite, Create, Overwrite, or Custom)!\n"));
144 IsAutomaticEnabled = Config->PlatformInfo.Automatic;
145 if (!IsAutomaticEnabled) {
152 for (Index = 0; Index <
ARRAY_SIZE (PlatformInfoCheckers); ++Index) {
153 ErrorCount += PlatformInfoCheckers[Index](Config);