Hi all! I’ve been spending the last few nights getting seL4 to boot on my Raspberry Pi 3, and picking up the old threads on why a u-boot patch to disable dcache is needed:
This forum post is a progress report on what I’m doing, for the sake of sharing - I’m largely treating this as a fun learning exercise, but if the bug gets squashed too then so much the better.
So far I have added printf debugging statements to elfloader to understand more about the problem. (I also attempted adding a call to arm_disable_dcaches before the kernel was loaded. Also I’ve read lots of assembler and compared elfloader to u-boot code.) My results are intermittent:
- Most often, I have seen output stop somewhere during the call to leave_hyp() - this is a hang rather than a crash
- Occasionally I get “unknown instruction” with a dump of the registers, somewhere after “Enabling MMU and paging” but before the end of that function call - I think this happened more often after adding the call to arm_disable_dcaches.
- Very occasionally (once or twice) I actually got a successful boot (with various modifications made to elfloader)! But this did not work consistently, which is interesting, and makes me think that I still don’t understand what’s happening.
Having reproduced the problem, I’m working on improving my test-debug cycle time and getting more information: last night I got boot.scr working so that I didn’t have to type in boot commands, and disassembled the binary with objdump to help understand the crash info better. Debugging with gdb might be the next milestone.
Any advice welcome! I’ll post any progress updates here.