[U-Boot] [RFC PATCH 3/5] arm: Kconfig: Add entry for MMU

Tom Rini trini at konsulko.com
Tue Apr 24 13:20:47 UTC 2018


On Tue, Apr 24, 2018 at 06:24:46PM +0530, Lokesh Vutla wrote:

> Add a Kconfig entry for MMU and imply for all platforms
> using cache-cp15.c. Using imply instead of select so that
> MMU can be disabled by defconfigs when not needed.
> 
> Signed-off-by: Lokesh Vutla <lokeshvutla at ti.com>
> ---
>  arch/arm/Kconfig      | 15 +++++++++++++++
>  arch/arm/lib/Makefile |  6 +-----
>  2 files changed, 16 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index de36ab6701..fe5bff097d 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -74,6 +74,12 @@ config ARM_ASM_UNIFIED
>  config THUMB2_KERNEL
>  	bool
>  
> +config MMU
> +	bool "MMU-based Paged Memory Management Support"
> +	help
> +	  Select if you want MMU-based virtualised addressing space
> +	  support by paged memory management.
> +
>  # If set, the workarounds for these ARM errata are applied early during U-Boot
>  # startup. Note that in general these options force the workarounds to be
>  # applied; no CPU-type/version detection exists, unlike the similar options in
> @@ -158,33 +164,40 @@ config ARM_ERRATA_855873
>  config CPU_ARM720T
>  	bool
>  	select SYS_CACHE_SHIFT_5
> +	imply MMU
>  
>  config CPU_ARM920T
>  	bool
>  	select SYS_CACHE_SHIFT_5
> +	imply MMU
>  
>  config CPU_ARM926EJS
>  	bool
>  	select SYS_CACHE_SHIFT_5
> +	imply MMU
>  
>  config CPU_ARM946ES
>  	bool
>  	select SYS_CACHE_SHIFT_5
> +	imply MMU
>  
>  config CPU_ARM1136
>  	bool
>  	select SYS_CACHE_SHIFT_5
> +	imply MMU
>  
>  config CPU_ARM1176
>  	bool
>  	select HAS_VBAR
>  	select SYS_CACHE_SHIFT_5
> +	imply MMU
>  
>  config CPU_V7
>  	bool
>  	select HAS_VBAR
>  	select HAS_THUMB2
>  	select SYS_CACHE_SHIFT_6
> +	imply MMU
>  
>  config CPU_V7M
>  	bool
> @@ -200,10 +213,12 @@ config CPU_V7R
>  config CPU_PXA
>  	bool
>  	select SYS_CACHE_SHIFT_5
> +	imply MMU
>  
>  config CPU_SA1100
>  	bool
>  	select SYS_CACHE_SHIFT_5
> +	imply MMU
>  
>  config SYS_CPU
>  	default "arm720t" if CPU_ARM720T
> diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
> index 3d3085e917..f907adc161 100644
> --- a/arch/arm/lib/Makefile
> +++ b/arch/arm/lib/Makefile
> @@ -63,11 +63,7 @@ obj-y	+= reset.o
>  endif
>  
>  obj-y	+= cache.o
> -ifndef CONFIG_ARM64
> -ifndef CONFIG_CPU_V7M
> -obj-y	+= cache-cp15.o
> -endif
> -endif
> +obj-$(CONFIG_MMU)	+= cache-cp15.o
>  
>  obj-y	+= psci-dt.o

So, funny enough.  We have CONFIG_MMU code in ARM today that I bet
doesn't work and is just copy/pasted from the kernel and we should drop.

For right here, I think I'd rather see some CONFIG flag about
CONFIG_SYS_ARM_CACHE_CP15 instead.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180424/92b418a3/attachment.sig>


More information about the U-Boot mailing list