From: Jordan Justen <jordan.l.justen@intel.com>
To: "Ni, Ray" <ray.ni@Intel.com>, Andrew Fish <afish@apple.com>,
Laszlo Ersek <lersek@redhat.com>, Liu Yu <pedroa.liu@outlook.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: EmulatorPkg Unix Host Segmentation fault.
Date: Sun, 17 Feb 2019 18:45:26 -0800 [thread overview]
Message-ID: <155045792639.20549.10652194945643646136@jljusten-skl> (raw)
In-Reply-To: <848819df-1225-3660-00af-80bf95122ae6@Intel.com>
On 2019-02-17 18:25:01, Ni, Ray wrote:
> Jordan,
> > Study the PeiCore migration logic a bit more, I found since PeiCore
> > knows the exact size of new stack in permanent memory, it migrates
> > old stack to the top of new stack.
> > But the migration logic in above C code (since it doesn't know the
> > size of new stack, CopySize is the size of temporary memory) may copy
> > the old stack to the middle in new stack.
>
> Maybe your new RamMigration2 PPI needs to carry both the old and new
> stack/heap location and size.
> It helps:
> 1. migrate the old stack to top of new stack (instead of middle of new
> stack).
> 2. potentially reduce the size of memory that needs to be copied.
>
> TemporaryRamMigration (
> IN CONST EFI_PEI_SERVICES **PeiServices,
> IN EFI_PHYSICAL_ADDRESS TemporaryStackBase,
> IN EFI_PHYSICAL_ADDRESS PermanentStackSize,
> IN EFI_PHYSICAL_ADDRESS TemporaryHeapBase,
> IN EFI_PHYSICAL_ADDRESS PermanentHeapSize,
> IN TEMPORARY_RAM_MIGRATION_CALLBACK Callback,
> IN VOID *Context
> )
Hmm. I'll think about that for the new PPI.
> Before the finalize of PI spec change regarding the RamMigration2
> change, I prefer to fix the EmulatorPkg boot crash ASAP using the
> OVMF-like solution.
> If you agree, I will send out the patch to let you review.
You are right that it will take more time for a new PPI. But, I have
almost finished my patches to fix the PEI Core with the old PPI. I'll
try to send them out tonight.
-Jordan
prev parent reply other threads:[~2019-02-18 2:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-18 4:51 EmulatorPkg Unix Host Segmentation fault Liu Yu
2018-11-18 9:27 ` Jordan Justen
2018-11-18 12:07 ` Liu Yu
2018-11-18 22:37 ` Andrew Fish
2018-11-19 1:13 ` Jordan Justen
2018-11-19 19:16 ` Jordan Justen
2018-11-19 21:22 ` Andrew Fish
2018-11-19 22:12 ` Laszlo Ersek
2018-11-19 23:39 ` Andrew Fish
2018-11-19 22:29 ` Jordan Justen
2018-11-20 0:54 ` Andrew Fish
2018-11-20 8:57 ` Laszlo Ersek
2019-02-16 7:29 ` Ni, Ray
2019-02-16 7:40 ` Ni, Ray
2019-02-16 20:23 ` Andrew Fish
2019-02-16 7:43 ` Ni, Ray
2019-02-16 8:05 ` Ni, Ray
2019-02-16 9:11 ` Jordan Justen
2019-02-18 2:25 ` Ni, Ray
2019-02-18 2:45 ` Jordan Justen [this message]
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=155045792639.20549.10652194945643646136@jljusten-skl \
--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