]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg/PrePi: Removed harcoded HobList pointer calculation to use PrePeiHobLi...
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 18 Aug 2011 11:17:09 +0000 (11:17 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 18 Aug 2011 11:17:09 +0000 (11:17 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12166 6f19259b-4bc3-4df7-8a09-765794883524

ArmPlatformPkg/PrePi/PrePi.c

index 860befdc2b1e9c3ddde533071d102e9e4d3820c3..7fe6fc36fa1ed91f94af2adbd5a4d2976653a21a 100755 (executable)
@@ -19,6 +19,7 @@
 #include <Library/IoLib.h>\r
 #include <Library/PrintLib.h>\r
 #include <Library/PeCoffGetEntryPointLib.h>\r
+#include <Library/PrePiHobListPointerLib.h>\r
 #include <Library/TimerLib.h>\r
 #include <Library/PerformanceLib.h>\r
 \r
@@ -52,7 +53,7 @@ PrePiMain (
   IN  UINT64                    StartTimeStamp\r
   )\r
 {\r
-  EFI_HOB_HANDOFF_INFO_TABLE**  PrePiHobBase;\r
+  EFI_HOB_HANDOFF_INFO_TABLE*   HobList;\r
   EFI_STATUS                    Status;\r
   CHAR8                         Buffer[100];\r
   UINTN                         CharCount;\r
@@ -83,15 +84,14 @@ PrePiMain (
   // Check the PcdCPUCoresNonSecStackBase match with the calculated StackBase\r
   ASSERT (StacksBase == PcdGet32 (PcdCPUCoresNonSecStackBase));\r
   \r
-  PrePiHobBase = (EFI_HOB_HANDOFF_INFO_TABLE**)(PcdGet32 (PcdCPUCoresNonSecStackBase) + (PcdGet32 (PcdCPUCoresNonSecStackSize) / 2) - PcdGet32 (PcdHobListPtrGlobalOffset));\r
-\r
   // Declare the PI/UEFI memory region\r
-  *PrePiHobBase = HobConstructor (\r
+  HobList = HobConstructor (\r
     (VOID*)UefiMemoryBase,\r
     FixedPcdGet32 (PcdSystemMemoryUefiRegionSize),\r
     (VOID*)UefiMemoryBase,\r
     (VOID*)StacksBase  // The top of the UEFI Memory is reserved for the stacks\r
     );\r
+  PrePeiSetHobList (HobList);\r
 \r
   // Initialize MMU and Memory HOBs (Resource Descriptor HOBs)\r
   Status = MemoryPeim (UefiMemoryBase, FixedPcdGet32 (PcdSystemMemoryUefiRegionSize));\r