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 <AsmMacroIoLib.h>
15 #include <Library/ArmLib.h>
17 // For the moment we assume this will run in SVC mode on ARMv7
21 //ArmGicGetControlSystemRegisterEnable (
24 ASM_FUNC(ArmGicV3GetControlSystemRegisterEnable)
25 mrc p15, 0, r0, c12, c12, 5 // ICC_SRE
30 //ArmGicSetControlSystemRegisterEnable (
31 // IN UINT32 ControlSystemRegisterEnable
33 ASM_FUNC(ArmGicV3SetControlSystemRegisterEnable)
34 mcr p15, 0, r0, c12, c12, 5 // ICC_SRE
39 //ArmGicV3EnableInterruptInterface (
42 ASM_FUNC(ArmGicV3EnableInterruptInterface)
44 mcr p15, 0, r0, c12, c12, 7 // ICC_IGRPEN1
48 //ArmGicV3DisableInterruptInterface (
51 ASM_FUNC(ArmGicV3DisableInterruptInterface)
53 mcr p15, 0, r0, c12, c12, 7 // ICC_IGRPEN1
57 //ArmGicV3EndOfInterrupt (
58 // IN UINTN InterruptId
60 ASM_FUNC(ArmGicV3EndOfInterrupt)
61 mcr p15, 0, r0, c12, c12, 1 //ICC_EOIR1
65 //ArmGicV3AcknowledgeInterrupt (
68 ASM_FUNC(ArmGicV3AcknowledgeInterrupt)
69 mrc p15, 0, r0, c12, c12, 0 //ICC_IAR1
73 //ArmGicV3SetPriorityMask (
76 ASM_FUNC(ArmGicV3SetPriorityMask)
77 mcr p15, 0, r0, c4, c6, 0 //ICC_PMR
81 //ArmGicV3SetBinaryPointer (
82 // IN UINTN BinaryPoint
84 ASM_FUNC(ArmGicV3SetBinaryPointer)
85 mcr p15, 0, r0, c12, c12, 3 //ICC_BPR1