diff --git a/ArmPlatformPkg/ArmPlatformPkg.dec b/ArmPlatformPkg/ArmPlatformPkg.dec index 45aeaeee75..cb95516881 100644 --- a/ArmPlatformPkg/ArmPlatformPkg.dec +++ b/ArmPlatformPkg/ArmPlatformPkg.dec @@ -87,7 +87,8 @@ # PeiServicePtr and HobListPtr shares the same location in the PEI Global Variable list # PeiServicePtr is only valid with PEI Core and HobListPtr only when the PEI Core is skipped. gArmPlatformTokenSpaceGuid.PcdPeiServicePtrGlobalOffset|0x0|UINT32|0x00000017 - gArmPlatformTokenSpaceGuid.PcdHobListPtrGlobalOffset|0x0|UINT32|0x00000018 + ## TO BE REMOVED + ## gArmPlatformTokenSpaceGuid.PcdHobListPtrGlobalOffset|0x0|UINT32|0x00000018 # Size to reserve in the primary core stack for SEC Global Variables gArmPlatformTokenSpaceGuid.PcdSecGlobalVariableSize|0x0|UINT32|0x00000031 diff --git a/ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointer.c b/ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointer.c index 8932e10049..23e366db2f 100755 --- a/ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointer.c +++ b/ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointer.c @@ -13,10 +13,9 @@ **/ #include -#include +#include #include #include -#include /** Returns the pointer to the HOB list. @@ -32,11 +31,7 @@ PrePeiGetHobList ( VOID ) { - VOID* HobList; - - ArmPlatformGetGlobalVariable (PcdGet32 (PcdHobListPtrGlobalOffset), sizeof(VOID*), &HobList); - - return HobList; + return (VOID *)ArmReadTpidrurw(); } @@ -53,8 +48,7 @@ PrePeiSetHobList ( IN VOID *HobList ) { - ArmPlatformSetGlobalVariable (PcdGet32 (PcdHobListPtrGlobalOffset), sizeof(VOID*), &HobList); + ArmWriteTpidrurw((UINTN)HobList); return EFI_SUCCESS; } - diff --git a/ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf b/ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf index 16b201e8f6..0b98f6ffda 100755 --- a/ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf +++ b/ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf @@ -25,11 +25,8 @@ [Packages] MdePkg/MdePkg.dec - ArmPlatformPkg/ArmPlatformPkg.dec + ArmPkg/ArmPkg.dec EmbeddedPkg/EmbeddedPkg.dec [LibraryClasses] - ArmPlatformGlobalVariableLib - -[FixedPcd.common] - gArmPlatformTokenSpaceGuid.PcdHobListPtrGlobalOffset + ArmLib