mirror of https://github.com/acidanthera/audk.git
ArmPlatformPkg/PrePi: Removed the dependency on 'PcdCPUCoresNonSecStackBase'
In PrePi the StackBase is automatically calculated from the top of the memory. The information is now passed from the assembly files to the C code. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12418 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
009f583fa0
commit
c524ffbb67
|
@ -21,6 +21,8 @@
|
|||
VOID
|
||||
PrimaryMain (
|
||||
IN UINTN UefiMemoryBase,
|
||||
IN UINTN StacksBase,
|
||||
IN UINTN GlobalVariableBase,
|
||||
IN UINT64 StartTimeStamp
|
||||
)
|
||||
{
|
||||
|
@ -33,7 +35,7 @@ PrimaryMain (
|
|||
ArmGicSendSgiTo (PcdGet32(PcdGicDistributorBase), ARM_GIC_ICDSGIR_FILTER_EVERYONEELSE, 0x0E);
|
||||
}
|
||||
|
||||
PrePiMain (UefiMemoryBase, StartTimeStamp);
|
||||
PrePiMain (UefiMemoryBase, StacksBase, GlobalVariableBase, StartTimeStamp);
|
||||
|
||||
// We must never return
|
||||
ASSERT(FALSE);
|
||||
|
|
|
@ -17,10 +17,12 @@
|
|||
VOID
|
||||
PrimaryMain (
|
||||
IN UINTN UefiMemoryBase,
|
||||
IN UINTN StacksBase,
|
||||
IN UINTN GlobalVariableBase,
|
||||
IN UINT64 StartTimeStamp
|
||||
)
|
||||
{
|
||||
PrePiMain (UefiMemoryBase, StartTimeStamp);
|
||||
PrePiMain (UefiMemoryBase, StacksBase, GlobalVariableBase, StartTimeStamp);
|
||||
|
||||
// We must never return
|
||||
ASSERT(FALSE);
|
||||
|
|
|
@ -133,14 +133,21 @@ _InitGlobals:
|
|||
|
||||
|
||||
_PrepareArguments:
|
||||
mov r0, r5
|
||||
mov r1, r6
|
||||
mov r2, r7
|
||||
mov r3, sp
|
||||
|
||||
// Move sec startup address into a data register
|
||||
// Ensure we're jumping to FV version of the code (not boot remapped alias)
|
||||
ldr r2, StartupAddr
|
||||
ldr r4, StartupAddr
|
||||
|
||||
// Jump to PrePiCore C code
|
||||
// r0 = MpId
|
||||
// r1 = UefiMemoryBase
|
||||
blx r2
|
||||
// r2 = StacksBase
|
||||
// r3 = GlobalVariableBase
|
||||
blx r4
|
||||
|
||||
_NeverReturn:
|
||||
b _NeverReturn
|
||||
|
|
|
@ -134,14 +134,21 @@ _InitGlobals
|
|||
|
||||
|
||||
_PrepareArguments
|
||||
mov r0, r5
|
||||
mov r1, r6
|
||||
mov r2, r7
|
||||
mov r3, sp
|
||||
|
||||
// Move sec startup address into a data register
|
||||
// Ensure we're jumping to FV version of the code (not boot remapped alias)
|
||||
ldr r2, StartupAddr
|
||||
ldr r4, StartupAddr
|
||||
|
||||
// Jump to PrePiCore C code
|
||||
// r0 = MpId
|
||||
// r1 = UefiMemoryBase
|
||||
blx r2
|
||||
// r2 = StacksBase
|
||||
// r3 = GlobalVariableBase
|
||||
blx r4
|
||||
|
||||
_NeverReturn
|
||||
b _NeverReturn
|
||||
|
|
|
@ -51,6 +51,8 @@ LzmaDecompressLibConstructor (
|
|||
VOID
|
||||
PrePiMain (
|
||||
IN UINTN UefiMemoryBase,
|
||||
IN UINTN StacksBase,
|
||||
IN UINTN GlobalVariableBase,
|
||||
IN UINT64 StartTimeStamp
|
||||
)
|
||||
{
|
||||
|
@ -58,9 +60,7 @@ PrePiMain (
|
|||
EFI_STATUS Status;
|
||||
CHAR8 Buffer[100];
|
||||
UINTN CharCount;
|
||||
UINTN UefiMemoryTop;
|
||||
UINTN StacksSize;
|
||||
UINTN StacksBase;
|
||||
|
||||
// Enable program flow prediction, if supported.
|
||||
ArmEnableBranchPrediction ();
|
||||
|
@ -78,12 +78,6 @@ PrePiMain (
|
|||
InitializeDebugAgent (DEBUG_AGENT_INIT_POSTMEM_SEC, NULL, NULL);
|
||||
SaveAndSetDebugTimerInterrupt (TRUE);
|
||||
|
||||
UefiMemoryTop = UefiMemoryBase + FixedPcdGet32 (PcdSystemMemoryUefiRegionSize);
|
||||
StacksBase = UefiMemoryTop - StacksSize;
|
||||
|
||||
// Check the PcdCPUCoresNonSecStackBase match with the calculated StackBase
|
||||
ASSERT (StacksBase == PcdGet32 (PcdCPUCoresNonSecStackBase));
|
||||
|
||||
// Declare the PI/UEFI memory region
|
||||
HobList = HobConstructor (
|
||||
(VOID*)UefiMemoryBase,
|
||||
|
@ -137,7 +131,9 @@ PrePiMain (
|
|||
VOID
|
||||
CEntryPoint (
|
||||
IN UINTN MpId,
|
||||
IN UINTN UefiMemoryBase
|
||||
IN UINTN UefiMemoryBase,
|
||||
IN UINTN StacksBase,
|
||||
IN UINTN GlobalVariableBase
|
||||
)
|
||||
{
|
||||
UINT64 StartTimeStamp;
|
||||
|
@ -170,7 +166,7 @@ CEntryPoint (
|
|||
// If not primary Jump to Secondary Main
|
||||
if (IS_PRIMARY_CORE(MpId)) {
|
||||
// Goto primary Main.
|
||||
PrimaryMain (UefiMemoryBase, StartTimeStamp);
|
||||
PrimaryMain (UefiMemoryBase, StacksBase, GlobalVariableBase, StartTimeStamp);
|
||||
} else {
|
||||
SecondaryMain (MpId);
|
||||
}
|
||||
|
|
|
@ -44,6 +44,8 @@ TimerConstructor (
|
|||
VOID
|
||||
PrePiMain (
|
||||
IN UINTN UefiMemoryBase,
|
||||
IN UINTN StacksBase,
|
||||
IN UINTN GlobalVariableBase,
|
||||
IN UINT64 StartTimeStamp
|
||||
);
|
||||
|
||||
|
@ -63,6 +65,8 @@ PlatformPeim (
|
|||
VOID
|
||||
PrimaryMain (
|
||||
IN UINTN UefiMemoryBase,
|
||||
IN UINTN StacksBase,
|
||||
IN UINTN GlobalVariableBase,
|
||||
IN UINT64 StartTimeStamp
|
||||
);
|
||||
|
||||
|
|
|
@ -124,6 +124,7 @@
|
|||
|
||||
[LibraryClasses.common.SEC]
|
||||
ArmLib|ArmPkg/Library/ArmLib/ArmV7/ArmV7LibPrePi.inf
|
||||
|
||||
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
|
||||
ReportStatusCodeLib|IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
|
||||
UefiDecompressLib|MdePkg/Library/BaseUefiDecompressLib/BaseUefiDecompressLib.inf
|
||||
|
@ -293,7 +294,6 @@
|
|||
# DEBUG_LOADFILE 0x00020000 // UNDI Driver
|
||||
# DEBUG_EVENT 0x00080000 // Event messages
|
||||
# DEBUG_ERROR 0x80000000 // Error
|
||||
|
||||
gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000000F
|
||||
|
||||
gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x07
|
||||
|
@ -331,9 +331,6 @@
|
|||
#
|
||||
gArmTokenSpaceGuid.PcdVFPEnabled|1
|
||||
|
||||
gArmPlatformTokenSpaceGuid.PcdCPUCoresNonSecStackBase|0x87FE0000 # stack at top of memory
|
||||
gArmPlatformTokenSpaceGuid.PcdCPUCoresNonSecStackSize|0x20000 # 128K stack
|
||||
|
||||
gArmTokenSpaceGuid.PcdSystemMemoryBase|0x80000000
|
||||
gArmTokenSpaceGuid.PcdSystemMemorySize|0x08000000
|
||||
|
||||
|
@ -354,7 +351,6 @@
|
|||
gEmbeddedTokenSpaceGuid.PcdMemoryBase|0x80000000
|
||||
gEmbeddedTokenSpaceGuid.PcdMemorySize|0x10000000
|
||||
|
||||
|
||||
gArmTokenSpaceGuid.PcdCpuVectorBaseAddress|0x80008000
|
||||
gArmTokenSpaceGuid.PcdCpuResetAddress|0x80008000
|
||||
|
||||
|
|
Loading…
Reference in New Issue