This is the documentation for the latest (main) development branch of Zephyr. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

CONFIG_SRAM_OFFSET

Kernel SRAM offset

Type: hex

Help

A lot of x86 that resemble PCs have many reserved physical memory
regions within the first megabyte. Specify an offset from the
beginning of RAM to load the kernel in physical memory, avoiding these
regions.

Note that this does not include the "locore" which contains real mode
bootstrap code within the first 64K of physical memory.

This value normally need to be page-aligned.

Help

This option specifies the byte offset from the beginning of SRAM
where the kernel begins. Changing this value from zero will affect
the Zephyr image's link, and will decrease the total amount of
SRAM available for use by application code.

If unsure, leave at the default value 0.

Defaults

Kconfig definitions

At arch/x86/Kconfig:177

Included via Kconfig:8Kconfig.zephyr:39arch/Kconfig:12

Menu path: (Top) → X86 Architecture Options

config SRAM_OFFSET
    hex
    default 0x100000 if X86_PC_COMPATIBLE
    depends on X86
    help
      A lot of x86 that resemble PCs have many reserved physical memory
      regions within the first megabyte. Specify an offset from the
      beginning of RAM to load the kernel in physical memory, avoiding these
      regions.

      Note that this does not include the "locore" which contains real mode
      bootstrap code within the first 64K of physical memory.

      This value normally need to be page-aligned.

At Kconfig.zephyr:210

Included via Kconfig:8

Menu path: (Top) → Build and Link Features → Linker Options

config SRAM_OFFSET
    hex "Kernel SRAM offset" if HAS_SRAM_OFFSET
    default 0
    help
      This option specifies the byte offset from the beginning of SRAM
      where the kernel begins. Changing this value from zero will affect
      the Zephyr image's link, and will decrease the total amount of
      SRAM available for use by application code.

      If unsure, leave at the default value 0.

(The ‘depends on’ condition includes propagated dependencies from ifs and menus.)