On 16 January 2018 at 21:51, Udit Kumar <[email protected]> wrote: > This patch reset x11 to zero before using it. > x11 is marked as caller saved register, therefore before using it > default (reset) value should be assigned. > > If ArmPlatformPeiBootAction function is using x11 then some of > calculation in this routine may go wrong. > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Udit Kumar <[email protected]> > --- > ArmPlatformPkg/PrePi/AArch64/ModuleEntryPoint.S | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/ArmPlatformPkg/PrePi/AArch64/ModuleEntryPoint.S > b/ArmPlatformPkg/PrePi/AArch64/ModuleEntryPoint.S > index a81709d..d391fc1 100644 > --- a/ArmPlatformPkg/PrePi/AArch64/ModuleEntryPoint.S > +++ b/ArmPlatformPkg/PrePi/AArch64/ModuleEntryPoint.S > @@ -60,6 +60,7 @@ _SetupStack: > // Because the 'push' instruction is equivalent to 'stmdb' (decrement > before), we need to increment > // one to the top of the stack. We check if incrementing one does not > overflow (case of DRAM at the > // top of the memory space) > + mov x11, 0 > adds x11, x1, #1 > b.cs _SetupOverflowStack >
x11 is used as an output only by the adds instruction, so there is no point in setting a value first. _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

