summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Acpi
diff options
context:
space:
mode:
authorjyao1 <jyao1@6f19259b-4bc3-4df7-8a09-765794883524>2010-07-16 04:31:02 +0000
committerjyao1 <jyao1@6f19259b-4bc3-4df7-8a09-765794883524>2010-07-16 04:31:02 +0000
commit4196f91ec0e615ecbddd2fc267a39fd7f3c59b91 (patch)
treeb97d959ec9180bd91c112d2cd0337cfdcf8d6ff7 /MdeModulePkg/Universal/Acpi
parent3ea3ff88e3fb91dd63da29718bdc454f0d043cee (diff)
downloadedk2-platforms-4196f91ec0e615ecbddd2fc267a39fd7f3c59b91.tar.xz
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
Diffstat (limited to 'MdeModulePkg/Universal/Acpi')
-rw-r--r--MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c
index c551d0bd5d..cb3dc89948 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