audk/ArmPkg/Include/Chipset
Ard Biesheuvel 31441f2983 ArmPkg/ArmMmuLib: avoid type promotion in TCR_EL1 assignment
Commit fafb7e9c11 ("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>
2016-07-13 12:38:48 +02:00
..
AArch64.h ArmPkg/ArmLib: add ArmReadHcr to enable read-modify-write of HCR 2016-03-16 12:19:25 +01:00
AArch64Mmu.h ArmPkg/ArmMmuLib: avoid type promotion in TCR_EL1 assignment 2016-07-13 12:38:48 +02:00
ArmArchTimer.h ARM Packages: Removed trailing spaces 2014-08-19 13:29:52 +00:00
ArmCortexA5x.h ArmPkg/ArmCortexA5x: Declared the helper functions to access the CPU Extended Control Register 2014-03-26 19:32:48 +00:00
ArmCortexA9.h ArmPkg: Introduce ArmCpuLib to abstract ARM Cpu specific initialization (2) 2011-09-27 16:26:03 +00:00
ArmV7.h ArmPlatformPkg/ArmJunoDxe: Set the platform dependent FDT device path 2015-02-26 10:57:27 +00:00
ArmV7Mmu.h ArmPkg/ArmV7Lib: take MP extensions into account when programming TTBR 2015-11-18 15:59:59 +00:00