summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJeenu Viswambharan <jeenu.viswambharan@arm.com>2017-01-06 16:14:42 +0000
committerJeenu Viswambharan <jeenu.viswambharan@arm.com>2017-03-02 11:00:20 +0000
commitd4593e4713617b455929960eb616c9c09e446dc4 (patch)
treeef857313559cf765b0123f82a3be7a4b44cbf8e3 /Makefile
parent25a93f7cd181ca79a631864b7c076fa7106f4365 (diff)
Disallow using coherent memory with hardware-assisted coherency
ARM Trusted Firmware keeps certain data structures in a memory region with non-cacheable attributes (termed as "coherent memory") to keep data coherent with observers that are cache-coherent, and those not. These data structures pertain to power management and mutual exclusion. Using coherent memory also costs at least an additional page to map memory with special memory attributes. On systems with hardware-assisted coherency, all CPUs that participate in power management and mutual exclusion are cache-coherent, obviating the need for special memory attributes for such data structures. Instead, they can be placed in normal memory, along with rest of data. On systems with hardware-assisted coherency, where build option HW_ASSISTED_COHERENCY will be set, also having USE_COHERENT_MEMORY enabled only wastes a page of memory without any benefit. Therefore, with HW_ASSISTED_COHERENCY set to 1, require that USE_COHERENT_MEMORY is explicitly set to 0. Change-Id: I5101657ae6b1a46278069f23e2d88ee5cbd98efa Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index e00159a3..5c798d58 100644
--- a/Makefile
+++ b/Makefile
@@ -305,6 +305,11 @@ ifeq (${ARCH},aarch32)
endif
endif
+# When building for systems with hardware-assisted coherency, there's no need to
+# use USE_COHERENT_MEM. Require that USE_COHERENT_MEM must be set to 0 too.
+ifeq ($(HW_ASSISTED_COHERENCY)-$(USE_COHERENT_MEM),1-1)
+$(error USE_COHERENT_MEM cannot be enabled with HW_ASSISTED_COHERENCY)
+endif
################################################################################
# Process platform overrideable behaviour