public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Liming" <liming.gao@intel.com>
To: Laszlo Ersek <lersek@redhat.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	Leif Lindholm <leif.lindholm@linaro.org>
Subject: Re: [PATCH] ArmPlatformPkg/PrePeiCore: seed temporary stack before entering PEI core
Date: Mon, 23 Oct 2017 14:18:12 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E16F647@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <7c7676f9-39b4-39b6-24b7-7c83840df72a@redhat.com>

This is for debug purpose. I think UINT32 is OK if AARCH64 can operate 32bit value. 

Thanks
Liming
> -----Original Message-----
> From: Laszlo Ersek [mailto:lersek@redhat.com]
> Sent: Saturday, October 21, 2017 1:19 AM
> To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Gao, Liming <liming.gao@intel.com>; edk2-devel@lists.01.org; Leif Lindholm <leif.lindholm@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 <lersek@redhat.com> wrote:
> >> On 10/20/17 18:39, Ard Biesheuvel wrote:
> >>> On 20 October 2017 at 17:37, Gao, Liming <liming.gao@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

  reply	other threads:[~2017-10-23 14:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-20 11:23 [PATCH] ArmPlatformPkg/PrePeiCore: seed temporary stack before entering PEI core Ard Biesheuvel
2017-10-20 13:00 ` Leif Lindholm
2017-10-20 15:43   ` Laszlo Ersek
2017-10-20 16:10     ` Ard Biesheuvel
2017-10-20 16:30       ` Laszlo Ersek
2017-10-20 16:37       ` Gao, Liming
2017-10-20 16:39         ` Ard Biesheuvel
2017-10-20 16:51           ` Laszlo Ersek
2017-10-20 16:52             ` Ard Biesheuvel
2017-10-20 17:18               ` Laszlo Ersek
2017-10-23 14:18                 ` Gao, Liming [this message]
2017-10-23 14:39                   ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A89E2EF3DFEDB4C8BFDE51014F606A14E16F647@SHSMSX104.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox