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 <antonio.ninodiaz@arm.com>
1 parent 6d76942 commit 3a1b7b108aec527597075b48aa929a622fff23da
@Antonio Nino Diaz Antonio Nino Diaz authored on 21 Jun 2018
Showing 7 changed files
View
docs/xlat-tables-lib-v2-design.rst
View
include/lib/xlat_tables/xlat_tables.h
View
include/lib/xlat_tables/xlat_tables_v2.h
View
lib/utils/mem_region.c
View
lib/xlat_tables/xlat_tables_common.c
View
lib/xlat_tables_v2/xlat_tables_internal.c
View
lib/xlat_tables_v2/xlat_tables_private.h