openhwgroup / cva6-sdk

CVA6 SDK containing RISC-V tools and Buildroot
60 stars 65 forks source link

Error while booting using OpenOCD #84

Closed jimaandro closed 1 year ago

jimaandro commented 1 year ago

I have load a linux image created with cva6-sdk to the Ariane. I used OpenOCD to load the image, then I tried to verify_image but I got `

verify_image uImage 0x80200000 Algorithm timed out after 200001 ms. ra = 0x0 sp = 0x0 gp = 0x0 tp = 0x0 t0 = 0x0 t1 = 0x0 t2 = 0x0 s0 = 0x0 s1 = 0x0 a0 = 0x80200000 a1 = 0x98b3bf a2 = 0x0 a3 = 0x0 a4 = 0x0 a5 = 0x0 a6 = 0x0 a7 = 0x0 s2 = 0x0 s3 = 0x0 s4 = 0x0 s5 = 0x0 s6 = 0x0 s7 = 0x0 s8 = 0x0 s9 = 0x0 s10 = 0x0 s11 = 0x0 t3 = 0x0 t4 = 0x0 t5 = 0x0 t6 = 0x0 pc = 0x80200040 mstatus = 0xa00001800 mepc = 0x80200040 mcause = 0xc error executing RISC-V CRC algorithm verified 8571710 bytes in 283.027466s (29.576 KiB/s)

Then I checked this address (0x80200040) and there was an invalid instruction 0x08088b1f. So why does sdk produce this?

eyssartk commented 1 year ago

The linux image uses virtual memory. Can you dump the 0x80200000 area and use objdump to see if there is some valid code there ? mcause = 0xc means Instruction page fault.

Regards

jimaandro commented 1 year ago

Thank you very much for the reply. Here is a part of the dump image in attached files. uImage.zip

Also, sometimes it shows mcause = 0x2 (Illegal instruction), but it always stops on 0x40