Commit 5dc289b
[libcpu][riscv] Add Xuantie processor support and MMU enhancements
Kconfig: Introduce ARCH_RISCV_XUANTIE option for Xuantie-based SoCs
and CONFIG_XUANTIE_SVPBMT under RT_USING_SMART to enable Svpbmt
extension support used by the Xuantie C908 core.
mmu.c: Several improvements for MMU management:
- Add dcache flush after populating early page table entries to ensure
they are visible to the MMU hardware before enabling address
translation
- Handle the case where v2p translation fails during aspace switch for
low physical addresses below KERNEL_VADDR_START, falling back to
direct physical address (needed during early K230 bring-up)
- When ARCH_REMAP_KERNEL is enabled, set up an identity map guard for
low physical memory during aspace switch to validate boot context
liveness during the transition away from the early page table
- Fix pointer arithmetic in _init_region() with explicit rt_ubase_t
casts to avoid potential type promotion issues
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 8b1d4c6 commit 5dc289b
2 files changed
Lines changed: 41 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
291 | 295 | | |
292 | 296 | | |
293 | 297 | | |
| |||
300 | 304 | | |
301 | 305 | | |
302 | 306 | | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
303 | 315 | | |
304 | 316 | | |
305 | 317 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
87 | 102 | | |
88 | 103 | | |
89 | 104 | | |
90 | 105 | | |
91 | 106 | | |
92 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
93 | 117 | | |
94 | 118 | | |
95 | 119 | | |
| |||
561 | 585 | | |
562 | 586 | | |
563 | 587 | | |
564 | | - | |
| 588 | + | |
565 | 589 | | |
566 | 590 | | |
567 | 591 | | |
568 | 592 | | |
569 | 593 | | |
570 | 594 | | |
571 | | - | |
| 595 | + | |
572 | 596 | | |
573 | 597 | | |
574 | 598 | | |
| |||
955 | 979 | | |
956 | 980 | | |
957 | 981 | | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
958 | 985 | | |
959 | 986 | | |
960 | 987 | | |
| |||
0 commit comments