]>
Commit | Line | Data |
---|---|---|
9095d37b | 1 | ;------------------------------------------------------------------------------\r |
ebd04fc2 | 2 | ;\r |
3 | ; GetInterruptState() function for ARM\r | |
4 | ;\r | |
9095d37b | 5 | ; Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r |
bb817c56 | 6 | ; Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r |
9344f092 | 7 | ; SPDX-License-Identifier: BSD-2-Clause-Patent\r |
ebd04fc2 | 8 | ;\r |
9 | ;------------------------------------------------------------------------------\r | |
10 | \r | |
11 | EXPORT GetInterruptState\r | |
12 | \r | |
13 | AREA Interrupt_enable, CODE, READONLY\r | |
14 | \r | |
15 | ;/**\r | |
16 | ; Retrieves the current CPU interrupt state.\r | |
17 | ;\r | |
18 | ; Returns TRUE is interrupts are currently enabled. Otherwise\r | |
19 | ; returns FALSE.\r | |
20 | ;\r | |
21 | ; @retval TRUE CPU interrupts are enabled.\r | |
22 | ; @retval FALSE CPU interrupts are disabled.\r | |
23 | ;\r | |
24 | ;**/\r | |
25 | ;\r | |
26 | ;BOOLEAN\r | |
27 | ;EFIAPI\r | |
28 | ;GetInterruptState (\r | |
29 | ; VOID\r | |
30 | ; );\r | |
31 | ;\r | |
32 | GetInterruptState\r | |
33 | MRS R0, CPSR\r | |
34 | TST R0, #0x80 ;Check if IRQ is enabled.\r | |
35 | MOVEQ R0, #1\r | |
36 | MOVNE R0, #0\r | |
37 | BX LR\r | |
9095d37b | 38 | \r |
ebd04fc2 | 39 | END\r |