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_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 || X86 || MMU

(Includes any dependencies from ifs and menus.)

Defaults

  • 0x10000000 if ACPI

  • 0x10000000 if ACPI

  • 0x400000

  • 0x400000

  • 0x40000000 if ACPI

  • 0x800000

Kconfig definitions

At boards/x86/qemu_x86/Kconfig.defconfig:15

Included via Kconfig:8Kconfig.zephyr:22

Menu path: (Top)

config KERNEL_VM_SIZE
    hex
    default 0x10000000 if ACPI
    depends on BOARD_QEMU_X86

At boards/x86/qemu_x86/Kconfig.defconfig:40

Included via Kconfig:8Kconfig.zephyr:22

Menu path: (Top)

config KERNEL_VM_SIZE
    hex
    default 0x10000000 if ACPI
    depends on BOARD_QEMU_X86_64

At boards/x86/qemu_x86/Kconfig.defconfig:53

Included via Kconfig:8Kconfig.zephyr:22

Menu path: (Top)

config KERNEL_VM_SIZE
    hex
    default 0x400000
    depends on BOARD_QEMU_X86_LAKEMONT

At boards/x86/qemu_x86/Kconfig.defconfig:80

Included via Kconfig:8Kconfig.zephyr:22

Menu path: (Top)

config KERNEL_VM_SIZE
    hex
    default 0x400000
    depends on BOARD_QEMU_X86_TINY

At arch/x86/Kconfig:238

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

Menu path: (Top) → X86 Architecture Options

config KERNEL_VM_SIZE
    hex
    default 0x40000000 if ACPI
    depends on X86

At arch/Kconfig:662

Included via Kconfig:8Kconfig.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.)