<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.E-MailFormatvorlage17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.E-MailFormatvorlage18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#002060;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=DE link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='color:#002060'>Hello<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#002060'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='color:#002060'>Well, it came out
that the page fault results from not having a ‘</span><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>device_core = “...”</span><span
lang=EN-US style='color:#002060'>’ in the platform definition class in <i>platform/<name>/tools.machines.py</i>.
Although this definition seems to be obsolete, its absence has a nasty side
effect in <i>project/iguana/SConstruct</i>:<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='color:#002060'>The statement ‘</span><span
lang=EN-US style='font-size:9.0pt;font-family:"Courier New";color:black'>if
ig_env.feature_profile == "EXTRA" and ig_env.machine.device_core is
not None:</span><span lang=EN-US style='color:#002060'>’ in line 325
prevents the inclusion of any v2 drivers in the build. Apparently this also
leads to the described problem in the BOOTINFO table of the build. After adding
the </span><span lang=EN-US style='font-size:9.0pt;font-family:"Courier New"'>device_core</span><span
lang=EN-US style='color:#002060'> statement the page fault during BOOTINFO
processinf vanishes. The trace shows that the pool naming is now correct:<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New";color:black'>iguana/server/src/bootinfo.c:387
init: pd_array: 0x9002e870, items = 1<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New";color:black'>iguana/server/src/bootinfo.c:389
init: ms_array: 0x9002e830, items = 7<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New";color:black'>iguana/server/src/bootinfo.c:391
init: thread_array: 0x9002e780, items = 1<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New";color:black'>iguana/server/src/bootinfo.c:393
init: cap_array: 0x9002e678, items = 21<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New";color:black'>iguana/server/src/bootinfo.c:395
init: pool_array: 0x9002e648, items = 3<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New";color:black'>iguana/server/src/bootinfo.c:397
init: zone_array: (nil), items = 0<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New";color:black'>iguana/server/src/bootinfo.c:399
init: obj_array: 0x9002e5b8, items = 34<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New";color:black'>Second pass:
Processing operation.<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New";color:black'>current is:
0x90015000<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New";color:black'>current is:
0x90015020<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New";color:black'>iguana/server/src/bootinfo.c:442
init_mem2: <--- Created Virtual Pool 1 (0x9002ea18)<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New";color:black'>iguana/server/src/bootinfo.c:450
init_mem2: <--- Created Physical Pool 2 (0x9002e958)<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New";color:black'>iguana/server/src/bootinfo.c:458
init_mem2: <--- Created Direct Pool 3 (0x9002e898)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='color:#002060'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='color:#002060'>Regards<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='color:#002060'>Frank<o:p></o:p></span></p>
<div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
developer-bounces@okl4.org [mailto:developer-bounces@okl4.org] <b>On Behalf Of </b>Frank
Kaiser<br>
<b>Sent:</b> Monday, August 18, 2008 7:07 PM<br>
<b>To:</b> support.opensynergy@portal.ok-labs.com<br>
<b>Cc:</b> developer@okl4.org<br>
<b>Subject:</b> [okl4-developer] OKL4 v2.1: Page fault during BOOTINFO
processing<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Hello<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span lang=EN-US>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:<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'> v2_drivers
= [<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>
]<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'> memory =
arm920t.memory.copy()<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'> base_vaddr
= 0x90000000<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>
memory['virtual'] = [Region(0x90000000L, 0xE0000000L)]<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>
memory['physical'] = [Region(0x20000000L, 0x22000000L)]<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>I don’t think that this should cause
any problem.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>The page fault occurs during processing od
the bootinfo section (I added aome trace information):<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>iguana/server/src/main.c:120
main: Processing Boot Info: 0x90012000<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>First pass: Calculating sizes
and initialising memory.<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>HEADER: stack_base:
0x90011000 stack_end: 0x90011fff, heap_base: 0x90020000, heap_end: 0x9002ffff<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>MEM_INIT (virt_base:
0x90030000, virt_end: 0xdfffffff, phys_base: 0x20500000, phys_end: 0x21ffffff)<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>vbase is 0x90030000, vend is
0xdfffffff<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>addr is 0x90030000, vbase is
0x90030000<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>iguana/server/src/bootinfo.c:387
init: pd_array: (nil), items = 0<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>iguana/server/src/bootinfo.c:389
init: ms_array: 0x9002e888, items = 1<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>iguana/server/src/bootinfo.c:391
init: thread_array: (nil), items = 0<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>iguana/server/src/bootinfo.c:393
init: cap_array: 0x9002e820, items = 8<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>iguana/server/src/bootinfo.c:395
init: pool_array: 0x9002e7f0, items = 3<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>iguana/server/src/bootinfo.c:397
init: zone_array: (nil), items = 0<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>iguana/server/src/bootinfo.c:399
init: obj_array: 0x9002e7b0, items = 13<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>iguana/server/src/bootinfo.c:405
init: Could not allocate memory for bootinfo buffers.<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>Second pass: Processing
operation.<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>current is: 0x90012000<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>current is: 0x90012020<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>iguana/server/src/bootinfo.c:442
init_mem2: <--- Created Virtual Pool 0 (0x9002ea18)<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>iguana/server/src/bootinfo.c:450
init_mem2: <--- Created Physical Pool 1 (0x9002e958)<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>iguana/server/src/bootinfo.c:458
init_mem2: <--- Created Direct Pool 2 (0x9002e898)<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>current is: 0x90012034<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>ADD VIRT MEM (pool: 0x1,
base: 0x90018000, end: 0x9001ffff)<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>roottask read pagefault at
00000008, ip=900012d0 - deny<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>The content of the first part of the bootinfo
section is:<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>90012000 00010020
1960021d 00000008 00000000 .....`. ........<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>90012010 90011000
90011fff 90020000 9002ffff ....ÿ... ....ÿÿ..<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>90012020 00110014
90030000 dfffffff 20500000 ........ ÿÿÿ...P<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>90012030 21ffffff
00050010 00000001 90018000 ÿÿÿ!.... ........<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>90012040 9001ffff
00060010 00000002 200b0000 ÿÿ...... .......<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>90012050 200fffff
00050010 00000003 20000000 ÿÿ. .... .......<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>90012060 21ffffff
00050010 00000001 90013000 ÿÿÿ!.... .....0..<o:p></o:p></span></p>
<p class=MsoNormal style='margin-left:35.4pt'><span lang=EN-US
style='font-size:9.0pt;font-family:"Courier New"'>90012070 90016fff
00060010 00000002 20098000 ÿo...... ....... <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>The page fault occurs when processing the
record at address </span><span lang=EN-US style='font-size:9.0pt;font-family:
"Courier New"'>0x90012034</span><span lang=EN-US>, whose opcode is <b>BI_OP_ADD_VIRT_MEM</b>.
The associated pool is #1 which, however, is of type <b>physical</b>. The
outcome is that function <b>get_pool()</b> of file <i>iguna/server/src/bootinfo.c</i>
returns a NULL pointer which leads to an access of an invalid address.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Apparently there is an inconsistency
between what function <b>init_mem2()</b> 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.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Regards<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US>Frank<o:p></o:p></span></p>
</div>
</div>
</body>
</html>