[edk2-devel] [PATCH 0/4] XCODE5 toolchain binary patching fix

Lendacky, Thomas posted 4 patches 3 years, 11 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
OvmfPkg/OvmfPkgIa32.dsc                       |  20 +
OvmfPkg/OvmfPkgIa32X64.dsc                    |  20 +
OvmfPkg/OvmfPkgX64.dsc                        |  20 +
OvmfPkg/OvmfXen.dsc                           |  16 +
UefiCpuPkg/UefiCpuPkg.dsc                     |  23 +
UefiPayloadPkg/UefiPayloadPkgIa32.dsc         |   8 +
.../Xcode5DxeCpuExceptionHandlerLib.inf       |  64 +++
.../Xcode5PeiCpuExceptionHandlerLib.inf       |  63 +++
.../Xcode5SecPeiCpuExceptionHandlerLib.inf    |  55 +++
.../Xcode5SmmCpuExceptionHandlerLib.inf       |  59 +++
.../X64/ExceptionHandlerAsm.nasm              |  25 +-
.../X64/Xcode5ExceptionHandlerAsm.nasm        | 413 ++++++++++++++++++
12 files changed, 767 insertions(+), 19 deletions(-)
create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5DxeCpuExceptionHandlerLib.inf
create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5PeiCpuExceptionHandlerLib.inf
create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf
create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SmmCpuExceptionHandlerLib.inf
create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/Xcode5ExceptionHandlerAsm.nasm
[edk2-devel] [PATCH 0/4] XCODE5 toolchain binary patching fix
Posted by Lendacky, Thomas 3 years, 11 months ago
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.

This is accomplished in phases:
  - Create a new XCODE5 specific version of the ExceptionHandlerAsm.nasm
    file
  - Update the DSC files that use the CpuExceptionHandlerLib library to
    to use the XCODE5 version of the library when the XCODE5 toolchain
    is used.
  - Revert the changes made by commit 2db0ccc2d7fe in 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:
e54310451f1a ("OvmfPkg: Add VBE2 mode info structure to LegacyVgaBios.h")

Cc: Andrew Fish <afish@apple.com>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Benjamin You <benjamin.you@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Guo Dong <guo.dong@intel.com>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Jian J Wang <jian.j.wang@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: Maurice Ma <maurice.ma@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Ray Ni <ray.ni@intel.com>

Tom Lendacky (4):
  UefiCpuPkg/CpuExceptionHandler: Make XCODE5 changes toolchain specific
  UefiPayloadPkg: Use toolchain appropriate CpuExceptionHandlerLib
  OvmfPkg: Use toolchain appropriate CpuExceptionHandlerLib
  UefiCpuPkg/CpuExceptionHandler: Revert binary patching in standard
    CpuExceptionHandlerLib

 OvmfPkg/OvmfPkgIa32.dsc                       |  20 +
 OvmfPkg/OvmfPkgIa32X64.dsc                    |  20 +
 OvmfPkg/OvmfPkgX64.dsc                        |  20 +
 OvmfPkg/OvmfXen.dsc                           |  16 +
 UefiCpuPkg/UefiCpuPkg.dsc                     |  23 +
 UefiPayloadPkg/UefiPayloadPkgIa32.dsc         |   8 +
 .../Xcode5DxeCpuExceptionHandlerLib.inf       |  64 +++
 .../Xcode5PeiCpuExceptionHandlerLib.inf       |  63 +++
 .../Xcode5SecPeiCpuExceptionHandlerLib.inf    |  55 +++
 .../Xcode5SmmCpuExceptionHandlerLib.inf       |  59 +++
 .../X64/ExceptionHandlerAsm.nasm              |  25 +-
 .../X64/Xcode5ExceptionHandlerAsm.nasm        | 413 ++++++++++++++++++
 12 files changed, 767 insertions(+), 19 deletions(-)
 create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5DxeCpuExceptionHandlerLib.inf
 create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5PeiCpuExceptionHandlerLib.inf
 create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SecPeiCpuExceptionHandlerLib.inf
 create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/Xcode5SmmCpuExceptionHandlerLib.inf
 create mode 100644 UefiCpuPkg/Library/CpuExceptionHandlerLib/X64/Xcode5ExceptionHandlerAsm.nasm

-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#58520): https://edk2.groups.io/g/devel/message/58520
Mute This Topic: https://groups.io/mt/73406887/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-