public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ard Biesheuvel" <ardb@kernel.org>
To: devel@edk2.groups.io, corvink@freebsd.org
Cc: Jiewen Yao <jiewen.yao@intel.com>,
	Jordan Justen <jordan.l.justen@intel.com>,
	 Gerd Hoffmann <kraxel@redhat.com>,
	Rebecca Cran <rebecca@bsdio.com>,
	Peter Grehan <grehan@freebsd.org>
Subject: Re: [edk2-devel] [PATCH v1 1/1] OvmfPkg/Bhyve: build platform info HOB
Date: Mon, 7 Aug 2023 18:52:56 +0200	[thread overview]
Message-ID: <CAMj1kXFn=pg3Jzm3iTdPHOsxRNNeYTOJdA-wc0=R96D-MDRc3g@mail.gmail.com> (raw)
In-Reply-To: <a287429fcea589d36944c5dba0d733f791c05618.camel@FreeBSD.org>

On Mon, 7 Aug 2023 at 13:31, Corvin Köhne <corvink@freebsd.org> wrote:
>
> On Mon, 2023-07-24 at 14:59 +0200, Corvin Köhne wrote:
> > Copy the function BuildPlatformInfoHob() from OvmfPkg/PlatformPei.
> >
> > QemuFwCfgLib expect this HOB to be present, or fails to do anything.
> > InternalQemuFwCfgIsAvailable() from QemuFwCfgPeiLib module will not
> > check if the HOB is actually present for example and try to use a
> > NULL
> > pointer.
> >
> > Fixes: cda98df16228970dcf9a4ce2af5368219711b4b0
> > ("OvmfPkg/QemuFwCfgLib: remove mQemuFwCfgSupported +
> > mQemuFwCfgDmaSupported")
> > Signed-off-by: Corvin Köhne <corvink@FreeBSD.org>
> > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > Cc: Jordan Justen <jordan.l.justen@intel.com>
> > Cc: Gerd Hoffmann <kraxel@redhat.com>
> > Cc: Rebecca Cran <rebecca@bsdio.com>
> > Cc: Peter Grehan <grehan@freebsd.org>
> > ---
> >  OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf |  1 +
> >  OvmfPkg/Bhyve/PlatformPei/Platform.c      | 20 ++++++++++++++++++++
> >  2 files changed, 21 insertions(+)
> >

Could someone review this please?




> > diff --git a/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf
> > b/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf
> > index 739d63098b1e..07570d4e30ca 100644
> > --- a/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf
> > +++ b/OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf
> > @@ -44,6 +44,7 @@ [Packages]
> >
> >  [Guids]
> >    gEfiMemoryTypeInformationGuid
> > +  gUefiOvmfPkgPlatformInfoGuid
> >
> >  [LibraryClasses]
> >    BaseLib
> > diff --git a/OvmfPkg/Bhyve/PlatformPei/Platform.c
> > b/OvmfPkg/Bhyve/PlatformPei/Platform.c
> > index 5bfe435327c1..bdfc1614d284 100644
> > --- a/OvmfPkg/Bhyve/PlatformPei/Platform.c
> > +++ b/OvmfPkg/Bhyve/PlatformPei/Platform.c
> > @@ -17,6 +17,7 @@
> >  //
> >  // The Library classes this module consumes
> >  //
> > +#include <Library/BaseMemoryLib.h>
> >  #include <Library/BaseLib.h>
> >  #include <Library/DebugLib.h>
> >  #include <Library/HobLib.h>
> > @@ -27,6 +28,7 @@
> >  #include <Library/PciLib.h>
> >  #include <Library/PeimEntryPoint.h>
> >  #include <Library/PeiServicesLib.h>
> > +#include <Library/PlatformInitLib.h>
> >  #include <Library/ResourcePublicationLib.h>
> >  #include <Guid/MemoryTypeInformation.h>
> >  #include <Ppi/MasterBootMode.h>
> > @@ -534,6 +536,23 @@ MaxCpuCountInitialization (
> >      ));
> >  }
> >
> > +/**
> > + * @brief Builds PlatformInfo Hob
> > + */
> > +EFI_HOB_PLATFORM_INFO *
> > +BuildPlatformInfoHob (
> > +  VOID
> > +  )
> > +{
> > +  EFI_HOB_PLATFORM_INFO  PlatformInfoHob;
> > +  EFI_HOB_GUID_TYPE      *GuidHob;
> > +
> > +  ZeroMem (&PlatformInfoHob, sizeof PlatformInfoHob);
> > +  BuildGuidDataHob (&gUefiOvmfPkgPlatformInfoGuid, &PlatformInfoHob,
> > sizeof (EFI_HOB_PLATFORM_INFO));
> > +  GuidHob = GetFirstGuidHob (&gUefiOvmfPkgPlatformInfoGuid);
> > +  return (EFI_HOB_PLATFORM_INFO *)GET_GUID_HOB_DATA (GuidHob);
> > +}
> > +
> >  /**
> >    Perform Platform PEI initialization.
> >
> > @@ -551,6 +570,7 @@ InitializePlatform (
> >    )
> >  {
> >    DEBUG ((DEBUG_INFO, "Platform PEIM Loaded\n"));
> > +  BuildPlatformInfoHob();
> >
> >    //
> >    // Initialize Local APIC Timer hardware and disable Local APIC
> > Timer
>
> Any comments?
>
> CI: https://github.com/tianocore/edk2/pull/4676
>
>
> --
> Kind regards,
> Corvin
>
> Attachments:
> signature.asc: https://edk2.groups.io/g/devel/attachment/107616/0
>
>
> 
>
>


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



      reply	other threads:[~2023-08-07 16:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-24 12:59 [edk2-devel] [PATCH v1 0/1] OvmfPkg/Bhyve: build PlatformInfoHob Corvin Köhne
2023-07-24 12:59 ` [edk2-devel] [PATCH v1 1/1] OvmfPkg/Bhyve: build platform info HOB Corvin Köhne
2023-08-08 13:32   ` Rebecca Cran
2023-08-08 16:25     ` Ard Biesheuvel
2023-08-10 12:53       ` Corvin Köhne
2023-08-10 12:55         ` Ard Biesheuvel
2023-08-10 13:33           ` Corvin Köhne
2023-08-10 15:46             ` Ard Biesheuvel
2023-08-10 19:54               ` Michael Kubacki
2023-08-14  8:15                 ` Corvin Köhne
2023-08-15  8:10                   ` Ard Biesheuvel
2023-08-18 12:32                     ` Ard Biesheuvel
     [not found] ` <1774CF3EF23450CD.25264@groups.io>
2023-08-07 11:31   ` Corvin Köhne
2023-08-07 16:52     ` 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='CAMj1kXFn=pg3Jzm3iTdPHOsxRNNeYTOJdA-wc0=R96D-MDRc3g@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