summaryrefslogtreecommitdiff
path: root/include/sbi/sbi_pmp.h
blob: ce00ec0cbc5b277ddb6a90ca8e9067324e5b2065 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 * 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