On 23 October 2017 at 15:18, Gao, Liming <liming....@intel.com> wrote: > This is for debug purpose. I think UINT32 is OK if AARCH64 can operate 32bit > value. >
Both my ARM and AARCH64 implementations write 16 bytes at a time, and so whether the source value is UINT32 or UINT64 or UINT16 does not make any difference at all. >> -----Original Message----- >> From: Laszlo Ersek [mailto:ler...@redhat.com] >> Sent: Saturday, October 21, 2017 1:19 AM >> To: Ard Biesheuvel <ard.biesheu...@linaro.org> >> Cc: Gao, Liming <liming....@intel.com>; edk2-devel@lists.01.org; Leif >> Lindholm <leif.lindh...@linaro.org> >> Subject: Re: [edk2] [PATCH] ArmPlatformPkg/PrePeiCore: seed temporary stack >> before entering PEI core >> >> On 10/20/17 18:52, Ard Biesheuvel wrote: >> > On 20 October 2017 at 17:51, Laszlo Ersek <ler...@redhat.com> wrote: >> >> On 10/20/17 18:39, Ard Biesheuvel wrote: >> >>> On 20 October 2017 at 17:37, Gao, Liming <liming....@intel.com> wrote: >> >>>> Ard: >> >>>> This case is to share the same value between PeiCore and SecCore. I >> >>>> also think it will be better to define one fixed PCD in >> MdeModulePkg.dec for this value. Could you submit bugzillar to catch this >> issue first? >> >>>> >> >>> >> >>> Certainly! >> >> >> >> Would it be possible to define the PCD as UINT32, and task 64-bit SEC >> >> (and PEI_CORE) code to first construct the wider value manually (in a >> >> register or otherwise)? >> >> >> >> Just thinking out loud. >> >> >> > >> > Could you think the reasoning behind that out loud as well? >> >> Haha, good stab :) Sure. >> >> In your patch you have: >> >> +#define INIT_CAR_VALUE 0x5AA55AA55AA55AA5 >> >> for 64-bit, and >> >> +#define INIT_CAR_VALUE 0x5AA55AA5 >> >> for 32-bit. >> >> Both 64-bit assembly code in SEC, and 64-bit C-code in the PEI_CORE, can >> easily compose the large value from the small value, starting from >> FixedPcdGet32(). The alternatives are: >> >> - asking the 32-bit assembly code to truncate the 64-bit constant -- it >> won't compile, >> >> - defining *two* FixedAtBuild PCDs, one for 32-bit, another for 64-bit >> SEC -- an idea probably not universally liked. >> >> ... When I originally started writing my previous email, I even thought >> about introducing the PCD as UINT16 :) But then I realized, if any >> platform lacks *some* 32-bit mode when it sets up the stack in assembly, >> for C-language entry, then the platform won't be supported by edk2. >> >> Thanks >> Laszlo _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel