mirror of https://github.com/acidanthera/audk.git
OvmfPkg/AcpiPlatformDxe: rely on built-in checksumming
Implementation in "MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c": InstallAcpiTable() SetAcpiTable(... Checksum=TRUE ...) AddTableToList(... Checksum=TRUE ...) AcpiPlatformChecksum() Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13543 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
4804ef4943
commit
b5c91f01d2
|
@ -129,34 +129,6 @@ LocateFvInstanceWithTables (
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
This function calculates and updates an UINT8 checksum.
|
||||
|
||||
@param Buffer Pointer to buffer to checksum
|
||||
@param Size Number of bytes to checksum
|
||||
|
||||
**/
|
||||
VOID
|
||||
AcpiPlatformChecksum (
|
||||
IN UINT8 *Buffer,
|
||||
IN UINTN Size
|
||||
)
|
||||
{
|
||||
UINTN ChecksumOffset;
|
||||
|
||||
ChecksumOffset = OFFSET_OF (EFI_ACPI_DESCRIPTION_HEADER, Checksum);
|
||||
|
||||
//
|
||||
// Set checksum to 0 first
|
||||
//
|
||||
Buffer[ChecksumOffset] = 0;
|
||||
|
||||
//
|
||||
// Update checksum value
|
||||
//
|
||||
Buffer[ChecksumOffset] = CalculateCheckSum8(Buffer, Size);
|
||||
}
|
||||
|
||||
/**
|
||||
Find ACPI tables in an FV and parses them. This function is useful for QEMU and KVM.
|
||||
|
||||
|
@ -219,11 +191,6 @@ FindAcpiTablesInFv (
|
|||
TableSize = ((EFI_ACPI_DESCRIPTION_HEADER *) CurrentTable)->Length;
|
||||
ASSERT (Size >= TableSize);
|
||||
|
||||
//
|
||||
// Checksum ACPI table
|
||||
//
|
||||
AcpiPlatformChecksum ((UINT8*)CurrentTable, TableSize);
|
||||
|
||||
//
|
||||
// Install ACPI table
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue