]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Arm/GetInterruptsState.asm
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / BaseLib / Arm / GetInterruptsState.asm
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 EXPORT GetInterruptState
12
13 AREA Interrupt_enable, CODE, READONLY
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 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
38
39 END