diff options
Diffstat (limited to 'platform/thead/c910/platform.c')
-rw-r--r-- | platform/thead/c910/platform.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/platform/thead/c910/platform.c b/platform/thead/c910/platform.c index 9d98a31..adb1a20 100644 --- a/platform/thead/c910/platform.c +++ b/platform/thead/c910/platform.c @@ -106,25 +106,11 @@ static int c910_system_shutdown(u32 type) return 0; } -void sbi_boot_other_core(int hartid) +int c910_hart_start(u32 hartid, ulong saddr) { - csr_write(CSR_MRVBR, FW_TEXT_START); + csr_write(CSR_MRVBR, saddr); csr_write(CSR_MRMR, csr_read(CSR_MRMR) | (1 << hartid)); -} -static int c910_vendor_ext_provider(long extid, long funcid, - unsigned long *args, - unsigned long *out_value, - struct sbi_trap_info *out_trap) -{ - switch (extid) { - case SBI_EXT_VENDOR_C910_BOOT_OTHER_CORE: - sbi_boot_other_core((int)args[0]); - break; - default: - sbi_printf("Unsupported private sbi call: %ld\n", extid); - asm volatile ("ebreak"); - } return 0; } @@ -143,7 +129,7 @@ const struct sbi_platform_operations platform_ops = { .system_shutdown = c910_system_shutdown, - .vendor_ext_provider = c910_vendor_ext_provider, + .hart_start = c910_hart_start, }; const struct sbi_platform platform = { |