diff options
author | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2018-02-23 15:07:54 +0000 |
---|---|---|
committer | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2018-02-27 09:55:01 +0000 |
commit | 883d1b5d4a1a4da956310a951df9eb2056c84597 (patch) | |
tree | 38155abc27455ae5c63a27056a5452d96a8c9c7e /include/lib/xlat_tables/xlat_tables_defs.h | |
parent | 5ff6da948710361dec294f4b5106978501531caf (diff) |
Add comments about mismatched TCR_ELx and xlat tables
When the MMU is enabled and the translation tables are mapped, data
read/writes to the translation tables are made using the attributes
specified in the translation tables themselves. However, the MMU
performs table walks with the attributes specified in TCR_ELx. They are
completely independent, so special care has to be taken to make sure
that they are the same.
This has to be done manually because it is not practical to have a test
in the code. Such a test would need to know the virtual memory region
that contains the translation tables and check that for all of the
tables the attributes match the ones in TCR_ELx. As the tables may not
even be mapped at all, this isn't a test that can be made generic.
The flags used by enable_mmu_xxx() have been moved to the same header
where the functions are.
Also, some comments in the linker scripts related to the translation
tables have been fixed.
Change-Id: I1754768bffdae75f53561b1c4a5baf043b45a304
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'include/lib/xlat_tables/xlat_tables_defs.h')
-rw-r--r-- | include/lib/xlat_tables/xlat_tables_defs.h | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/include/lib/xlat_tables/xlat_tables_defs.h b/include/lib/xlat_tables/xlat_tables_defs.h index 3a7f2456..1c84fe07 100644 --- a/include/lib/xlat_tables/xlat_tables_defs.h +++ b/include/lib/xlat_tables/xlat_tables_defs.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 */ @@ -9,6 +9,7 @@ #include <arch.h> #include <utils_def.h> +#include <xlat_mmu_helpers.h> /* Miscellaneous MMU related constants */ #define NUM_2MB_IN_GB (U(1) << 9) @@ -165,16 +166,4 @@ #define XN_SHIFT 54 #define UXN_SHIFT XN_SHIFT -/* - * Flags to override default values used to program system registers while - * enabling the MMU. - */ -#define DISABLE_DCACHE (U(1) << 0) - -/* - * This flag marks the translation tables are Non-cacheable for MMU accesses. - * If the flag is not specified, by default the tables are cacheable. - */ -#define XLAT_TABLE_NC (U(1) << 1) - #endif /* __XLAT_TABLES_DEFS_H__ */ |