1 #------------------------------------------------------------------------------
3 # Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
4 # Copyright (c) 2011-2013, ARM Limited. All rights reserved.
5 # Copyright (c) 2016, Linaro Limited. All rights reserved.
7 # This program and the accompanying materials
8 # are licensed and made available under the terms and conditions of the BSD License
9 # which accompanies this distribution. The full text of the license may be found at
10 # http://opensource.org/licenses/bsd-license.php
12 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #------------------------------------------------------------------------------
17 #include <AsmMacroIoLib.h>
21 // Get Multiprocessing extension (bit31) & U bit (bit30)
22 and R0, R0, #0xC0000000
23 // if (bit31 == 1) && (bit30 == 0) then the processor is part of a multiprocessor system
29 ASM_FUNC(ArmEnableAsynchronousAbort)
34 ASM_FUNC(ArmDisableAsynchronousAbort)
39 ASM_FUNC(ArmEnableIrq)
44 ASM_FUNC(ArmDisableIrq)
49 ASM_FUNC(ArmEnableFiq)
54 ASM_FUNC(ArmDisableFiq)
59 ASM_FUNC(ArmEnableInterrupts)
64 ASM_FUNC(ArmDisableInterrupts)
74 mcr p15,2,r0,c0,c0,0 @ Write Cache Size Selection Register (CSSELR)
76 mrc p15,1,r0,c0,c0,0 @ Read current CP15 Cache Size ID Register (CCSIDR)
84 mrc p15,1,r0,c0,c0,1 @ Read CP15 Cache Level ID Register
87 ASM_FUNC(ArmReadNsacr)
88 mrc p15, 0, r0, c1, c1, 2
91 ASM_FUNC(ArmWriteNsacr)
92 mcr p15, 0, r0, c1, c1, 2
95 ASM_FUNCTION_REMOVE_IF_UNREFERENCED