public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ray" <ray.ni@intel.com>
To: "Justen, Jordan L" <jordan.l.justen@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: Liu Yu <pedroa.liu@outlook.com>, Andrew Fish <afish@apple.com>,
	"Anthony Perard" <anthony.perard@citrix.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	"Wu, Hao A" <hao.a.wu@intel.com>,
	"Wang, Jian J" <jian.j.wang@intel.com>,
	Julien Grall <julien.grall@linaro.org>,
	Laszlo Ersek <lersek@redhat.com>,
	"Zeng, Star" <star.zeng@intel.com>
Subject: Re: [PATCH 00/10] Fix PEI Core issue during TemporaryRamMigration
Date: Tue, 19 Feb 2019 02:46:24 +0000	[thread overview]
Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C023766@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <20190218041141.21363-1-jordan.l.justen@intel.com>

Jordan,
I find many real platforms do not implement the temporary ram migration
PPI and rely on the PeiCore migration  logic.
So perhaps TemporaryRamMigration PPI was added to help platform to
destroy the temporary RAM (CAR in x86 platform).
But with the introduction of TemporaryRamDone PPI, maybe the
TemporaryRamMigration PPI can be retired.
The logic in PeiCore to call TemporaryRamMigration is just for backward
compatibility.
If that's true, do you still need to enhance PeiCore?

For the Emulator case, I already found without TemporaryRamMigration
the platform can still boot.

Does OVMF hard-depend on TemporaryRamMigration? Or it can reply on
the PeiCore migration logic + TemporaryDone PPI?

Thanks,
Ray

