mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 23:41:23 +01:00

The delegation bit is lost along with the rest of the PLIC state when the CPU power domain in the Allwinner D1 is powered down, so the PLIC needs to be re-delegated to S-mode during the hart resume path. Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Samuel Holland <samuel@sholland.org>
23 lines
502 B
C
23 lines
502 B
C
/*
|
|
* 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);
|
|
|
|
void thead_plic_restore(void);
|
|
|
|
#endif
|