]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/Drivers/ArmGic/GicV3/Arm/ArmGicV3.asm
BaseTools: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / ArmPkg / Drivers / ArmGic / GicV3 / Arm / ArmGicV3.asm
CommitLineData
d7133859
OM
1//\r
2// Copyright (c) 2014, ARM Limited. All rights reserved.\r
3//\r
4// This program and the accompanying materials are licensed and made available\r
5// under the terms and conditions of the BSD License which accompanies this\r
6// distribution. The full text of the license may be found at\r
7// http://opensource.org/licenses/bsd-license.php\r
8//\r
9// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11//\r
12//\r
13\r
14// For the moment we assume this will run in SVC mode on ARMv7\r
15\r
d7133859 16\r
efda1775 17 INCLUDE AsmMacroExport.inc\r
d7133859
OM
18\r
19//UINT32\r
20//EFIAPI\r
21//ArmGicGetControlSystemRegisterEnable (\r
22// VOID\r
23// );\r
efda1775 24 RVCT_ASM_EXPORT ArmGicV3GetControlSystemRegisterEnable\r
d7133859
OM
25 mrc p15, 0, r0, c12, c12, 5 // ICC_SRE\r
26 bx lr\r
27\r
28//VOID\r
29//EFIAPI\r
30//ArmGicSetControlSystemRegisterEnable (\r
31// IN UINT32 ControlSystemRegisterEnable\r
32// );\r
efda1775 33 RVCT_ASM_EXPORT ArmGicV3SetControlSystemRegisterEnable\r
d7133859
OM
34 mcr p15, 0, r0, c12, c12, 5 // ICC_SRE\r
35 isb\r
36 bx lr\r
37\r
38//VOID\r
39//ArmGicV3EnableInterruptInterface (\r
40// VOID\r
41// );\r
efda1775 42 RVCT_ASM_EXPORT ArmGicV3EnableInterruptInterface\r
d7133859
OM
43 mov r0, #1\r
44 mcr p15, 0, r0, c12, c12, 7 // ICC_IGRPEN1\r
45 bx lr\r
46\r
47//VOID\r
48//ArmGicV3DisableInterruptInterface (\r
49// VOID\r
50// );\r
efda1775 51 RVCT_ASM_EXPORT ArmGicV3DisableInterruptInterface\r
d7133859
OM
52 mov r0, #0\r
53 mcr p15, 0, r0, c12, c12, 7 // ICC_IGRPEN1\r
54 bx lr\r
55\r
56//VOID\r
57//ArmGicV3EndOfInterrupt (\r
58// IN UINTN InterruptId\r
59// );\r
efda1775 60 RVCT_ASM_EXPORT ArmGicV3EndOfInterrupt\r
d7133859
OM
61 mcr p15, 0, r0, c12, c12, 1 //ICC_EOIR1\r
62 bx lr\r
63\r
64//UINTN\r
65//ArmGicV3AcknowledgeInterrupt (\r
66// VOID\r
67// );\r
efda1775 68 RVCT_ASM_EXPORT ArmGicV3AcknowledgeInterrupt\r
66127011 69 mrc p15, 0, r0, c12, c12, 0 //ICC_IAR1\r
d7133859
OM
70 bx lr\r
71\r
72//VOID\r
73//ArmGicV3SetPriorityMask (\r
74// IN UINTN Priority\r
75// );\r
efda1775 76 RVCT_ASM_EXPORT ArmGicV3SetPriorityMask\r
d7133859
OM
77 mcr p15, 0, r0, c4, c6, 0 //ICC_PMR\r
78 bx lr\r
79\r
80//VOID\r
81//ArmGicV3SetBinaryPointer (\r
82// IN UINTN BinaryPoint\r
83// );\r
efda1775 84 RVCT_ASM_EXPORT ArmGicV3SetBinaryPointer\r
d7133859
OM
85 mcr p15, 0, r0, c12, c12, 3 //ICC_BPR1\r
86 bx lr\r
87\r
88 END\r