Re: Booting L4Re on the CI20: Panic in sigma0

Sarah Hoffmann <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <[email protected]>
Hi Paul,

> 
> pkg/l4re-core/sigma0/server/src/ARCH-mips/crt0.S
> 
> This is what it looks like:
> 
> __start:
>         .cpload $25 /* load GP */
>         SETUP_GPX64($25, $0)
>         PTR_LA  $29, crt0_stack_high
>         PTR_LA  $25, init
>         PTR_SUBU  $29, (NARGSAVE * SZREG)
>         jalr $25
>           nop
> 
> The problem here is that the .cpload directive (operating on t9/$25) doesn't 
> have a known value of t9 to work with, it would seem. Consequently, the 
> calculations in the generated code work with a value that isn't initialised.

This suspiciously looks like a compiler issue. I would .cpload expect to
translate to a nop on mips32r2 without PIC. We generally use the
compilers provided by Imagination(*). The Debian GCC might do things
slightly differently, I need to check that again. Making the code work
with the official GCC is on our list, although not very high at the
moment. If you can switch to the Imgtec GCC for the moment, this might
save you some headache.

(*)
http://community.imgtec.com/developers/mips/tools/codescape-mips-sdk/download-codescape-mips-sdk-essentials/

> And that is then the end of output. Maybe I've stumbled across a difference in 
> the way the compilers work here. I'm using the mipsel-linux-gnu cross-
> compilers in Debian unstable, whereas I imagine that the people who ported the 
> code to MIPS used proprietary toolchains with different characteristics.
> 
> Anyway, I guess I'll investigate other places where this might be occurring 
> and hopefully get the "hello" program to do its thing.

It won't be that easy I'm afraid. Last time we tried the board, we found
that the CI20 has a crippled instruction set. In particular, it does not
support the rdhwr instruction which L4Re user programs use to clean
caches. The easiest way to work around this issue by emulating the
instruction in Fiasco. There is already some code for catching rdhwr.
Look for "ENTRY reserved_insn" in src/kern/mips/exception.S. Somebody
'just' needs to add support for reading the cache configuration values.

Kind regards

Sarah

-- 
Sarah Hoffmann, [email protected]

Kernkonzept GmbH, Dresden, Germany
https://kernkonzept.com/

_______________________________________________
l4-hackers mailing list
[email protected]
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEbYz+yhGVTkr5Im//6IPjpR2icDkFAllo5aMACgkQ6IPjpR2i
cDm1Sw/9HjEIseDLqW7cz9U+ylkqAlvvIk1qYEQJOl7zkDJXB2L1vTskHAUQt0xn
UVq+RPrG/Kb3yYzrKHZ2H4YYynZzbJneI6OAfaPDCU/R2DiaZAB5t3icCyG8/qT3
atau215HJkpT/K/NCY7tbXSo7CoBuj0hNP0kUyUu06GsKdUPHvZiVQWGsFquEOMl
zBfs+ahQDTS2N5gLy90++KK3vi2FUw0tD6JkAjZEeXSNXq8pNrKniXGmsAvBnGOn
Ul4i0Nf/3/1VcgcVIg7jfTVYAjOA6nbV7SbQDVUkVIMy5DC1GWprLL8Sxj2hX2LZ
8pRFwGY/N0t4VLAVNmQuDxeG4Tuyjd0DExE3cwZAN340e6OHYV9mRmuKvxSy+Jc1
VC3U4AviylxqxIKzCV7RwTZdwKfLBgmhC96xk6zmsFJU8qQnZyeW6Atkytwfw2zA
1pBIhx7d6J/POWBu6RBodwf+mUlPi66gy8R/JNpkuJZ1SAIpqz7OEPNd022NrHg8
jboVZ0DT9NQh8P6f9ZsHfSzg5VgWlqXZen7AZcECSQTnp0lwPRlZfE1Th1qqNpcS
AzFUhULVkNUqWssXBZr3qPtn1prABghmLpDmXNfDLNBBrDcDrjzlNuMdq951BIC4
sFLklw8hb3Qfp6ac81lBHmGON+XAhK7XcuIln9XhzParcqprFlw=
=IiDn
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.