2 # Copyright (c) 2014, ARM Limited. All rights reserved.
4 # This program and the accompanying materials are licensed and made available
5 # under the terms and conditions of the BSD License which accompanies this
6 # distribution. The full text of the license may be found at
7 # http://opensource.org/licenses/bsd-license.php
9 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 #include <AsmMacroIoLibV8.h>
16 #define ICC_SRE_EL1 S3_0_C12_C12_5
17 #define ICC_SRE_EL2 S3_4_C12_C9_5
18 #define ICC_SRE_EL3 S3_6_C12_C12_5
19 #define ICC_IGRPEN1_EL1 S3_0_C12_C12_7
20 #define ICC_EOIR1_EL1 S3_0_C12_C12_1
21 #define ICC_IAR1_EL1 S3_0_C12_C12_0
22 #define ICC_PMR_EL1 S3_0_C4_C6_0
23 #define ICC_BPR1_EL1 S3_0_C12_C12_3
28 GCC_ASM_EXPORT(ArmGicGetControlSystemRegisterEnable)
29 GCC_ASM_EXPORT(ArmGicSetControlSystemRegisterEnable)
30 GCC_ASM_EXPORT(ArmGicV3EnableInterruptInterface)
31 GCC_ASM_EXPORT(ArmGicV3DisableInterruptInterface)
32 GCC_ASM_EXPORT(ArmGicV3EndOfInterrupt)
33 GCC_ASM_EXPORT(ArmGicV3AcknowledgeInterrupt)
34 GCC_ASM_EXPORT(ArmGicV3SetPriorityMask)
35 GCC_ASM_EXPORT(ArmGicV3SetBinaryPointer)
39 //ArmGicGetControlSystemRegisterEnable (
42 ASM_PFX(ArmGicGetControlSystemRegisterEnable):
44 1: mrs x0, ICC_SRE_EL1
46 2: mrs x0, ICC_SRE_EL2
48 3: mrs x0, ICC_SRE_EL3
53 //ArmGicSetControlSystemRegisterEnable (
54 // IN UINT32 ControlSystemRegisterEnable
56 ASM_PFX(ArmGicSetControlSystemRegisterEnable):
58 1: msr ICC_SRE_EL1, x0
60 2: msr ICC_SRE_EL2, x0
62 3: msr ICC_SRE_EL3, x0
67 //ArmGicV3EnableInterruptInterface (
70 ASM_PFX(ArmGicV3EnableInterruptInterface):
72 msr ICC_IGRPEN1_EL1, x0
76 //ArmGicV3DisableInterruptInterface (
79 ASM_PFX(ArmGicV3DisableInterruptInterface):
81 msr ICC_IGRPEN1_EL1, x0
85 //ArmGicV3EndOfInterrupt (
86 // IN UINTN InterruptId
88 ASM_PFX(ArmGicV3EndOfInterrupt):
93 //ArmGicV3AcknowledgeInterrupt (
96 ASM_PFX(ArmGicV3AcknowledgeInterrupt):
101 //ArmGicV3SetPriorityMask (
104 ASM_PFX(ArmGicV3SetPriorityMask):
109 //ArmGicV3SetBinaryPointer (
110 // IN UINTN BinaryPoint
112 ASM_PFX(ArmGicV3SetBinaryPointer):