kernel: introduce hidden CONFIG_KERNEL_VM_SUPPORT
Introduce a hidden kconfig CONFIG_KERNEL_VM_SUPPORT which enables some kconfigs that are required for virtual memory support. CONFIG_KERNEL_VM_BASE, CONFIG_KERNEL_VM_OFFSET, and CONFIG_KERNEL_VM_SIZE are moved under this new kconfig so these can be enabled independent of CONFIG_MMU. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
2e5501a3fe
commit
7c6b016ce7
1 changed files with 22 additions and 12 deletions
|
@ -4,20 +4,12 @@
|
||||||
|
|
||||||
menu "Virtual Memory Support"
|
menu "Virtual Memory Support"
|
||||||
|
|
||||||
menuconfig MMU
|
config KERNEL_VM_SUPPORT
|
||||||
bool "Enable MMU features"
|
bool
|
||||||
depends on CPU_HAS_MMU
|
|
||||||
help
|
help
|
||||||
This option is enabled when the CPU's memory management unit is active
|
Hidden option to enable virtual memory Kconfigs.
|
||||||
and the arch_mem_map() API is available.
|
|
||||||
|
|
||||||
if MMU
|
if KERNEL_VM_SUPPORT
|
||||||
config MMU_PAGE_SIZE
|
|
||||||
hex "Size of smallest granularity MMU page"
|
|
||||||
default 0x1000
|
|
||||||
help
|
|
||||||
Size of memory pages. Varies per MMU but 4K is common. For MMUs that
|
|
||||||
support multiple page sizes, put the smallest one here.
|
|
||||||
|
|
||||||
DT_CHOSEN_Z_SRAM := zephyr,sram
|
DT_CHOSEN_Z_SRAM := zephyr,sram
|
||||||
|
|
||||||
|
@ -88,6 +80,24 @@ config KERNEL_VM_SIZE
|
||||||
implement a notion of "high" memory in Zephyr to work around physical
|
implement a notion of "high" memory in Zephyr to work around physical
|
||||||
RAM size larger than the defined bounds of the virtual address space.
|
RAM size larger than the defined bounds of the virtual address space.
|
||||||
|
|
||||||
|
endif # KERNEL_VM_SUPPORT
|
||||||
|
|
||||||
|
menuconfig MMU
|
||||||
|
bool "Enable MMU features"
|
||||||
|
depends on CPU_HAS_MMU
|
||||||
|
select KERNEL_VM_SUPPORT
|
||||||
|
help
|
||||||
|
This option is enabled when the CPU's memory management unit is active
|
||||||
|
and the arch_mem_map() API is available.
|
||||||
|
|
||||||
|
if MMU
|
||||||
|
config MMU_PAGE_SIZE
|
||||||
|
hex "Size of smallest granularity MMU page"
|
||||||
|
default 0x1000
|
||||||
|
help
|
||||||
|
Size of memory pages. Varies per MMU but 4K is common. For MMUs that
|
||||||
|
support multiple page sizes, put the smallest one here.
|
||||||
|
|
||||||
menuconfig DEMAND_PAGING
|
menuconfig DEMAND_PAGING
|
||||||
bool "Enable demand paging [EXPERIMENTAL]"
|
bool "Enable demand paging [EXPERIMENTAL]"
|
||||||
depends on ARCH_HAS_DEMAND_PAGING
|
depends on ARCH_HAS_DEMAND_PAGING
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue