do checksum before installing IBFT.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8649 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
eric_tian 2009-06-24 09:39:47 +00:00
parent 7ec9caab92
commit 35c290c580
1 changed files with 5 additions and 1 deletions

View File

@ -448,6 +448,7 @@ IScsiPublishIbft (
UINTN HandleCount;
EFI_HANDLE *HandleBuffer;
UINT8 *Heap;
UINT8 Checksum;
Status = gBS->LocateProtocol (&gEfiAcpiTableProtocolGuid, NULL, (VOID **)&AcpiTableProtocol);
if (EFI_ERROR (Status)) {
@ -481,7 +482,7 @@ IScsiPublishIbft (
//
// Allocate 4k bytes to hold the ACPI table.
//
Table = AllocatePool (IBFT_MAX_SIZE);
Table = AllocateZeroPool (IBFT_MAX_SIZE);
if (Table == NULL) {
return ;
}
@ -496,6 +497,9 @@ IScsiPublishIbft (
IScsiFillInitiatorSection (Table, &Heap, HandleBuffer[0]);
IScsiFillNICAndTargetSections (Table, &Heap, HandleCount, HandleBuffer);
Checksum = CalculateCheckSum8((UINT8 *)Table, Table->Length);
Table->Checksum = Checksum;
FreePool (HandleBuffer);
//