Closed jiegec closed 5 years ago
It traps right after setting satp:
satp
OpenSBI v0.3 (Apr 19 2019 23:38:37) ____ _____ ____ _____ / __ \ / ____| _ \_ _| | | | |_ __ ___ _ __ | (___ | |_) || | | | | | '_ \ / _ \ '_ \ \___ \| _ < | | | |__| | |_) | __/ | | |____) | |_) || |_ \____/| .__/ \___|_| |_|_____/|____/_____| | | |_| Platform Name : SiFive Freedom U540 Platform HART Features : RV64ACDFIMSU Platform Max HARTs : 5 Current Hart : 4 Firmware Base : 0x80000000 Firmware Size : 84 KB Runtime SBI Version : 0.1 PMP0: 0x0000000080000000-0x000000008001ffff (A) PMP1: 0x0000000000000000-0x0000007fffffffff (A,R,W,X) sbi_trap_error: hart4: trap handler failed (error -5) sbi_trap_error: hart1: trap handler failed (error -5) sbi_trap_error: hart2: trap handler failed (error -5) sbi_trap_error: hart1: mcause=0x0000000000000001 mtval=0xffffffffc0207c0e sbi_trap_error: hart2: mcause=0x0000000000000001 mtval=0xffffffffc0207c0e sbi_trap_error: hart1: mepc=0xffffffffc0207c0e mstatus=0x8000000a00006800 sbi_trap_error: hart2: mepc=0xffffffffc0207c0e mstatus=0x8000000a00006800 sbi_trap_error: hart1: ra=0x000000008000073c sp=0xffffffffc0cd5000 sbi_trap_error: hart3: trap handler failed (error -5) sbi_trap_error: hart1: gp=0x0000000000000000 tp=0x0000000080012e00 sbi_trap_error: hart3: mcause=0x0000000000000001 mtval=0xffffffffc0207c0e sbi_trap_error: hart2: ra=0x000000008000073c sp=0xffffffffc0ce5000 sbi_trap_error: hart1: s0=0x0000000080012d90 s1=0x0000000080012e00 sbi_trap_error: hart2: gp=0x0000000000000000 tp=0x0000000080010e00 sbi_trap_error: hart1: a0=0x0000000000000001 a1=0x0000000082200000 sbi_trap_error: hart2: s0=0x0000000080010d90 s1=0x0000000080010e00 sbi_trap_error: hart1: a2=0x0000000080200000 a3=0x0000000000000001 sbi_trap_error: hart2: a0=0x0000000000000002 a1=0x0000000082200000 sbi_trap_error: hart1: a4=0x0000000000000800 a5=0x0000000000000001 sbi_trap_error: hart3: mepc=0xffffffffc0207c0e mstatus=0x8000000a00006800 sbi_trap_error: hart2: a2=0x0000000080200000 a3=0x0000000000000001 sbi_trap_error: hart1: a6=0x0000000082200000 a7=0x0000000080200000 sbi_trap_error: hart2: a4=0x0000000000000800 a5=0x0000000000000001 sbi_trap_error: hart1: s2=0x0000000080009550 s3=0x0000000000000001 sbi_trap_error: hart3: ra=0x000000008000073c sp=0xffffffffc0cf5000 sbi_trap_error: hart1: s4=0x0000000000000000 s5=0x0000000000000000 sbi_trap_error: hart2: a6=0x0000000082200000 a7=0x0000000080200000 sbi_trap_error: hart1: s6=0x0000000000000001 s7=0x0000000000000005 sbi_trap_error: hart2: s2=0x0000000080009550 s3=0x0000000000000002 sbi_trap_error: hart1: s8=0x0000000000002000 s9=0x0000000000000000 sbi_trap_error: hart3: gp=0x0000000000000000 tp=0x000000008000ee00 sbi_trap_error: hart1: s10=0x0000000000000000 s11=0x0000000000000000 sbi_trap_error: hart2: s4=0x0000000000000000 s5=0x0000000000000000 sbi_trap_error: hart1: t0=0xffffffffc0207c0e t1=0x8000000000000000 sbi_trap_error: hart2: s6=0x0000000000000002 s7=0x0000000000000005 sbi_trap_error: hart1: t2=0x0000000000000001 t3=0x0000000000000000 sbi_trap_error: hart2: s8=0x0000000000002000 s9=0x0000000000000000 sbi_trap_error: hart1: t4=0x0000000000000000 t5=0x0000000000000000 sbi_trap_error: hart2: s10=0x0000000000000000 s11=0x0000000000000000 sbi_trap_error: hart1: t6=0x0000000082200000 sbi_trap_error: hart2: t0=0xffffffffc0207c0e t1=0x8000000000000000 sbi_trap_error: hart3: s0=0x000000008000ed90 s1=0x000000008000ee00 sbi_trap_error: hart2: t2=0x0000000000000001 t3=0x0000000000000000 sbi_trap_error: hart3: a0=0x0000000000000003 a1=0x0000000082200000 sbi_trap_error: hart2: t4=0x0000000000000000 t5=0x0000000000000000 sbi_trap_error: hart3: a2=0x0000000080200000 a3=0x0000000000000001 sbi_trap_error: hart2: t6=0x0000000082200000 sbi_trap_error: hart3: a4=0x0000000000000800 a5=0x0000000000000001 sbi_trap_error: hart4: mcause=0x0000000000000001 mtval=0xffffffffc0207c0e sbi_trap_error: hart3: a6=0x0000000082200000 a7=0x0000000080200000 sbi_trap_error: hart4: mepc=0xffffffffc0207c0e mstatus=0x8000000a00006800 sbi_trap_error: hart3: s2=0x0000000080009550 s3=0x0000000000000003 sbi_trap_error: hart4: ra=0x000000008000073c sp=0xffffffffc0d05000 sbi_trap_error: hart3: s4=0x0000000000000000 s5=0x0000000000000000 sbi_trap_error: hart4: gp=0x0000000000000000 tp=0x000000008000ce00 sbi_trap_error: hart3: s6=0x0000000000000003 s7=0x0000000000000005 sbi_trap_error: hart4: s0=0x000000008000cd90 s1=0x000000008000ce00 sbi_trap_error: hart3: s8=0x0000000000002000 s9=0x0000000000000000 sbi_trap_error: hart4: a0=0x0000000000000004 a1=0x0000000082200000 sbi_trap_error: hart3: s10=0x0000000000000000 s11=0x0000000000000000 sbi_trap_error: hart4: a2=0x0000000080200000 a3=0x0000000000000001 sbi_trap_error: hart3: t0=0xffffffffc0207c0e t1=0x8000000000000000 sbi_trap_error: hart4: a4=0x0000000000000800 a5=0x0000000000000001 sbi_trap_error: hart3: t2=0x0000000000000001 t3=0x0000000000000000 sbi_trap_error: hart4: a6=0x0000000082200000 a7=0x0000000080200000 sbi_trap_error: hart3: t4=0x0000000000000000 t5=0x0000000000000000 sbi_trap_error: hart4: s2=0x0000000080009550 s3=0x0000000000000004 sbi_trap_error: hart3: t6=0x0000000082200000 sbi_trap_error: hart4: s4=0x0000000000000000 s5=0x0000000000000000 sbi_trap_error: hart4: s6=0x0000000000000004 s7=0x0000000000000005 sbi_trap_error: hart4: s8=0x0000000000002000 s9=0x0000000000000000 sbi_trap_error: hart4: s10=0x0000000000000000 s11=0x0000000000000000 sbi_trap_error: hart4: t0=0xffffffffc0207c0e t1=0x8000000000000000 sbi_trap_error: hart4: t2=0x0000000000000001 t3=0x0000000000000000 sbi_trap_error: hart4: t4=0x0000000000000000 t5=0x0000000000000000 sbi_trap_error: hart4: t6=0x0000000082200000
Fixed.
The problem lies in PMP. Rocket Chip has weird problems in PMP.
It traps right after setting
satp
: