summaryrefslogtreecommitdiff
path: root/include/lib
diff options
context:
space:
mode:
Diffstat (limited to 'include/lib')
-rw-r--r--include/lib/aarch32/arch.h2
-rw-r--r--include/lib/smccc.h19
-rw-r--r--include/lib/utils_def.h4
-rw-r--r--include/lib/xlat_tables/xlat_mmu_helpers.h5
-rw-r--r--include/lib/xlat_tables/xlat_tables_v2.h4
-rw-r--r--include/lib/xlat_tables/xlat_tables_v2_helpers.h16
6 files changed, 42 insertions, 8 deletions
diff --git a/include/lib/aarch32/arch.h b/include/lib/aarch32/arch.h
index 910341a7..a940b63b 100644
--- a/include/lib/aarch32/arch.h
+++ b/include/lib/aarch32/arch.h
@@ -340,7 +340,7 @@
/*
* TTBR definitions
*/
-#define TTBR_CNP_BIT 0x1
+#define TTBR_CNP_BIT U(0x1)
/*
* CTR definitions
diff --git a/include/lib/smccc.h b/include/lib/smccc.h
index 660c1dbd..cb722b0e 100644
--- a/include/lib/smccc.h
+++ b/include/lib/smccc.h
@@ -57,6 +57,7 @@
* does not equal SMC_UNK. This is to ensure that the caller won't mistake the
* returned UUID in x0 for an invalid SMC error return
*/
+#if !ERROR_DEPRECATED
#define DEFINE_SVC_UUID(_name, _tl, _tm, _th, _cl, _ch, \
_n0, _n1, _n2, _n3, _n4, _n5) \
CASSERT((uint32_t)(_tl) != (uint32_t) SMC_UNK, invalid_svc_uuid);\
@@ -64,6 +65,24 @@
_tl, _tm, _th, _cl, _ch, \
{ _n0, _n1, _n2, _n3, _n4, _n5 } \
}
+#endif
+
+
+#define DEFINE_SVC_UUID2(_name, _tl, _tm, _th, _cl, _ch, \
+ _n0, _n1, _n2, _n3, _n4, _n5) \
+ CASSERT((uint32_t)(_tl) != (uint32_t) SMC_UNK, invalid_svc_uuid);\
+ static const uuid_t _name = { \
+ {(_tl >> 24) & 0xFF, \
+ (_tl >> 16) & 0xFF, \
+ (_tl >> 8) & 0xFF, \
+ (_tl & 0xFF)}, \
+ {(_tm >> 8) & 0xFF, \
+ (_tm & 0xFF)}, \
+ {(_th >> 8) & 0xFF, \
+ (_th & 0xFF)}, \
+ _cl, _ch, \
+ { _n0, _n1, _n2, _n3, _n4, _n5 } \
+ }
#endif /*__ASSEMBLY__*/
#endif /* __SMCCC_H__ */
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
diff --git a/include/lib/xlat_tables/xlat_mmu_helpers.h b/include/lib/xlat_tables/xlat_mmu_helpers.h
index 77953177..b6c53e26 100644
--- a/include/lib/xlat_tables/xlat_mmu_helpers.h
+++ b/include/lib/xlat_tables/xlat_mmu_helpers.h
@@ -48,10 +48,15 @@
#ifdef AARCH32
/* AArch32 specific translation table API */
void enable_mmu_secure(unsigned int flags);
+
+void enable_mmu_direct(unsigned int flags);
#else
/* AArch64 specific translation table APIs */
void enable_mmu_el1(unsigned int flags);
void enable_mmu_el3(unsigned int flags);
+
+void enable_mmu_direct_el1(unsigned int flags);
+void enable_mmu_direct_el3(unsigned int flags);
#endif /* AARCH32 */
int xlat_arch_is_granule_size_supported(size_t size);
diff --git a/include/lib/xlat_tables/xlat_tables_v2.h b/include/lib/xlat_tables/xlat_tables_v2.h
index 98f00d71..4dc2c5ec 100644
--- a/include/lib/xlat_tables/xlat_tables_v2.h
+++ b/include/lib/xlat_tables/xlat_tables_v2.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -8,12 +8,12 @@
#define __XLAT_TABLES_V2_H__
#include <xlat_tables_defs.h>
+#include <xlat_tables_v2_helpers.h>
#ifndef __ASSEMBLY__
#include <stddef.h>
#include <stdint.h>
#include <xlat_mmu_helpers.h>
-#include <xlat_tables_v2_helpers.h>
/*
* Default granularity size for an mmap_region_t.
diff --git a/include/lib/xlat_tables/xlat_tables_v2_helpers.h b/include/lib/xlat_tables/xlat_tables_v2_helpers.h
index de1c2d4b..e1ea2b64 100644
--- a/include/lib/xlat_tables/xlat_tables_v2_helpers.h
+++ b/include/lib/xlat_tables/xlat_tables_v2_helpers.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -16,6 +16,13 @@
#error "Do not include this header file directly. Include xlat_tables_v2.h instead."
#endif
+/* Offsets into mmu_cfg_params array. All parameters are 32 bits wide. */
+#define MMU_CFG_MAIR0 0
+#define MMU_CFG_TCR 1
+#define MMU_CFG_TTBR0_LO 2
+#define MMU_CFG_TTBR0_HI 3
+#define MMU_CFG_PARAM_MAX 4
+
#ifndef __ASSEMBLY__
#include <cassert.h>
@@ -24,6 +31,9 @@
#include <xlat_tables_arch.h>
#include <xlat_tables_defs.h>
+/* Parameters of register values required when enabling MMU */
+extern uint32_t mmu_cfg_params[MMU_CFG_PARAM_MAX];
+
/* Forward declaration */
struct mmap_region;
@@ -162,6 +172,8 @@ struct xlat_ctx {
.initialized = 0, \
}
+#endif /*__ASSEMBLY__*/
+
#if AARCH64
/*
@@ -187,6 +199,4 @@ struct xlat_ctx {
#endif /* AARCH64 */
-#endif /*__ASSEMBLY__*/
-
#endif /* __XLAT_TABLES_V2_HELPERS_H__ */