Files
Nicholas Piggin f7738cc1e5 lib: sbi: Add sbi_pmp_is_enabled() helper
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>
2026-06-10 13:25:29 +05:30

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