mirror of
https://github.com/saymrwulf/pulp-runtime.git
synced 2026-05-29 23:06:56 +00:00
Added config CONFIG_CL_BOOT to forward the execution to cluster side
This commit is contained in:
parent
30e51032bc
commit
eca64eca67
2 changed files with 28 additions and 1 deletions
|
|
@ -33,6 +33,14 @@ pos_init_entry:
|
|||
csrr a0, 0xF14
|
||||
andi a1, a0, 0x1f
|
||||
srli a0, a0, 5
|
||||
#ifdef ARCHI_CL_BOOT
|
||||
|
||||
li a2, ARCHI_FC_CID
|
||||
beq a0, a2, do_cl_boot
|
||||
bnez a1, pe_start
|
||||
|
||||
#else
|
||||
|
||||
#ifdef ARCHI_FC_CID
|
||||
li a2, ARCHI_FC_CID
|
||||
bne a0, a2, pe_start
|
||||
|
|
@ -41,6 +49,8 @@ pos_init_entry:
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
# Clear the bss segment
|
||||
|
|
@ -155,4 +165,17 @@ pe_start:
|
|||
mul x1, x3, a1
|
||||
add x2, x2, x1
|
||||
j cluster_entry_stub
|
||||
#endif
|
||||
#endif
|
||||
|
||||
do_cl_boot:
|
||||
li x2, 0x10200000
|
||||
li x3, 0x1
|
||||
la x4, _start
|
||||
sw x4, 0x40(x2)
|
||||
sw x3, 8(x2)
|
||||
|
||||
loop:
|
||||
li x2, 0x1a109800
|
||||
sw x0, 0(x2)
|
||||
wfi
|
||||
j loop
|
||||
|
|
@ -75,6 +75,10 @@ ifdef CONFIG_NO_FC
|
|||
PULP_CFLAGS += -DARCHI_NO_FC=1
|
||||
endif
|
||||
|
||||
ifdef CONFIG_CL_BOOT
|
||||
PULP_CFLAGS += -DARCHI_CL_BOOT=1
|
||||
endif
|
||||
|
||||
ifdef CONFIG_IO_UART
|
||||
PULP_CFLAGS += -DCONFIG_IO_UART=$(CONFIG_IO_UART)
|
||||
endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue