mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-12-17 04:21:39 +00:00
lib: sbi: Replace sbi_hart_pmp_xyz() and sbi_hart_map/unmap_addr()
The sbi_hart_pmp_xyz() and sbi_hart_map/unmap_addr() functions can now be replaced by various sbi_hart_protection_xyz() functions. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Link: https://lore.kernel.org/r/20251209135235.423391-5-apatel@ventanamicro.com Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <sbi/sbi_console.h>
|
||||
#include <sbi/sbi_hsm.h>
|
||||
#include <sbi/sbi_hart.h>
|
||||
#include <sbi/sbi_hart_protection.h>
|
||||
#include <sbi/sbi_heap.h>
|
||||
#include <sbi/sbi_scratch.h>
|
||||
#include <sbi/sbi_string.h>
|
||||
@@ -122,8 +123,8 @@ static int switch_to_next_domain_context(struct hart_context *ctx,
|
||||
spin_unlock(&target_dom->assigned_harts_lock);
|
||||
|
||||
/* Reconfigure PMP settings for the new domain */
|
||||
sbi_hart_pmp_unconfigure(scratch);
|
||||
sbi_hart_pmp_configure(scratch);
|
||||
sbi_hart_protection_unconfigure(scratch);
|
||||
sbi_hart_protection_configure(scratch);
|
||||
|
||||
/* Save current CSR context and restore target domain's CSR context */
|
||||
ctx->sstatus = csr_swap(CSR_SSTATUS, dom_ctx->sstatus);
|
||||
|
||||
Reference in New Issue
Block a user