mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-25 07:41:42 +01:00
lib: utils/irqchip: Add FDT wrappers for PLIC save/restore functions
These functions save/restore the state of the PLIC associated with the current hart. The context save/restore functions only manipulate a single context, since most likely the M-mode context is unused and does not need to be saved. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:

committed by
Anup Patel

parent
2b79b694a8
commit
69be3dff9d
20
include/sbi_utils/irqchip/fdt_irqchip_plic.h
Normal file
20
include/sbi_utils/irqchip/fdt_irqchip_plic.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*
|
||||
* Copyright (c) 2022 Samuel Holland <samuel@sholland.org>
|
||||
*/
|
||||
|
||||
#ifndef __IRQCHIP_FDT_IRQCHIP_PLIC_H__
|
||||
#define __IRQCHIP_FDT_IRQCHIP_PLIC_H__
|
||||
|
||||
#include <sbi/sbi_types.h>
|
||||
|
||||
void fdt_plic_priority_save(u8 *priority);
|
||||
|
||||
void fdt_plic_priority_restore(const u8 *priority);
|
||||
|
||||
void fdt_plic_context_save(bool smode, u32 *enable, u32 *threshold);
|
||||
|
||||
void fdt_plic_context_restore(bool smode, const u32 *enable, u32 threshold);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user