diff options
author | jyao1 <jyao1@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-07-16 04:31:02 +0000 |
---|---|---|
committer | jyao1 <jyao1@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-07-16 04:31:02 +0000 |
commit | 4196f91ec0e615ecbddd2fc267a39fd7f3c59b91 (patch) | |
tree | b97d959ec9180bd91c112d2cd0337cfdcf8d6ff7 | |
parent | 3ea3ff88e3fb91dd63da29718bdc454f0d043cee (diff) | |
download | edk2-4196f91ec0e615ecbddd2fc267a39fd7f3c59b91.zip edk2-4196f91ec0e615ecbddd2fc267a39fd7f3c59b91.tar.gz edk2-4196f91ec0e615ecbddd2fc267a39fd7f3c59b91.tar.bz2 |
Enhance to follow UEFI2.3 spec - the EFI_ACPI_TABLE_PROTOCOL will ensure that the checksum field is correct for both the RSDT/XSDT table and the table being installed through the AcpiTableBuffer parameter.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10655 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c index c551d0b..cb3dc89 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c @@ -330,7 +330,13 @@ InstallAcpiTable ( Length = ((EFI_ACPI_COMMON_HEADER *) AcpiTableBuffer)->Length;
Checksum = CalculateCheckSum8 ((UINT8 *)AcpiTableBuffer, Length);
- ASSERT (Checksum == 0);
+ if (Checksum != 0) {
+ AcpiPlatformChecksum (
+ (VOID *)AcpiTableBuffer,
+ (UINTN)Length,
+ OFFSET_OF (EFI_ACPI_DESCRIPTION_HEADER, Checksum)
+ );
+ }
//
// Get the instance of the ACPI table protocol
|