diff options
| author | Himanshu Chauhan <[email protected]> | 2023-07-12 10:04:35 +0530 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2023-07-13 12:44:02 +0530 |
| commit | 6e44ef686a9b329d837c61d7f121541abfcfed90 (patch) | |
| tree | b42e9899749b974eec6d9ca7193f2c9eaa5e1f77 /include | |
| parent | 5dd8db5b10fc03aeded76407aecb731a8a9f1cfa (diff) | |
lib: sbi: Add functions to map/unmap shared memory
When Smepmp is enabled, M-mode will need to map/unmap the
shared memory before it can read/write to it. This patch
adds functions to create dynamic short-lived mappings.
Signed-off-by: Himanshu Chauhan <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/sbi/sbi_hart.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sbi/sbi_hart.h b/include/sbi/sbi_hart.h index 1b783436..c150b7e4 100644 --- a/include/sbi/sbi_hart.h +++ b/include/sbi/sbi_hart.h @@ -90,6 +90,8 @@ unsigned long sbi_hart_pmp_granularity(struct sbi_scratch *scratch); unsigned int sbi_hart_pmp_addrbits(struct sbi_scratch *scratch); unsigned int sbi_hart_mhpm_bits(struct sbi_scratch *scratch); int sbi_hart_pmp_configure(struct sbi_scratch *scratch); +int sbi_hart_map_saddr(unsigned long base, unsigned long size); +int sbi_hart_unmap_saddr(void); int sbi_hart_priv_version(struct sbi_scratch *scratch); void sbi_hart_get_priv_version_str(struct sbi_scratch *scratch, char *version_str, int nvstr); |
