#\r
#\r
\r
-#include <AsmMacroIoLibV8.h>\r
+#include <AsmMacroLib.h>\r
\r
#if !defined(__clang__)\r
\r
#\r
#\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
#include <Library/ArmLib.h>\r
\r
// For the moment we assume this will run in SVC mode on ARMv7\r
.text\r
.align 3\r
\r
-#include <AsmMacroIoLibV8.h>\r
+#include <AsmMacroLib.h>\r
#include <IndustryStandard/ArmStdSmc.h>\r
#include <Library/ArmLib.h>\r
\r
+++ /dev/null
-/** @file\r
- Macros to work around lack of Apple support for LDR register, =expr\r
-\r
- Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
- Copyright (c) 2011-2012, ARM Ltd. All rights reserved.<BR>\r
- Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>\r
-\r
- SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-\r
-#ifndef ASM_MACRO_IO_LIB_H_\r
-#define ASM_MACRO_IO_LIB_H_\r
-\r
-#define _ASM_FUNC(Name, Section) \\r
- .global Name ; \\r
- .section #Section, "ax" ; \\r
- .type Name, %function ; \\r
- .p2align 2 ; \\r
- Name:\r
-\r
-#define ASM_FUNC(Name) _ASM_FUNC(ASM_PFX(Name), .text. ## Name)\r
-\r
-#define MOV32(Reg, Val) \\r
- movw Reg, #(Val) & 0xffff ; \\r
- movt Reg, #(Val) >> 16\r
-\r
-#define ADRL(Reg, Sym) \\r
- movw Reg, #:lower16:(Sym) - (. + 16) ; \\r
- movt Reg, #:upper16:(Sym) - (. + 12) ; \\r
- add Reg, Reg, pc\r
-\r
-#define LDRL(Reg, Sym) \\r
- movw Reg, #:lower16:(Sym) - (. + 16) ; \\r
- movt Reg, #:upper16:(Sym) - (. + 12) ; \\r
- ldr Reg, [pc, Reg]\r
-\r
-#endif // ASM_MACRO_IO_LIB_H_\r
+++ /dev/null
-;%HEADER%\r
-;/** @file\r
-; Macros to work around lack of Apple support for LDR register, =expr\r
-;\r
-; Copyright (c) 2009, Apple Inc. All rights reserved.<BR>\r
-; Copyright (c) 2011-2012, ARM Ltd. All rights reserved.<BR>\r
-;\r
-; SPDX-License-Identifier: BSD-2-Clause-Patent\r
-;\r
-;**/\r
-\r
-\r
- MACRO\r
- adrll $Reg, $Symbol\r
- add $Reg, pc, #-8\r
- RELOC R_ARM_ALU_PC_G0_NC, $Symbol\r
- add $Reg, $Reg, #-4\r
- RELOC R_ARM_ALU_PC_G1_NC, $Symbol\r
- add $Reg, $Reg, #0\r
- RELOC R_ARM_ALU_PC_G2, $Symbol\r
- MEND\r
-\r
- MACRO\r
- ldrl $Reg, $Symbol\r
- add $Reg, pc, #-8\r
- RELOC R_ARM_ALU_PC_G0_NC, $Symbol\r
- add $Reg, $Reg, #-4\r
- RELOC R_ARM_ALU_PC_G1_NC, $Symbol\r
- ldr $Reg, [$Reg, #0]\r
- RELOC R_ARM_LDR_PC_G2, $Symbol\r
- MEND\r
-\r
- END\r
+++ /dev/null
-/** @file\r
- Macros to work around lack of Clang support for LDR register, =expr\r
-\r
- Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
- Portions copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.<BR>\r
- Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>\r
-\r
- SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-\r
-#ifndef ASM_MACRO_IO_LIBV8_H_\r
-#define ASM_MACRO_IO_LIBV8_H_\r
-\r
-// CurrentEL : 0xC = EL3; 8 = EL2; 4 = EL1\r
-// This only selects between EL1 and EL2, else we die.\r
-// Provide the Macro with a safe temp xreg to use.\r
-#define EL1_OR_EL2(SAFE_XREG) \\r
- mrs SAFE_XREG, CurrentEL ;\\r
- cmp SAFE_XREG, #0x8 ;\\r
- b.gt . ;\\r
- b.eq 2f ;\\r
- cbnz SAFE_XREG, 1f ;\\r
- b . ;// We should never get here\r
-\r
-#define _ASM_FUNC(Name, Section) \\r
- .global Name ; \\r
- .section #Section, "ax" ; \\r
- .type Name, %function ; \\r
- Name: ; \\r
- AARCH64_BTI(c)\r
-\r
-#define _ASM_FUNC_ALIGN(Name, Section, Align) \\r
- .global Name ; \\r
- .section #Section, "ax" ; \\r
- .type Name, %function ; \\r
- .balign Align ; \\r
- Name: ; \\r
- AARCH64_BTI(c)\r
-\r
-#define ASM_FUNC(Name) _ASM_FUNC(ASM_PFX(Name), .text. ## Name)\r
-\r
-#define ASM_FUNC_ALIGN(Name, Align) \\r
- _ASM_FUNC_ALIGN(ASM_PFX(Name), .text. ## Name, Align)\r
-\r
-#define MOV32(Reg, Val) \\r
- movz Reg, (Val) >> 16, lsl #16 ; \\r
- movk Reg, (Val) & 0xffff\r
-\r
-#define MOV64(Reg, Val) \\r
- movz Reg, (Val) >> 48, lsl #48 ; \\r
- movk Reg, ((Val) >> 32) & 0xffff, lsl #32 ; \\r
- movk Reg, ((Val) >> 16) & 0xffff, lsl #16 ; \\r
- movk Reg, (Val) & 0xffff\r
-\r
-#endif // ASM_MACRO_IO_LIBV8_H_\r
\r
#include <AArch64/AArch64.h>\r
#include <Library/PcdLib.h>\r
-#include <AsmMacroIoLibV8.h>\r
+#include <AsmMacroLib.h>\r
#include <Protocol/DebugSupport.h> // for exception type definitions\r
\r
/*\r
//\r
//\r
\r
-#include <AsmMacroIoLibV8.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(ArmCallHvc)\r
// Push x0 on the stack - The stack must always be quad-word aligned\r
//\r
//\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
.arch_extension virt\r
\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLibV8.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(ArmReadCntFrq)\r
mrs x0, cntfrq_el0 // Read CNTFRQ\r
#------------------------------------------------------------------------------\r
\r
#include <AArch64/AArch64.h>\r
-#include <AsmMacroIoLibV8.h>\r
+#include <AsmMacroLib.h>\r
\r
.set CTRL_M_BIT, (1 << 0)\r
.set CTRL_A_BIT, (1 << 1)\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLibV8.h>\r
+#include <AsmMacroLib.h>\r
\r
.set DAIF_RD_FIQ_BIT, (1 << 6)\r
.set DAIF_RD_IRQ_BIT, (1 << 7)\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLibV8.h>\r
+#include <AsmMacroLib.h>\r
\r
.set MPIDR_U_BIT, (30)\r
.set MPIDR_U_MASK, (1 << MPIDR_U_BIT)\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(ArmReadMidr)\r
mrc p15,0,R0,c0,c0,0\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(ArmIsMpCore)\r
mrc p15,0,R0,c0,c0,5\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(ArmReadCntFrq)\r
mrc p15, 0, r0, c14, c0, 0 @ Read CNTFRQ\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
.set DC_ON, (0x1<<2)\r
.set IC_ON, (0x1<<12)\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLibV8.h>\r
+#include <AsmMacroLib.h>\r
\r
.set CTRL_M_BIT, (1 << 0)\r
\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
.text\r
.align 2\r
//\r
//\r
\r
-#include <AsmMacroIoLibV8.h>\r
+#include <AsmMacroLib.h>\r
\r
/** Monitor call.\r
\r
//\r
//\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
/** Monitor call.\r
\r
//\r
//\r
\r
-#include <AsmMacroIoLibV8.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(ArmCallSmc)\r
// Push x0 on the stack - The stack must always be quad-word aligned\r
//\r
//\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
.arch_extension sec\r
\r
//\r
//\r
\r
-#include <AsmMacroIoLibV8.h>\r
+#include <AsmMacroLib.h>\r
\r
.text\r
.align 3\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLibV8.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(__ashlti3)\r
# return if shift is 0\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(__ashldi3)\r
cmp r2, #31\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(__ashrdi3)\r
cmp r2, #31\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(__clzsi2)\r
@ frame_needed = 1, uses_anonymous_args = 0\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(__ctzsi2)\r
uxth r3, r0\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(__divdi3)\r
@ args = 0, pretend = 0, frame = 0\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(__divsi3)\r
eor r3, r0, r0, asr #31\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
#\r
#UINT64\r
//\r
//------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
//\r
// A pair of (unsigned) long longs is returned in {{r0, r1}, {r2, r3}},\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
#\r
#VOID\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
#VOID\r
#EFIAPI\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(__lshrdi3)\r
cmp r2, #31\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
# VOID\r
# EFIAPI\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(__moddi3)\r
stmfd sp!, {r4, r5, r7, lr}\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(__modsi3)\r
stmfd sp!, {r4, r5, r7, lr}\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(__muldi3)\r
stmfd sp!, {r4, r5, r6, r7, lr}\r
#**/\r
#\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
.syntax unified\r
\r
#**/\r
#\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
.syntax unified\r
\r
#**/\r
#\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
.syntax unified\r
\r
#**/\r
#\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
.syntax unified\r
\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(__ucmpdi2)\r
stmfd sp!, {r4, r5, r8, lr}\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(__udivdi3)\r
stmfd sp!, {r7, lr}\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
.syntax unified\r
\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
.syntax unified\r
\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(__umoddi3)\r
stmfd sp!, {r7, lr}\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(__umodsi3)\r
stmfd sp!, {r4, r5, r7, lr}\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
#\r
#UINT32\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
#\r
#UINT32\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLibV8.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(GccSemihostCall)\r
hlt #0xf000\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
/*\r
Semihosting operation request mechanism\r
//\r
//\r
\r
-#include <AsmMacroIoLibV8.h>\r
+#include <AsmMacroLib.h>\r
#include <Library/ArmLib.h>\r
\r
ASM_FUNC(ArmPlatformPeiBootAction)\r
//\r
//\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
#include <Library/ArmLib.h>\r
\r
ASM_FUNC(ArmPlatformPeiBootAction)\r
//\r
//\r
\r
-#include <AsmMacroIoLibV8.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(_ModuleEntryPoint)\r
// Do early platform specific actions\r
//\r
//\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
#include <Arm/AArch32.h>\r
\r
#\r
\r
#include <AArch64/AArch64.h>\r
-#include <AsmMacroIoLibV8.h>\r
+#include <AsmMacroLib.h>\r
#include <Base.h>\r
#include <AutoGen.h>\r
\r
#\r
#=======================================================================================\r
\r
-#include <AsmMacroIoLibV8.h>\r
+#include <AsmMacroLib.h>\r
#include <AArch64/AArch64.h>\r
\r
// Setup EL1 while in EL1\r
//\r
//\r
\r
-#include <AsmMacroIoLibV8.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(_ModuleEntryPoint)\r
// Do early platform specific actions\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLibV8.h>\r
+#include <AsmMacroLib.h>\r
\r
#/**\r
# This allows the caller to switch the stack and return\r
#\r
#\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
#include <Base.h>\r
#include <AutoGen.h>\r
\r
//\r
//\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(_ModuleEntryPoint)\r
// Do early platform specific actions\r
#\r
#------------------------------------------------------------------------------\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
#/**\r
# This allows the caller to switch the stack and return\r
//\r
//\r
\r
-#include <AsmMacroIoLibV8.h>\r
+#include <AsmMacroLib.h>\r
\r
.macro mov_i, reg:req, imm:req\r
movz \reg, :abs_g1:\imm\r
//\r
//\r
\r
-#include <AsmMacroIoLibV8.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(_ModuleEntryPoint)\r
//\r
//\r
//\r
\r
-#include <AsmMacroIoLib.h>\r
+#include <AsmMacroLib.h>\r
\r
ASM_FUNC(_ModuleEntryPoint)\r
// Do early platform specific actions\r
--- /dev/null
+/** @file\r
+ Macros to work around lack of Clang support for LDR register, =expr\r
+\r
+ Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
+ Portions copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.<BR>\r
+ Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>\r
+\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#ifndef ASM_MACRO_IO_LIBV8_H_\r
+#define ASM_MACRO_IO_LIBV8_H_\r
+\r
+// CurrentEL : 0xC = EL3; 8 = EL2; 4 = EL1\r
+// This only selects between EL1 and EL2, else we die.\r
+// Provide the Macro with a safe temp xreg to use.\r
+#define EL1_OR_EL2(SAFE_XREG) \\r
+ mrs SAFE_XREG, CurrentEL ;\\r
+ cmp SAFE_XREG, #0x8 ;\\r
+ b.gt . ;\\r
+ b.eq 2f ;\\r
+ cbnz SAFE_XREG, 1f ;\\r
+ b . ;// We should never get here\r
+\r
+#define _ASM_FUNC(Name, Section) \\r
+ .global Name ; \\r
+ .section #Section, "ax" ; \\r
+ .type Name, %function ; \\r
+ Name: ; \\r
+ AARCH64_BTI(c)\r
+\r
+#define _ASM_FUNC_ALIGN(Name, Section, Align) \\r
+ .global Name ; \\r
+ .section #Section, "ax" ; \\r
+ .type Name, %function ; \\r
+ .balign Align ; \\r
+ Name: ; \\r
+ AARCH64_BTI(c)\r
+\r
+#define ASM_FUNC(Name) _ASM_FUNC(ASM_PFX(Name), .text. ## Name)\r
+\r
+#define ASM_FUNC_ALIGN(Name, Align) \\r
+ _ASM_FUNC_ALIGN(ASM_PFX(Name), .text. ## Name, Align)\r
+\r
+#define MOV32(Reg, Val) \\r
+ movz Reg, (Val) >> 16, lsl #16 ; \\r
+ movk Reg, (Val) & 0xffff\r
+\r
+#define MOV64(Reg, Val) \\r
+ movz Reg, (Val) >> 48, lsl #48 ; \\r
+ movk Reg, ((Val) >> 32) & 0xffff, lsl #32 ; \\r
+ movk Reg, ((Val) >> 16) & 0xffff, lsl #16 ; \\r
+ movk Reg, (Val) & 0xffff\r
+\r
+#endif // ASM_MACRO_IO_LIBV8_H_\r
--- /dev/null
+/** @file\r
+ Macros to work around lack of Apple support for LDR register, =expr\r
+\r
+ Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
+ Copyright (c) 2011-2012, ARM Ltd. All rights reserved.<BR>\r
+ Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>\r
+\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+**/\r
+\r
+#ifndef ASM_MACRO_IO_LIB_H_\r
+#define ASM_MACRO_IO_LIB_H_\r
+\r
+#define _ASM_FUNC(Name, Section) \\r
+ .global Name ; \\r
+ .section #Section, "ax" ; \\r
+ .type Name, %function ; \\r
+ .p2align 2 ; \\r
+ Name:\r
+\r
+#define ASM_FUNC(Name) _ASM_FUNC(ASM_PFX(Name), .text. ## Name)\r
+\r
+#define MOV32(Reg, Val) \\r
+ movw Reg, #(Val) & 0xffff ; \\r
+ movt Reg, #(Val) >> 16\r
+\r
+#define ADRL(Reg, Sym) \\r
+ movw Reg, #:lower16:(Sym) - (. + 16) ; \\r
+ movt Reg, #:upper16:(Sym) - (. + 12) ; \\r
+ add Reg, Reg, pc\r
+\r
+#define LDRL(Reg, Sym) \\r
+ movw Reg, #:lower16:(Sym) - (. + 16) ; \\r
+ movt Reg, #:upper16:(Sym) - (. + 12) ; \\r
+ ldr Reg, [pc, Reg]\r
+\r
+#endif // ASM_MACRO_IO_LIB_H_\r