/** @file\r
ACPI Table Protocol Implementation\r
\r
- Copyright (c) 2006 - 2009, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
+ Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
http://opensource.org/licenses/bsd-license.php\r
\r
/**\r
Installs an ACPI table into the RSDT/XSDT.\r
+ Note that the ACPI table should be checksumed before installing it.\r
+ Otherwise it will assert.\r
\r
@param This Protocol instance pointer.\r
@param AcpiTableBuffer A pointer to a buffer containing the ACPI table to be installed.\r
EFI_ACPI_TABLE_INSTANCE *AcpiTableInstance;\r
EFI_STATUS Status;\r
VOID *AcpiTableBufferConst;\r
+ UINT32 Length;\r
+ UINT8 Checksum;\r
\r
//\r
// Check for invalid input parameters\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
+ Length = ((EFI_ACPI_COMMON_HEADER *) AcpiTableBuffer)->Length;\r
+ Checksum = CalculateCheckSum8 ((UINT8 *)AcpiTableBuffer, Length);\r
+ ASSERT (Checksum == 0);\r
+\r
//\r
// Get the instance of the ACPI table protocol\r
//\r
Status = SetAcpiTable (\r
AcpiTableInstance,\r
AcpiTableBufferConst,\r
- TRUE,\r
+ FALSE,\r
EFI_ACPI_TABLE_VERSION_1_0B | EFI_ACPI_TABLE_VERSION_2_0 | EFI_ACPI_TABLE_VERSION_3_0,\r
TableKey\r
);\r
EFI_ACPI_TABLE_LIST *Table;\r
EFI_STATUS Status;\r
\r
+ Table = (EFI_ACPI_TABLE_LIST*) NULL;\r
+\r
//\r
// Check for invalid input parameters\r
//\r