Skip to content

Commit ab5fb06

Browse files
author
Axel Heider
committed
elfloader/riscv: always pass hart/core information
Align the SMP and non-SMP ABI for kernel entry and pass on the hard ID obtained from the previous bootloader unconditionally. This allows the kernel to use the ID, e.g. when setting up the PLIC, so there is no need to require defining a platform specific hard-codes value. Furthermore, this change allows running a single core kernel in SMP configuration also. Signed-off-by: Axel Heider <axel.heider@codasip.com>
1 parent 8c660fd commit ab5fb06

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

elfloader-tool/include/arch-riscv/elfloader.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ typedef void (*init_riscv_kernel_t)(word_t ui_p_reg_start,
1818
word_t pv_offset,
1919
word_t v_entry,
2020
word_t dtb_addr_p,
21-
word_t dtb_size
22-
#if CONFIG_MAX_NUM_NODES > 1
23-
,
21+
word_t dtb_size,
2422
word_t hart_id,
25-
word_t core_id
26-
#endif
27-
);
23+
word_t core_id);

elfloader-tool/src/arch-riscv/boot.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,13 +244,9 @@ static int run_elfloader(UNUSED int hart_id, void *bootloader_dtb)
244244
user_info.phys_virt_offset,
245245
user_info.virt_entry,
246246
(word_t)dtb,
247-
dtb_size
248-
#if CONFIG_MAX_NUM_NODES > 1
249-
,
247+
dtb_size,
250248
hart_id,
251-
0
252-
#endif
253-
);
249+
0);
254250

255251
/* We should never get here. */
256252
printf("ERROR: Kernel returned back to the ELF Loader\n");

0 commit comments

Comments
 (0)