|
@@ -15,6 +15,7 @@
|
|
|
#include <sbi/sbi_console.h>
|
|
|
#include <sbi/sbi_error.h>
|
|
|
#include <sbi/sbi_hart.h>
|
|
|
+#include <sbi/sbi_math.h>
|
|
|
#include <sbi/sbi_platform.h>
|
|
|
|
|
|
extern void __sbi_expected_trap(void);
|
|
@@ -121,19 +122,6 @@ void sbi_hart_delegation_dump(struct sbi_scratch *scratch)
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
-unsigned long log2roundup(unsigned long x)
|
|
|
-{
|
|
|
- unsigned long ret = 0;
|
|
|
-
|
|
|
- while (ret < __riscv_xlen) {
|
|
|
- if (x <= (1UL << ret))
|
|
|
- break;
|
|
|
- ret++;
|
|
|
- }
|
|
|
-
|
|
|
- return ret;
|
|
|
-}
|
|
|
-
|
|
|
void sbi_hart_pmp_dump(struct sbi_scratch *scratch)
|
|
|
{
|
|
|
const struct sbi_platform *plat = sbi_platform_ptr(scratch);
|