From 6196841f4d47433f9ecc353c4cf75d6871f96082 Mon Sep 17 00:00:00 2001 From: Juan Yescas Date: Tue, 25 Jul 2023 15:28:36 -0700 Subject: [PATCH] 16k: core: Check that TARGET_MAX_PAGE_SIZE_SUPPORTED is greater than 4096 only for ARM archs. For arm archs, PRODUCT_MAX_PAGE_SIZE_SUPPORTED values can be 4096, 16384, 65536. For other archs, PRODUCT_MAX_PAGE_SIZE_SUPPORTED can only be 4096. Note: The linker flag max-page-size is configured by PRODUCT_MAX_PAGE_SIZE_SUPPORTED flag. Bug: 289419664 Test: source build/envsetup.sh lunch aosp_cf_x86_64_phone build/make/core/config.mk:448: error: TARGET_MAX_PAGE_SIZE_SUPPORTED=65536 is greater than 4096. Only supported in ARM arch. source build/envsetup.sh lunch aosp_raven_64-userdebug Change-Id: I887d6f12835f1bea4c6b92d7d836440b8d3fd6a8 --- core/config.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/core/config.mk b/core/config.mk index 920e4575b5..e919be3470 100644 --- a/core/config.mk +++ b/core/config.mk @@ -436,11 +436,25 @@ else TARGET_MAX_PAGE_SIZE_SUPPORTED := 4096 # When VSR vendor API level >= 34, binary alignment will be 65536. ifeq ($(call math_gt_or_eq,$(vsr_vendor_api_level),34),true) + ifeq ($(TARGET_ARCH),arm64) TARGET_MAX_PAGE_SIZE_SUPPORTED := 65536 + endif + ifeq ($(TARGET_ARCH),arm) + TARGET_MAX_PAGE_SIZE_SUPPORTED := 65536 + endif endif endif .KATI_READONLY := TARGET_MAX_PAGE_SIZE_SUPPORTED +# Check that TARGET_MAX_PAGE_SIZE_SUPPORTED is greater than 4096 only for ARM arch. +ifneq ($(TARGET_MAX_PAGE_SIZE_SUPPORTED),4096) + ifneq ($(TARGET_ARCH),arm64) + ifneq ($(TARGET_ARCH),arm) + $(error TARGET_MAX_PAGE_SIZE_SUPPORTED=$(TARGET_MAX_PAGE_SIZE_SUPPORTED) is greater than 4096. Only supported in ARM arch) + endif + endif +endif + # Boolean variable determining if AOSP is page size agnostic. This means # that AOSP can use a kernel configured with 4k/16k/64k PAGE SIZES. TARGET_PAGE_SIZE_AGNOSTIC := false