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:
@@ -13,6 +13,7 @@
|
||||
#include <sbi/sbi_domain.h>
|
||||
#include <sbi/sbi_ecall_interface.h>
|
||||
#include <sbi/sbi_hart.h>
|
||||
#include <sbi/sbi_hart_protection.h>
|
||||
#include <sbi/sbi_heap.h>
|
||||
#include <sbi/sbi_platform.h>
|
||||
#include <sbi/sbi_pmu.h>
|
||||
@@ -1053,7 +1054,7 @@ int sbi_pmu_event_get_info(unsigned long shmem_phys_lo, unsigned long shmem_phys
|
||||
SBI_DOMAIN_READ | SBI_DOMAIN_WRITE))
|
||||
return SBI_ERR_INVALID_ADDRESS;
|
||||
|
||||
sbi_hart_map_saddr(shmem_phys_lo, shmem_size);
|
||||
sbi_hart_protection_map_range(shmem_phys_lo, shmem_size);
|
||||
|
||||
einfo = (struct sbi_pmu_event_info *)(shmem_phys_lo);
|
||||
for (i = 0; i < num_events; i++) {
|
||||
@@ -1087,7 +1088,7 @@ int sbi_pmu_event_get_info(unsigned long shmem_phys_lo, unsigned long shmem_phys
|
||||
}
|
||||
}
|
||||
|
||||
sbi_hart_unmap_saddr();
|
||||
sbi_hart_protection_unmap_range(shmem_phys_lo, shmem_size);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user