public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gerd Hoffmann" <kraxel@redhat.com>
To: "Xu, Min M" <min.m.xu@intel.com>
Cc: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>,
	Brijesh Singh <brijesh.singh@amd.com>,
	"Aktas, Erdem" <erdemaktas@google.com>,
	James Bottomley <jejb@linux.ibm.com>,
	"Yao, Jiewen" <jiewen.yao@intel.com>,
	Tom Lendacky <thomas.lendacky@amd.com>
Subject: Re: [PATCH V2 09/10] OvmfPkg: Update DxeAcpiTimerLib to read HostBridgeDevId in PlatformInfoHob
Date: Mon, 14 Feb 2022 11:03:21 +0100	[thread overview]
Message-ID: <20220214100321.sdb4heedrrgqb33i@sirius.home.kraxel.org> (raw)
In-Reply-To: <PH0PR11MB50641E4CC9BFC0B7B2F97F80C52D9@PH0PR11MB5064.namprd11.prod.outlook.com>

On Tue, Feb 08, 2022 at 08:20:20AM +0000, Xu, Min M wrote:
> On January 27, 2022 9:49 PM, Gerd Hoffmann wrote:
> > > +  EFI_HOB_GUID_TYPE      *GuidHob;
> > > +  EFI_HOB_PLATFORM_INFO  *PlatformInfo = NULL;
> > 
> > >    // Query Host Bridge DID to determine platform type
> > > +  // Tdx guest stores the HostBridgePciDevId in a GuidHob.
> > > +  // So we first check if this HOB exists
> > 
> > Hmm, wouldn't it be better to create and use the PlatformInfo for both PEI-
> > based and PEI-less boot?
> > 
> > > -  HostBridgeDevId = PcdGet16 (PcdOvmfHostBridgePciDevId);
> > > +  GuidHob = GetFirstGuidHob (&gUefiOvmfPkgTdxPlatformGuid);  if
> > > + (GuidHob != NULL) {
> > > +    PlatformInfo    = (EFI_HOB_PLATFORM_INFO *)GET_GUID_HOB_DATA
> > (GuidHob);
> > > +    HostBridgeDevId = PlatformInfo->HostBridgePciDevId;  } else {
> > > +    HostBridgeDevId = PcdGet16 (PcdOvmfHostBridgePciDevId);  }
> > 
> > We would not need that kind of checks in the first place then.
> > 
> As we agreed at the first stage, only OvmfPkg/PlatformPei will be refactored with PlatformInitLib. 
> OvmfPkg/Bhyve/PlatformPei and OvmfPkg/XenPlatformPei will be refactored in the future. HostBridgeDevId is set to PcdOvmfHostBridgePciDevId in these 2 platforms.
> So we have to check both EFI_HOB_PLATFORM_INFO and PcdOvmfHostBridgePciDevId.

Ok.  Can you add a comment explaining this?

thanks,
  Gerd


  reply	other threads:[~2022-02-14 10:03 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-25  6:33 [PATCH V2 00/10] Introduce TDVF Config-B (basic) in OvmfPkg Min Xu
2022-01-25  6:33 ` [PATCH V2 01/10] EmbeddedPkg: Fix a build error in FwVol.c in X64 arch Min Xu
2022-01-25 15:09   ` [edk2-devel] " Abner Chang
2022-01-27  0:43     ` Abner Chang
2022-01-27  0:58       ` Min Xu
2022-01-27  1:55         ` Abner Chang
2022-01-27  2:39           ` Min Xu
2022-01-27  3:01             ` Abner Chang
2022-01-27  3:38               ` Min Xu
2022-01-25  6:33 ` [PATCH V2 02/10] UefiCpuPkg: Add PcdTdxWorkAreaBase Min Xu
2022-01-27 13:24   ` Gerd Hoffmann
2022-01-28  8:02     ` Min Xu
2022-01-28 10:20       ` Gerd Hoffmann
2022-02-14  1:51         ` Min Xu
2022-02-14  9:58           ` Gerd Hoffmann
2022-01-25  6:33 ` [PATCH V2 03/10] OvmfPkg: Add TdxWorkArea definition Min Xu
2022-01-27 13:25   ` Gerd Hoffmann
2022-01-28  8:01     ` Min Xu
2022-01-28 10:21       ` [edk2-devel] " Gerd Hoffmann
2022-01-25  6:33 ` [PATCH V2 04/10] OvmfPkg: Add PrePiHobListPointerLibTdx Min Xu
2022-01-25  6:33 ` [PATCH V2 05/10] OvmfPkg: Update EFI_HOB_PLATFORM_INFO with more platform settings Min Xu
2022-01-27 13:32   ` Gerd Hoffmann
2022-02-14  2:34     ` Min Xu
2022-02-14 10:00       ` Gerd Hoffmann
2022-01-25  6:33 ` [PATCH V2 06/10] OvmfPkg: Add TdxStartupLib Min Xu
2022-01-25  6:33 ` [PATCH V2 07/10] OvmfPkg/IntelTdx: Add Sec to bring up both Legacy and Tdx guest Min Xu
2022-01-27 13:42   ` Gerd Hoffmann
2022-02-08  8:43     ` Min Xu
2022-01-25  6:33 ` [PATCH V2 08/10] OvmfPkg: Update TdxDxe to set TDX PCDs Min Xu
2022-01-25  6:33 ` [PATCH V2 09/10] OvmfPkg: Update DxeAcpiTimerLib to read HostBridgeDevId in PlatformInfoHob Min Xu
2022-01-27 13:48   ` Gerd Hoffmann
2022-02-08  8:20     ` Min Xu
2022-02-14 10:03       ` Gerd Hoffmann [this message]
2022-02-14 13:09         ` Min Xu
2022-01-25  6:33 ` [PATCH V2 10/10] OvmfPkg: Introduce IntelTdxX64 for TDVF Config-B Min Xu

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=20220214100321.sdb4heedrrgqb33i@sirius.home.kraxel.org \
    --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