public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Liming Gao" <liming.gao@intel.com>
To: Laszlo Ersek <lersek@redhat.com>,
	"Justen, Jordan L" <jordan.l.justen@intel.com>,
	"Dong, Eric" <eric.dong@intel.com>, "Ni, Ray" <ray.ni@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	"Anthony Perard" <anthony.perard@citrix.com>,
	Julien Grall <julien@xen.org>,
	"Brijesh Singh" <brijesh.singh@amd.com>,
	Andrew Fish <afish@apple.com>,
	"Chiu, Chasel" <chasel.chiu@intel.com>,
	"Steele, Kelly" <kelly.steele@intel.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>,
	"Desimone, Nathaniel L" <nathaniel.l.desimone@intel.com>,
	"Qian, Yi" <yi.qian@intel.com>,
	"Sun, Zailiang" <zailiang.sun@intel.com>
Subject: Re: [PATCH v3 0/3] XCODE5 toolchain binary patching fix
Date: Fri, 8 May 2020 14:11:50 +0000	[thread overview]
Message-ID: <BN6PR11MB39723DBA60C7F4F9DBD7E24580A20@BN6PR11MB3972.namprd11.prod.outlook.com> (raw)
In-Reply-To: <8d38706c-1d89-88ca-1760-935566fd62e7@redhat.com>

Laszlo:
  This change is OK to me. It doesn't impact those platforms, because their SEC and PEI are IA32 only. This patch is to update SecPei library instance for X64 arch.

  Reviewed-by: Liming Gao <liming.gao@intel.com>

