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:
@@ -389,12 +389,12 @@ static void __noreturn init_coldboot(struct sbi_scratch *scratch, u32 hartid)
|
||||
}
|
||||
|
||||
/*
|
||||
* Configure PMP at last because if SMEPMP is detected,
|
||||
* M-mode access to the S/U space will be rescinded.
|
||||
* Configure hart isolation at last because if SMEPMP is,
|
||||
* detected, M-mode access to the S/U space will be rescinded.
|
||||
*/
|
||||
rc = sbi_hart_pmp_configure(scratch);
|
||||
rc = sbi_hart_protection_configure(scratch);
|
||||
if (rc) {
|
||||
sbi_printf("%s: PMP configure failed (error %d)\n",
|
||||
sbi_printf("%s: hart isolation configure failed (error %d)\n",
|
||||
__func__, rc);
|
||||
sbi_hart_hang();
|
||||
}
|
||||
@@ -468,10 +468,10 @@ static void __noreturn init_warm_startup(struct sbi_scratch *scratch,
|
||||
sbi_hart_hang();
|
||||
|
||||
/*
|
||||
* Configure PMP at last because if SMEPMP is detected,
|
||||
* M-mode access to the S/U space will be rescinded.
|
||||
* Configure hart isolation at last because if SMEPMP is,
|
||||
* detected, M-mode access to the S/U space will be rescinded.
|
||||
*/
|
||||
rc = sbi_hart_pmp_configure(scratch);
|
||||
rc = sbi_hart_protection_configure(scratch);
|
||||
if (rc)
|
||||
sbi_hart_hang();
|
||||
|
||||
@@ -492,7 +492,7 @@ static void __noreturn init_warm_resume(struct sbi_scratch *scratch,
|
||||
if (rc)
|
||||
sbi_hart_hang();
|
||||
|
||||
rc = sbi_hart_pmp_configure(scratch);
|
||||
rc = sbi_hart_protection_configure(scratch);
|
||||
if (rc)
|
||||
sbi_hart_hang();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user