diff -r 578be2adaf3e -r 307f4279f433 Adaptation/GUID-16423056-C435-5C4D-BE3D-4A15F95F7F68.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Adaptation/GUID-16423056-C435-5C4D-BE3D-4A15F95F7F68.dita Fri Oct 15 14:32:18 2010 +0100 @@ -0,0 +1,113 @@ + + + + + +Configuration +Tutorial Describes the steps required in producing a ROM that will work +with Writable Data Paging (WDP). +

Writable Data Paging +(WDP) allows allocated memory that is to be written e.g. stacks and heaps +to be paged in and out of the RAM pool.

+ + +It is recommended to enable WDP kerneltrace warnings if the build is +being migrated to a data paged system. +This is done by setting trace bit number 60 of the kernel trace flags. +The UDEB version of the build has to be used in order for tracing messages +to be available. +Once the demand paging build is stable, then the REL version of the +build can be used. + + +Set the paging policy for pages of the core ROM image. This is done +by using the datapagingpolicy and pagingpolicy keywords in the 'ROM_IMAGE[0] +{}' block. + + +Next, the data paging for ROFS images is enabled by using datapagingoverride +and pagingoverride keywords for each ROFS partition that contains executables +that should use data paging. This is done by adding the keywords into each +relevant 'ROM_IMAGE[<partion>] {}' block. + + +In order for a ROM to support data paging, it has to have a media driver +that supports data paging. + + +

The output of this +tutorial will be a configuration that allows the ROM build to use demand paging.

This +tutorial only describes how to configure the general paging behaviour.

+Example OBY +configuration file

Below is a typical OBY file that uses data paging, +XIP ROM and code paging:

// MyDPConfig.oby +// +// The section below is used to specify if XIP ROM paging is to be implemented. +#if !defined PAGED_ROM +#define PAGED_ROM +#endif + +// The section below is used when code paging is to be implemented. +#if !defined USE_CODE_PAGING +// Comment out the next line if code paging is wanted +#define USE_CODE_PAGING +#endif + +#if !defined CODE_PAGING_FROM_ROFS +// Comment out the next line if code paging from primary rofs is wanted +#define CODE_PAGING_FROM_ROFS +#endif + +// The section below is used to configure the RAM pages for writable data paging. +ROM_IMAGE[0] { +pagedrom +compress +// Min Max Young/Old +// Live Live Page +// Pages Pages Ratio +demandpagingconfig 256 512 3 +pagingoverride defaultpaged + +// The section below specifies if the default paging policy is to used. +#if defined USE_CODE_PAGING && !defined USE_DATA_PAGING +codepagingpolicy defaultpaged +#endif + +#if defined USE_DATA_PAGING +#if defined USE_CODE_PAGING +codepagingpolicy defaultpaged +#endif + +datapagingpolicy defaultpaged +#endif +} + +#if defined CODE_PAGING_FROM_ROFS || defined USE_DATA_PAGING +ROM_IMAGE[1] { +pagingoverride defaultpaged +} +#endif +

The OBY file that determined the start of the primary ROFS +partition, for example base.iby, would then be adjusted thus:

+#if defined(_NAND) || defined(_NAND2) +#if !defined PAGED_ROM || defined CODE_PAGING_FROM_ROFS || defined USE_DATA_PAGING +REM Start of ROFS image +ROM_IMAGE[1] { +#endif +#endif

Make sure to include media drivers that can +support writable data paging.

+

This tutorial only +covers the configuration of the general demand paging parameters. To see how +to make individual executables pageable see (the +mmp configuration tutorial).

The next step is to build +the writable data paging ROM

+
+Building +ROM tutorial +
\ No newline at end of file