Re: [edk2] [PATCH] ArmPkg/ArmMmuLib: avoid type promotion in TCR_EL1 assignment

2016-07-13 Thread Mark Rutland
On Wed, Jul 13, 2016 at 09:28:06AM +0200, Ard Biesheuvel wrote: > 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

Re: [edk2] [PATCH] ArmPkg/ArmMmuLib: avoid type promotion in TCR_EL1 assignment

2016-07-13 Thread Leif Lindholm
On Wed, Jul 13, 2016 at 09:28:06AM +0200, Ard Biesheuvel wrote: > 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

[edk2] [PATCH] ArmPkg/ArmMmuLib: avoid type promotion in TCR_EL1 assignment

2016-07-13 Thread Ard Biesheuvel
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,