diff options
| author | GUI <[email protected]> | 2026-10-17 09:44:26 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-10-17 09:44:26 +0800 |
| commit | 8d8dc96b67eee53af2841a8819364d52fbec39cb (patch) | |
| tree | eb2ac2f0984261f526c5d9c14462db47eceeb193 /components/drivers/block | |
| parent | c1d931bcc78915f24c3526a07bdecc64d5110d51 (diff) | |
[ARCH/RISC-V] Next RISC-V (#10320)
* [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 <[email protected]>
* [libcpu][risc-v] skip disabled CPU nodes in early FDT walk
Rbb666 noted that rt_hw_fdt_install_early() walked every /cpus child
without checking status, so disabled cores still joined hart registration
and MMU capability probing. Skip nodes that are not okay/ok via
rt_fdt_device_is_available() before reading reg or mmu-type.
Signed-off-by: seteiro <[email protected]>
* [libcpu][risc-v] Fix per-CPU page table mapping
- reuse existing non-leaf page table entries when mapping per-CPU areas
- reject leaf entry conflicts instead of overwriting mappings
Signed-off-by: GuEe-GUI <[email protected]>
---------
Signed-off-by: GuEe-GUI <[email protected]>
Signed-off-by: seteiro <[email protected]>
Co-authored-by: seteiro <[email protected]>
Diffstat (limited to 'components/drivers/block')
| -rw-r--r-- | components/drivers/block/blk.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/drivers/block/blk.c b/components/drivers/block/blk.c index 5f0d6b1f82..a0c18acca9 100644 --- a/components/drivers/block/blk.c +++ b/components/drivers/block/blk.c @@ -492,11 +492,12 @@ static const char *blk_get_mounted_path(struct rt_device *device) const char *convert_size(struct rt_device_blk_geometry *geome, rt_size_t sector_count, rt_size_t *out_cap, rt_size_t *out_minor) { - rt_size_t cap, minor = 0; + rt_uint64_t cap; + rt_size_t minor = 0; int size_index = 0; const char *size_name[] = { "B", "K", "M", "G", "T", "P", "E" }; - cap = geome->bytes_per_sector * sector_count; + cap = (rt_uint64_t)geome->bytes_per_sector * sector_count; for (size_index = 0; size_index < RT_ARRAY_SIZE(size_name) - 1; ++size_index) { |
