From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id D6359D801D3 for ; Mon, 7 Aug 2023 16:53:13 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Izza6SN/Yiw7eXk7Gq/G+lNKAafzsxUXIUhQwo8n5BY=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type:Content-Transfer-Encoding; s=20140610; t=1691427192; v=1; b=hYHSIKLrAzSBiCcnnWysI10/NjYKb0PY45O1Vp6601SHIcNkWLmAR7PGbGiaun6ScsqHlV5a mVsOR1xe9VRXR6czW5TW4R2QWg4/j9V9smwqIdWZhD/N3WGc3RFBFLKtXtgjlvURFtEQp0YYySl W4UWVSQy0b7OeMiyC8dniv3U= X-Received: by 127.0.0.2 with SMTP id MrUzYY7687511xtPtAIWPrAI; Mon, 07 Aug 2023 09:53:12 -0700 X-Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web11.40004.1691427191776987816 for ; Mon, 07 Aug 2023 09:53:12 -0700 X-Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 10B5C61F96 for ; Mon, 7 Aug 2023 16:53:11 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0341DC433BD for ; Mon, 7 Aug 2023 16:53:09 +0000 (UTC) X-Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-4fe1c285690so7320541e87.3 for ; Mon, 07 Aug 2023 09:53:09 -0700 (PDT) X-Gm-Message-State: butw64hWrZyGtivNi4mrvKCHx7686176AA= X-Google-Smtp-Source: AGHT+IGdKsifoXYeQ+gdHRWCXs0G4fto5Ndg78SL5oiwlZFCOkNJwiQDplB5l5ZQhxzWHUG/KYWkt3b/PCgUNYM/TCo= X-Received: by 2002:a19:4f4a:0:b0:4fb:99d9:6ba2 with SMTP id a10-20020a194f4a000000b004fb99d96ba2mr6566125lfk.24.1691427187975; Mon, 07 Aug 2023 09:53:07 -0700 (PDT) MIME-Version: 1.0 References: <20230724130006.427522-1-corvink@FreeBSD.org> <1774CF3EF23450CD.25264@groups.io> In-Reply-To: From: "Ard Biesheuvel" Date: Mon, 7 Aug 2023 18:52:56 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH v1 1/1] OvmfPkg/Bhyve: build platform info HOB To: devel@edk2.groups.io, corvink@freebsd.org Cc: Jiewen Yao , Jordan Justen , Gerd Hoffmann , Rebecca Cran , Peter Grehan Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ardb@kernel.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=hYHSIKLr; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none) On Mon, 7 Aug 2023 at 13:31, Corvin K=C3=B6hne wrote: > > On Mon, 2023-07-24 at 14:59 +0200, Corvin K=C3=B6hne 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=C3=B6hne > > Cc: Ard Biesheuvel > > Cc: Jiewen Yao > > Cc: Jordan Justen > > Cc: Gerd Hoffmann > > Cc: Rebecca Cran > > Cc: Peter Grehan > > --- > > 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 > > #include > > #include > > #include > > @@ -27,6 +28,7 @@ > > #include > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -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 =3D 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 > > >=20 > > -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- 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] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-