2 # Copyright (c) 2014, ARM Limited. All rights reserved.
4 # SPDX-License-Identifier: BSD-2-Clause-Patent
8 #include <AsmMacroIoLibV8.h>
10 #if !defined(__clang__)
13 // Clang versions before v3.6 do not support the GNU extension that allows
14 // system registers outside of the IMPLEMENTATION DEFINED range to be specified
15 // using the generic notation below. However, clang knows these registers by
16 // their architectural names, so it has no need for these aliases anyway.
18 #define ICC_SRE_EL1 S3_0_C12_C12_5
19 #define ICC_SRE_EL2 S3_4_C12_C9_5
20 #define ICC_SRE_EL3 S3_6_C12_C12_5
21 #define ICC_IGRPEN1_EL1 S3_0_C12_C12_7
22 #define ICC_EOIR1_EL1 S3_0_C12_C12_1
23 #define ICC_IAR1_EL1 S3_0_C12_C12_0
24 #define ICC_PMR_EL1 S3_0_C4_C6_0
25 #define ICC_BPR1_EL1 S3_0_C12_C12_3
31 //ArmGicV3GetControlSystemRegisterEnable (
34 ASM_FUNC(ArmGicV3GetControlSystemRegisterEnable)
36 1: mrs x0, ICC_SRE_EL1
38 2: mrs x0, ICC_SRE_EL2
40 3: mrs x0, ICC_SRE_EL3
45 //ArmGicV3SetControlSystemRegisterEnable (
46 // IN UINT32 ControlSystemRegisterEnable
48 ASM_FUNC(ArmGicV3SetControlSystemRegisterEnable)
50 1: msr ICC_SRE_EL1, x0
52 2: msr ICC_SRE_EL2, x0
54 3: msr ICC_SRE_EL3, x0
59 //ArmGicV3EnableInterruptInterface (
62 ASM_FUNC(ArmGicV3EnableInterruptInterface)
64 msr ICC_IGRPEN1_EL1, x0
68 //ArmGicV3DisableInterruptInterface (
71 ASM_FUNC(ArmGicV3DisableInterruptInterface)
73 msr ICC_IGRPEN1_EL1, x0
77 //ArmGicV3EndOfInterrupt (
78 // IN UINTN InterruptId
80 ASM_FUNC(ArmGicV3EndOfInterrupt)
85 //ArmGicV3AcknowledgeInterrupt (
88 ASM_FUNC(ArmGicV3AcknowledgeInterrupt)
93 //ArmGicV3SetPriorityMask (
96 ASM_FUNC(ArmGicV3SetPriorityMask)
101 //ArmGicV3SetBinaryPointer (
102 // IN UINTN BinaryPoint
104 ASM_FUNC(ArmGicV3SetBinaryPointer)