From 3a1b7b108aec527597075b48aa929a622fff23da Mon Sep 17 00:00:00 2001 From: Antonio Nino Diaz Date: Thu, 21 Jun 2018 14:39:16 +0100 Subject: xlat: Remove mmap_attr_t enum type The values defined in this type are used in logical operations, which goes against MISRA Rule 10.1: "Operands shall not be of an inappropriate essential type". Now, `unsigned int` is used instead. This also allows us to move the dynamic mapping bit from 30 to 31. It was an undefined behaviour in the past because an enum is signed by default, and bit 31 corresponds to the sign bit. It is undefined behaviour to modify the sign bit. Now, bit 31 is free to use as it was originally meant to be. mmap_attr_t is now defined as an `unsigned int` for backwards compatibility. Change-Id: I6b31218c14b9c7fdabebe432de7fae6e90a97f34 Signed-off-by: Antonio Nino Diaz --- docs/xlat-tables-lib-v2-design.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/xlat-tables-lib-v2-design.rst b/docs/xlat-tables-lib-v2-design.rst index d256b6b57..d207f301e 100644 --- a/docs/xlat-tables-lib-v2-design.rst +++ b/docs/xlat-tables-lib-v2-design.rst @@ -79,9 +79,9 @@ 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). 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. +a User region (EL0) or Privileged region (EL1). See the ``MT_xxx`` definitions +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