-
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.
Kconfig definitions¶
At arch/x86/Kconfig:110
Included via Kconfig:8
→ Kconfig.zephyr:29
→ arch/Kconfig:12
Menu path: (Top) → X86 Architecture Options
config KERNEL_VM_SIZE hex default 0xC0000000 ifACPI
depends onX86
At arch/Kconfig:619
Included via Kconfig:8
→ Kconfig.zephyr:29
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.)