summaryrefslogtreecommitdiff
path: root/ArmPkg/Drivers/ArmGic
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2016-07-13 09:06:49 +0200
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2016-07-13 12:38:48 +0200
commit31441f298365dd182a7a672f1b40fbdb6115c12f (patch)
tree10d0ab92a932c5d507c034b3a034cad2a2405540 /ArmPkg/Drivers/ArmGic
parent30dc4a49b6e303d7a53ff27a8334269cfe3662e9 (diff)
downloadedk2-31441f298365dd182a7a672f1b40fbdb6115c12f.zip
edk2-31441f298365dd182a7a672f1b40fbdb6115c12f.tar.gz
edk2-31441f298365dd182a7a672f1b40fbdb6115c12f.tar.bz2
ArmPkg/ArmMmuLib: avoid type promotion in TCR_EL1 assignment
Commit fafb7e9c110e ("ArmPkg: correct TTBR1_EL1 settings in TCR_EL1") introduced a symbolic constant TCR_TG1_4KB which resolves to (2 << 30), and ORs it into the value to be written into TCR_EL1 (if executing at EL1). Since the constant is implicitly typed as signed int, and has the sign bit set, the promotion that occurs when casting to UINT64 results in a TCR value that has bits [63:32] all set, which includes mostly RES0 bits but also the TBIn, AS and IPS fields. So explicitly redefine all TCR related constants as 'unsigned long' types, using the UL suffix. To avoid confusion in the future, the inappropriately named VTCR_EL23_xxx constants have the leading V removed, and the actual VTCR_EL2 related constants are dropped, given that we never configure stage 2 translation in UEFI. Reported-by: Vishal Oliyil Kunnil <vishalo@qti.qualcomm.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Acked-by: Mark Rutland <mark.rutland@arm.com>
Diffstat (limited to 'ArmPkg/Drivers/ArmGic')
0 files changed, 0 insertions, 0 deletions