summaryrefslogtreecommitdiff
path: root/MdePkg/Library/PeiHobLib
diff options
context:
space:
mode:
authormikewuping <mikewuping@6f19259b-4bc3-4df7-8a09-765794883524>2006-10-30 07:47:44 +0000
committermikewuping <mikewuping@6f19259b-4bc3-4df7-8a09-765794883524>2006-10-30 07:47:44 +0000
commitd4f397c0311d529e62ca3356bc6e92fb3fbdb1bc (patch)
treed97f93f15131b0d2d9c90acd3becde156b968373 /MdePkg/Library/PeiHobLib
parentba73bc0bc0b7bf0d29868683bba446dc5593393e (diff)
downloadedk2-platforms-d4f397c0311d529e62ca3356bc6e92fb3fbdb1bc.tar.xz
1. In event.c, a function's name is not spelled correctly, a typo.
2. In Graphics.c, Memory Leak in Graphics Library, ConvertBmpToUgaBlt(). 3. In HobLib.c, PeiBuildHobModule and three other functions do not zero hob reserved data area according to HOB spec v0.9. 4. In statuscode.h, the number of definition of EFI_SW_PEIM_PC_CAPSULE_START is equal to EFI_SW_PEIM_PC_CAPSULE_LOAD. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1861 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/PeiHobLib')
-rw-r--r--MdePkg/Library/PeiHobLib/HobLib.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/MdePkg/Library/PeiHobLib/HobLib.c b/MdePkg/Library/PeiHobLib/HobLib.c
index ce9f79f82c..60a0e8c5da 100644
--- a/MdePkg/Library/PeiHobLib/HobLib.c
+++ b/MdePkg/Library/PeiHobLib/HobLib.c
@@ -228,6 +228,11 @@ BuildModuleHob (
Hob->MemoryAllocationHeader.MemoryLength = ModuleLength;
Hob->MemoryAllocationHeader.MemoryType = EfiBootServicesCode;
+ //
+ // Zero the reserved space to match HOB spec
+ //
+ ZeroMem (Hob->MemoryAllocationHeader.Reserved, sizeof (Hob->MemoryAllocationHeader.Reserved));
+
CopyGuid (&Hob->ModuleName, ModuleName);
Hob->EntryPoint = EntryPoint;
}
@@ -418,6 +423,11 @@ BuildCpuHob (
Hob->SizeOfMemorySpace = SizeOfMemorySpace;
Hob->SizeOfIoSpace = SizeOfIoSpace;
+
+ //
+ // Zero the reserved space to match HOB spec
+ //
+ ZeroMem (Hob->Reserved, sizeof (Hob->Reserved));
}
/**
@@ -447,6 +457,11 @@ BuildStackHob (
Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress;
Hob->AllocDescriptor.MemoryLength = Length;
Hob->AllocDescriptor.MemoryType = EfiConventionalMemory;
+
+ //
+ // Zero the reserved space to match HOB spec
+ //
+ ZeroMem (Hob->AllocDescriptor.Reserved, sizeof (Hob->AllocDescriptor.Reserved));
}
/**
@@ -478,6 +493,11 @@ BuildBspStoreHob (
Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress;
Hob->AllocDescriptor.MemoryLength = Length;
Hob->AllocDescriptor.MemoryType = MemoryType;
+
+ //
+ // Zero the reserved space to match HOB spec
+ //
+ ZeroMem (Hob->AllocDescriptor.Reserved, sizeof (Hob->AllocDescriptor.Reserved));
}
/**
@@ -509,4 +529,8 @@ BuildMemoryAllocationHob (
Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress;
Hob->AllocDescriptor.MemoryLength = Length;
Hob->AllocDescriptor.MemoryType = MemoryType;
+ //
+ // Zero the reserved space to match HOB spec
+ //
+ ZeroMem (Hob->AllocDescriptor.Reserved, sizeof (Hob->AllocDescriptor.Reserved));
}