Compartilhar via


XIP Chain (Windows CE 5.0)

Send Feedback

The XIP chain is simply a list of XIP regions that reside in flash memory or RAM and is accessible from the OAL by the OEM. More specifically, the first DWORD at ROM_CHAIN_OFFSET in the chain region is the number of XIP regions and the rest of the chain is an array of XIPCHAIN_ENTRY structures, one per XIP region. The XIPCHAIN_ENTRY structure is defined in %_WINCEROOT%\Public\Common\Oak\Inc\Romldr.h. The most important member of this structure is pvAddr, which is the starting memory address of the XIP region.

The XIP chain itself is flashed into memory by the boot loader, if the boot loader is capable of one of the download methods of loading the image into ROM.

The location of the XIP chain is defined in Config.bib and passed into the OAL through a fixup variable. A fixup variable is a functionality of ROMIMAGE that allows you to initialize a global variable in the Nk.exe at MAKEIMG time. The initialization value is obtained from Config.bib. The following code example shows how the sample lines from Config.bib define the chain location, pass it in through a fixup variable, and reserve a memory area for the chain.

MEMORY
...    
    #define XIPLOC_PHYSICAL 802C0000    ; Location of the chain
    RESERVE  $(XIPLOC_PHYSICAL)    00002000  ; CHAIN
    pdwXIPLoc 00000000 $(XIPLOC_PHYSICAL) FIXUPVAR
...
CONFIG
...
    XIPSCHAIN= $(XIPLOC_PHYSICAL)

You can define a DWORD pointer called pdwXIPLoc in the OAL. This pointer is defined at MAKEIMG time to the value 0x802C0000. OEMInit uses the pointer to access the chain and walks through each entry in the chain to get the location of the XIP region's table of contents. It then adds the location of that table of contents to OEMRomChain. Once this process is complete, the kernel module and file boot loader are able to see all of the XIP regions.

See Also

Booting an Image with Multiple XIP Regions

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.