diff options
author | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-06-24 09:39:47 +0000 |
---|---|---|
committer | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-06-24 09:39:47 +0000 |
commit | 35c290c5805c4b0266898040e44b905c19aeda3d (patch) | |
tree | 8ad88c7613c213f9e90b409923a6b6a2da7735c1 /MdeModulePkg/Universal/Network/IScsiDxe | |
parent | 7ec9caab9293a06129cdeceda40db94f0b37eb9e (diff) | |
download | edk2-35c290c5805c4b0266898040e44b905c19aeda3d.zip edk2-35c290c5805c4b0266898040e44b905c19aeda3d.tar.gz edk2-35c290c5805c4b0266898040e44b905c19aeda3d.tar.bz2 |
do checksum before installing IBFT.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8649 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/IScsiDxe')
-rw-r--r-- | MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c index 60a11b2..6d2b184 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c @@ -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);
//
|