summaryrefslogtreecommitdiff
path: root/include/lib/utils_def.h
diff options
context:
space:
mode:
authorJeenu Viswambharan <jeenu.viswambharan@arm.com>2018-04-27 15:06:57 +0100
committerJeenu Viswambharan <jeenu.viswambharan@arm.com>2018-06-27 11:31:30 +0100
commit0cc7aa896465ad7ecd8c253a4dc970508d96724c (patch)
treebee4d9dbf4f3eed1d8563d831a1da5a7f83bfa2c /include/lib/utils_def.h
parentf790cc0a9c492cf3615c82574e2c3f1ff8af0a3d (diff)
xlat v2: Split MMU setup and enable
At present, the function provided by the translation library to enable MMU constructs appropriate values for translation library, and programs them to the right registers. The construction of initial values, however, is only required once as both the primary and secondaries program the same values. Additionally, the MMU-enabling function is written in C, which means there's an active stack at the time of enabling MMU. On some systems, like Arm DynamIQ, having active stack while enabling MMU during warm boot might lead to coherency problems. This patch addresses both the above problems by: - Splitting the MMU-enabling function into two: one that sets up values to be programmed into the registers, and another one that takes the pre-computed values and writes to the appropriate registers. With this, the primary effectively calls both functions to have the MMU enabled, but secondaries only need to call the latter. - Rewriting the function that enables MMU in assembly so that it doesn't use stack. This patch fixes a bunch of MISRA issues on the way. Change-Id: I0faca97263a970ffe765f0e731a1417e43fbfc45 Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Diffstat (limited to 'include/lib/utils_def.h')
-rw-r--r--include/lib/utils_def.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/lib/utils_def.h b/include/lib/utils_def.h
index 7335103b..1bdf3c4b 100644
--- a/include/lib/utils_def.h
+++ b/include/lib/utils_def.h
@@ -127,8 +127,8 @@
* expected.
*/
#define ARM_ARCH_AT_LEAST(_maj, _min) \
- ((ARM_ARCH_MAJOR > _maj) || \
- ((ARM_ARCH_MAJOR == _maj) && (ARM_ARCH_MINOR >= _min)))
+ ((ARM_ARCH_MAJOR > (_maj)) || \
+ ((ARM_ARCH_MAJOR == (_maj)) && (ARM_ARCH_MINOR >= (_min))))
/*
* Import an assembly or linker symbol as a C expression with the specified