-
Notifications
You must be signed in to change notification settings - Fork 507
Open
Description
Current tests assume hart IDs are contiguous and start at 0, how to support testing discontinuous Hart IDs?
Line 210 in b5ba870
f"-DNHARTS={len(self.harts)}", |
riscv-tests/debug/programs/entry.S
Lines 61 to 72 in b5ba870
# Initialize stack pointer. | |
la sp, stack_bottom | |
# Give each hart STACK_SIZE of stack. | |
# Assume hart IDs are contiguous and start at 0. | |
li t1, STACK_SIZE | |
csrr t0, CSR_MHARTID | |
# Don't use mul instruction because not all harts support it. | |
addi t0, t0, 1 | |
1: | |
add sp, sp, t1 | |
addi t0, t0, -1 | |
bnez t0, 1b |
riscv-tests/debug/programs/entry.S
Lines 223 to 225 in b5ba870
stack_bottom: | |
.fill NHARTS * STACK_SIZE/4, 4, 0x22446688 | |
stack_top: |
riscv-tests/debug/programs/multicore.c
Lines 42 to 43 in b5ba870
static unsigned hart_count[NHARTS]; | |
static unsigned interrupt_count[NHARTS]; |
riscv-tests/debug/programs/multicore.c
Lines 55 to 57 in b5ba870
uint32_t hartid = read_csr(mhartid); | |
hart_count[hartid] = 0; | |
interrupt_count[hartid] = 0; |
Metadata
Metadata
Assignees
Labels
No labels