sbi_hart_hang();
}
- rc = sbi_hart_pmp_configure(scratch);
- if (rc) {
- sbi_printf("%s: PMP configure failed (error %d)\n",
- __func__, rc);
- sbi_hart_hang();
- }
-
/*
* Note: Platform final initialization should be after finalizing
* domains so that it sees correct domain assignment and PMP
sbi_boot_print_hart(scratch, hartid);
+ /*
+ * Configure PMP at last because if SMEPMP is detected,
+ * M-mode access to the S/U space will be rescinded.
+ */
+ rc = sbi_hart_pmp_configure(scratch);
+ if (rc) {
+ sbi_printf("%s: PMP configure failed (error %d)\n",
+ __func__, rc);
+ sbi_hart_hang();
+ }
+
wake_coldboot_harts(scratch, hartid);
count = sbi_scratch_offset_ptr(scratch, init_count_offset);
if (rc)
sbi_hart_hang();
- rc = sbi_hart_pmp_configure(scratch);
+ rc = sbi_platform_final_init(plat, false);
if (rc)
sbi_hart_hang();
- rc = sbi_platform_final_init(plat, false);
+ /*
+ * Configure PMP at last because if SMEPMP is detected,
+ * M-mode access to the S/U space will be rescinded.
+ */
+ rc = sbi_hart_pmp_configure(scratch);
if (rc)
sbi_hart_hang();