From 1524ef2f52988a65ca1aca93dcc23e8302bb1912 Mon Sep 17 00:00:00 2001 From: Andrew Boie Date: Mon, 20 Jul 2020 17:32:00 -0700 Subject: [PATCH] arch: Kconfig: add sub-menu for MMU options De-clutters the main menu. Signed-off-by: Andrew Boie --- arch/Kconfig | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index ebfd0900857..960a1c942e4 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -492,17 +492,16 @@ config CPU_HAS_MMU help This hidden option is selected when the CPU has a Memory Management Unit (MMU). - -config MMU - bool +menuconfig MMU + bool "Enable MMU features" depends on CPU_HAS_MMU 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" - depends on MMU default 0x1000 help Size of memory pages. Varies per MMU but 4K is common. For MMUs that @@ -510,7 +509,6 @@ config MMU_PAGE_SIZE config SRAM_REGION_PERMISSIONS bool "Assign appropriate permissions to kernel areas in SRAM" - depends on MMU default y help If enabled, the program text, rodata, and data parts of the kernel in @@ -521,7 +519,6 @@ config SRAM_REGION_PERMISSIONS config KERNEL_VM_BASE hex "Base virtual address for the kernel" - depends on MMU default SRAM_BASE_ADDRESS if X86 # TODO remove once x86 is linked properly default 0xFFFF800000000000 if 64BIT default 0xC0000000 @@ -546,7 +543,6 @@ config KERNEL_VM_BASE config KERNEL_VM_LIMIT hex "Upper bound on kernel address space" - depends on MMU default 0xFFFFFFFFFFFFFFFF if 64BIT default 0xFFFFFFFF help @@ -559,6 +555,8 @@ config KERNEL_VM_LIMIT may be made at runtime depending on configuration options (such as memory-mapping stacks, VDSO pages, etc). +endif # MMU + config MEMORY_PROTECTION bool help