public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Théo Jehl" <theojehl76@gmail.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: devel@edk2.groups.io, Leif Lindholm <quic_llindhol@quicinc.com>,
	 Michael D Kinney <michael.d.kinney@intel.com>,
	Isaac Oram <isaac.w.oram@intel.com>,
	 Pedro Falcato <pedro.falcato@gmail.com>,
	Stefan Hajnoczi <stefanha@gmail.com>
Subject: Re: [edk2-platforms][PATCH v1 01/02] QemuOpenBoardPkg: Add QemuOpenBoardPkg
Date: Fri, 2 Sep 2022 15:36:56 +0200	[thread overview]
Message-ID: <CAKqL5MKAXsrNM1mCsrX7iCF+JDHLnxcUhaEy5zDhvMQs4xWJQg@mail.gmail.com> (raw)
In-Reply-To: <20220902100245.m5mgcpvub4gmwj54@sirius.home.kraxel.org>

[-- Attachment #1: Type: text/plain, Size: 4264 bytes --]

>
> That is a rather short description for a patch of this size.  It
> probably makes sense to break that down into smaller pieces and make a
> patch series out of it because you can describe the specific pieces much
> better then.


I was thinking about breaking down the main patch into smaller ones
corresponding to
MinPlatform stages implementations to make it easier to follow along.

It seems the goal is to have a MinPlatform board which can easily be
> used to learn about and experiment with MinPlatform, is that correct?


The package goal is to be a simple implementation for developers wanting to
get started with board ports indeed.

Why duplicate that lib instead of just using the OvmfPkg version (which
> you do elsewhere)?


It was supposed to be for training purposes, I was discussing with my
mentors about that,
it stayed in the project because of its simplicity, the OvmfPkg is way more
complete but this
one provides only the essentials. And this simple implementation is used in
my custom libs, the Ovmf
version is used by OvmfPkg modules and libs. If indeed my lib doesn't bring
anything new or useful I can
remove it and switch to OvmfPkg QemuFwCfgLib instead.

Note that OvmfPkg got a PlatformInitLib recently which you might be able
> to use to reduce code duplication (didn't check the code though and
> maybe MinPlatform init is different enough that this doesn't help much).


For both GSOC purposes and MinPlatform compliance, I didn't want this
package to be OVMF but repacked,
PlatformInit from OVMF is very complete, maybe too much when we are
targeting a simple board port.
QemuOpenBoardPkg's PlatformInit only performs the necessary and nothing
more, to make reading and understanding
the package easier.
It's also up to debate, but concerning OVMF code, all the dependencies we
have with OVMF makes understanding
the boot flow a bit harder, I was thinking about slowly phasing out OVMF
modules with lot of external dependencies
in favor of new ones, keeping the "only do the necessary" pattern, just
like what happened with PlatformInitPei.

Regards,
Théo

Le ven. 2 sept. 2022 à 12:02, Gerd Hoffmann <kraxel@redhat.com> a écrit :

> On Sat, Aug 27, 2022 at 02:02:00AM +0200, Théo wrote:
> > From: Théo Jehl <theojehl76@gmail.com>
> >
> > QemuOpenBoardPkg adds a MinPlatform port to Qemu x86_64
> > It can boots UEFI Linux and Windows, and works on PIIX4 and Q35
> > This board port provides a simple starting place for investigating edk2
> and
> > MinPlatform Arch.
> > Currently we implement up to stage 4 of the MinPlatform spec and can boot
> > Windows/Linux.
>
> That is a rather short description for a patch of this size.  It
> probably makes sense to break that down into smaller pieces and make a
> patch series out of it because you can describe the specific pieces much
> better then.
>
> I'm not familiar with MinPlatform, just skimmed the manual.  Can't
> comment much on those details.
>
> It seems the goal is to have a MinPlatform board which can easily be
> used to learn about and experiment with MinPlatform, is that correct?
>
> >
> Platform/Qemu/QemuOpenBoardPkg/Library/OpenQemuFwCfgLib/OpenQemuFwCfgLib.inf
>      |  23 +
> >  Platform/Qemu/QemuOpenBoardPkg/Include/Library/OpenQemuFwCfgLib.h
>             | 102 +++
> >
> Platform/Qemu/QemuOpenBoardPkg/Library/OpenQemuFwCfgLib/OpenQemuFwCfgLib.c
>        | 130 ++++
>
> Why duplicate that lib instead of just using the OvmfPkg version (which
> you do elsewhere)?
>
> >  Platform/Qemu/QemuOpenBoardPkg/PlatformInitPei/Cpu.c
>            |  56 ++
> >  Platform/Qemu/QemuOpenBoardPkg/PlatformInitPei/Memory.c
>             | 244 ++++++++
> >  Platform/Qemu/QemuOpenBoardPkg/PlatformInitPei/Pci.c
>            |  59 ++
> >  Platform/Qemu/QemuOpenBoardPkg/PlatformInitPei/Pcie.c
>             |  91 +++
> >  Platform/Qemu/QemuOpenBoardPkg/PlatformInitPei/PlatformInit.c
>             |  67 ++
>
> Note that OvmfPkg got a PlatformInitLib recently which you might be able
> to use to reduce code duplication (didn't check the code though and
> maybe MinPlatform init is different enough that this doesn't help much).
>
> take care,
>   Gerd
>
>

[-- Attachment #2: Type: text/html, Size: 5931 bytes --]

  reply	other threads:[~2022-09-02 13:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-27  0:01 [edk2-platforms][PATCH v1 00/02] Add QemuOpenBoardPkg Théo Jehl
2022-08-27  0:02 ` [edk2-platforms][PATCH v1 01/02] QemuOpenBoardPkg: " Théo Jehl
2022-08-29 21:41   ` Pedro Falcato
2022-09-02 10:02   ` Gerd Hoffmann
2022-09-02 13:36     ` Théo Jehl [this message]
2022-09-02 16:49       ` Gerd Hoffmann
2022-09-02 16:51     ` Pedro Falcato
2022-08-27  0:02 ` [edk2-platforms][PATCH v1 02/02] Maintainers: Add maintainers for QemuOpenBoardPkg Théo Jehl
2022-08-29 20:15 ` [edk2-devel] [edk2-platforms][PATCH v1 00/02] Add QemuOpenBoardPkg Oram, Isaac W

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=CAKqL5MKAXsrNM1mCsrX7iCF+JDHLnxcUhaEy5zDhvMQs4xWJQg@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