> -----Original Message-----
> From: Justen, Jordan L <jordan.l.justen@intel.com>
> Sent: Monday, February 18, 2019 12:12 PM
> To: edk2-devel@lists.01.org
> Cc: Justen, Jordan L <jordan.l.justen@intel.com>; Liu Yu
> <pedroa.liu@outlook.com>; Andrew Fish <afish@apple.com>; Anthony
> Perard <anthony.perard@citrix.com>; Ard Biesheuvel
> <ard.biesheuvel@linaro.org>; Wu, Hao A <hao.a.wu@intel.com>; Wang, Jian
> J <jian.j.wang@intel.com>; Julien Grall <julien.grall@linaro.org>; Laszlo Ersek
> <lersek@redhat.com>; Ni, Ray <ray.ni@intel.com>; Zeng, Star
> <star.zeng@intel.com>
> Subject: [PATCH 00/10] Fix PEI Core issue during TemporaryRamMigration
> 
> https://github.com/jljusten/edk2.git temp-ram-support
> 
> This series fixes an issue that, while rare, is possible based on the way the
> TemporaryRamSupport PPI is defined along with how it is used by the PEI
> Core.
> 
> Liu Yu reported a boot issue with EmulatorPkg, which I believe was caused by
> this issue.
> 
> The details of the issue are described in the commit message of the
> "MdeModePkg/Core/Pei: Add code path to allow assembly temp-ram
> migration" patch.
> 
> Along with this, I added a few Temporary RAM patches for EmulatorPkg and
> OvmfPkg.
> 
> Cc: Liu Yu <pedroa.liu@outlook.com>
> Cc: Andrew Fish <afish@apple.com>
> Cc: Anthony Perard <anthony.perard@citrix.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Hao Wu <hao.a.wu@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Julien Grall <julien.grall@linaro.org>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Ray Ni <ray.ni@intel.com>
> Cc: Star Zeng <star.zeng@intel.com>
> 
> Jordan Justen (10):
>   EmulatorPkg/build.sh: Fix missing usage of -b BUILDTARGET parameter
>   EmulatorPkg/Unix/Host: Use PcdInitValueInTempStack to init temp-ram
>   EmulatorPkg/Sec: Replace assembly temp-ram support with C code
>   EmulatorPkg/Sec: Disable optimizations for TemporaryRamMigration
>     function
>   OvmfPkg/Sec: Swap TemporaryRam Stack and Heap locations
>   OvmfPkg/Sec: Disable optimizations for TemporaryRamMigration
>   MdeModePkg/Core/Pei: Add code path to allow assembly temp-ram
>     migration
>   MdeModulePkg/Core/Pei: Use assembly for X64 TemporaryRamMigration
>   MdeModulePkg/Core/Pei: Use assembly for IA32 TemporaryRamMigration
>   OvmfPkg/Sec: Fill Temp Ram after TemporaryRamMigration
> 
>  EmulatorPkg/Sec/Ia32/SwitchRam.S              | 95 -------------------
>  EmulatorPkg/Sec/Ia32/SwitchRam.asm            | 94 ------------------
>  EmulatorPkg/Sec/Ia32/TempRam.c                | 65 -------------
>  EmulatorPkg/Sec/Sec.c                         | 76 ++++++++++++++-
>  EmulatorPkg/Sec/Sec.inf                       | 13 +--
>  EmulatorPkg/Sec/X64/SwitchRam.S               | 72 --------------
>  EmulatorPkg/Sec/X64/SwitchRam.asm             | 76 ---------------
>  EmulatorPkg/Unix/Host/Host.c                  |  2 +-
>  EmulatorPkg/Unix/Host/Host.inf                |  1 +
>  EmulatorPkg/build.sh                          | 10 +-
>  MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 59 ++++++++----
>  .../Dispatcher/Ia32/TemporaryRamMigration.S   | 72 ++++++++++++++
>  .../Ia32/TemporaryRamMigration.nasm           | 78 +++++++++++++++
>  .../Pei/Dispatcher/TemporaryRamMigration.c    | 52 ++++++++++
>  .../Dispatcher/X64/TemporaryRamMigration.S    | 69 ++++++++++++++
>  .../Dispatcher/X64/TemporaryRamMigration.nasm | 75 +++++++++++++++
>  MdeModulePkg/Core/Pei/PeiMain.h               | 52 ++++++++++
>  MdeModulePkg/Core/Pei/PeiMain.inf             | 14 +++
>  OvmfPkg/Sec/Ia32/SecEntry.nasm                |  2 +-
>  OvmfPkg/Sec/SecMain.c                         | 59 ++++++++----
>  OvmfPkg/Sec/X64/SecEntry.nasm                 |  2 +-
>  21 files changed, 577 insertions(+), 461 deletions(-)  delete mode 100644
> EmulatorPkg/Sec/Ia32/SwitchRam.S  delete mode 100644
> EmulatorPkg/Sec/Ia32/SwitchRam.asm
>  delete mode 100644 EmulatorPkg/Sec/Ia32/TempRam.c  delete mode
> 100644 EmulatorPkg/Sec/X64/SwitchRam.S  delete mode 100644
> EmulatorPkg/Sec/X64/SwitchRam.asm  create mode 100644
> MdeModulePkg/Core/Pei/Dispatcher/Ia32/TemporaryRamMigration.S
>  create mode 100644
> MdeModulePkg/Core/Pei/Dispatcher/Ia32/TemporaryRamMigration.nasm
>  create mode 100644
> MdeModulePkg/Core/Pei/Dispatcher/TemporaryRamMigration.c
>  create mode 100644
> MdeModulePkg/Core/Pei/Dispatcher/X64/TemporaryRamMigration.S
>  create mode 100644
> MdeModulePkg/Core/Pei/Dispatcher/X64/TemporaryRamMigration.nasm
> 
> --
> 2.20.0.rc1



  parent reply	other threads:[~2019-02-19  2:46 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-18  4:11 [PATCH 00/10] Fix PEI Core issue during TemporaryRamMigration Jordan Justen
2019-02-18  4:11 ` [PATCH 01/10] EmulatorPkg/build.sh: Fix missing usage of -b BUILDTARGET parameter Jordan Justen
2019-02-18  4:11 ` [PATCH 02/10] EmulatorPkg/Unix/Host: Use PcdInitValueInTempStack to init temp-ram Jordan Justen
2019-02-18  4:11 ` [PATCH 03/10] EmulatorPkg/Sec: Replace assembly temp-ram support with C code Jordan Justen
2019-02-18  4:11 ` [PATCH 04/10] EmulatorPkg/Sec: Disable optimizations for TemporaryRamMigration function Jordan Justen
2019-02-18  4:11 ` [PATCH 05/10] OvmfPkg/Sec: Swap TemporaryRam Stack and Heap locations Jordan Justen
2019-02-18 12:58   ` Laszlo Ersek
2019-02-18  4:11 ` [PATCH 06/10] OvmfPkg/Sec: Disable optimizations for TemporaryRamMigration Jordan Justen
2019-02-18  7:53   ` Ard Biesheuvel
2019-02-18  9:08     ` Jordan Justen
2019-02-18  9:32       ` Ard Biesheuvel
2019-02-18 13:01         ` Laszlo Ersek
2019-02-19 22:50         ` Brian J. Johnson
2019-02-19 23:58           ` Jordan Justen
2019-02-20  8:52         ` Jordan Justen
2019-02-20  8:59           ` Ard Biesheuvel
2019-02-18  4:11 ` [PATCH 07/10] MdeModePkg/Core/Pei: Add code path to allow assembly temp-ram migration Jordan Justen
2019-02-18  4:11 ` [PATCH 08/10] MdeModulePkg/Core/Pei: Use assembly for X64 TemporaryRamMigration Jordan Justen
2019-02-18  4:11 ` [PATCH 09/10] MdeModulePkg/Core/Pei: Use assembly for IA32 TemporaryRamMigration Jordan Justen
2019-02-18  4:11 ` [PATCH 10/10] OvmfPkg/Sec: Fill Temp Ram after TemporaryRamMigration Jordan Justen
2019-02-18 13:15   ` Laszlo Ersek
2019-02-19  2:46 ` Ni, Ray [this message]
2019-02-19 13:25   ` [PATCH 00/10] Fix PEI Core issue during TemporaryRamMigration Gao, Liming
2019-02-20 13:27     ` Ni, Ray
2019-02-20 17:43       ` Jordan Justen
2019-02-21  0:15         ` Ni, Ray
2019-02-21  1:03           ` Jordan Justen
2019-02-21  4:43             ` Ni, Ray
2019-02-19 19:27   ` Jordan Justen

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=734D49CCEBEEF84792F5B80ED585239D5C023766@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