]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseLib/RiscV64/GetInterruptState.c
MdePkg/BaseLib: BaseLib for RISCV64 architecture
[mirror_edk2.git] / MdePkg / Library / BaseLib / RiscV64 / GetInterruptState.c
CommitLineData
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
11extern UINT32 RiscVGetSupervisorModeInterrupts (VOID);\r
12\r
13/**\r
14 Retrieves the current CPU interrupt state.\r
15\r
16 Returns TRUE is interrupts are currently enabled. Otherwise\r
17 returns FALSE.\r
18\r
19 @retval TRUE CPU interrupts are enabled.\r
20 @retval FALSE CPU interrupts are disabled.\r
21\r
22**/\r
23BOOLEAN\r
24EFIAPI\r
25GetInterruptState (\r
26 VOID\r
27 )\r
28{\r
29 unsigned long RetValue;\r
30\r
31 RetValue = RiscVGetSupervisorModeInterrupts ();\r
32 return RetValue? TRUE: FALSE;\r
33}\r
34\r
35\r