diff options
author | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-04-14 09:28:11 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2013-04-14 09:28:11 +0000 |
commit | 53cba4fea4cae903b31e439f1d40ac7e3bb19a1b (patch) | |
tree | 79a5d01b3f0b53000d001849f575778c47e50b66 /ArmPlatformPkg/Bds/Bds.c | |
parent | 81742bb085522dc9120af1b7cc1a1dc959afa7b9 (diff) | |
download | edk2-platforms-53cba4fea4cae903b31e439f1d40ac7e3bb19a1b.tar.xz |
ArmPlatformPkg/Bds: Missing CRC32 update
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14266 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Bds/Bds.c')
-rw-r--r-- | ArmPlatformPkg/Bds/Bds.c | 14 |
1 files changed, 14 insertions, 0 deletions
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 ();
|