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 B2DABD80CF6 for ; Tue, 8 Aug 2023 13:33:07 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=pSgSBACs2HaoAfrO6ayCFyNXlD9OaHziU4//hya290Y=; c=relaxed/simple; d=groups.io; h=Feedback-ID:Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1691501586; v=1; b=cY/SOI0AWjHZJYfprvE666y9N+uxxg9hy2shJf+hcai1j00Xlt0Urw35F+F7z5hNGg4mu0am SxgpDuLRic56iWZaFEH5knHNdAUwxCMdDdAROyFma48tnjY/aI14cC7pbraBW8RiEwgj3STCI3X zmgvkHMGUAHtWQ3/IjIvqS3I= X-Received: by 127.0.0.2 with SMTP id C3rcYY7687511xz93Svnlx6h; Tue, 08 Aug 2023 06:33:06 -0700 X-Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by mx.groups.io with SMTP id smtpd.web10.61617.1691501585547351747 for ; Tue, 08 Aug 2023 06:33:05 -0700 X-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id C170F5C00CB; Tue, 8 Aug 2023 09:33:04 -0400 (EDT) X-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 08 Aug 2023 09:33:04 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrledvgdeihecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthekredttdefjeenucfhrhhomheptfgvsggv tggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrth htvghrnhepgeefgeevudehjefgudfffefhheelheeigffhtedvjedvlefhueekhffhvdeg heevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 8 Aug 2023 09:33:03 -0400 (EDT) Message-ID: <899bbdac-5aa3-50c4-f6e2-926b7a22c799@bsdio.com> Date: Tue, 8 Aug 2023 07:32:50 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [edk2-devel] [PATCH v1 1/1] OvmfPkg/Bhyve: build platform info HOB To: =?UTF-8?Q?Corvin_K=c3=b6hne?= , devel@edk2.groups.io Cc: Ard Biesheuvel , Jiewen Yao , Jordan Justen , Gerd Hoffmann , Peter Grehan References: <20230724130006.427522-1-corvink@FreeBSD.org> <20230724130006.427522-2-corvink@FreeBSD.org> From: "Rebecca Cran" In-Reply-To: <20230724130006.427522-2-corvink@FreeBSD.org> 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,rebecca@bsdio.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: w9NXIP2vaWe53pY4ypEWwy44x7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b="cY/SOI0A"; 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=none Nit: "sizeof" is normally used like a function. And this patch mixes the two styles. Other than that: Reviewed-by: Rebecca Cran -- Rebecca Cran On 7/24/23 06:59, 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 > 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(+) > > 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 = 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 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#107638): https://edk2.groups.io/g/devel/message/107638 Mute This Topic: https://groups.io/mt/100327419/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-