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