InstallAcpiTable() - Do not update the checksum in the passed in buffer – the buffer is an IN buffer and should be treated as such.

signed-off-by: jyao1
reviewed-by: rsun3

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12869 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jyao1 2011-12-15 05:34:57 +00:00
parent fab1046560
commit 71824dd8db
2 changed files with 2 additions and 26 deletions

View File

@ -390,8 +390,6 @@ InstallAcpiTable (
EFI_ACPI_SUPPORT_PROTOCOL *AcpiSupport;
EFI_STATUS Status;
VOID *AcpiTableBufferConst;
UINT32 Length;
UINT8 Checksum;
//
// Check for invalid input parameters
@ -401,16 +399,6 @@ InstallAcpiTable (
return EFI_INVALID_PARAMETER;
}
Length = ((EFI_ACPI_COMMON_HEADER *) AcpiTableBuffer)->Length;
Checksum = CalculateCheckSum8 ((UINT8 *)AcpiTableBuffer, Length);
if (Checksum != 0) {
AcpiPlatformChecksum (
(VOID *)AcpiTableBuffer,
(UINTN)Length,
OFFSET_OF (EFI_ACPI_DESCRIPTION_HEADER, Checksum)
);
}
//
// Get the instance of the ACPI support protocol
//
@ -425,7 +413,7 @@ InstallAcpiTable (
Status = AcpiSupport->SetAcpiTable (
AcpiSupport,
AcpiTableBufferConst,
FALSE,
TRUE,
EFI_ACPI_TABLE_VERSION_1_0B | EFI_ACPI_TABLE_VERSION_2_0 | EFI_ACPI_TABLE_VERSION_3_0,
TableKey
);

View File

@ -317,8 +317,6 @@ InstallAcpiTable (
EFI_ACPI_TABLE_INSTANCE *AcpiTableInstance;
EFI_STATUS Status;
VOID *AcpiTableBufferConst;
UINT32 Length;
UINT8 Checksum;
//
// Check for invalid input parameters
@ -328,16 +326,6 @@ InstallAcpiTable (
return EFI_INVALID_PARAMETER;
}
Length = ((EFI_ACPI_COMMON_HEADER *) AcpiTableBuffer)->Length;
Checksum = CalculateCheckSum8 ((UINT8 *)AcpiTableBuffer, Length);
if (Checksum != 0) {
AcpiPlatformChecksum (
(VOID *)AcpiTableBuffer,
(UINTN)Length,
OFFSET_OF (EFI_ACPI_DESCRIPTION_HEADER, Checksum)
);
}
//
// Get the instance of the ACPI table protocol
//
@ -351,7 +339,7 @@ InstallAcpiTable (
Status = SetAcpiTable (
AcpiTableInstance,
AcpiTableBufferConst,
FALSE,
TRUE,
EFI_ACPI_TABLE_VERSION_1_0B | EFI_ACPI_TABLE_VERSION_2_0 | EFI_ACPI_TABLE_VERSION_3_0,
TableKey
);