X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;ds=sidebyside;f=ArmPkg%2FInclude%2FAsmMacroIoLib.h;h=644c65466508df7974fb73f105ceb46986c3ded7;hb=89bbce116a4dabb83c1be5953b030928f2d2f378;hp=9ef3430aaaa596d7ecd9e4c6afd697556a95944c;hpb=41b152c5f6ec3a5a6e51b4f8f0f90291a5895edc;p=mirror_edk2.git diff --git a/ArmPkg/Include/AsmMacroIoLib.h b/ArmPkg/Include/AsmMacroIoLib.h index 9ef3430aaa..644c654665 100644 --- a/ArmPkg/Include/AsmMacroIoLib.h +++ b/ArmPkg/Include/AsmMacroIoLib.h @@ -119,6 +119,21 @@ .long (_Data) ; \ 1: +// Convert the (ClusterId,CoreId) into a Core Position +// We assume there are 4 cores per cluster +#define GetCorePositionInStack(Pos, MpId, Tmp) \ + lsr Pos, MpId, #6 ; \ + and Tmp, MpId, #3 ; \ + add Pos, Pos, Tmp + +// Reserve a region at the top of the Primary Core stack +// for Global variables for the XIP phase +#define SetPrimaryStack(StackTop, GlobalSize, Tmp) \ + and Tmp, GlobalSize, #7 ; \ + rsbne Tmp, Tmp, #8 ; \ + add GlobalSize, GlobalSize, Tmp ; \ + sub sp, StackTop, GlobalSize + #elif defined (__GNUC__)