CONFIG_KERNEL_VM_OFFSET

Kernel offset within address space

Type: hex

Help

Offset that the kernel image begins within its address space,
if this is not the same offset from the beginning of RAM.

Some care may need to be taken in selecting this value. In certain
build-time cases, or when a physical address cannot be looked up
in page tables, the equation:

    virt = phys + ((KERNEL_VM_BASE + KERNEL_VM_OFFSET) -
                   (SRAM_BASE_ADDRESS + SRAM_OFFSET))

Will be used to convert between physical and virtual addresses for
memory that is mapped at boot.

This uncommon and is only necessary if the beginning of VM and
physical memory have dissimilar alignment.

Direct dependencies

X86 || MMU

(Includes any dependencies from ifs and menus.)

Defaults

  • 0x100000 if MMU

  • 0

Kconfig definitions

At <Zephyr>/arch/x86/Kconfig:190

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:37<Zephyr>/arch/Kconfig:12

Menu path: (Top) → X86 Architecture Options

config KERNEL_VM_OFFSET
    hex
    default 0x100000 if MMU
    depends on X86

At <Zephyr>/arch/Kconfig:642

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:37

Menu path: (Top) → Enable MMU features

config KERNEL_VM_OFFSET
    hex "Kernel offset within address space"
    default 0
    depends on MMU
    help
      Offset that the kernel image begins within its address space,
      if this is not the same offset from the beginning of RAM.

      Some care may need to be taken in selecting this value. In certain
      build-time cases, or when a physical address cannot be looked up
      in page tables, the equation:

          virt = phys + ((KERNEL_VM_BASE + KERNEL_VM_OFFSET) -
                         (SRAM_BASE_ADDRESS + SRAM_OFFSET))

      Will be used to convert between physical and virtual addresses for
      memory that is mapped at boot.

      This uncommon and is only necessary if the beginning of VM and
      physical memory have dissimilar alignment.

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