• Antonio Nino Diaz's avatar
    xlat: Remove mmap_attr_t enum type · 3a1b7b10
    Antonio Nino Diaz authored
    
    
    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: default avatarAntonio Nino Diaz <antonio.ninodiaz@arm.com>
    3a1b7b10
mem_region.c 3.48 KB