]> 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 1f0c66acd092fb26f7a905dc0032c04d53b035c4..60a0e8c5da6951a64526a96f3168c463a10ee663 100644 (file)
@@ -33,7 +33,7 @@ GetHobList (
   EFI_STATUS            Status;\r
   VOID                  *HobList;\r
 \r
-  Status = PeiCoreGetHobList (&HobList);\r
+  Status = PeiServicesGetHobList (&HobList);\r
   ASSERT_EFI_ERROR (Status);\r
   ASSERT (HobList != NULL);\r
 \r
@@ -187,7 +187,7 @@ InternalPeiCreateHob (
   EFI_STATUS        Status;\r
   VOID              *Hob;\r
 \r
-  Status = PeiCoreCreateHob (Type, Length, &Hob);\r
+  Status = PeiServicesCreateHob (Type, Length, &Hob);\r
   //\r
   // Assume the process of HOB building is always successful.\r
   //\r
@@ -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