]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c
Update BdsDxe to fill int he FirmwareVendor and FirmwareRevision fields of the EFI...
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / BdsDxe / BdsEntry.c
index 322cb59f99aa88255ffa8c5c84a5d68e8b2237ef..055a52df1b887a254c5c69253276d1d298bef8dc 100644 (file)
@@ -278,6 +278,7 @@ BdsEntry (
   LIST_ENTRY                      DriverOptionList;\r
   LIST_ENTRY                      BootOptionList;\r
   UINTN                           BootNextSize;\r
+  CHAR16                          *FirmwareVendor;\r
 \r
   //\r
   // Insert the performance probe\r
@@ -296,6 +297,19 @@ BdsEntry (
   //\r
   InitializeHotkeyService ();\r
 \r
+  //\r
+  // Fill in FirmwareVendor and FirmwareRevision from PCDs\r
+  //\r
+  FirmwareVendor = (CHAR16 *)PcdGetPtr (PcdFirmwareVendor);\r
+  gST->FirmwareVendor = AllocateRuntimeCopyPool (StrSize (FirmwareVendor), FirmwareVendor);\r
+  ASSERT (gST->FirmwareVendor != NULL);\r
+  gST->FirmwareRevision = PcdGet32 (PcdFirmwareRevision);\r
+\r
+  //\r
+  // Fixup Tasble CRC after we updated Firmware Vendor and Revision\r
+  //\r
+  gBS->CalculateCrc32 ((VOID *)gST, sizeof(EFI_SYSTEM_TABLE), &gST->Hdr.CRC32);\r
+\r
   //\r
   // Do the platform init, can be customized by OEM/IBV\r
   //\r