CONFIG_KERNEL_VM_SIZE

Size of kernel address space in bytes

Type: hex

Help

Size of the kernel's address space. Constraining this helps control
how much total memory can be used for page tables.

The difference between KERNEL_VM_BASE and KERNEL_VM_SIZE indicates the
size of the virtual region for runtime memory mappings. This is needed
for mapping driver MMIO regions, as well as special RAM mapping use-cases
such as VSDO pages, memory mapped thread stacks, and anonymous memory
mappings. The kernel itself will be mapped in here as well at boot.

Systems with very large amounts of memory (such as 512M or more)
will want to use a 64-bit build of Zephyr, there are no plans to
implement a notion of "high" memory in Zephyr to work around physical
RAM size larger than the defined bounds of the virtual address space.

Direct dependencies

BOARD_QEMU_X86 || BOARD_QEMU_X86_64 || BOARD_QEMU_X86_LAKEMONT || BOARD_QEMU_X86_TINY || (SOC_AGILEX && SOC_SERIES_AGILEX) || (SOC_AGILEX && SOC_SERIES_AGILEX) || X86 || MMU

(Includes any dependencies from ifs and menus.)

Defaults

  • 0x10000000 if ACPI

  • 0x10000000 if ACPI

  • 0x400000

  • 0x400000

  • 0x40000

  • 0x40000

  • 0x40000000 if ACPI

  • 0x800000

Kconfig definitions

At <Zephyr>/boards/x86/qemu_x86/Kconfig.defconfig:15

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

Menu path: (Top)

config KERNEL_VM_SIZE
    hex
    default 0x10000000 if ACPI
    depends on BOARD_QEMU_X86

At <Zephyr>/boards/x86/qemu_x86/Kconfig.defconfig:40

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

Menu path: (Top)

config KERNEL_VM_SIZE
    hex
    default 0x10000000 if ACPI
    depends on BOARD_QEMU_X86_64

At <Zephyr>/boards/x86/qemu_x86/Kconfig.defconfig:53

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

Menu path: (Top)

config KERNEL_VM_SIZE
    hex
    default 0x400000
    depends on BOARD_QEMU_X86_LAKEMONT

At <Zephyr>/boards/x86/qemu_x86/Kconfig.defconfig:80

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

Menu path: (Top)

config KERNEL_VM_SIZE
    hex
    default 0x400000
    depends on BOARD_QEMU_X86_TINY

At <Zephyr>/soc/arm64/intel_socfpga/agilex/Kconfig.defconfig.agilex:19

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:25<nRF>/doc/_build/kconfig/Kconfig.soc.defconfig:1<Zephyr>/soc/arm64/intel_socfpga/Kconfig.defconfig:4<Zephyr>/soc/arm64/intel_socfpga/agilex/Kconfig.defconfig.series:9

Menu path: (Top)

config KERNEL_VM_SIZE
    hex
    default 0x40000
    depends on SOC_AGILEX && SOC_SERIES_AGILEX

At <Zephyr>/soc/arm64/intel_socfpga/agilex/Kconfig.defconfig.agilex:19

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:27<Zephyr>/soc/arm64/intel_socfpga/Kconfig.defconfig:4<Zephyr>/soc/arm64/intel_socfpga/agilex/Kconfig.defconfig.series:9

Menu path: (Top)

config KERNEL_VM_SIZE
    hex
    default 0x40000
    depends on SOC_AGILEX && SOC_SERIES_AGILEX

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

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

Menu path: (Top) → X86 Architecture Options

config KERNEL_VM_SIZE
    hex
    default 0x40000000 if ACPI
    depends on X86

At <Zephyr>/arch/Kconfig:663

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

Menu path: (Top) → Enable MMU features

config KERNEL_VM_SIZE
    hex "Size of kernel address space in bytes"
    default 0x800000
    depends on MMU
    help
      Size of the kernel's address space. Constraining this helps control
      how much total memory can be used for page tables.

      The difference between KERNEL_VM_BASE and KERNEL_VM_SIZE indicates the
      size of the virtual region for runtime memory mappings. This is needed
      for mapping driver MMIO regions, as well as special RAM mapping use-cases
      such as VSDO pages, memory mapped thread stacks, and anonymous memory
      mappings. The kernel itself will be mapped in here as well at boot.

      Systems with very large amounts of memory (such as 512M or more)
      will want to use a 64-bit build of Zephyr, there are no plans to
      implement a notion of "high" memory in Zephyr to work around physical
      RAM size larger than the defined bounds of the virtual address space.

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