RT-Thread / RT-Thread/rt-thread
[Bug]cvitek duo256m smart 异常
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 12.2k
- Forks
- 5.4k
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 40
Description
RT-Thread Version
master
Hardware Type/Architectures
duo256m
Develop Toolchain
Other
Describe the bug
duo256m跑smart时候异常,日志如下。跑标准版本没有问题。
C▒S▒▒▒W▒▒%▒▒.▒꒵▒�▒▒▒▒▒▒.B▒iE▒▒*▒S▒ ▒▒▒▒0▒▒E0▒▒▒▒▒Q▒B▒▒▒ ▒▒0▒▒a▒▒▒▒a▒▒/r▒B▒▒▒
FSBL Jb2829:g8e970aa49-dirty:2025-01-09T11:56:29+08:00
st_on_reason=d0000
st_off_reason=0
P2S/0x1000/0xc00a400.
SD/0x9400/0x1000/0x1000/0.P2E.
DPS/0xa400/0x2000.
SD/0xa400/0x2000/0x2000/0.DPE.
cv181x DDR init.
ddr_param[0]=0x78075562.
pkg_type=5
D1_3_2
DDR3-2G-QFN
Data rate=1866.
DDR BIST PASS
PLLS.
PLLE.
C2S/0xc400/0x8fe00000/0x12200.
SD/0xc400/0x12200/0x12200/0.RSC.
C2E.
MS/0x1e600/0x80000000/0x1b000.
SD/0x1e600/0x1b000/0x1b000/0.ME.
L2/0x39600.
SD/0x39600/0x200/0x200/0.L2/0x414d3342/0xcafe16af/0x80200000/0x37400/0x37400
COMP/1.
SD/0x39600/0x37400/0x37400/0.DCP/0x80200020/0x1000000/0x81900020/0x37400/1.
DCP/0x73e33/0.
Loader_2nd loaded.
Use internal 32k
Jump to monitor at 0x80000000.
OPENSBI: next_addr=0x80200020 arg1=0x80080000
OpenSBI v0.9
____ _____ ____ _____
/ __ \ / ____| _ \_ _|
| | | |_ __ ___ _ __ | (___ | |_) || |
| | | | '_ \ / _ \ '_ \ \___ \| _ < | |
| |__| | |_) | __/ | | |____) | |_) || |_
\____/| .__/ \___|_| |_|_____/|____/_____|
| |
|_|
Platform Name : Milk-V DuoS
Platform Features : mfdeleg
Platform HART Count : 1
Platform IPI Device : clint
Platform Timer Device : clint
Platform Console Device : uart8250
Platform HSM Device : ---
Platform SysReset Device : ---
Firmware Base : 0x80000000
Firmware Size : 132 KB
Runtime SBI Version : 0.3
Domain0 Name : root
Domain0 Boot HART : 0
Domain0 HARTs : 0*
Domain0 Region00 : 0x0000000074000000-0x000000007400ffff (I)
Domain0 Region01 : 0x0000000080000000-0x000000008003ffff ()
Domain0 Region02 : 0x0000000000000000-0xffffffffffffffff (R,W,X)
Domain0 Next Address : 0x0000000080200020
Domain0 Next Arg1 : 0x0000000080080000
Domain0 Next Mode : S-mode
Domain0 SysReset : yes
Boot HART ID : 0
Boot HART Domain : root
Boot HART ISA : rv64imafdcvsux
Boot HART Features : scounteren,mcounteren,time
Boot HART PMP Count : 16
Boot HART PMP Granularity : 4096
Boot HART PMP Address Bits: 38
Boot HART MHPM Count : 8
Boot HART MHPM Count : 8
Boot HART MIDELEG : 0x0000000000000222
Boot HART MEDELEG : 0x000000000000b109
U-Boot 2021.10 (Jan 09 2025 - 11:56:19 +0800) cvitek_cv181x
DRAM: 254 MiB
gd->relocaddr=0x8b0c8000. offset=0xaec8000
MMC: cv-sd@4310000: 0
Loading Environment from nowhere... OK
In: serial
Out: serial
Err: serial
Net:
Warning: ethernet@4070000 (eth0) using random MAC address - 6e:3f:be:50:3f:40
eth0: ethernet@4070000
Hit any key to stop autoboot: 0
Boot from SD ...
switch to partitions #0, OK
mmc0 is current device
259220 bytes read in 15 ms (16.5 MiB/s)
## Loading kernel from FIT Image at 81800000 ...
Using 'config-cv1812cp_milkv_duo256m_sd' configuration
Trying 'kernel-1' kernel subimage
Description: cvitek kernel
Type: Kernel Image
Compression: lzma compressed
Data Start: 0x818000d8
Data Size: 236881 Bytes = 231.3 KiB
Architecture: RISC-V
OS: Linux
Load Address: 0x80200000
Entry Point: 0x80200000
Hash algo: crc32
Hash value: 1ea24afa
Verifying Hash Integrity ... crc32+ OK
## Loading fdt from FIT Image at 81800000 ...
Using 'config-cv1812cp_milkv_duo256m_sd' configuration
Trying 'fdt-cv1812cp_milkv_duo256m_sd' fdt subimage
Description: cvitek device tree - cv1812cp_milkv_duo256m_sd
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x81839f48
Data Size: 20443 Bytes = 20 KiB
Architecture: RISC-V
Hash algo: sha256
Hash value: d494f8d8d9244d5235147054abbe6ea6282d4fd6922e109fd2c806a800f9a7e7
Verifying Hash Integrity ... sha256+ OK
Booting using the fdt blob at 0x81839f48
Uncompressing Kernel Image
Decompressing 728360 bytes used 91ms
Loading Device Tree to 000000008a778000, end 000000008a77ffda ... OK
Starting kernel ...
Unhandled Exception 12:Instruction Page Fault
scause:0x000000000000000c,stval:(nil),sepc:(nil)
--------------Dump Registers-----------------
Function Registers:
ra(x1) = (nil) user_sp = 0x00000000802b3d40
gp(x3) = 0x00000000802b24a0 tp(x4) = (nil)
Temporary Registers:
t0(x5) = 0x0000000000002000 t1(x6) = (nil)
t2(x7) = (nil)
t3(x28) = (nil) t4(x29) = (nil)
t5(x30) = (nil) t6(x31) = (nil)
Saved Registers:
s0/fp(x8) = 0xffffffff00000000 s1(x9) = (nil)
s2(x18) = (nil) s3(x19) = (nil)
s4(x20) = (nil) s5(x21) = (nil)
s6(x22) = (nil) s7(x23) = (nil)
s8(x24) = (nil) s9(x25) = (nil)
s10(x26) = (nil) s11(x27) = (nil)
Function Arguments Registers:
a0(x10) = 0x0000004080000000 a1(x11) = (nil)
a2(x12) = (nil) a3(x13) = 0x00000000802cc000
a4(x14) = 0x00000000000802cc a5(x15) = 0x80000000000802cc
a6(x16) = (nil) a7(x17) = (nil)
sstatus = 0x8000000201840100
Supervisor Interrupt Disabled
Last Time Supervisor Interrupt Disabled
Last Privilege is Supervisor Mode
Permit to Access User Page
Not Permit to Read Executable-only Page
satp = 0x80000000000802cc
Current Page Table(Physical) = 0x00000000802cc000
Current ASID = (nil)
Mode = Page-based 39-bit Virtual Addressing Mode
-----------------Dump OK---------------------
--------------Thread list--------------
current thread: (null)
--------------Backtrace--------------
please use: addr2line -e rtthread.elf -a -f
0x0Unhandled Exception 13:Load Page Fault
[E/libcpu.trap]
-------- [SEVER ERROR] --------
[E/libcpu.trap] Nested trap detected
[E/libcpu.trap] scause:0x000000000000000d,stval:0x0000000000000110,sepc:0x0000000080264b60
--------------Dump Registers-----------------
Function Registers:
ra(x1) = 0x0000000080286f98 user_sp = 0x00000000802b3a60
gp(x3) = 0x00000000802b24a0 tp(x4) = (nil)
Temporary Registers:
t0(x5) = 0x000000000000000c t1(x6) = (nil)
t2(x7) = (nil)
t3(x28) = (nil) t4(x29) = (nil)
t5(x30) = (nil) t6(x31) = (nil)
Saved Registers:
s0/fp(x8) = 0x00000000802b3aa0 s1(x9) = (nil)
s2(x18) = (nil) s3(x19) = (nil)
s4(x20) = (nil) s5(x21) = (nil)
s6(x22) = (nil) s7(x23) = (nil)
s8(x24) = (nil) s9(x25) = (nil)
s10(x26) = (nil) s11(x27) = (nil)
Function Arguments Registers:
a0(x10) = (nil) a1(x11) = 0x00000000802b3af8
a2(x12) = (nil) a3(x13) = (nil)
a4(x14) = (nil) a5(x15) = (nil)
a6(x16) = (nil) a7(x17) = 0x0000000000000001
sstatus = 0x8000000201844100
Supervisor Interrupt Disabled
Last Time Supervisor Interrupt Disabled
Last Privilege is Supervisor Mode
Permit to Access User Page
Not Permit to Read Executable-only Page
satp = 0x80000000000802cc
Current Page Table(Physical) = 0x00000000802cc000
Current ASID = (nil)
Mode = Page-based 39-bit Virtual Addressing Mode
-----------------Dump OK---------------------
shutdown...
Other additional context
No response
Contributor 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.
Research direction
Start by reproducing the failure on the cvitek duo256m using the master version and compare it with the standard build, which reportedly works. Use the shown boot log and rtthread.elf with addr2line to investigate the reported instruction and load page faults. Done means the smart build boots without the nested trap or page-fault shutdown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100