mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-06-12 22:31:45 +01:00
f7738cc1e5
Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20260430045528.420437-7-npiggin@gmail.com Signed-off-by: Anup Patel <anup@brainfault.org>
24 lines
508 B
C
24 lines
508 B
C
/*
|
|
* SPDX-FileCopyrightText: (c) 2025-2026 Tenstorrent USA, Inc.
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#ifndef __SBI_PMP_H__
|
|
#define __SBI_PMP_H__
|
|
|
|
#include <sbi/sbi_types.h>
|
|
|
|
struct pmp {
|
|
unsigned long addr;
|
|
u8 cfg;
|
|
};
|
|
typedef struct pmp pmp_t;
|
|
|
|
bool sbi_pmp_is_enabled(pmp_t *pmp);
|
|
int sbi_pmp_encode(pmp_t *pmp, unsigned long prot, unsigned long addr,
|
|
unsigned long log2len);
|
|
int sbi_pmp_decode(pmp_t *pmp, unsigned long *prot, unsigned long *addr,
|
|
unsigned long *log2len);
|
|
|
|
#endif
|