public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Leif Lindholm <leif.lindholm@linaro.org>
To: Laszlo Ersek <lersek@redhat.com>
Cc: edk2-devel@lists.01.org, Liming Gao <liming.gao@intel.com>
Subject: Re: BaseTools: handling of $(ARCH) in .dsc/.fdf when multiple -a specified
Date: Tue, 5 Feb 2019 11:08:19 +0000	[thread overview]
Message-ID: <20190205110819.snxii7yoqyd5zwhu@bivouac.eciton.net> (raw)
In-Reply-To: <ebf9baca-e1a5-282f-1a9c-7c779b6c8c26@redhat.com>

On Mon, Feb 04, 2019 at 08:02:55PM +0100, Laszlo Ersek wrote:
> > Now, the Ia32X64 target is very much of a special case, which I don't
> > necessarily see as usefully supported by the current .dsc
> > specification. But I believe we need to do one of
> > - banning (simultaneous) multi-architecture platforms
> > - treating them the same as multi-target (-b) builds (build them separately)
> > - have a defined way of handling them
> 
> Only option #3 can work here. OvmfPkgIa32X64.dsc is a platform where the
> Reset Vector, SEC and PEI phases are built for IA32, the rest (i.e.
> DXE+) is built for X64, and the images are finally organized into a
> single flash device (FD).
> 
> The key PCD is
> 
>   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|TRUE
> 
> which you won't see in either the pure IA32 or the pure X64 OVMF
> platform -- as none of those have to switch from 32-bit mode to 64-bit
> (long) mode at the PEI/DXE boundary:
> 
> - OvmfPkgIa32.dsc:
>   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
> 
> - OvmfPkgIa32X64.dsc:
>   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|TRUE
> 
> - OvmfPkgX64.dsc:
>   gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode|FALSE
> 
> 
> Regarding the usefulness of the OvmfPkgIa32X64.dsc, that's presently the
> *only* OVMF platform that is suitable for production use. It is the only
> platform that:
> 
> (a) supports Secure Boot, *and*
> (b) includes ACPI S3 suspend/resume support, *and*
> (c) protects sensitive data related to (a) and (b), i.e. non-volatile
> UEFI variables, and the LockBox data structure, respectively, by
> inclusion of the SMM driver stack, and usage of SMRAM, *and*
> (d) supports 64-bit OS-es.

OK, at that point I totally agree only option #3 is workable.

> > So, am I missing something, or does this require a change in
> > BaseTools?
> 
> I believe you may have missed that "-a IA32 -a X64" stands for more than
> just "build this set of modules for each of IA32 and X64, separately".
> 
> AIUI, "-a IA32 -a X64" it means "build the Components.* sections
> (plural) as dictated by the '-a' flags, and then organize the full
> (multi-arch) set of modules into the flash device(s), described by
> FLASH_DEFINITION".

Nope, I did spot that actually :)
Although I was certainly confused the first 10 times I looked at those
.dscs.

And it could still be squashed into a common .dsc/.fdf if there was a
useful way of handling $(ARCH) when multiple -a have been specified to
the build command.

/
    Leif


  reply	other threads:[~2019-02-05 11:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-04 18:31 BaseTools: handling of $(ARCH) in .dsc/.fdf when multiple -a specified Leif Lindholm
2019-02-04 19:02 ` Laszlo Ersek
2019-02-05 11:08   ` Leif Lindholm [this message]
2019-02-05 11:35     ` Laszlo Ersek
2019-02-11 15:51       ` Gao, Liming

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=20190205110819.snxii7yoqyd5zwhu@bivouac.eciton.net \
    --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