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.web09.28249.1643290937518377596 for ; Thu, 27 Jan 2022 05:42:17 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bg3NMABk; 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=1643290936; 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=SySk5+voelY9+UUOntO+rUcE+DKKuZItLAkY8vQe8YU=; b=bg3NMABk8CIy78trEHVJIN3CHCwJX/Xd6nBIdowjc06TpLZFxgZEhmnBOIXE2paXwKzDFx Ataj4ozKifhnNJmMjFMsokNw6cqmj44URcjMsMsQgmhQj31qBWF61nQJeqhSoyBevon9BN Boz15avrJmJd3eZSDJ0P0Cpc2ksCyMA= 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-631-tyLCd8udMxOEbo7sJ0Aotg-1; Thu, 27 Jan 2022 08:42:10 -0500 X-MC-Unique: tyLCd8udMxOEbo7sJ0Aotg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E7C25100CCC6; Thu, 27 Jan 2022 13:42:08 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.193.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5FD891F42A; Thu, 27 Jan 2022 13:42:08 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id DB4EE1800094; Thu, 27 Jan 2022 14:42:06 +0100 (CET) Date: Thu, 27 Jan 2022 14:42:06 +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 V2 07/10] OvmfPkg/IntelTdx: Add Sec to bring up both Legacy and Tdx guest Message-ID: <20220127134206.hfg2mbvwtzi32fk7@sirius.home.kraxel.org> References: <20220125063318.862-1-min.m.xu@intel.com> <20220125063318.862-8-min.m.xu@intel.com> MIME-Version: 1.0 In-Reply-To: <20220125063318.862-8-min.m.xu@intel.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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 On Tue, Jan 25, 2022 at 02:33:15PM +0800, Min Xu wrote: > RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3429 > > OvmfPkg/IntelTdx/Sec is a simplied version of OvmfPkg/Sec. There > are below differences between these 2 Sec > - IntelTdx/Sec only supports Legacy guest and Tdx guest. > - IntelTdx/Sec calls TdxStartup () to jump from SEC to DXE directly. > - IntelTdx/Sec only supports X64. > - IntelTdx/Sec uses MemoryAllocationLib / HobLib / PrePiLib in > EmbeddedPkg. Quite some code duplication here ... > +BspAcceptMemoryResourceRange ( > +ValidateHobList ( ... and possibly more. I think these functions should move to the new PlatformInitLib too. take care, Gerd