]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Arm/GetInterruptsState.S
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / BaseLib / Arm / GetInterruptsState.S
1 #------------------------------------------------------------------------------
2 #
3 # GetInterruptState() function for ARM
4 #
5 # Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
6 # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
7 # SPDX-License-Identifier: BSD-2-Clause-Patent
8 #
9 #------------------------------------------------------------------------------
10
11 .text
12 .p2align 2
13 GCC_ASM_EXPORT (GetInterruptState)
14
15 #/**
16 # Retrieves the current CPU interrupt state.
17 #
18 # Returns TRUE is interrupts are currently enabled. Otherwise
19 # returns FALSE.
20 #
21 # @retval TRUE CPU interrupts are enabled.
22 # @retval FALSE CPU interrupts are disabled.
23 #
24 #**/
25 #
26 #BOOLEAN
27 #EFIAPI
28 #GetInterruptState (
29 # VOID
30 # );
31 #
32 ASM_PFX(GetInterruptState):
33 mrs R0, CPSR
34 tst R0, #0x80 @Check if IRQ is enabled.
35 moveq R0, #1
36 movne R0, #0
37 bx LR