From 53cba4fea4cae903b31e439f1d40ac7e3bb19a1b Mon Sep 17 00:00:00 2001 From: oliviermartin Date: Sun, 14 Apr 2013 09:28:11 +0000 Subject: ArmPlatformPkg/Bds: Missing CRC32 update Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14266 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPlatformPkg/Bds/Bds.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ArmPlatformPkg/Bds/Bds.c b/ArmPlatformPkg/Bds/Bds.c index fadba6e7a5..2801fac531 100644 --- a/ArmPlatformPkg/Bds/Bds.c +++ b/ArmPlatformPkg/Bds/Bds.c @@ -406,6 +406,13 @@ BdsEntry ( UnicodeSPrint (gST->FirmwareVendor, Size, L"%a EFI %a %a", PcdGetPtr(PcdFirmwareVendor), __DATE__, __TIME__); } + // + // Fixup Table CRC after we updated Firmware Vendor + // + gST->Hdr.CRC32 = 0; + Status = gBS->CalculateCrc32 ((VOID*)gST, gST->Hdr.HeaderSize, &gST->Hdr.CRC32); + ASSERT_EFI_ERROR (Status); + // If BootNext environment variable is defined then we just load it ! BootNextSize = sizeof(UINT16); Status = GetGlobalEnvironmentVariable (L"BootNext", NULL, &BootNextSize, (VOID**)&BootNext); @@ -448,6 +455,13 @@ BdsEntry ( // Now we need to setup the EFI System Table with information about the console devices. InitializeConsole (); + // + // Update the CRC32 in the EFI System Table header + // + gST->Hdr.CRC32 = 0; + Status = gBS->CalculateCrc32 ((VOID*)gST, gST->Hdr.HeaderSize, &gST->Hdr.CRC32); + ASSERT_EFI_ERROR (Status); + // Timer before initiating the default boot selection StartDefaultBootOnTimeout (); -- cgit v1.2.3