[Feature] RISC-V 近期调整
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- c
- Domain
- embedded-iot, operating-systems
Research direction
Start by reading the RISC-V architecture plan in PR #10320 and the libcpu/common and legacy_common notes. The issue lists many planned changes and BSPs to sync, but does not define one bounded task or a single completion test, so the scope must be narrowed before work can be considered done.
Written by the indexing model from the issue text.
Description
Describe problem solved by the proposed feature
已有问题
只列当前 ISSUE 会解决的问题
- HARTID 保存:https://github.com/RT-Thread/rt-thread/issues/11226
- Timer 统一:https://github.com/RT-Thread/rt-thread/issues/11019
- TLS 支持:https://github.com/RT-Thread/rt-thread/issues/7820
- 降低移植门槛:https://github.com/RT-Thread/rt-thread/issues/8675
- 中断框架解耦:https://github.com/RT-Thread/rt-thread/issues/10457
- 地址空间管理:https://github.com/RT-Thread/rt-thread/issues/9178,https://github.com/RT-Thread/rt-thread/issues/9521
- PIC 统一:https://github.com/RT-Thread/rt-thread/issues/9566
- MMU 标准统一:https://github.com/RT-Thread/rt-thread/issues/9567
- RV32 S-Mode:https://github.com/RT-Thread/rt-thread/issues/9571
- SMP 支持:https://github.com/RT-Thread/rt-thread/issues/10722
Describe your preferred solution
已有提交
- 进迭 Spacemit K1 支持:
- RISC-V 重启系统调用:https://github.com/RT-Thread/rt-thread/pull/10520
- RISC-V 重构和支持:https://github.com/RT-Thread/rt-thread/pull/10320
后续计划
对于架构本身的改进,https://github.com/RT-Thread/rt-thread/pull/10320#issuecomment-2906928709 已经做了详细规划,在与社区的协商下,进行了一定的调整(带 MMU 的 SoC 平台)。
- 支持动态 ISA 管理
- 合并 32/64 位公共代码
- 支持统一 cache 操作
- MMU 支持到标准
- 合并 M/S 模式公共代码
- 支持 SMP
- 支持 DM
- 合并 T-HEAD Vendor 代码
- RT-Thread 支持非 0 核启动
- libcpu 目录改进
- common 实现仍然作为切入点和统一目录
- 原本的 common 改名为 legacy_common,使用原本 common 的 bsp 如果没有采用新添加的宏 RT_USING_RISCV_NEW_COMMON 就会自动使用 legacy_common,t-head 目录同理
- qemu-virt64-riscv 是第一个使用新 common 的 BSP,并在同一目录支持 RV32 和 RV64 S-mode,同时 DM 在 32位下部分数据打印截断问题也修复。
- 对于非 0 核启动问题,不再修改内核 master CPU 语义,而是 RISC-V 架构层维护 physical HART ID 与 logical CPU ID 的转换表:
- 最先启动的 HART 注册为 logical CPU0。
- 其余 HART 按平台枚举顺序映射为 CPU1、CPU2 等。
- SBI HSM、IPI、timer 和 per-CPU 中断初始化统一经过该映射。
- 后续继续在维护的 BSP,开源逐个接入新的 common,同时按照现实要求完善 common,最终没有 BSP 引用 legacy_ 时,即可删除 legacy_ 和全部 BSP 的RT_USING_RISCV_NEW_COMMON,RISC-V 架构则算重构完成。
需要维护(Sync)的 BSP
RV32
- bluetrum
- bouffalo_lab
- core-v-mcu
- hpmicro
- nuclei
- xuantie/smartl
- rv32m1_vega
- wch/riscv
- gd32/risc-v
- sparkfun-redv
- ES-PDS-ES32VF2264
RV64
- allwinner
- cvitek
- K230
- qemu-virt64-riscv
- xuantie/xiaohui
- spacemit/k1
Describe possible alternatives
No response
- Dominant language
- C
- Stars
- 12.4k
- Forks
- 5.5k
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 79
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RT-Thread/rt-thread
-
Arch: ARM/AArch64 Doc
Difficulty 1/5 Under an hour Newbie friendliness 90/100
RT-Thread/rt-thread#12082 · 1 comment ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
RT-Thread/rt-thread#11951 · 2 comments ·
Maintainers usually reply within 2 days
-
[Bug] [libc] timer_gettime 拆秒前将总纳秒截断为 uint32_t,剩余时间查询错误May be free again @Yunlk claimed this 28 days ago, and no pull request is open. Openin progress
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
RT-Thread/rt-thread#11924 · 7 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
[Bug] dfs_v2 tmpfs: ftruncate(fd, 0) frees the file buffer but reports success — use-after-free read/write and double free from a legal POSIX callPossibly taken @remukisama claimed this 33 days ago. Openin progress
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
RT-Thread/rt-thread#11902 · 4 comments · 1 assignee ·
Maintainers usually reply within 2 days
-
[bsp][stm32][bluepill] README「快速上手」缺少重新生成 MDK 工程这一步,按文档操作无法编译通过May be free again @moment-NEW claimed this 50 days ago, and no pull request is open. Openin progress
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
RT-Thread/rt-thread#11818 · 4 comments · 1 assignee ·
Maintainers usually reply within 2 days
All issues in RT-Thread/rt-thread
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
apache/nuttx-apps#4108 · 4 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
trezor/trezor-firmware#8357 ·
Maintainers usually reply within 2 days
-
ivorysql_ora: DBMS_SESSION lacks SLEEP (documented, not covered by #2763)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
good first issue kernel
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
JackFurton/who-would-build-a-kernel-in-java#316 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
PE5PVB/TEF6686_ESP32#970 ·