1 #------------------------------------------------------------------------------
3 # Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
4 # Copyright (c) 2011, ARM Limited. All rights reserved.
6 # This program and the accompanying materials
7 # are licensed and made available under the terms and conditions of the BSD License
8 # which accompanies this distribution. The full text of the license may be found at
9 # http://opensource.org/licenses/bsd-license.php
11 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 #------------------------------------------------------------------------------
16 #include <AsmMacroIoLib.h>
21 GCC_ASM_EXPORT(ArmIsMpCore)
22 GCC_ASM_EXPORT(ArmEnableAsynchronousAbort)
23 GCC_ASM_EXPORT(ArmDisableAsynchronousAbort)
24 GCC_ASM_EXPORT(ArmEnableIrq)
25 GCC_ASM_EXPORT(ArmDisableIrq)
26 GCC_ASM_EXPORT(ArmEnableFiq)
27 GCC_ASM_EXPORT(ArmDisableFiq)
28 GCC_ASM_EXPORT(ArmEnableInterrupts)
29 GCC_ASM_EXPORT(ArmDisableInterrupts)
30 GCC_ASM_EXPORT(ReadCCSIDR)
31 GCC_ASM_EXPORT(ReadCLIDR)
33 #------------------------------------------------------------------------------
37 // Get Multiprocessing extension (bit31) & U bit (bit30)
38 and R0, R0, #0xC0000000
39 // if bit30 == 0 then the processor is part of a multiprocessor system)
40 and R0, R0, #0x80000000
43 ASM_PFX(ArmEnableAsynchronousAbort):
48 ASM_PFX(ArmDisableAsynchronousAbort):
53 ASM_PFX(ArmEnableIrq):
58 ASM_PFX(ArmDisableIrq):
63 ASM_PFX(ArmEnableFiq):
68 ASM_PFX(ArmDisableFiq):
73 ASM_PFX(ArmEnableInterrupts):
78 ASM_PFX(ArmDisableInterrupts):
88 mcr p15,2,r0,c0,c0,0 @ Write Cache Size Selection Register (CSSELR)
90 mrc p15,1,r0,c0,c0,0 @ Read current CP15 Cache Size ID Register (CCSIDR)
98 mrc p15,1,r0,c0,c0,1 @ Read CP15 Cache Level ID Register
101 ASM_FUNCTION_REMOVE_IF_UNREFERENCED