ROM Paging Overview

Memory may be conserved by only loading the parts of an execute in place (XIP) image that are required at any given time.

Description

If an XIP ROM image is stored on an XIP media such as NOR flash, it does not have to be copied into main memory before it can be executed. If it is stored on non-XIP media, such as NAND flash, then it must be copied into main memory before it can be executed. The entire XIP image can run to many megabytes, and therefore use a lot of main memory. If ROM Paging is used, then only those sections of the XIP image which are required are loaded into memory. Additional sections are loaded as and when they are needed, and sections which have not been used in some time can be discarded. The overall effect is to leave more memory available for applications.

<add links to memory mapping, NOR NAND>

If the ROM image is in a non-XIP ROM it has to be loaded into RAM before it can be executed. The ROM image is split into two parts:

  • Paged

  • Unpaged

The unpaged part of the ROM image is loaded by the bootloader and it always present in RAM. The paged part of the ROM image is paged in on demand.

Using ROM Paging

The type of paging used and the area of memory to use first is specified in the oby and mmp files and then built by using specific parameters in the buildrom utility.