summaryrefslogtreecommitdiffstats
path: root/src/arch/riscv/include/arch/pmp.h
blob: 663e50a97f7dd9613dd1a696fbe7921ccaf2e053 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* SPDX-License-Identifier: GPL-2.0-only */

#ifndef __RISCV_PMP_H__
#define __RISCV_PMP_H__

#include <stdint.h>

/*
 * this function needs to be implemented by a specific SoC.
 * return number of PMP entries for current hart
 */
extern int pmp_entries_num(void);

/* reset PMP setting */
void reset_pmp(void);

/* set up PMP record */
void setup_pmp(uintptr_t base, uintptr_t size, uintptr_t flags);

#endif /* __RISCV_PMP_H__ */