bringup on RK3399
Michael Grunditz
michael.grunditz at gmail.com
Tue Nov 10 14:59:42 CET 2020
On Tue, 10 Nov 2020 at 13:24, Stefan Kalkowski
<stefan.kalkowski at genode-labs.com> wrote:
>
> Hi,
>
> On Tue, Nov 10, 2020 at 12:21:50PM +0000, Michael Grunditz wrote:
> > On Tue, 10 Nov 2020 at 10:40, Stefan Kalkowski
> > <stefan.kalkowski at genode-labs.com> wrote:
> > >
> > > Hi Michael,
> > >
> > > I just answered to you in the IRC channel. I could imagine that access
> > > to the GIC is the actual problem, because this is done in _arch_init()
> > > inside of the Cpu constructor.
> > >
> > > Can you confirm, that you can proceed at least behind the Cpu
> > > construction if you uncomment the line:
> > >
> > > repos/base-hw/src/core/spec/arm_v8/kernel/cpu.cc:20
> > >
> > > or not?
> >
> > Not.. I have checked all related constructors , and non seems to get
> > called. I somewhat suspect cpu constructor isn't called.
>
> To be really sure, that the constructor does not even get called, you
> might derive the Kernel::Cpu class from a Dummy class that prints
> something in its contructor. Of course, it should be the first class
> the Cpu class inherits from.
>
> If the (hardware-)exception is really not caused inside the
> constructor, but before the constructor call, then you would be right
> and it has to do with the actual memory access for the object
> creation.
> The Cpu objects are constructed using the Genode::Constructible class,
> which contains a static char array as placeholder for the object
> memory. That means it is actually no dynamically allocated memory but
> already part of core's ELF sections. Therefore, it might be useful to
> investigate the linking address you are using for the whole image, and
> maybe to change that.
> Another reason might be some alignment constraints? To be really sure,
> what is going on, you could temporarily change the exception vector in
> file 'repos/base-hw/src/core/spec/arm_v8/exception_vector.s' at the
> very beginning to, e.g.:
>
> .section .text.crt0
>
> .rept 16
> mrs x0, elr_el1
> mrs x1, spsr_el1
> adr x2, .
> and x2, x2, #0xf80
> bl kernel
> .balign 128
> .endr
>
> And change the function kernel() to something like:
>
> extern "C" void kernel(void * ip, void * spsr, void * off, void * esr_el1)
> {
> Genode::raw("ip=", ip, " spsr=", spsr, " exc_off=", off, " esr_el1=", esr_el1);
> }
>
> Then the outcome of the first printing would be quite interesting to know.
>
> Regards
> Stefan
>
Kernel: ip=0xffffffc00008ed60 spsr=0x600003c5 exc_off=0x200
esr_el1=0xffffffe02ff22000
Going to look up that esr.
More information about the users
mailing list