Booting L4Re on the CI20: Panic in sigma0

Paul Boddie paul at boddie.org.uk
Sun Jul 16 02:24:03 CEST 2017


On Saturday 15. July 2017 00.11.58 Paul Boddie wrote:
> 
> However, I'm not managing to actually see the example start. I get the
> following output:
> 
> MOE: Hello world
> MOE: found 245048 KByte free memory
> MOE: found RAM from 1000 to 10000000
> MOE: allocated 255 KByte for the page array @0x104d000
> MOE: virtual user address space [0-7fffffff]
> MOE: rom name space cap -> [C:103000]
>   BOOTFS: [1100000-1131e5c] [C:105000] l4re
>   BOOTFS: [1132000-1164b08] [C:107000] hello
> MOE: cmdline: moe --init=rom/hello
> MOE: Starting: rom/hello
> MOE: loading 'rom/hello'
> 
> Despite inserting a trace statement into the Moe main program after the
> elf_loader.start invocations, I don't see anything else appear. So I guess
> something else manages to go wrong at this point. I suppose I'll have to
> try and track this down.

So, some more slow but steady progress here.

I decided to see where the code was failing by inserting trace statements and 
looking at the output. The failure path involved the elf_loader.start 
invocation, through the loader machinery...

Loader::start
Loader::exec
Elf_loader::launch
Loader<App_model_, Dbg_>::launch
Elf_loader::load

...invoking the Moe_app_model (init_prog and copy_ds), ultimately calling 
Dataspace_util::copy and l4_cache_coherent.

Naturally, l4_cache_coherent on MIPS employs the rdhwr (read hardware 
register) instruction that Sarah mentioned, and although there is code to 
handle this instruction when accessing the ULR (User Local Register), there 
isn't code to handle access to the SYNCI_Step register which describes the 
instruction cache line size. As noted previously, the code for "reserved" 
instruction handling is here:

kernel/fiasco/src/kern/mips/exception.S

So, I've made an attempt to implement this support in the reserved_insn 
handler, accessing the appropriate Config register and reading the value, 
setting it in the target register. The existing code wasn't too difficult to 
follow, and I hope I haven't broken anything by changing it.

Now, it appears that Moe does complete the loading of "hello", but I still 
don't see any output from the example. Switching on all debugging gives the 
following output from Moe:

MOE: loading 'rom/hello'
MOE[ldr]:  done...
MOE: dump of root name space:
  icu -> [C:6000] f=2309
  jdb -> [C:a000] f=2317
  log -> [C:5000] f=2309
  mem -> [C:10d000] o=108edc0 f=2829
  rom -> [C:103000] o=108dfe0 f=2816
    .dirinfo -> [C:109000] o=108ee80 f=2816
    hello -> [C:107000] o=108ef00 f=2816
    l4re -> [C:105000] o=108ef80 f=2816
  sigma0 -> [C:4000] f=2317

But with the --l4re-dbg option set to "all", after this output...

L4Re: load binary 'rom/hello'
L4Re: Start server loop

...I notice this continuously recurring message:

L4Re[svr]: request: tag=0xfffb1026 proto=-5 obj=0x0

So I imagine now that I will need to investigate what this is all about.

Paul




More information about the l4-hackers mailing list