[okl4-developer] OKL4 v2.1: Page fault during BOOTINFO processing
Frank Kaiser
frank.kaiser at opensynergy.com
Tue Aug 19 03:06:54 EST 2008
Hello
I am trying to get OKL4 running on an AT91RM9200 platform which is quite similar to the AT91SAM9263 (some peripherals differ, and the ARM core is an ARM920T). The first step is a minimum system with PISTACHIO and IGUANA w/o any drivers. Since some default parameters of the machine 'arm920t' look odd, I overwrote them in my machine definition:
v2_drivers = [
]
memory = arm920t.memory.copy()
base_vaddr = 0x90000000
memory['virtual'] = [Region(0x90000000L, 0xE0000000L)]
memory['physical'] = [Region(0x20000000L, 0x22000000L)]
I don't think that this should cause any problem.
The page fault occurs during processing od the bootinfo section (I added aome trace information):
iguana/server/src/main.c:120 main: Processing Boot Info: 0x90012000
First pass: Calculating sizes and initialising memory.
HEADER: stack_base: 0x90011000 stack_end: 0x90011fff, heap_base: 0x90020000, heap_end: 0x9002ffff
MEM_INIT (virt_base: 0x90030000, virt_end: 0xdfffffff, phys_base: 0x20500000, phys_end: 0x21ffffff)
vbase is 0x90030000, vend is 0xdfffffff
addr is 0x90030000, vbase is 0x90030000
iguana/server/src/bootinfo.c:387 init: pd_array: (nil), items = 0
iguana/server/src/bootinfo.c:389 init: ms_array: 0x9002e888, items = 1
iguana/server/src/bootinfo.c:391 init: thread_array: (nil), items = 0
iguana/server/src/bootinfo.c:393 init: cap_array: 0x9002e820, items = 8
iguana/server/src/bootinfo.c:395 init: pool_array: 0x9002e7f0, items = 3
iguana/server/src/bootinfo.c:397 init: zone_array: (nil), items = 0
iguana/server/src/bootinfo.c:399 init: obj_array: 0x9002e7b0, items = 13
iguana/server/src/bootinfo.c:405 init: Could not allocate memory for bootinfo buffers.
Second pass: Processing operation.
current is: 0x90012000
current is: 0x90012020
iguana/server/src/bootinfo.c:442 init_mem2: <--- Created Virtual Pool 0 (0x9002ea18)
iguana/server/src/bootinfo.c:450 init_mem2: <--- Created Physical Pool 1 (0x9002e958)
iguana/server/src/bootinfo.c:458 init_mem2: <--- Created Direct Pool 2 (0x9002e898)
current is: 0x90012034
ADD VIRT MEM (pool: 0x1, base: 0x90018000, end: 0x9001ffff)
roottask read pagefault at 00000008, ip=900012d0 - deny
The content of the first part of the bootinfo section is:
90012000 00010020 1960021d 00000008 00000000 .....`. ........
90012010 90011000 90011fff 90020000 9002ffff ....ÿ... ....ÿÿ..
90012020 00110014 90030000 dfffffff 20500000 ........ ÿÿÿ...P
90012030 21ffffff 00050010 00000001 90018000 ÿÿÿ!.... ........
90012040 9001ffff 00060010 00000002 200b0000 ÿÿ...... .......
90012050 200fffff 00050010 00000003 20000000 ÿÿ. .... .......
90012060 21ffffff 00050010 00000001 90013000 ÿÿÿ!.... .....0..
90012070 90016fff 00060010 00000002 20098000 ÿo...... .......
The page fault occurs when processing the record at address 0x90012034, whose opcode is BI_OP_ADD_VIRT_MEM. The associated pool is #1 which, however, is of type physical. The outcome is that function get_pool() of file iguna/server/src/bootinfo.c returns a NULL pointer which leads to an access of an invalid address.
Apparently there is an inconsistency between what function init_mem2() does and what ELFWEAVER has written into the bootinfo section, and I wonder why this is the case. Any hints how to get rid of the problem are welcome.
Regards
Frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.okl4.org/pipermail/developer/attachments/20080818/7ba0bb31/attachment.htm
More information about the Developer
mailing list