From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web12.5916.1645613413272589626 for ; Wed, 23 Feb 2022 02:50:13 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=he3QjmVu; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645613412; 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=ZpZvO9Qb177vGe7KowzUMD7LFfaAYMxYu/XFigOWVqc=; b=he3QjmVu06UzGvat140kxEBzi9Ip3OTxg/D6rqlqvgHNMkmIW56l/668u31QpLxTGj8Xsc DmtlDtXNlpzaDXjtIhHX0ayVTEMfLsPwHPeI0AymYqfIVnvxKp+9LOqUhFklTx4fzt86xl gtiquAgP5i8674MKueCdN8clrAnjtQc= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-47-0gxbRb2sNtGmNe_BYYJGgA-1; Wed, 23 Feb 2022 05:50:09 -0500 X-MC-Unique: 0gxbRb2sNtGmNe_BYYJGgA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8679680D6AB; Wed, 23 Feb 2022 10:50:07 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.195.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 15C9C6F987; Wed, 23 Feb 2022 10:50:07 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 8F70B18003BA; Wed, 23 Feb 2022 11:50:05 +0100 (CET) Date: Wed, 23 Feb 2022 11:50:05 +0100 From: "Gerd Hoffmann" To: Min Xu Cc: devel@edk2.groups.io, Michael D Kinney , Brijesh Singh , Erdem Aktas , James Bottomley , Jiewen Yao , Tom Lendacky Subject: Re: [PATCH V3 4/8] OvmfPkg: Add TdxStartupLib Message-ID: <20220223105005.tfb7uk2qk5iac4l3@sirius.home.kraxel.org> References: <20220220023319.1495-1-min.m.xu@intel.com> <20220220023319.1495-5-min.m.xu@intel.com> MIME-Version: 1.0 In-Reply-To: <20220220023319.1495-5-min.m.xu@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > +EFI_STATUS > +EFIAPI > +InitializePlatform ( > + EFI_HOB_PLATFORM_INFO *PlatformInfoHob > + ) > +{ > + Pci64Base = 0; > + Pci64Size = 0; > + > + FirstNonAddress = PlatformGetFirstNonAddress (&Pci64Base, &Pci64Size, 0x800000000); > + PlatformInfoHob->PcdPciMmio64Base = Pci64Base; > + PlatformInfoHob->PcdPciMmio64Size = Pci64Size; I think here are opportunities to make the differences between PEI and PEI-less boot even smaller, by: (1) Allocate a PlatformInfoHob also when using PEI boot workflow. (2) Switch PlatformInitLib functions like PlatformGetFirstNonAddress() to receive a PlatformInfoHob pointer so they can update the HOB directly. (3) Add more platform info variables to PlatformInfoHob (FirstNonAddress, PhysMemAddressWidth for example). But I guess that kind of improvements can also be done incrementally after getting this upstream. It's also easier to test that kind of changes when we have both PEI and PEI-less variants present in the upstream repo. So I'm fine with deferring these changes for now. Beside that: The name TdxStartupLib doesn't reflect reality any more, we should give it a better name. take care, Gerd