From 3d457e1a365b832e547a62ed37bb768e5b8b1885 Mon Sep 17 00:00:00 2001 From: Daniel Leung Date: Fri, 19 Feb 2021 14:18:36 -0800 Subject: [PATCH] linker: add CONFIG_KERNEL_LINK_IN_VIRT This adds the kconfig CONFIG_KERNEL_LINK_IN_VIRT and supporting kconfigs to indicate that the linker script can link the kernel in virtual address space. This is needed for demand paging where the kernel can be bigger than physical address space. Signed-off-by: Daniel Leung --- Kconfig.zephyr | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Kconfig.zephyr b/Kconfig.zephyr index 190d05528fd..1fc726d83b0 100644 --- a/Kconfig.zephyr +++ b/Kconfig.zephyr @@ -183,6 +183,23 @@ config SRAM_OFFSET If unsure, leave at the default value 0. +config CAN_LINK_IN_VIRT + bool + help + Hidden option to indicate that the architecture, SoC or board + linker script can link the kernel in virtual address space. + +config KERNEL_LINK_IN_VIRT + bool "Link Kernel in Virtual Address Space" + depends on MMU + depends on CAN_LINK_IN_VIRT + help + Enable linking the kernel in virtual address space defined by + KERNEL_VM_BASE, KERNEL_VM_SIZE and KERNEL_VM_OFFSET. + + Requires linker script support. If unsure, says N and the kernel + will be linked in physical address space. + endmenu menu "Compiler Options"