3 ; Macros to work around lack of Apple support for LDR register, =expr
5 ; Copyright (c) 2009, Apple Inc. All rights reserved.<BR>
6 ; Copyright (c) 2011-2012, ARM Ltd. All rights reserved.<BR>
8 ; This program and the accompanying materials
9 ; are licensed and made available under the terms and conditions of the BSD License
10 ; which accompanies this distribution. The full text of the license may be found at
11 ; http://opensource.org/licenses/bsd-license.php
13 ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
20 MmioWrite32Macro $Address, $Data
27 MmioOr32Macro $Address, $OrData
36 MmioAnd32Macro $Address, $AndData
45 MmioAndThenOr32Macro $Address, $AndData, $OrData
56 MmioWriteFromReg32Macro $Address, $Reg
62 MmioRead32Macro $Address
68 MmioReadToReg32Macro $Address, $Reg
74 LoadConstantMacro $Data
79 LoadConstantToRegMacro $Data, $Reg
84 GetCorePositionInStack $Pos, $MpId, $Tmp
90 ; The reserved place must be 8-bytes aligned for pushing 64-bit variable on the stack
91 ; Note: Global Size will be modified
93 SetPrimaryStack $StackTop, $GlobalSize, $Tmp
94 and $Tmp, $GlobalSize, #7
96 add $GlobalSize, $GlobalSize, $Tmp
97 sub sp, $StackTop, $GlobalSize
99 ; Set all the global variables to 0
101 mov $GlobalSize, #0x0
102 _SetPrimaryStackInitGlobals
104 beq _SetPrimaryStackEnd
105 str $GlobalSize, [$Tmp], #4
106 b _SetPrimaryStackInitGlobals