18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_cimenu "Memory management options" 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ciconfig MMU 58c2ecf20Sopenharmony_ci bool "Support for memory management hardware" 68c2ecf20Sopenharmony_ci depends on !CPU_SH2 78c2ecf20Sopenharmony_ci default y 88c2ecf20Sopenharmony_ci help 98c2ecf20Sopenharmony_ci Some SH processors (such as SH-2/SH-2A) lack an MMU. In order to 108c2ecf20Sopenharmony_ci boot on these systems, this option must not be set. 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci On other systems (such as the SH-3 and 4) where an MMU exists, 138c2ecf20Sopenharmony_ci turning this off will boot the kernel on these machines with the 148c2ecf20Sopenharmony_ci MMU implicitly switched off. 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ciconfig PAGE_OFFSET 178c2ecf20Sopenharmony_ci hex 188c2ecf20Sopenharmony_ci default "0x80000000" if MMU 198c2ecf20Sopenharmony_ci default "0x00000000" 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ciconfig FORCE_MAX_ZONEORDER 228c2ecf20Sopenharmony_ci int "Maximum zone order" 238c2ecf20Sopenharmony_ci range 9 64 if PAGE_SIZE_16KB 248c2ecf20Sopenharmony_ci default "9" if PAGE_SIZE_16KB 258c2ecf20Sopenharmony_ci range 7 64 if PAGE_SIZE_64KB 268c2ecf20Sopenharmony_ci default "7" if PAGE_SIZE_64KB 278c2ecf20Sopenharmony_ci range 11 64 288c2ecf20Sopenharmony_ci default "14" if !MMU 298c2ecf20Sopenharmony_ci default "11" 308c2ecf20Sopenharmony_ci help 318c2ecf20Sopenharmony_ci The kernel memory allocator divides physically contiguous memory 328c2ecf20Sopenharmony_ci blocks into "zones", where each zone is a power of two number of 338c2ecf20Sopenharmony_ci pages. This option selects the largest power of two that the kernel 348c2ecf20Sopenharmony_ci keeps in the memory allocator. If you need to allocate very large 358c2ecf20Sopenharmony_ci blocks of physically contiguous memory, then you may need to 368c2ecf20Sopenharmony_ci increase this value. 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci This config option is actually maximum order plus one. For example, 398c2ecf20Sopenharmony_ci a value of 11 means that the largest free memory block is 2^10 pages. 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci The page size is not necessarily 4KB. Keep this in mind when 428c2ecf20Sopenharmony_ci choosing a value for this option. 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ciconfig MEMORY_START 458c2ecf20Sopenharmony_ci hex "Physical memory start address" 468c2ecf20Sopenharmony_ci default "0x08000000" 478c2ecf20Sopenharmony_ci help 488c2ecf20Sopenharmony_ci Computers built with Hitachi SuperH processors always 498c2ecf20Sopenharmony_ci map the ROM starting at address zero. But the processor 508c2ecf20Sopenharmony_ci does not specify the range that RAM takes. 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ci The physical memory (RAM) start address will be automatically 538c2ecf20Sopenharmony_ci set to 08000000. Other platforms, such as the Solution Engine 548c2ecf20Sopenharmony_ci boards typically map RAM at 0C000000. 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ci Tweak this only when porting to a new machine which does not 578c2ecf20Sopenharmony_ci already have a defconfig. Changing it from the known correct 588c2ecf20Sopenharmony_ci value on any of the known systems will only lead to disaster. 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ciconfig MEMORY_SIZE 618c2ecf20Sopenharmony_ci hex "Physical memory size" 628c2ecf20Sopenharmony_ci default "0x04000000" 638c2ecf20Sopenharmony_ci help 648c2ecf20Sopenharmony_ci This sets the default memory size assumed by your SH kernel. It can 658c2ecf20Sopenharmony_ci be overridden as normal by the 'mem=' argument on the kernel command 668c2ecf20Sopenharmony_ci line. If unsure, consult your board specifications or just leave it 678c2ecf20Sopenharmony_ci as 0x04000000 which was the default value before this became 688c2ecf20Sopenharmony_ci configurable. 698c2ecf20Sopenharmony_ci 708c2ecf20Sopenharmony_ci# Physical addressing modes 718c2ecf20Sopenharmony_ci 728c2ecf20Sopenharmony_ciconfig 29BIT 738c2ecf20Sopenharmony_ci def_bool !32BIT 748c2ecf20Sopenharmony_ci select UNCACHED_MAPPING 758c2ecf20Sopenharmony_ci 768c2ecf20Sopenharmony_ciconfig 32BIT 778c2ecf20Sopenharmony_ci bool 788c2ecf20Sopenharmony_ci default !MMU 798c2ecf20Sopenharmony_ci 808c2ecf20Sopenharmony_ciconfig PMB 818c2ecf20Sopenharmony_ci bool "Support 32-bit physical addressing through PMB" 828c2ecf20Sopenharmony_ci depends on MMU && CPU_SH4A && !CPU_SH4AL_DSP 838c2ecf20Sopenharmony_ci select 32BIT 848c2ecf20Sopenharmony_ci select UNCACHED_MAPPING 858c2ecf20Sopenharmony_ci help 868c2ecf20Sopenharmony_ci If you say Y here, physical addressing will be extended to 878c2ecf20Sopenharmony_ci 32-bits through the SH-4A PMB. If this is not set, legacy 888c2ecf20Sopenharmony_ci 29-bit physical addressing will be used. 898c2ecf20Sopenharmony_ci 908c2ecf20Sopenharmony_ciconfig X2TLB 918c2ecf20Sopenharmony_ci def_bool y 928c2ecf20Sopenharmony_ci depends on (CPU_SHX2 || CPU_SHX3) && MMU 938c2ecf20Sopenharmony_ci 948c2ecf20Sopenharmony_ciconfig VSYSCALL 958c2ecf20Sopenharmony_ci bool "Support vsyscall page" 968c2ecf20Sopenharmony_ci depends on MMU && (CPU_SH3 || CPU_SH4) 978c2ecf20Sopenharmony_ci default y 988c2ecf20Sopenharmony_ci help 998c2ecf20Sopenharmony_ci This will enable support for the kernel mapping a vDSO page 1008c2ecf20Sopenharmony_ci in process space, and subsequently handing down the entry point 1018c2ecf20Sopenharmony_ci to the libc through the ELF auxiliary vector. 1028c2ecf20Sopenharmony_ci 1038c2ecf20Sopenharmony_ci From the kernel side this is used for the signal trampoline. 1048c2ecf20Sopenharmony_ci For systems with an MMU that can afford to give up a page, 1058c2ecf20Sopenharmony_ci (the default value) say Y. 1068c2ecf20Sopenharmony_ci 1078c2ecf20Sopenharmony_ciconfig NUMA 1088c2ecf20Sopenharmony_ci bool "Non Uniform Memory Access (NUMA) Support" 1098c2ecf20Sopenharmony_ci depends on MMU && SYS_SUPPORTS_NUMA 1108c2ecf20Sopenharmony_ci select ARCH_WANT_NUMA_VARIABLE_LOCALITY 1118c2ecf20Sopenharmony_ci default n 1128c2ecf20Sopenharmony_ci help 1138c2ecf20Sopenharmony_ci Some SH systems have many various memories scattered around 1148c2ecf20Sopenharmony_ci the address space, each with varying latencies. This enables 1158c2ecf20Sopenharmony_ci support for these blocks by binding them to nodes and allowing 1168c2ecf20Sopenharmony_ci memory policies to be used for prioritizing and controlling 1178c2ecf20Sopenharmony_ci allocation behaviour. 1188c2ecf20Sopenharmony_ci 1198c2ecf20Sopenharmony_ciconfig NODES_SHIFT 1208c2ecf20Sopenharmony_ci int 1218c2ecf20Sopenharmony_ci default "3" if CPU_SUBTYPE_SHX3 1228c2ecf20Sopenharmony_ci default "1" 1238c2ecf20Sopenharmony_ci depends on NEED_MULTIPLE_NODES 1248c2ecf20Sopenharmony_ci 1258c2ecf20Sopenharmony_ciconfig ARCH_FLATMEM_ENABLE 1268c2ecf20Sopenharmony_ci def_bool y 1278c2ecf20Sopenharmony_ci depends on !NUMA 1288c2ecf20Sopenharmony_ci 1298c2ecf20Sopenharmony_ciconfig ARCH_SPARSEMEM_ENABLE 1308c2ecf20Sopenharmony_ci def_bool y 1318c2ecf20Sopenharmony_ci select SPARSEMEM_STATIC 1328c2ecf20Sopenharmony_ci 1338c2ecf20Sopenharmony_ciconfig ARCH_SPARSEMEM_DEFAULT 1348c2ecf20Sopenharmony_ci def_bool y 1358c2ecf20Sopenharmony_ci 1368c2ecf20Sopenharmony_ciconfig ARCH_SELECT_MEMORY_MODEL 1378c2ecf20Sopenharmony_ci def_bool y 1388c2ecf20Sopenharmony_ci 1398c2ecf20Sopenharmony_ciconfig ARCH_ENABLE_MEMORY_HOTPLUG 1408c2ecf20Sopenharmony_ci def_bool y 1418c2ecf20Sopenharmony_ci depends on SPARSEMEM && MMU 1428c2ecf20Sopenharmony_ci 1438c2ecf20Sopenharmony_ciconfig ARCH_ENABLE_MEMORY_HOTREMOVE 1448c2ecf20Sopenharmony_ci def_bool y 1458c2ecf20Sopenharmony_ci depends on SPARSEMEM && MMU 1468c2ecf20Sopenharmony_ci 1478c2ecf20Sopenharmony_ciconfig ARCH_MEMORY_PROBE 1488c2ecf20Sopenharmony_ci def_bool y 1498c2ecf20Sopenharmony_ci depends on MEMORY_HOTPLUG 1508c2ecf20Sopenharmony_ci 1518c2ecf20Sopenharmony_ciconfig IOREMAP_FIXED 1528c2ecf20Sopenharmony_ci def_bool y 1538c2ecf20Sopenharmony_ci depends on X2TLB 1548c2ecf20Sopenharmony_ci 1558c2ecf20Sopenharmony_ciconfig UNCACHED_MAPPING 1568c2ecf20Sopenharmony_ci bool 1578c2ecf20Sopenharmony_ci 1588c2ecf20Sopenharmony_ciconfig HAVE_SRAM_POOL 1598c2ecf20Sopenharmony_ci bool 1608c2ecf20Sopenharmony_ci select GENERIC_ALLOCATOR 1618c2ecf20Sopenharmony_ci 1628c2ecf20Sopenharmony_cichoice 1638c2ecf20Sopenharmony_ci prompt "Kernel page size" 1648c2ecf20Sopenharmony_ci default PAGE_SIZE_4KB 1658c2ecf20Sopenharmony_ci 1668c2ecf20Sopenharmony_ciconfig PAGE_SIZE_4KB 1678c2ecf20Sopenharmony_ci bool "4kB" 1688c2ecf20Sopenharmony_ci help 1698c2ecf20Sopenharmony_ci This is the default page size used by all SuperH CPUs. 1708c2ecf20Sopenharmony_ci 1718c2ecf20Sopenharmony_ciconfig PAGE_SIZE_8KB 1728c2ecf20Sopenharmony_ci bool "8kB" 1738c2ecf20Sopenharmony_ci depends on !MMU || X2TLB 1748c2ecf20Sopenharmony_ci help 1758c2ecf20Sopenharmony_ci This enables 8kB pages as supported by SH-X2 and later MMUs. 1768c2ecf20Sopenharmony_ci 1778c2ecf20Sopenharmony_ciconfig PAGE_SIZE_16KB 1788c2ecf20Sopenharmony_ci bool "16kB" 1798c2ecf20Sopenharmony_ci depends on !MMU 1808c2ecf20Sopenharmony_ci help 1818c2ecf20Sopenharmony_ci This enables 16kB pages on MMU-less SH systems. 1828c2ecf20Sopenharmony_ci 1838c2ecf20Sopenharmony_ciconfig PAGE_SIZE_64KB 1848c2ecf20Sopenharmony_ci bool "64kB" 1858c2ecf20Sopenharmony_ci depends on !MMU || CPU_SH4 1868c2ecf20Sopenharmony_ci help 1878c2ecf20Sopenharmony_ci This enables support for 64kB pages, possible on all SH-4 1888c2ecf20Sopenharmony_ci CPUs and later. 1898c2ecf20Sopenharmony_ci 1908c2ecf20Sopenharmony_ciendchoice 1918c2ecf20Sopenharmony_ci 1928c2ecf20Sopenharmony_cichoice 1938c2ecf20Sopenharmony_ci prompt "HugeTLB page size" 1948c2ecf20Sopenharmony_ci depends on HUGETLB_PAGE 1958c2ecf20Sopenharmony_ci default HUGETLB_PAGE_SIZE_1MB if PAGE_SIZE_64KB 1968c2ecf20Sopenharmony_ci default HUGETLB_PAGE_SIZE_64K 1978c2ecf20Sopenharmony_ci 1988c2ecf20Sopenharmony_ciconfig HUGETLB_PAGE_SIZE_64K 1998c2ecf20Sopenharmony_ci bool "64kB" 2008c2ecf20Sopenharmony_ci depends on !PAGE_SIZE_64KB 2018c2ecf20Sopenharmony_ci 2028c2ecf20Sopenharmony_ciconfig HUGETLB_PAGE_SIZE_256K 2038c2ecf20Sopenharmony_ci bool "256kB" 2048c2ecf20Sopenharmony_ci depends on X2TLB 2058c2ecf20Sopenharmony_ci 2068c2ecf20Sopenharmony_ciconfig HUGETLB_PAGE_SIZE_1MB 2078c2ecf20Sopenharmony_ci bool "1MB" 2088c2ecf20Sopenharmony_ci 2098c2ecf20Sopenharmony_ciconfig HUGETLB_PAGE_SIZE_4MB 2108c2ecf20Sopenharmony_ci bool "4MB" 2118c2ecf20Sopenharmony_ci depends on X2TLB 2128c2ecf20Sopenharmony_ci 2138c2ecf20Sopenharmony_ciconfig HUGETLB_PAGE_SIZE_64MB 2148c2ecf20Sopenharmony_ci bool "64MB" 2158c2ecf20Sopenharmony_ci depends on X2TLB 2168c2ecf20Sopenharmony_ci 2178c2ecf20Sopenharmony_ciendchoice 2188c2ecf20Sopenharmony_ci 2198c2ecf20Sopenharmony_ciconfig SCHED_MC 2208c2ecf20Sopenharmony_ci bool "Multi-core scheduler support" 2218c2ecf20Sopenharmony_ci depends on SMP 2228c2ecf20Sopenharmony_ci default y 2238c2ecf20Sopenharmony_ci help 2248c2ecf20Sopenharmony_ci Multi-core scheduler support improves the CPU scheduler's decision 2258c2ecf20Sopenharmony_ci making when dealing with multi-core CPU chips at a cost of slightly 2268c2ecf20Sopenharmony_ci increased overhead in some places. If unsure say N here. 2278c2ecf20Sopenharmony_ci 2288c2ecf20Sopenharmony_ciendmenu 2298c2ecf20Sopenharmony_ci 2308c2ecf20Sopenharmony_cimenu "Cache configuration" 2318c2ecf20Sopenharmony_ci 2328c2ecf20Sopenharmony_ciconfig SH7705_CACHE_32KB 2338c2ecf20Sopenharmony_ci bool "Enable 32KB cache size for SH7705" 2348c2ecf20Sopenharmony_ci depends on CPU_SUBTYPE_SH7705 2358c2ecf20Sopenharmony_ci default y 2368c2ecf20Sopenharmony_ci 2378c2ecf20Sopenharmony_cichoice 2388c2ecf20Sopenharmony_ci prompt "Cache mode" 2398c2ecf20Sopenharmony_ci default CACHE_WRITEBACK if CPU_SH2A || CPU_SH3 || CPU_SH4 2408c2ecf20Sopenharmony_ci default CACHE_WRITETHROUGH if (CPU_SH2 && !CPU_SH2A) 2418c2ecf20Sopenharmony_ci 2428c2ecf20Sopenharmony_ciconfig CACHE_WRITEBACK 2438c2ecf20Sopenharmony_ci bool "Write-back" 2448c2ecf20Sopenharmony_ci 2458c2ecf20Sopenharmony_ciconfig CACHE_WRITETHROUGH 2468c2ecf20Sopenharmony_ci bool "Write-through" 2478c2ecf20Sopenharmony_ci help 2488c2ecf20Sopenharmony_ci Selecting this option will configure the caches in write-through 2498c2ecf20Sopenharmony_ci mode, as opposed to the default write-back configuration. 2508c2ecf20Sopenharmony_ci 2518c2ecf20Sopenharmony_ci Since there's sill some aliasing issues on SH-4, this option will 2528c2ecf20Sopenharmony_ci unfortunately still require the majority of flushing functions to 2538c2ecf20Sopenharmony_ci be implemented to deal with aliasing. 2548c2ecf20Sopenharmony_ci 2558c2ecf20Sopenharmony_ci If unsure, say N. 2568c2ecf20Sopenharmony_ci 2578c2ecf20Sopenharmony_ciconfig CACHE_OFF 2588c2ecf20Sopenharmony_ci bool "Off" 2598c2ecf20Sopenharmony_ci 2608c2ecf20Sopenharmony_ciendchoice 2618c2ecf20Sopenharmony_ci 2628c2ecf20Sopenharmony_ciendmenu 263