public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ardb@kernel.org>
To: Nhi Pham <nhi@os.amperecomputing.com>
Cc: devel@edk2.groups.io,
	Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>,
	 Leif Lindholm <quic_llindhol@quicinc.com>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	 Sami Mujawar <sami.mujawar@arm.com>
Subject: Re: [edk2-devel] [PATCH edk2-platforms 2/2] SbsaQemu: set CPU model in SMBIOS
Date: Mon, 15 Jul 2024 10:24:18 +0200	[thread overview]
Message-ID: <CAMj1kXGFMnPOHv6RxQbqwjQGqoW86Ow4iF8BWSB7N+7ToaC4GQ@mail.gmail.com> (raw)
In-Reply-To: <b8c3e0b0-b6a7-4e9c-9b8b-59cbdec120c5@os.amperecomputing.com>

On Mon, 15 Jul 2024 at 05:25, Nhi Pham <nhi@os.amperecomputing.com> wrote:
>
> On 7/12/2024 5:01 PM, Ard Biesheuvel via groups.io wrote:
> > On Fri, 12 Jul 2024 at 11:24, Marcin Juszkiewicz
> > <marcin.juszkiewicz@linaro.org> wrote:
> >>
> >> SbsaQemu platform have several cpu models available. Since start it
> >> reported "arm-virt" one in SMBIOS instead of real one.
> >>
> >> This change replaces it with the real cpu model like Cortex-A57,
> >> Neoverse-N2 etc.
> >>
> >> Requires change in EDK2 to make PcdProcessorVersion dynamic.
> >>
> >> Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
> >
> > I am going to make the same remark as I did before in a different
> > context: how is it guaranteed that the code that sets the PCD executes
> > before the code that consumes it?
>
> We could implement the setting in a 'PlatformInitDxe', which will be
> added to the 'APPRIORI DXE' list to ensure it is scheduled to run in the
> early DXE phase. This approach will help initialize the neccessary
> compoenents early in the DXE phase, providing a stable foundation for
> subsequent operations.
>

APRIORI DXE should be avoided, so I don't want to see it used in a
reference implementation. (APRIORI DXE breaks the DXE dependency based
dispatch)

> >
> > Making PCDs dynamic is usually not the solution here, unless they are
> > set in the PEI phase and consumed in the DXE phase or after.
> >
> > The EFI SMBIOS protocol has an 'update string' method that you can
> > call from a platform driver. That might be a better fit here, and the
> > PCD can remain fixed, and carry a fallback default value.
> >
>
> In fact that the 'update string' method could eat up the boot time.
> Hence, the SMBIOS string patching is not prefered.
>

Let's implement it correctly first, and then, if boot time appears to
be impacted, think about how to optimize this.

Boot time is not a huge concern for an emulator.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119933): https://edk2.groups.io/g/devel/message/119933
Mute This Topic: https://groups.io/mt/107179083/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



      reply	other threads:[~2024-07-15  8:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-12  9:23 [edk2-devel] [PATCH 0/2] Set CPU model in SMBIOS Marcin Juszkiewicz
2024-07-12  9:23 ` [edk2-devel] [PATCH 1/2] ArmPkg: make PcdProcessorVersion dynamic Marcin Juszkiewicz
2024-07-12  9:23 ` [edk2-devel] [PATCH edk2-platforms 2/2] SbsaQemu: set CPU model in SMBIOS Marcin Juszkiewicz
2024-07-12 10:01   ` Ard Biesheuvel
2024-07-12 10:58     ` Marcin Juszkiewicz
2024-07-15  3:24     ` Nhi Pham via groups.io
2024-07-15  8:24       ` Ard Biesheuvel [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=CAMj1kXGFMnPOHv6RxQbqwjQGqoW86Ow4iF8BWSB7N+7ToaC4GQ@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