Adaptation/GUID-16423056-C435-5C4D-BE3D-4A15F95F7F68.dita
changeset 15 307f4279f433
equal deleted inserted replaced
14:578be2adaf3e 15:307f4279f433
       
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE task
       
    11   PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
       
    12 <task id="GUID-16423056-C435-5C4D-BE3D-4A15F95F7F68" xml:lang="en"><title>Configuration
       
    13 Tutorial </title><shortdesc>Describes the steps required in producing a ROM that will work
       
    14 with Writable Data Paging (WDP). </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
       
    15 <context id="GUID-77EC86D2-A74E-574C-868E-4304668A3863"><p>Writable Data Paging
       
    16 (WDP) allows allocated memory that is to be written e.g. stacks and heaps
       
    17 to be paged in and out of the RAM pool. </p> </context>
       
    18 <steps id="GUID-F19DB5BA-CC38-5C2D-A337-12F4EB85F9E3">
       
    19 <step id="GUID-DE8E7A0E-DB35-58B5-A5AA-85A2BFC7301C"><cmd/>
       
    20 <info>It is recommended to enable WDP kerneltrace warnings if the build is
       
    21 being migrated to a data paged system. </info>
       
    22 <info>This is done by setting trace bit number 60 of the kernel trace flags. </info>
       
    23 <info>The UDEB version of the build has to be used in order for tracing messages
       
    24 to be available. </info>
       
    25 <info>Once the demand paging build is stable, then the REL version of the
       
    26 build can be used. </info>
       
    27 </step>
       
    28 <step id="GUID-D5F19B3A-3520-576A-8D59-7E1BF29AB97B"><cmd/>
       
    29 <info>Set the paging policy for pages of the core ROM image. This is done
       
    30 by using the datapagingpolicy and pagingpolicy keywords in the 'ROM_IMAGE[0]
       
    31 {}' block. </info>
       
    32 </step>
       
    33 <step id="GUID-C1DF8A12-8CB4-5E71-8247-7B8F29EE66D5"><cmd/>
       
    34 <info>Next, the data paging for ROFS images is enabled by using datapagingoverride
       
    35 and pagingoverride keywords for each ROFS partition that contains executables
       
    36 that should use data paging. This is done by adding the keywords into each
       
    37 relevant 'ROM_IMAGE[&lt;partion&gt;] {}' block. </info>
       
    38 </step>
       
    39 <step id="GUID-A13FBB84-3885-5A49-9BA9-698F65CBF1BF"><cmd/>
       
    40 <info>In order for a ROM to support data paging, it has to have a media driver
       
    41 that supports data paging. </info>
       
    42 </step>
       
    43 </steps>
       
    44 <result id="GUID-9565A808-C86C-57CF-931E-2684A382D5E2"><p>The output of this
       
    45 tutorial will be a configuration that allows the ROM build to use demand paging. </p> <p> <note> This
       
    46 tutorial only describes how to configure the general paging behaviour.</note> </p> </result>
       
    47 <example id="GUID-9A892A74-0823-57D7-A146-BC8E14508B99"><title>Example OBY
       
    48 configuration file</title> <p>Below is a typical OBY file that uses data paging,
       
    49 XIP ROM and code paging: </p> <codeblock id="GUID-1A753A2E-3846-51BC-AF30-06A53785589C" xml:space="preserve">// MyDPConfig.oby 
       
    50 // 
       
    51 // The section below is used to specify if XIP ROM paging is to be implemented.
       
    52 #if !defined PAGED_ROM 
       
    53 #define PAGED_ROM 
       
    54 #endif 
       
    55 
       
    56 // The section below is used when code paging is to be implemented.
       
    57 #if !defined USE_CODE_PAGING 
       
    58 // Comment out the next line if code paging is wanted 
       
    59 #define USE_CODE_PAGING 
       
    60 #endif
       
    61  
       
    62 #if !defined CODE_PAGING_FROM_ROFS 
       
    63 // Comment out the next line if code paging from primary rofs is wanted 
       
    64 #define CODE_PAGING_FROM_ROFS 
       
    65 #endif 
       
    66 
       
    67 // The section below is used to configure the RAM pages for writable data paging.
       
    68 ROM_IMAGE[0] { 
       
    69 pagedrom 
       
    70 compress 
       
    71 //                 Min   Max   Young/Old 
       
    72 //                 Live  Live  Page 
       
    73 //                 Pages Pages Ratio 
       
    74 demandpagingconfig 256         512            3 
       
    75 pagingoverride defaultpaged 
       
    76 
       
    77 // The section below specifies if the default paging policy is to used.
       
    78 #if defined USE_CODE_PAGING &amp;&amp; !defined USE_DATA_PAGING 
       
    79 codepagingpolicy defaultpaged 
       
    80 #endif
       
    81  
       
    82 #if defined USE_DATA_PAGING 
       
    83 #if defined USE_CODE_PAGING 
       
    84 codepagingpolicy defaultpaged 
       
    85 #endif
       
    86  
       
    87 datapagingpolicy defaultpaged 
       
    88 #endif 
       
    89 }
       
    90 
       
    91 #if defined CODE_PAGING_FROM_ROFS || defined USE_DATA_PAGING 
       
    92 ROM_IMAGE[1] { 
       
    93 pagingoverride defaultpaged 
       
    94 }
       
    95 #endif 
       
    96 </codeblock> <p>The OBY file that determined the start of the primary ROFS
       
    97 partition, for example base.iby, would then be adjusted thus: </p> <codeblock id="GUID-7C438B69-DEB8-5598-A338-9707FA23F758" xml:space="preserve">
       
    98 #if defined(_NAND) || defined(_NAND2) 
       
    99 #if !defined PAGED_ROM || defined CODE_PAGING_FROM_ROFS || defined USE_DATA_PAGING 
       
   100 REM Start of ROFS image 
       
   101 ROM_IMAGE[1] { 
       
   102 #endif 
       
   103 #endif </codeblock> <p> <note> Make sure to include media drivers that can
       
   104 support writable data paging.</note>  </p> </example>
       
   105 <postreq id="GUID-DFC44549-2B7B-5D4F-9686-7E7BEA7E430A"><p>This tutorial only
       
   106 covers the configuration of the general demand paging parameters. To see how
       
   107 to make individual executables pageable see (<xref href="GUID-16423056-C435-5C4D-BE3D-4A15F95F7F68.dita#GUID-16423056-C435-5C4D-BE3D-4A15F95F7F68/GUID-9A892A74-0823-57D7-A146-BC8E14508B99">the
       
   108 mmp configuration tutorial</xref>). </p> <p>The next step is to <xref href="GUID-6B9041F7-79A6-5CCA-9B4D-B8EF377FD378.dita">build
       
   109 the writable data paging ROM</xref>  </p> </postreq>
       
   110 </taskbody><related-links>
       
   111 <link href="GUID-6B9041F7-79A6-5CCA-9B4D-B8EF377FD378.dita"><linktext>Building
       
   112 ROM tutorial</linktext></link>
       
   113 </related-links></task>