Fix Smbios table checksum error, by zero IntermediateChecksum and EntryPointStructureChecksum before checksum calculation.

signed-off-by: jyao1
reviewed-by: elvinli

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12527 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jyao1 2011-10-11 13:25:18 +00:00
parent 30d636c8d9
commit 47f8d0f3c3
1 changed files with 3 additions and 0 deletions

View File

@ -994,6 +994,9 @@ SmbiosCreateTable (
//
// Fixup checksums in the Entry Point Structure
//
EntryPointStructure->IntermediateChecksum = 0;
EntryPointStructure->EntryPointStructureChecksum = 0;
EntryPointStructure->IntermediateChecksum =
CalculateCheckSum8 ((UINT8 *) EntryPointStructure + 0x10, EntryPointStructure->EntryPointLength - 0x10);
EntryPointStructure->EntryPointStructureChecksum =