X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=ArmPkg%2FInclude%2FAsmMacroIoLib.inc;h=5644bf9b3076f02ae16fd4ddb7ccd8bcd1d3f36d;hp=23f3c44d6bb789d2754776955efd196686c60007;hb=639a76d1912f8eb07e26b1a8f2393b682be65f2c;hpb=2ef2b01e07c02db339f34004445734a2dbdd80e1 diff --git a/ArmPkg/Include/AsmMacroIoLib.inc b/ArmPkg/Include/AsmMacroIoLib.inc index 23f3c44d6b..5644bf9b30 100644 --- a/ArmPkg/Include/AsmMacroIoLib.inc +++ b/ArmPkg/Include/AsmMacroIoLib.inc @@ -2,7 +2,14 @@ ;/** @file ; Macros to work around lack of Apple support for LDR register, =expr ; -; Copyright (c) 2009, Apple, Inc. All rights reserved. +; Copyright (c) 2009, Apple Inc. 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. ; ;**/ @@ -70,5 +77,21 @@ LoadConstantToRegMacro $Data, $Reg ldr $Reg, =($Data) MEND + + MACRO + GetCorePositionInStack $Pos, $MpId, $Tmp + lsr $Pos, $MpId, #6 + and $Tmp, $MpId, #3 + add $Pos, $Pos, $Tmp + MEND + + ; The reserved place must be 8-bytes aligned for pushing 64-bit variable on the stack + MACRO + SetPrimaryStack $StackTop, $GlobalSize, $Tmp + and $Tmp, $GlobalSize, #7 + rsbne $Tmp, $Tmp, #8 + add $GlobalSize, $GlobalSize, $Tmp + sub sp, $StackTop, $GlobalSize + MEND END