[okl4-developer] how to resolve page_fault
Sean Chiang
n2i911 at gmail.com
Wed Jan 21 02:16:12 EST 2009
Hi list,
I tried to find out what happened to the booting of okl4 at gta02(Free
Runner).
The problem I met is no more respond after the msg "OKL4 - (provider: Open
Kernel ..." is displayed.
The build cmd I use is:
./tools/build.py machine=gta02 project=examples pyfreeze=false example=hello
\
pistachio.TOOLCHAIN=gnu_arm_toolchain
For more verbose debug msgs, I added CONFIG_VERBOSE_INIT and
CONFIG_KDB_ON_STARTUP to machines.py, see the attached file.
The other attached file okl4.log is the complete log, including booting and
how I find out
the problem through KDB.
The reason why I got no respond is because of PAGE_FAULT when switching from
idle
thread to _hello_ thread.
We could see the instruction address(pc) when page fault happened is
_0x001056a0_
from okl4.log.
00105640 <hello-device_setup_impl>:
...
105690: e284400c add r4, r4, #12 ; 0xc
105694: daffffef ble 105658 <hello-device_setup_impl+0x18>
105698: e5952068 ldr r2, [r5, #104]
10569c: e59fe160 ldr lr, [pc, #352] ; 105804
<hello.text+0x5804>
1056a0: e5923000 ldr r3, [r2]
According the asm code,
r2 = memory(r5+#104) = memory(0x200d98+#104) = memory(0x200e00) = 0x0
r3 = memory(r2) = memory(0x0)
When I dump the memory (0x0), it show ######## always, I thought that's why
page_fault. I'll keep trying and any idea/hint how to resolve this problem
is very
appreciated. ;)
Captured from okl4.log:
> go
DABT @ 00000000 [00000000], pc = 001056a0, tcb = f0103d20, fs = 5
--- KD# ARM_DATA_ABORT ---
> frame
== Stack frame: f0023f58 ==
cpsr = 200000d3, pc = f0010a78, sp = f0023f58, lr = f0010a78
r0 = f001a944, r1 = f9000000, r2 = 85, r3 = ffffffff, r4 =
0
r5 = 5, r6 = f00243d0, r7 = 200df8, r8 = f0103d70, r9 =
1075b4
r10 = f0103d20, r11 = 5, r12 = 0
> dumpframe
tcb/tid/addr [current]: current
== Stack frame: f0103d70 ==
cpsr = 20000010, pc = 1056a0, sp = 1108a8, lr = 10f79c
r0 = 200d98, r1 = 0, r2 = 0, r3 = 105c2c, r4 =
10f83c
r5 = 200d98, r6 = 8, r7 = 200df8, r8 = 0, r9 =
1075b4
r10 = ffffffff, r11 = 10f6b8, r12 = 200db0
> go
PF @ 00000000 [00000000], pc = 001056a0, tcb = f0103d20, fs = 5
--- KD# ARM_PAGE_FAULT ---
> go
user read pagefault by f0103d20 at 00000000, ip=001056a0, ksp=f0023f80
--- KD# PAGEFAULT_USER ---
> go
DABT @ 00000000 [00000000], pc = 001056a0, tcb = f0103d20, fs = 5
--- KD# ARM_DATA_ABORT ---
> go
PF @ 00000000 [00000000], pc = 001056a0, tcb = f0103d20, fs = 5
--- KD# ARM_PAGE_FAULT ---
> memdump
Dump address [0x200000]: 0x200e00
00200e00 00000000 00000000 00000000 00000000 ........ ........
00200e10 00000000 00000000 00000000 00000000 ........ ........
00200e20 00000000 00000000 00000000 00000000 ........ ........
00200e30 00000000 00000000 00000000 00000000 ........ ........
00200e40 00000000 00000000 00000000 00000000 ........ ........
00200e50 00000000 00000000 00000000 00000000 ........ ........
00200e60 00000000 00000000 00000000 00000000 ........ ........
00200e70 00000000 00000000 00000000 00000000 ........ ........
00200e80 00000000 00000000 00000000 00000000 ........ ........
00200e90 00000000 00000000 00000000 00000000 ........ ........
00200ea0 00000000 00000000 00000000 00000000 ........ ........
00200eb0 00000000 00000000 00000000 00000000 ........ ........
00200ec0 00000000 00000000 00000000 00000000 ........ ........
00200ed0 00000000 00000000 00000000 00000000 ........ ........
00200ee0 00000000 00000000 00000000 00000000 ........ ........
00200ef0 00000000 00000000 00000000 00000000 ........ ........
Continue? (Continue/Quit) [continue]: quit
> dumpframe
tcb/tid/addr [current]: current
== Stack frame: f0103d70 ==
cpsr = 20000010, pc = 1056a0, sp = 1108a8, lr = 10f79c
r0 = 200d98, r1 = 0, r2 = 0, r3 = 105c2c, r4 =
10f83c
r5 = 200d98, r6 = 8, r7 = 200df8, r8 = 0, r9 =
1075b4
r10 = ffffffff, r11 = 10f6b8, r12 = 200db0
> memdump
Dump address [0x200e00]: 0x00000000
00000000 ######## ######## ######## ######## ######## ########
00000010 ######## ######## ######## ######## ######## ########
00000020 ######## ######## ######## ######## ######## ########
00000030 ######## ######## ######## ######## ######## ########
00000040 ######## ######## ######## ######## ######## ########
00000050 ######## ######## ######## ######## ######## ########
00000060 ######## ######## ######## ######## ######## ########
00000070 ######## ######## ######## ######## ######## ########
00000080 ######## ######## ######## ######## ######## ########
00000090 ######## ######## ######## ######## ######## ########
000000a0 ######## ######## ######## ######## ######## ########
000000b0 ######## ######## ######## ######## ######## ########
000000c0 ######## ######## ######## ######## ######## ########
000000d0 ######## ######## ######## ######## ######## ########
000000e0 ######## ######## ######## ######## ######## ########
000000f0 ######## ######## ######## ######## ######## ########
Continue? (Continue/Quit) [continue]: continue
00000100 ######## ######## ######## ######## ######## ########
00000110 ######## ######## ######## ######## ######## ########
00000120 ######## ######## ######## ######## ######## ########
00000130 ######## ######## ######## ######## ######## ########
00000140 ######## ######## ######## ######## ######## ########
00000150 ######## ######## ######## ######## ######## ########
00000160 ######## ######## ######## ######## ######## ########
00000170 ######## ######## ######## ######## ######## ########
00000180 ######## ######## ######## ######## ######## ########
00000190 ######## ######## ######## ######## ######## ########
000001a0 ######## ######## ######## ######## ######## ########
000001b0 ######## ######## ######## ######## ######## ########
000001c0 ######## ######## ######## ######## ######## ########
000001d0 ######## ######## ######## ######## ######## ########
000001e0 ######## ######## ######## ######## ######## ########
000001f0 ######## ######## ######## ######## ######## ########
Continue? (Continue/Quit) [continue]: quit
>
Thanks,
-Sean Chiang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.okl4.org/pipermail/developer/attachments/20090120/2db8bd51/attachment-0001.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: machines.py
Type: text/x-python
Size: 6325 bytes
Desc: not available
Url : http://lists.okl4.org/pipermail/developer/attachments/20090120/2db8bd51/attachment-0001.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: okl4.log
Type: text/x-log
Size: 79615 bytes
Desc: not available
Url : http://lists.okl4.org/pipermail/developer/attachments/20090120/2db8bd51/attachment-0001.bin
More information about the Developer
mailing list