]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/PeiHobLib/HobLib.c
1. In event.c, a function's name is not spelled correctly, a typo.
[mirror_edk2.git] / MdePkg / Library / PeiHobLib / HobLib.c
index ce9f79f82c1f4ec38cd37d85855f65ccabc4bc36..60a0e8c5da6951a64526a96f3168c463a10ee663 100644 (file)
@@ -228,6 +228,11 @@ BuildModuleHob (
   Hob->MemoryAllocationHeader.MemoryLength      = ModuleLength;\r
   Hob->MemoryAllocationHeader.MemoryType        = EfiBootServicesCode;\r
 \r
+  //\r
+  // Zero the reserved space to match HOB spec\r
+  //\r
+  ZeroMem (Hob->MemoryAllocationHeader.Reserved, sizeof (Hob->MemoryAllocationHeader.Reserved));\r
+  \r
   CopyGuid (&Hob->ModuleName, ModuleName);\r
   Hob->EntryPoint = EntryPoint;\r
 }\r
@@ -418,6 +423,11 @@ BuildCpuHob (
 \r
   Hob->SizeOfMemorySpace = SizeOfMemorySpace;\r
   Hob->SizeOfIoSpace     = SizeOfIoSpace;\r
+\r
+  //\r
+  // Zero the reserved space to match HOB spec\r
+  //\r
+  ZeroMem (Hob->Reserved, sizeof (Hob->Reserved)); \r
 }\r
 \r
 /**\r
@@ -447,6 +457,11 @@ BuildStackHob (
   Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress;\r
   Hob->AllocDescriptor.MemoryLength      = Length;\r
   Hob->AllocDescriptor.MemoryType        = EfiConventionalMemory;\r
+\r
+  //\r
+  // Zero the reserved space to match HOB spec\r
+  //\r
+  ZeroMem (Hob->AllocDescriptor.Reserved, sizeof (Hob->AllocDescriptor.Reserved));\r
 }\r
 \r
 /**\r
@@ -478,6 +493,11 @@ BuildBspStoreHob (
   Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress;\r
   Hob->AllocDescriptor.MemoryLength      = Length;\r
   Hob->AllocDescriptor.MemoryType        = MemoryType;\r
+\r
+  //\r
+  // Zero the reserved space to match HOB spec\r
+  //\r
+  ZeroMem (Hob->AllocDescriptor.Reserved, sizeof (Hob->AllocDescriptor.Reserved));\r
 }\r
 \r
 /**\r
@@ -509,4 +529,8 @@ BuildMemoryAllocationHob (
   Hob->AllocDescriptor.MemoryBaseAddress = BaseAddress;\r
   Hob->AllocDescriptor.MemoryLength      = Length;\r
   Hob->AllocDescriptor.MemoryType        = MemoryType;\r
+  //\r
+  // Zero the reserved space to match HOB spec\r
+  //\r
+  ZeroMem (Hob->AllocDescriptor.Reserved, sizeof (Hob->AllocDescriptor.Reserved));\r
 }\r