]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg: Allow platforms to report their boot status via OemMiscLib call
authorRebecca Cran <rebecca@nuviainc.com>
Wed, 31 Mar 2021 02:16:17 +0000 (20:16 -0600)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 27 Apr 2021 12:46:26 +0000 (12:46 +0000)
Add a new function to OemMiscLib to allow platforms to report their boot
status into the Type32 SMBIOS table.

Signed-off-by: Rebecca Cran <rebecca@nuviainc.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
ArmPkg/Include/Library/OemMiscLib.h
ArmPkg/Universal/Smbios/OemMiscLibNull/OemMiscLib.c
ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationFunction.c

index 25ae508ddb0314227bceb826bc407b8842fd0e91..0b03fe8d4de3e52e987206d03e1dbdf58b0298d7 100644 (file)
@@ -162,6 +162,16 @@ OemUpdateSmbiosInfo (
   IN OEM_MISC_SMBIOS_HII_STRING_FIELD Field\r
   );\r
 \r
+/** Fetches the Type 32 boot information status.\r
+\r
+  @return Boot status.\r
+**/\r
+MISC_BOOT_INFORMATION_STATUS_DATA_TYPE\r
+EFIAPI\r
+OemGetBootStatus (\r
+  VOID\r
+  );\r
+\r
 /** Fetches the chassis status when it was last booted.\r
 \r
  @return Chassis status.\r
index 33b0081d65b04d9748970acc18f1c290ce1f66f2..31252697352535c3c160bd715ebbbae420e6ed03 100644 (file)
@@ -140,6 +140,20 @@ OemUpdateSmbiosInfo (
   ASSERT (FALSE);\r
 }\r
 \r
+/** Fetches the Type 32 boot information status.\r
+\r
+  @return Boot status.\r
+**/\r
+MISC_BOOT_INFORMATION_STATUS_DATA_TYPE\r
+EFIAPI\r
+OemGetBootStatus (\r
+  VOID\r
+  )\r
+{\r
+  ASSERT (FALSE);\r
+  return BootInformationStatusNoError;\r
+}\r
+\r
 /** Fetches the chassis status when it was last booted.\r
 \r
  @return Chassis status.\r
index 733615bbcf1af76c1934661ac4cbe4dd7535747e..4be1e1cd29a9f74033d65a184c2a9fb510f74d60 100644 (file)
@@ -16,6 +16,7 @@
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
+#include <Library/OemMiscLib.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
 \r
 #include "SmbiosMisc.h"\r
@@ -59,6 +60,8 @@ SMBIOS_MISC_TABLE_FUNCTION(MiscBootInformation)
 \r
   SmbiosRecord->Hdr.Length = sizeof (SMBIOS_TABLE_TYPE32);\r
 \r
+  SmbiosRecord->BootStatus = OemGetBootStatus ();\r
+\r
   //\r
   // Now we have got the full smbios record, call smbios protocol to add this record.\r
   //\r