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.133.124]) by mx.groups.io with SMTP id smtpd.web12.8053.1631778165045732565 for ; Thu, 16 Sep 2021 00:42:45 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LXag96d6; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1631778164; 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=ozUk8/V2DjqDJyBNdTB3IpW1HqxcBBXTvgXRSlLm+Qo=; b=LXag96d6hT/yk24tNfxcdMDa8V8HG27cnaWzG/m8SQONKwKabG6outIQPI8dDl6WgaDfnh FAEXRRYhp14a4aBBwUqObdVxwW3jO0z+sXFQ6drW4NZZgD5gIzbgnOl8OUPh08nJn+fe86 WxLPm7xQebJK7VWD5CoGZryWUkob+qA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-602-egjUwInGMGCkRT9CICbugQ-1; Thu, 16 Sep 2021 03:42:40 -0400 X-MC-Unique: egjUwInGMGCkRT9CICbugQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 05863100C609; Thu, 16 Sep 2021 07:42:39 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.91]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A1FF1794B0; Thu, 16 Sep 2021 07:42:38 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D2F8318000A9; Thu, 16 Sep 2021 09:42:36 +0200 (CEST) Date: Thu, 16 Sep 2021 09:42:36 +0200 From: "Gerd Hoffmann" To: devel@edk2.groups.io, jiewen.yao@intel.com Cc: "Xu, Min M" , Brijesh Singh , James Bottomley , Tom Lendacky , "Justen, Jordan L" , Ard Biesheuvel , Erdem Aktas , Michael Roth Subject: Re: [edk2-devel] [PATCH v6 06/29] OvmfPkg/ResetVector: pre-validate the data pages used in SEC phase Message-ID: <20210916074236.5bohsughhh7hpfnh@sirius.home.kraxel.org> References: <20210901161646.24763-1-brijesh.singh@amd.com> <20210901161646.24763-7-brijesh.singh@amd.com> <20210902082029.tfdt4s5s76qknpiq@sirius.home.kraxel.org> <20210906121650.vwgt5y5hdwxfugvh@sirius.home.kraxel.org> <20210907070732.xcokfdn5iw3wyqbu@sirius.home.kraxel.org> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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, Sep 14, 2021 at 03:49:31AM +0000, Yao, Jiewen wrote: > I can explain why we prefer DQ instead of DD. > > You are right that current TD entrypoint is 32bit. However, we cannot predict that is always TRUE for the future. So a "save space in MEMFD" vs. "be future proof" tradeoff. > Back to 16 bit machine, we have entrypoint at F000:FFF0. But in 32bit mode we removed 1M limitation and move entrypoint to below 4G. > There is no limitation that we move 64bit entrypoint above 4G for 64bit machine. Any plans to actually do that? Defining an 64-bit entry point is a more than just using 64-bit addresses. For starters long mode requires paging being enabled. So a set of initial page tables is needed, and you possibly need to handle virtual vs. physical addresses. You also need to find a place above 4G where you can place the firmware without conflicts with something else. So I have my doubts that trying to make the struct future-proof will actually work out in practice. Or that we will actually need that anytime soon. take care, Gerd