mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-30 17:14:07 +02:00
ArmPlatformPkg/PrePi: Removed harcoded HobList pointer calculation to use PrePeiHobListPointerLib function
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12166 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
151acec6e1
commit
3757392733
@ -19,6 +19,7 @@
|
|||||||
#include <Library/IoLib.h>
|
#include <Library/IoLib.h>
|
||||||
#include <Library/PrintLib.h>
|
#include <Library/PrintLib.h>
|
||||||
#include <Library/PeCoffGetEntryPointLib.h>
|
#include <Library/PeCoffGetEntryPointLib.h>
|
||||||
|
#include <Library/PrePiHobListPointerLib.h>
|
||||||
#include <Library/TimerLib.h>
|
#include <Library/TimerLib.h>
|
||||||
#include <Library/PerformanceLib.h>
|
#include <Library/PerformanceLib.h>
|
||||||
|
|
||||||
@ -52,7 +53,7 @@ PrePiMain (
|
|||||||
IN UINT64 StartTimeStamp
|
IN UINT64 StartTimeStamp
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_HOB_HANDOFF_INFO_TABLE** PrePiHobBase;
|
EFI_HOB_HANDOFF_INFO_TABLE* HobList;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
CHAR8 Buffer[100];
|
CHAR8 Buffer[100];
|
||||||
UINTN CharCount;
|
UINTN CharCount;
|
||||||
@ -83,15 +84,14 @@ PrePiMain (
|
|||||||
// Check the PcdCPUCoresNonSecStackBase match with the calculated StackBase
|
// Check the PcdCPUCoresNonSecStackBase match with the calculated StackBase
|
||||||
ASSERT (StacksBase == PcdGet32 (PcdCPUCoresNonSecStackBase));
|
ASSERT (StacksBase == PcdGet32 (PcdCPUCoresNonSecStackBase));
|
||||||
|
|
||||||
PrePiHobBase = (EFI_HOB_HANDOFF_INFO_TABLE**)(PcdGet32 (PcdCPUCoresNonSecStackBase) + (PcdGet32 (PcdCPUCoresNonSecStackSize) / 2) - PcdGet32 (PcdHobListPtrGlobalOffset));
|
|
||||||
|
|
||||||
// Declare the PI/UEFI memory region
|
// Declare the PI/UEFI memory region
|
||||||
*PrePiHobBase = HobConstructor (
|
HobList = HobConstructor (
|
||||||
(VOID*)UefiMemoryBase,
|
(VOID*)UefiMemoryBase,
|
||||||
FixedPcdGet32 (PcdSystemMemoryUefiRegionSize),
|
FixedPcdGet32 (PcdSystemMemoryUefiRegionSize),
|
||||||
(VOID*)UefiMemoryBase,
|
(VOID*)UefiMemoryBase,
|
||||||
(VOID*)StacksBase // The top of the UEFI Memory is reserved for the stacks
|
(VOID*)StacksBase // The top of the UEFI Memory is reserved for the stacks
|
||||||
);
|
);
|
||||||
|
PrePeiSetHobList (HobList);
|
||||||
|
|
||||||
// Initialize MMU and Memory HOBs (Resource Descriptor HOBs)
|
// Initialize MMU and Memory HOBs (Resource Descriptor HOBs)
|
||||||
Status = MemoryPeim (UefiMemoryBase, FixedPcdGet32 (PcdSystemMemoryUefiRegionSize));
|
Status = MemoryPeim (UefiMemoryBase, FixedPcdGet32 (PcdSystemMemoryUefiRegionSize));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user