mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-12-22 06:12:02 +00:00
sbi_hart_pmp_fence can now be utilized by other hart-protection implementation. Signed-off-by: Bo Gan <ganboing@gmail.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20251218104243.562667-2-ganboing@gmail.com Signed-off-by: Anup Patel <anup@brainfault.org>
22 lines
545 B
C
22 lines
545 B
C
/*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*
|
|
* Copyright (c) 2025 Ventana Micro Systems Inc.
|
|
*/
|
|
|
|
#ifndef __SBI_HART_PMP_H__
|
|
#define __SBI_HART_PMP_H__
|
|
|
|
#include <sbi/sbi_types.h>
|
|
|
|
struct sbi_scratch;
|
|
|
|
unsigned int sbi_hart_pmp_count(struct sbi_scratch *scratch);
|
|
unsigned int sbi_hart_pmp_log2gran(struct sbi_scratch *scratch);
|
|
unsigned int sbi_hart_pmp_addrbits(struct sbi_scratch *scratch);
|
|
bool sbi_hart_smepmp_is_fw_region(unsigned int pmp_idx);
|
|
void sbi_hart_pmp_fence(void);
|
|
int sbi_hart_pmp_init(struct sbi_scratch *scratch);
|
|
|
|
#endif
|