Closed et-tommythorn closed 4 years ago
Interesting. I've been able to boot Linux in co-simulation consistently (though not the example kernel in the repository). I'll try to take a look at this later today.
I am currently seeing this with the latest master:
[ 0.002244] pid_max: default: 32768 minimum: 301
[ 0.002910] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.003302] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 8796.091429] Unable to handle kernel NULL pointer dereference at virtual address 00000000000005dc
[ 8796.091852] Oops [#1]
[ 8796.091997] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 5.3.0 #1
[ 8796.092359] sepc: ffffffe000423ca6 ra : ffffffe000284fc4 sp : ffffffe0004a1ed0
[ 8796.092721] gp : ffffffe0004c0ce8 tp : ffffffe0004a7cc0 t0 : ffffffe03af95f3c
[ 8796.093081] t1 : 0000000000000002 t2 : 00000000000003cd s0 : ffffffe0004a1ee0
[ 8796.093443] s1 : ffffffe0004f0658 a0 : 0000000200000022 a1 : ffffffe0004a1f30
[ 8796.093801] a2 : 0000000000000000 a3 : 0000000000000001 a4 : 00000000000005dc
[ 8796.094160] a5 : 0000000000000008 a6 : 0000000000010000 a7 : 0000000000000000
[ 8796.094520] s2 : ffffffe0004a1f30 s3 : 00000000000005dc s4 : 0000000000000002
[ 0.001857] s5 : 0000000000000000 s6 : 0000000000000000 s7 : ffffffe000265080
[ 0.002216] s8 : ffffffe0002601f8 s9 : 0000000000000000 s10: 0000000000000000
[ 0.002576] s11: 0000000000000000 t3 : 0000000000000402 t4 : ffffffe0004ae130
[ 0.002930] t5 : 0000000000000040 t6 : 00000000000003ff
[ 0.003204] sstatus: 0000000200000100 sbadaddr: 00000000000005dc scause: 000000000000000d
[ 0.003621] ---[ end trace 6da6143e95f213ce ]---
[ 8796.090329] Kernel panic - not syncing: Attempted to kill the idle task!
[ 8796.090672] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]---
Thanks! I should have run it to the end.
PR #14 solves part of this problem. However, the commit that seems to cause the next error seems to be c87251432897d665bf0767bbf45a8ce61b3a36e1 @ss2783. Here is what the log output looks like before the error. Note that the printk line diverges from what is expected.
@et-tommythorn and @abejgonzalez please check PR #15
Linux should be booting now. I picked the changes proposed in PR #14 as well to get this all working. Basically, I messed up two things (a) masks for clint reads/writes (b) enforcing dut marked pending interrupt checks to handle interrupts when actually executing in standalone mode. I added a flag to differentiate cosim vs. standalone mode.
It's still broken, starting with d8689621645be0270f324cdac3c5778f4628def3
.
I created a repo with a binary version of the kernel:
$ git clone git@github.com:chipsalliance/dromajo
$ git clone git@github.com:chipsalliance/dromajo-test
$ cd dromajo
$ git checkout v1.0
$ make -C src
$ src/dromajo ../dromajo-test/boot.cfg
OpenSBI v0.5 (Dec 13 2019 21:44:52)
____ _____ ____ _____
/ __ \ / ____| _ \_ _|
| | | |_ __ ___ _ __ | (___ | |_) || |
...
Welcome to Dromajo Buildroot
buildroot login:
This is what is expected. It hasn't worked for a while now.
We need a CI test based on this.
Fixed via 983be07b9894dc90370a92e3e17217baa710eb37
@abejgonzalez, this change
broke the Linux booting example in run.
Prior it booted the OpenSBI and kernel as expected, after the change we get