Platform-Specific Configuration Header

Describes how to write the file providing build-time configuration options.

The platform-specific configuration header is a file that provides the configuration options that must be known at build time.

The configuration header is an include file written in assembler, and is named config.inc.

Use the configuration header file in the Template port in os/kernelhwsrv/bsptemplate/asspandvariant/template_variant/config.inc as the basis of your own configuration header file.

The file consists of a number of global logical symbol definitions (GBLL statements), including the following:

  • symbols that define the CPU, listed below

  • a number of less commonly used macros and symbols, which are documented in the template configuration header file

  • a set of general bootstrap macros described in the Reference section, including the macros that define the presence of Level 2 cache (L210 cache and L220 cache).

CPU symbols

The CPU that the bootstrap runs on is indicated by defining one of the following symbols:

  • CFG_CPU_ARM710T

  • CFG_CPU_ARM720T

  • CFG_CPU_SA1

  • CFG_CPU_ARM920T

  • CFG_CPU_ARM925T

  • CFG_CPU_ARM926J

  • CFG_CPU_XSCALE

  • CFG_CPU_ARM1136

  • CFG_CPU_GENERIC_ARM4

Note that CFG_CPU_GENERIC_ARM4 refers to an ARM architecture 4, or later device, with no MMU.

The template file contains all these symbol definitions; just move the comment symbol (;) as appropriate for your platform.

Other symbols

CFG_DebugBootRom

Define this symbol to enable debug tracing in the bootstrap.

CFG_BootLoader

Define this symbol if the bootstrap is a bootloader.

Derived symbols

A number of commonly used symbols are derived from the supplied configuration options, and may be used in your code.

Precisely one of the following three logical symbols is true, indicating the memory model in use:

  • CFG_MMDirect

  • CFG_MMMoving

  • CFG_MMMultiple

The following logical symbols are true or false depending on whether the CPU in use has the corresponding property. The property represented by the symbol is given by the symbol name.

  • CFG_ARMV6

  • CFG_MMUPresent

  • CFG_CachePresent

  • CFG_WriteBufferPresent

  • CFG_SplitCache

  • CFG_SplitTLB

  • CFG_AltDCachePresent

  • CFG_WriteBackCache