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 EEC867803D1 for ; Mon, 7 Aug 2023 11:31:45 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=uksSw0/Xff/3+gwnr57wjuY2hTIr7RilMXdL1zgmlpQ=; c=relaxed/simple; d=groups.io; h=ARC-Message-Signature:ARC-Seal:ARC-Authentication-Results:Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References:User-Agent:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20140610; t=1691407904; v=1; b=oBeLv16/heAy9uQAhtoZwDvYwdKSDjLybXlWKllKxh7LrJ98idWpdHyX3UjnkwnS3Kdh1zbd 8XMasx0yhdrIZKk9eDWmRWjsD+jiki6IWWDIXXt8r8tfT8tA835gNsaZCvgfKCkWI++cFh6E81k li+AxWN3i8AZwKBICJyfv9Is= X-Received: by 127.0.0.2 with SMTP id 5Se6YY7687511xHQZ3KTl1qi; Mon, 07 Aug 2023 04:31:44 -0700 X-Received: from mx2.freebsd.org (mx2.freebsd.org [96.47.72.81]) by mx.groups.io with SMTP id smtpd.web11.32189.1691407902845688626 for ; Mon, 07 Aug 2023 04:31:43 -0700 X-Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits)) (Client CN "mx1.freebsd.org", Issuer "R3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id 4RKDg14QbLz4l1P; Mon, 7 Aug 2023 11:31:41 +0000 (UTC) (envelope-from corvink@FreeBSD.org) X-Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RKDg13crKz3VHS; Mon, 7 Aug 2023 11:31:41 +0000 (UTC) (envelope-from corvink@FreeBSD.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691407901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=iKnTf1H6lj+ZcaXGhUwULrbavCXS+O6QmTmP6hDX3x0=; b=jUO66ZPue0RFOxvVfWA/lVpRgE2TQRjKMa4TBR5060yonyIMsZAWktfkQ/HJYqlI4glBI+ X+48GTvBDs3yLUrBC064hxRfcBEZzlsNGEWFvNkzsK33rWyNN2Pc62Y8zFNEAfzP29JIg4 QQE8J6iSLExtRLibo+jtqUOb2djwGkxlB5KvGG88BLJNL35XtsQgCrxGicwibYjoL/D8WZ QdEzw3ZYKSY5/llNprovsGQZC+KogVpeUUNJ5A/5B4CfwRbyVg0tZ+QdMQkg1T7aBxyXNX lmKSPYVWAm4XAkooY4aZHjsVKMbzl1c86rH0JS6qs1cS0h6Mxf/4t7ZqgbRSKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691407901; a=rsa-sha256; cv=none; b=aJiL9oIhaALcGf9k8fYadQel+IVolK6X+48FxneaFwzTC/qbcJm4UlmEHwDbt3I/AKnEpm olqv2JoLtYgfzr9ga44PfmZorZDZl30y55VtiqBXjHcApi5VX0vMuIJ+q+WZFaI6dAi/tb R8ax8uIXtucjfuOEE7bKFwGvk7x/GTkiYQsjpPI8xTolKTJtT3b6FrKxYbeubpLkNiJE34 +3rHVHS/12rghHFMZGWOH+1H+8c1KFDc+JWkLN7Kgm+ahwmN97izxOXjdeq41WHUNjXZzz LjT41U7ReLz+8rJSrk9vPEXtaHMCxtUb5efM+I6mPL49d0AzsswmMQFAoaTe9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-Received: from [172.21.179.48] (unknown [195.226.174.194]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: corvink) by smtp.freebsd.org (Postfix) with ESMTPSA id 4RKDg03JP9z16vs; Mon, 7 Aug 2023 11:31:40 +0000 (UTC) (envelope-from corvink@FreeBSD.org) Message-ID: Subject: Re: [edk2-devel] [PATCH v1 1/1] OvmfPkg/Bhyve: build platform info HOB From: =?UTF-8?B?Q29ydmluIEvDtmhuZQ==?= To: devel@edk2.groups.io Cc: Ard Biesheuvel , Jiewen Yao , Jordan Justen , Gerd Hoffmann , Rebecca Cran , Peter Grehan Date: Mon, 07 Aug 2023 13:31:38 +0200 In-Reply-To: <1774CF3EF23450CD.25264@groups.io> References: <20230724130006.427522-1-corvink@FreeBSD.org> <1774CF3EF23450CD.25264@groups.io> User-Agent: Evolution 3.48.4 MIME-Version: 1.0 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,corvink@FreeBSD.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: Xz7dmzKknKloiXsYiqEE9iUvx7686176AA= Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-rf5QkZIhVeSXLusABRU6" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="oBeLv16/"; arc=reject ("signature check failed: fail, {[1] = sig:freebsd.org:reject}"); dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io --=-rf5QkZIhVeSXLusABRU6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2023-07-24 at 14:59 +0200, Corvin K=C3=B6hne wrote: > Copy the function BuildPlatformInfoHob() from OvmfPkg/PlatformPei. >=20 > 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. >=20 > 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 > --- > =C2=A0OvmfPkg/Bhyve/PlatformPei/PlatformPei.inf |=C2=A0 1 + > =C2=A0OvmfPkg/Bhyve/PlatformPei/Platform.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = | 20 ++++++++++++++++++++ > =C2=A02 files changed, 21 insertions(+) >=20 > 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] > =C2=A0 > =C2=A0[Guids] > =C2=A0=C2=A0 gEfiMemoryTypeInformationGuid > +=C2=A0 gUefiOvmfPkgPlatformInfoGuid > =C2=A0 > =C2=A0[LibraryClasses] > =C2=A0=C2=A0 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 @@ > =C2=A0// > =C2=A0// The Library classes this module consumes > =C2=A0// > +#include > =C2=A0#include > =C2=A0#include > =C2=A0#include > @@ -27,6 +28,7 @@ > =C2=A0#include > =C2=A0#include > =C2=A0#include > +#include > =C2=A0#include > =C2=A0#include > =C2=A0#include > @@ -534,6 +536,23 @@ MaxCpuCountInitialization ( > =C2=A0=C2=A0=C2=A0=C2=A0 )); > =C2=A0} > =C2=A0 > +/** > + * @brief Builds PlatformInfo Hob > + */ > +EFI_HOB_PLATFORM_INFO * > +BuildPlatformInfoHob ( > +=C2=A0 VOID > +=C2=A0 ) > +{ > +=C2=A0 EFI_HOB_PLATFORM_INFO=C2=A0 PlatformInfoHob; > +=C2=A0 EFI_HOB_GUID_TYPE=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 *GuidHob; > + > +=C2=A0 ZeroMem (&PlatformInfoHob, sizeof PlatformInfoHob); > +=C2=A0 BuildGuidDataHob (&gUefiOvmfPkgPlatformInfoGuid, &PlatformInfoHob= , > sizeof (EFI_HOB_PLATFORM_INFO)); > +=C2=A0 GuidHob =3D GetFirstGuidHob (&gUefiOvmfPkgPlatformInfoGuid); > +=C2=A0 return (EFI_HOB_PLATFORM_INFO *)GET_GUID_HOB_DATA (GuidHob); > +} > + > =C2=A0/** > =C2=A0=C2=A0 Perform Platform PEI initialization. > =C2=A0 > @@ -551,6 +570,7 @@ InitializePlatform ( > =C2=A0=C2=A0 ) > =C2=A0{ > =C2=A0=C2=A0 DEBUG ((DEBUG_INFO, "Platform PEIM Loaded\n")); > +=C2=A0 BuildPlatformInfoHob(); > =C2=A0 > =C2=A0=C2=A0 // > =C2=A0=C2=A0 // Initialize Local APIC Timer hardware and disable Local AP= IC > Timer Any comments? CI: https://github.com/tianocore/edk2/pull/4676 --=20 Kind regards, Corvin -=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 (#107616): https://edk2.groups.io/g/devel/message/107616 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- --=-rf5QkZIhVeSXLusABRU6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgvRSla3m2t/H2U9G2FTaVjFeAmoFAmTQ1hoACgkQ2FTaVjFe AmqvQw//f6RykzB5sAkhfDNCbOy4XU38WY5Fo1deUqR7jJR2I4HaQ4dwONT61Yi/ rhW8C4O3MgzCjB2uzEJHHf/eYSajD55Lu9u9jv1rLRMvURts2cMhECyIhPHBH1GU uI2gBOm+JcRsAkevoLNBYRBNI3/uhiVmDREgLPpMxvoqzfJmPOzw2qqnKkjtzvpz 9661Y9zNGkN96yHT7iZhMcRdgj4tR+4Us2dc9YrKZ/hDJ8LmWPbNbrd9LFAs8Kbe ZWrjFKoUL3AjKwjKqeffu2/Jf6JzvHINEpYrbStlnyruYnHIimoTHtIJsgbuERsJ 69J+mmxUZxxvE/VzUc5KW8b1gOAavE1EADqzifULKJnk6Id12ZEkEQyOPaPyIgyh oX8YWe/+AoBfCvbT4evAnGse6fRTStwyvi60jhBho0oxKaxY9GROIiL8AMpJgojj vJPyYZDFz3ublFieQ4IAcwiYkW0WthG1Sc/sNtSlRRH1aOHvWTxC/AOWFX0lZj86 oxi8YypGjs6B2g5EU6WMgLR0aAU+pB9M0RMciHnUizQlcw0Y2ZsP7aKL37m+vm/w KkrPMC7oL2xaexXQmLYP0C15D84uSKR2yJaA71myU2rreufIefDjWYQcIEQ5fSt/ ccnISHLsqStOqPpmeqxrYBP5ykgUjnhrfvgDSRWdxXj0MhW2vss= =gfCG -----END PGP SIGNATURE----- --=-rf5QkZIhVeSXLusABRU6--