From nobody Mon Feb 9 15:11:04 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+47930+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+47930+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1569324930; cv=none; d=zoho.com; s=zohoarc; b=D5cZEooKuistCoZa3d7/xQXQ9YGtt5iAoLTlUKiVpXOseKf6SD/SFCIuBtotzoSFf76dpqwkuAZ8S6g02STOjEoc57kWGb5xu3HGMlXd48rNesKKCzmDHC5wConBV7VLBI3fLCmv6mfJ3lk3lMlR5RxffqbkQtpiCZUd6SU1RoY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1569324930; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=eryMwb1ARvHRt7e3j94H0oHegtXaE3lorn8QtpqtR9A=; b=Gwdm29CoPtRl9pbqn2jAhgtmUzST3RhHexlDl7kqeaNAZuBgj8ihaHJykmvELyU5kiNiiUfHV1mlgM3UjDQjEjSGIFjHnv4SiXWvWosfHl58jzx1Msg9r3W4FkEwqH5qgaY6BTY9WJ7XF0TGEG4us7ufDrFTOJBQUmfzu0HyXck= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+47930+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1569324930274215.35312663483865; Tue, 24 Sep 2019 04:35:30 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id L5vrYY1788612xhaRBqn4sgI; Tue, 24 Sep 2019 04:35:29 -0700 X-Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Tue, 24 Sep 2019 04:35:29 -0700 X-Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1E0161107; Tue, 24 Sep 2019 11:35:29 +0000 (UTC) X-Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-118.rdu2.redhat.com [10.10.120.118]) by smtp.corp.redhat.com (Postfix) with ESMTP id 722DA600CC; Tue, 24 Sep 2019 11:35:26 +0000 (UTC) From: "Laszlo Ersek" To: edk2-devel-groups-io Cc: Ard Biesheuvel , Boris Ostrovsky , Brijesh Singh , Igor Mammedov , Jiewen Yao , Joao M Martins , Jordan Justen , Jun Nakajima , Michael Kinney , Paolo Bonzini , Phillip Goerl , Yingwen Chen Subject: [edk2-devel] [PATCH wave 1 06/10] OvmfPkg/PlatformPei: assert there's no permanent PEI RAM at default SMBASE Date: Tue, 24 Sep 2019 13:35:01 +0200 Message-Id: <20190924113505.27272-7-lersek@redhat.com> In-Reply-To: <20190924113505.27272-1-lersek@redhat.com> References: <20190924113505.27272-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 24 Sep 2019 11:35:29 +0000 (UTC) Precedence: Bulk List-Unsubscribe: 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,lersek@redhat.com X-Gm-Message-State: KmbZS37O5VsjucW8M6UQ7J1Hx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1569324929; bh=NOIJcbqc3NmyY2uts1vEeZeHqS1Ug+W8CEAilu9jajY=; h=Cc:Date:From:Reply-To:Subject:To; b=Nbzl4ddhV2murzCYbMZoxv93x+vmPTKPSqcP6gJSJHNckIpImUK25Llh/3j0HPcQYzJ WlPk0yPkar+0KGy90dHM7eiBMI/+cb0CuV2xdZpF9Pk1VwyQZB9N8VIwzGI5pSoCw4B3Z 7a+fHzTcMpYbmFPXDxZ0dLfvztvSFnWc5jc= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" The permanent PEI RAM that is published on the normal boot path starts strictly above MEMFD_BASE_ADDRESS (8 MB -- see the FDF files), regardless of whether PEI decompression will be necessary on S3 resume due to SMM_REQUIRE. Therefore the normal boot permanent PEI RAM never overlaps with the SMRAM at the default SMBASE (192 KB). The S3 resume permanent PEI RAM is strictly above the normal boot one. Therefore the no-overlap statement holds true on the S3 resume path as well. Assert the no-overlap condition commonly for both boot paths in PublishPeiMemory(). Cc: Ard Biesheuvel Cc: Boris Ostrovsky Cc: Brijesh Singh Cc: Igor Mammedov Cc: Jiewen Yao Cc: Joao M Martins Cc: Jordan Justen Cc: Jun Nakajima Cc: Michael Kinney Cc: Paolo Bonzini Cc: Phillip Goerl Cc: Yingwen Chen Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1512 Signed-off-by: Laszlo Ersek --- OvmfPkg/PlatformPei/MemDetect.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/OvmfPkg/PlatformPei/MemDetect.c b/OvmfPkg/PlatformPei/MemDetec= t.c index 2bc1c46dffc2..4879ee87b797 100644 --- a/OvmfPkg/PlatformPei/MemDetect.c +++ b/OvmfPkg/PlatformPei/MemDetect.c @@ -17,6 +17,7 @@ Module Name: #include #include #include +#include =20 // // The Library classes this module consumes @@ -626,6 +627,15 @@ PublishPeiMemory ( } } =20 + // + // MEMFD_BASE_ADDRESS separates the SMRAM at the default SMBASE from the + // normal boot permanent PEI RAM. Regarding the S3 boot path, the S3 + // permanent PEI RAM is located even higher. + // + if (FeaturePcdGet (PcdSmmSmramRequire) && mQ35SmramAtDefaultSmbase) { + ASSERT (SMM_DEFAULT_SMBASE + MCH_DEFAULT_SMBASE_SIZE <=3D MemoryBase); + } + // // Publish this memory to the PEI Core // --=20 2.19.1.3.g30247aa5d201 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#47930): https://edk2.groups.io/g/devel/message/47930 Mute This Topic: https://groups.io/mt/34274941/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-