From 609c91917f95e5c2c0dcccbfbea6ff32539bf738 Mon Sep 17 00:00:00 2001 From: Antonio Nino Diaz Date: Wed, 4 Oct 2017 16:52:15 +0100 Subject: xlat: Add support for EL0 and EL1 mappings This patch introduces the ability of the xlat tables library to manage EL0 and EL1 mappings from a higher exception level. Attributes MT_USER and MT_PRIVILEGED have been added to allow the user specify the target EL in the translation regime EL1&0. REGISTER_XLAT_CONTEXT2 macro is introduced to allow creating a xlat_ctx_t that targets a given translation regime (EL1&0 or EL3). A new member is added to xlat_ctx_t to represent the translation regime the xlat_ctx_t manages. The execute_never mask member is removed as it is computed from existing information. Change-Id: I95e14abc3371d7a6d6a358cc54c688aa9975c110 Co-authored-by: Douglas Raillard Co-authored-by: Sandrine Bailleux Co-authored-by: Antonio Nino Diaz Signed-off-by: Antonio Nino Diaz --- docs/xlat-tables-lib-v2-design.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'docs/xlat-tables-lib-v2-design.rst') diff --git a/docs/xlat-tables-lib-v2-design.rst b/docs/xlat-tables-lib-v2-design.rst index f36ee9bb..07cbf86c 100644 --- a/docs/xlat-tables-lib-v2-design.rst +++ b/docs/xlat-tables-lib-v2-design.rst @@ -77,8 +77,11 @@ might create new translation tables, update or split existing ones. The region attributes specify the type of memory (for example device or cached normal memory) as well as the memory access permissions (read-only or -read-write, executable or not, secure or non-secure, and so on). See the -``mmap_attr_t`` enumeration type in `xlat\_tables\_v2.h`_. +read-write, executable or not, secure or non-secure, and so on). In the case of +the EL1&0 translation regime, the attributes also specify whether the region is +a User region (EL0) or Privileged region (EL1). See the ``mmap_attr_t`` +enumeration type in `xlat\_tables\_v2.h`_. Note that for the EL1&0 translation +regime the Execute Never attribute is set simultaneously for both EL1 and EL0. The granularity controls the translation table level to go down to when mapping the region. For example, assuming the MMU has been configured to use a 4KB -- cgit v1.2.3