]>
Commit | Line | Data |
---|---|---|
7601b251 AC |
1 | /** @file\r |
2 | CPU get interrupt state function for RISC-V\r | |
3 | \r | |
4 | Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>\r | |
5 | \r | |
6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
7 | **/\r | |
8 | \r | |
9 | #include "BaseLibInternals.h"\r | |
10 | \r | |
2f88bd3a MK |
11 | extern UINT32\r |
12 | RiscVGetSupervisorModeInterrupts (\r | |
13 | VOID\r | |
14 | );\r | |
7601b251 AC |
15 | \r |
16 | /**\r | |
17 | Retrieves the current CPU interrupt state.\r | |
18 | \r | |
19 | Returns TRUE is interrupts are currently enabled. Otherwise\r | |
20 | returns FALSE.\r | |
21 | \r | |
22 | @retval TRUE CPU interrupts are enabled.\r | |
23 | @retval FALSE CPU interrupts are disabled.\r | |
24 | \r | |
25 | **/\r | |
26 | BOOLEAN\r | |
27 | EFIAPI\r | |
28 | GetInterruptState (\r | |
29 | VOID\r | |
30 | )\r | |
31 | {\r | |
2f88bd3a | 32 | unsigned long RetValue;\r |
7601b251 AC |
33 | \r |
34 | RetValue = RiscVGetSupervisorModeInterrupts ();\r | |
2f88bd3a | 35 | return RetValue ? TRUE : FALSE;\r |
7601b251 | 36 | }\r |