X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ArmPlatformPkg%2FPrePeiCore%2FArm%2FPrePeiCoreEntryPoint.asm;h=2734b0951a094fa41a9c2460ebe5afcb0cb5fcdb;hb=f4dfad05dda2c7b29e8105605621f2b413f0af2b;hp=c316379f05380d6d6e8fed051d3a1b7db37d6aee;hpb=3707dee3da5c58d91d64b56e4953736de69e06f6;p=mirror_edk2.git diff --git a/ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.asm b/ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.asm index c316379f05..2734b0951a 100644 --- a/ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.asm +++ b/ArmPlatformPkg/PrePeiCore/Arm/PrePeiCoreEntryPoint.asm @@ -1,19 +1,10 @@ // // Copyright (c) 2011-2013, ARM Limited. All rights reserved. // -// This program and the accompanying materials -// are licensed and made available under the terms and conditions of the BSD License -// which accompanies this distribution. The full text of the license may be found at -// http://opensource.org/licenses/bsd-license.php -// -// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +// SPDX-License-Identifier: BSD-2-Clause-Patent // // -#include -#include -#include #include INCLUDE AsmMacroIoLib.inc @@ -43,9 +34,7 @@ _ModuleEntryPoint bl ArmPlatformIsPrimaryCore // Get the top of the primary stacks (and the base of the secondary stacks) - LoadConstantToReg (FixedPcdGet32(PcdCPUCoresStackBase), r1) - LoadConstantToReg (FixedPcdGet32(PcdCPUCorePrimaryStackSize), r2) - add r1, r1, r2 + mov32 r1, FixedPcdGet64(PcdCPUCoresStackBase) + FixedPcdGet32(PcdCPUCorePrimaryStackSize) // r0 is equal to 1 if I am the primary core cmp r0, #1 @@ -62,16 +51,15 @@ _SetupSecondaryCoreStack add r0, r0, #1 // StackOffset = CorePos * StackSize - LoadConstantToReg (FixedPcdGet32(PcdCPUCoreSecondaryStackSize), r2) + mov32 r2, FixedPcdGet32(PcdCPUCoreSecondaryStackSize) mul r0, r0, r2 // SP = StackBase + StackOffset add sp, r6, r0 _PrepareArguments // The PEI Core Entry Point has been computed by GenFV and stored in the second entry of the Reset Vector - LoadConstantToReg (FixedPcdGet32(PcdFvBaseAddress), r2) - add r2, r2, #4 - ldr r1, [r2] + mov32 r2, FixedPcdGet32(PcdFvBaseAddress) + ldr r1, [r2, #4] // Move sec startup address into a data register // Ensure we're jumping to FV version of the code (not boot remapped alias) @@ -85,6 +73,14 @@ _PrepareArguments _SetupPrimaryCoreStack mov sp, r1 + mov32 r8, FixedPcdGet64 (PcdCPUCoresStackBase) + mov32 r9, FixedPcdGet32 (PcdInitValueInTempStack) + mov r10, r9 + mov r11, r9 + mov r12, r9 +0:stm r8!, {r9-r12} + cmp r8, r1 + blt 0b b _PrepareArguments _NeverReturn