[okl4-developer] okl4 faults on arm1136

Ashish Bijlani ashish.bijlani at gmail.com
Wed Jul 23 18:40:14 EST 2008


Yes, the return from exception instruction causes a fault. It sends
mode=0x00 instead of mode=0x10. I verified the root task exception
frame, everything seems to be fine. Am I missing something else?

Below if the root task exception frame

r0             0x0	0
r1             0x0	0
r2             0x0	0
r3             0x0	0
r4             0x0	0
r5             0x0	0
r6             0x0	0
r7             0x0	0
r8             0x0	0
r9             0x0	0
r10            0x0	0
r11            0x0	0
r12            0x0	0
sp             0xf0030094

mem(0xf0030094) = pc = 0x100000
mem(0xf0030098) = cpsr = 0x10

-Ashish


On Tue, Jul 22, 2008 at 11:46 PM, Geoffrey Lee <glee at ok-labs.com> wrote:
> On Tue, Jul 22, 2008 at 11:30:47PM -0500, Ashish Bijlani wrote:
>> I saw the stack setup in crt0.spp under arch/arm/libs/c/crt. However,
>> the control doesn't go to "_start" of rootserver. The system faults as
>> soon as last instruction in "initial_to_user" is executed. This means
>> arch.context in the tcb of roottask is not being setup correctly.
>> "arch.context" is what is loaded in "sp" in the function
>> "initial_to_user". Does this make sense? What could possibly be wrong
>> here?
>
>
> In our previous communication I understood you had a problem with the
> roottask stack pointer, however this seems to not be the case.  When returning
> to user, the sp should be set to point to the saved exception frame of the
> thread that is located in the kernel tcb (the arch.context).  Which
> instruction is it that is faulting, exactly?  Is it the rfeia
> instruction?  In this case it may be good to just before calling the
> initial_to_user print out the values in the exception frame, you
> can do that in the kdb.
>
>
>>
>> The rootserver mappings are fine I suppose.
>>
>> Debug: Setting up rootserver mappings: V:3000 P:8012a000 S:1000 (0)
>> Debug: Setting up rootserver mappings: V:100000 P:801a0000 S:39984 (1)
>> Debug: Setting up rootserver mappings: V:142000 P:80602000 S:3e02c (2)
>> Debug: Setting up rootserver mappings: V:2000 P:80123000 S:1000 (3)
>> Debug: Setting up rootserver mappings: V:200000 P:80700000 S:100000 (4)
>>
>> -Ashish
>
>>
>



More information about the Developer mailing list