arch: add support 16k page size on ARM64

The BCM2712 of the RaspberryPi 5 supports for 16KB page size.

This adds support for 16 KB on ARM64.

Signed-off-by: Gaël PORTAY <gael.portay@rtone.fr>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
Gaël PORTAY 2023-12-11 16:59:50 +01:00 committed by Yann E. MORIN
parent b200632b1a
commit 7a59c3a4d4
3 changed files with 9 additions and 1 deletions

View File

@ -781,6 +781,9 @@ choice
config BR2_ARM64_PAGE_SIZE_4K
bool "4KB"
config BR2_ARM64_PAGE_SIZE_16K
bool "16KB"
config BR2_ARM64_PAGE_SIZE_64K
bool "64KB"
@ -789,6 +792,7 @@ endchoice
config BR2_ARM64_PAGE_SIZE
string
default "4K" if BR2_ARM64_PAGE_SIZE_4K
default "16K" if BR2_ARM64_PAGE_SIZE_16K
default "64K" if BR2_ARM64_PAGE_SIZE_64K
config BR2_ARCH

View File

@ -23,7 +23,7 @@ ifeq ($(BR2_ARC_PAGE_SIZE_4K)$(BR2_ARM64_PAGE_SIZE_4K),y)
ARCH_TOOLCHAIN_WRAPPER_OPTS += -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096
else ifeq ($(BR2_ARC_PAGE_SIZE_8K),y)
ARCH_TOOLCHAIN_WRAPPER_OPTS += -Wl,-z,max-page-size=8192 -Wl,-z,common-page-size=8192
else ifeq ($(BR2_ARC_PAGE_SIZE_16K),y)
else ifeq ($(BR2_ARC_PAGE_SIZE_16K)$(BR2_ARM64_PAGE_SIZE_16K),y)
ARCH_TOOLCHAIN_WRAPPER_OPTS += -Wl,-z,max-page-size=16384 -Wl,-z,common-page-size=16384
else ifeq ($(BR2_ARM64_PAGE_SIZE_64K),y)
ARCH_TOOLCHAIN_WRAPPER_OPTS += -Wl,-z,max-page-size=65536 -Wl,-z,common-page-size=65536

View File

@ -411,6 +411,10 @@ define LINUX_KCONFIG_FIXUP_CMDS
$(call KCONFIG_ENABLE_OPT,CONFIG_ARM64_4K_PAGES)
$(call KCONFIG_DISABLE_OPT,CONFIG_ARM64_16K_PAGES)
$(call KCONFIG_DISABLE_OPT,CONFIG_ARM64_64K_PAGES))
$(if $(BR2_ARM64_PAGE_SIZE_16K),
$(call KCONFIG_DISABLE_OPT,CONFIG_ARM64_4K_PAGES)
$(call KCONFIG_ENABLE_OPT,CONFIG_ARM64_16K_PAGES)
$(call KCONFIG_DISABLE_OPT,CONFIG_ARM64_64K_PAGES))
$(if $(BR2_ARM64_PAGE_SIZE_64K),
$(call KCONFIG_DISABLE_OPT,CONFIG_ARM64_4K_PAGES)
$(call KCONFIG_DISABLE_OPT,CONFIG_ARM64_16K_PAGES)