public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>,
	edk2-devel-01 <edk2-devel@lists.01.org>,
	 Ruiyu Ni <ruiyu.ni@intel.com>
Subject: Re: [PATCH 0/4] OvmfPkg: measure temp stack usage, restore temp RAM to 64KB
Date: Sun, 12 Nov 2017 10:58:37 +0000	[thread overview]
Message-ID: <CAKv+Gu897V1pfGjHdN-UUzipfE7z3cwzmO+HM6Md49JjTojfJg@mail.gmail.com> (raw)
In-Reply-To: <151043786891.19895.6326436717816766532@jljusten-skl>

On 11 November 2017 at 22:04, Jordan Justen <jordan.l.justen@intel.com> wrote:
> On 2017-11-11 12:38:21, Jordan Justen wrote:
>> On 2017-11-10 07:49:04, Laszlo Ersek wrote:
>> > The first three patches enable the PEI_CORE to report OVMF's temp
>> > SEC/PEI stack and heap usage.
>> >
>> >   - This depends on the new fixed PCD "PcdInitValueInTempStack",
>> >     recently added for
>> >     <https://bugzilla.tianocore.org/show_bug.cgi?id=740>
>> >     ("INIT_CAR_VALUE should be defined in a central location").
>> >
>> >   - Ard recently implemented the same in ArmPlatformPkg, for
>> >     <https://bugzilla.tianocore.org/show_bug.cgi?id=748> ("measure temp
>> >     SEC/PEI stack usage").
>> >
>> > The last (fourth) patch adapts OVMF to the larger MtrrLib stack demand
>> > that originates from commit 2bbd7e2fbd4b ("UefiCpuPkg/MtrrLib: Update
>> > algorithm to calculate optimal settings", 2017-09-27). OVMF's temp RAM
>> > size is restored to the historical / original 64KB.
>> >
>> > This work is tracked in
>> > <https://bugzilla.tianocore.org/show_bug.cgi?id=747> ("measure temp
>> > SEC/PEI stack usage; grow temp SEC/PEI RAM"), with links to related
>> > mailing list discussions.
>> >
>> > Repo:   https://github.com/lersek/edk2.git
>> > Branch: temp_ram_tweaks
>> >
>> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> > Cc: Jordan Justen <jordan.l.justen@intel.com>
>> > Cc: Ruiyu Ni <ruiyu.ni@intel.com>
>> >
>> > Thanks
>> > Laszlo
>> >
>> > Laszlo Ersek (4):
>> >   OvmfPkg/Sec/Ia32: free up EAX for other uses while setting up the
>> >     stack
>> >   OvmfPkg/Sec/Ia32: seed the temporary RAM with PcdInitValueInTempStack
>> >   OvmfPkg/Sec/X64: seed the temporary RAM with PcdInitValueInTempStack
>>
>> I'd like to try a different option for these 3. Can you hold off a bit
>> before pushing this series?
>
> I think we should use a C based approach instead, like in the attached
> patch.
>

I'm not sure: having to abuse SetJump () and having to leave an
arbitrary 512 byte window both seem pretty good reasons to stick with
assembly.

Is your concern that the stack gets cleared in RELEASE builds as well?
Can't we put an #ifndef MDEPKG_NDEBUG around the code instead?

>> >   OvmfPkg: restore temporary SEC/PEI RAM size to 64KB
>
> This patch is Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
>
>> >
>> >  OvmfPkg/OvmfPkgIa32.fdf        |  2 +-
>> >  OvmfPkg/OvmfPkgIa32X64.fdf     |  2 +-
>> >  OvmfPkg/OvmfPkgX64.fdf         |  2 +-
>> >  OvmfPkg/Sec/SecMain.inf        |  1 +
>> >  OvmfPkg/Sec/Ia32/SecEntry.nasm | 19 ++++++++++++++++---
>> >  OvmfPkg/Sec/X64/SecEntry.nasm  | 15 +++++++++++++++
>> >  6 files changed, 35 insertions(+), 6 deletions(-)
>> >
>> > --
>> > 2.14.1.3.gb7cf6e02401b
>> >


  reply	other threads:[~2017-11-12 10:54 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-10 15:49 [PATCH 0/4] OvmfPkg: measure temp stack usage, restore temp RAM to 64KB Laszlo Ersek
2017-11-10 15:49 ` [PATCH 1/4] OvmfPkg/Sec/Ia32: free up EAX for other uses while setting up the stack Laszlo Ersek
2017-11-13 18:08   ` Jordan Justen
2017-11-13 18:30     ` Laszlo Ersek
2017-11-10 15:49 ` [PATCH 2/4] OvmfPkg/Sec/Ia32: seed the temporary RAM with PcdInitValueInTempStack Laszlo Ersek
2017-11-10 15:56   ` Ard Biesheuvel
2017-11-10 18:11     ` Laszlo Ersek
2017-11-10 18:27       ` Laszlo Ersek
2017-11-11  9:10       ` Ard Biesheuvel
2017-11-13 18:25   ` Jordan Justen
2017-11-13 18:36     ` Laszlo Ersek
2017-11-13 19:02       ` Jordan Justen
2017-11-13 20:58         ` Laszlo Ersek
2017-11-10 15:49 ` [PATCH 3/4] OvmfPkg/Sec/X64: " Laszlo Ersek
2017-11-10 15:49 ` [PATCH 4/4] OvmfPkg: restore temporary SEC/PEI RAM size to 64KB Laszlo Ersek
2017-11-11  9:14 ` [PATCH 0/4] OvmfPkg: measure temp stack usage, restore temp RAM " Ard Biesheuvel
2017-11-11 20:38 ` Jordan Justen
2017-11-11 22:04   ` Jordan Justen
2017-11-12 10:58     ` Ard Biesheuvel [this message]
2017-11-13  9:08       ` Jordan Justen
2017-11-13 10:09         ` Ard Biesheuvel
2017-11-13 12:34           ` Laszlo Ersek
2017-11-13 13:09             ` Laszlo Ersek
2017-11-13 18:05               ` Jordan Justen
2017-11-13 18:04             ` 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=CAKv+Gu897V1pfGjHdN-UUzipfE7z3cwzmO+HM6Md49JjTojfJg@mail.gmail.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