Thanks
Liming
> -----Original Message-----
> From: Laszlo Ersek <lersek@redhat.com>
> Sent: Friday, May 8, 2020 7:29 PM
> To: Justen, Jordan L <jordan.l.justen@intel.com>; Gao, Liming <liming.gao@intel.com>; Dong, Eric <eric.dong@intel.com>; Ni, Ray
> <ray.ni@intel.com>
> Cc: Tom Lendacky <thomas.lendacky@amd.com>; devel@edk2.groups.io; Ard Biesheuvel <ard.biesheuvel@linaro.org>; Anthony
> Perard <anthony.perard@citrix.com>; Julien Grall <julien@xen.org>; Brijesh Singh <brijesh.singh@amd.com>; Andrew Fish
> <afish@apple.com>; Chiu, Chasel <chasel.chiu@intel.com>; Steele, Kelly <kelly.steele@intel.com>; Kinney, Michael D
> <michael.d.kinney@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Qian, Yi <yi.qian@intel.com>; Sun, Zailiang
> <zailiang.sun@intel.com>
> Subject: Re: [PATCH v3 0/3] XCODE5 toolchain binary patching fix
> 
> Eric, Ray, Liming -- do you have comments please?
> 
> I'm ready to push the series (it has two UefiCpuPkg patches and one
> OvmfPkg patch).
> 
> Please consider specifically whether we should push the last patch at
> once. The last patch would prevent the following "edk2-platforms" DSC
> files from building with XCODE5:
> 
> Platform/Intel/MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
> Platform/Intel/QuarkPlatformPkg/Quark.dsc
> Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
> Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> 
> That could be prevented if Tom sent patches for them like the middle
> (OvmfPkg) patch in this series. But we don't know if those platforms
> above are ever built with XCODE5.
> 
> Adding their maintainers to the CC list as well.
> 
> Thanks,
> Laszlo
> 
> On 05/07/20 15:06, Tom Lendacky wrote:
> >
> > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2340
> >
> > Commit 2db0ccc2d7fe ("UefiCpuPkg: Update CpuExceptionHandlerLib pass
> > XCODE5 tool chain") introduced binary patching in the
> > ExceptionHandlerAsm.nasm in order to support the XCODE5 toolchain.
> > However, the CpuExceptionHandlerLib can be used during SEC phase which
> > would result in binary patching of flash.
> >
> > This series creates a new CpuExceptionHandlerLib file to support
> > the required binary patching for the XCODE5 toolchain, while reverting
> > the changes from commit 2db0ccc2d7fe in the standard file. As the Pei,
> > Dxe and SMM versions of the library operate in memory (as opposed to
> > flash), only the SEC/PEI version is of the library is updated to use the
> > version of the ExceptionHandlerAsm.nasm that does not perform binary
> > patching.
> >
> > This is accomplished in phases:
> >   - Create a new XCODE5 specific version of the ExceptionHandlerAsm.nasm
> >     file and update all CpuExceptionHandler INF files to use it while also
> >     creating a new SEC/PEI CpuExceptionHandler INF file specifically for
> >     the XCODE5 toolchain.
> >   - Update all package DSC files that use the SecPeiCpuExceptionHandlerLib
> >     version of the library to use the XCODE5 version of the library,
> >     Xcode5SecPeiCpuExceptionHandlerLib, when the XCODE5 toolchain is used.
> >   - Revert the changes made by commit 2db0ccc2d7fe in the standard file
> >     and update the SecPeiCpuExceptionHandlerLib.inf file to use the
> >     standard file.
> >
> > I don't have access to an XCODE5 toolchain setup, so I have not tested
> > this with XCODE5. I would like to request that someone who does please
> > test this.
> >
> > ---
> >
> > These patches are based on commit:
> > faef5a367c83 ("ShellPkg: acpiview: Check if SBBR mandatory ACPI tables are installed")
> >
> > Cc: Andrew Fish <afish@apple.com>
> > Cc: Anthony Perard <anthony.perard@citrix.com>
> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > Cc: Brijesh Singh <brijesh.singh@amd.com>
> > Cc: Eric Dong <eric.dong@intel.com>
> > Cc: Jordan Justen <jordan.l.justen@intel.com>
> > Cc: Julien Grall <julien@xen.org>
> > Cc: Laszlo Ersek <lersek@redhat.com>
> > Cc: Liming Gao <liming.gao@intel.com>
> > Cc: Ray Ni <ray.ni@intel.com>
> >
> > Changes since v2:
> > - Updated [Components] section of UefiCpuPkg.dsc to conditionally exclude
> >   SecPeiCpuExceptionHandlerLib.inf for the XCODE5 toolchain.
> > - Added some missed Reviewed-by: and Acked-by: tags from previous
> >   versions.
> >
> > Changes since v1:
> > - Only apply the revert to the Sec/Pei CpuExceptionHandler library and
> >   leave the Pei, Dxe and Smm versions using the binary patching version.
> > - Generate a unique file GUID for the new library INF file and create
> >   a corresponding UNI file.
> > - Remove any references to SEV-ES (original patches accidentally submitted
> >   from wrong tree).
> >
> > Tom Lendacky (3):
> >   UefiCpuPkg/CpuExceptionHandler: Make XCODE5 changes toolchain specific
> >   OvmfPkg: Use toolchain appropriate CpuExceptionHandlerLib
> >   UefiCpuPkg/CpuExceptionHandler: Revert CpuExceptionHandler binary
> >     patching
> >
> >  OvmfPkg/OvmfPkgIa32.dsc                       |  4 +++
> >  OvmfPkg/OvmfPkgIa32X64.dsc                    |  4 +++
> >  OvmfPkg/OvmfPkgX64.dsc                        |  4 +++
> >  OvmfPkg/OvmfXen.dsc                           |  4 +++
> >  UefiCpuPkg/UefiCpuPkg.dsc                     |  7 ++++++
> >  .../DxeCpuExceptionHandlerLib.inf             |  2 +-
> >  .../PeiCpuExceptionHandlerLib.inf             |  2 +-
> >  .../SmmCpuExceptionHandlerLib.inf             |  2 +-
> >  ...=> Xcode5SecPeiCpuExceptionHandlerLib.inf} | 13 +++++++---
> >  .../X64/ExceptionHandlerAsm.nasm              | 25 +++++--------------
> >  ...sm.nasm => Xcode5ExceptionHandlerAsm.nasm} |  0
> >  .../Xcode5SecPeiCpuExceptionHandlerLib.uni    | 18 +++++++++++++
> >  12 files changed, 59 insertions(+), 26 deletions(-)
> >  copy UefiCpuPkg/Library/CpuExceptionHandlerLib/{SecPeiCpuExceptionHandlerLib.inf => Xcode5SecPeiCpuExceptionHandlerLib.inf}
> (64%)
> >  copy UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/{ExceptionHandlerAsm.nasm => Xcode5ExceptionHandlerAsm.nasm} (100%)
> >  create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.uni
> >


  reply	other threads:[~2020-05-08 14:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-07 13:06 [PATCH v3 0/3] XCODE5 toolchain binary patching fix Lendacky, Thomas
2020-05-07 13:06 ` [PATCH v3 1/3] UefiCpuPkg/CpuExceptionHandler: Make XCODE5 changes toolchain specific Lendacky, Thomas
2020-05-07 13:06 ` [PATCH v3 2/3] OvmfPkg: Use toolchain appropriate CpuExceptionHandlerLib Lendacky, Thomas
2020-05-07 13:06 ` [PATCH v3 3/3] UefiCpuPkg/CpuExceptionHandler: Revert CpuExceptionHandler binary patching Lendacky, Thomas
2020-05-08 11:28 ` [PATCH v3 0/3] XCODE5 toolchain binary patching fix Laszlo Ersek
2020-05-08 14:11   ` Liming Gao [this message]
2020-05-09  2:17 ` [edk2-devel] " Dong, Eric
2020-05-11 20:06 ` Laszlo Ersek

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=BN6PR11MB39723DBA60C7F4F9DBD7E24580A20@BN6PR11MB3972.namprd11.prod.outlook.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