Skip to content

Commit 17b8bfa

Browse files
committed
[libcpu][risc-v] Refactor the RISC-V architecture port
Introduce an opt-in unified RISC-V common layer for RV32 and RV64 while keeping existing BSPs on the legacy implementation during migration. - use ARCH_RISCV and ARCH_CPU_64BIT for architecture and XLEN selection - unify context, trap, MMU, cache, timer, SBI, SMP and ISA handling - add PLIC, CLIC, ACLINT, APLIC and IMSIC support - map physical hart IDs to contiguous logical CPU IDs - add T-Head vendor overrides while preserving legacy ports - migrate qemu-virt64-riscv with RV32 and RV64 support - update clock_time, MM, LWP, OFW, PCI and Rust integration Existing BSPs continue using legacy_common or common64 unless they select RT_USING_RISCV_NEW_COMMON. Signed-off-by: GuEe-GUI <2991707448@qq.com>
1 parent 991f0ff commit 17b8bfa

170 files changed

Lines changed: 14879 additions & 3489 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/utest_auto_run.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,18 @@ jobs:
336336
$QEMU_BIN -cpu c906fd -M $TEST_QEMU_MACHINE -kernel $TEST_BSP_ROOT/rtthread.bin -nographic \
337337
-drive if=none,file=$TEST_BSP_ROOT/sd.bin,format=raw,id=blk0 -device virtio-blk-device,drive=blk0,bus=virtio-mmio-bus.0 \
338338
> qemu_output_$TEST_QEMU_ARCH.log 2>&1 &
339+
elif [[ "$TEST_BSP_ROOT" == "bsp/qemu-virt64-riscv" ]]; then
340+
cpus=$(grep -E '^#define[[:space:]]+RT_CPUS_NR' "$TEST_BSP_ROOT/rtconfig.h" | awk '{print $3}')
341+
cpus=${cpus:-1}
342+
qemu-system-$TEST_QEMU_ARCH \
343+
-nographic \
344+
-M $TEST_QEMU_MACHINE \
345+
-cpu max \
346+
-smp "$cpus" \
347+
-m 256M \
348+
-kernel "$TEST_BSP_ROOT/rtthread.bin" \
349+
-append "console=ttyS0 earlycon=sbi" \
350+
> qemu_output_$TEST_QEMU_ARCH.log 2>&1 &
339351
elif [[ "${{ matrix.platform.QEMU_ARCH }}" == "arm" ]]; then
340352
qemu-system-$TEST_QEMU_ARCH \
341353
-nographic \

0 commit comments

Comments
 (0)