From nobody Mon May 6 11:51:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+76749+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76749+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1624009727; cv=none; d=zohomail.com; s=zohoarc; b=UX64eAB2ufFnoEfVivMcuazDtkBCNQ9oMgb9jNvN0eklDhlMRwH8Bb+C4lqp7FKJp2qaJC0xoGt6AwPaj81HlNzWwHDdCMMQBikulRkJKd3S4wKCzOKGyv7+CGsBLt9jsKIff1xKKH+stPrtYpUTqfl3m+mf1L47Z2DoS2q1V9M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1624009727; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=hPPjGbMxmXo6n5x4pR/jOb2cqu+TSessyi7dw3iS7e0=; b=nK9m0osH97WxuVC+zzNHGMlfs0Tvf6q+/rwbyR88aHFfNSVyb2rVn8hAPVhn7rWHy3NgcOGzmLOY7vFRBRQMkDp8sPwZlzprGdeyTjzxhYDwuChzRjfBh7tboB+6N4sZLyGfjBWd67InWxwQe07IEYLDRsLG/W/m0ELehTuPvfw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76749+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1624009727278714.2793504655385; Fri, 18 Jun 2021 02:48:47 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id B0QgYY1788612x9nb0plf2s4; Fri, 18 Jun 2021 02:48:46 -0700 X-Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by mx.groups.io with SMTP id smtpd.web08.5686.1624009721475512432 for ; Fri, 18 Jun 2021 02:48:41 -0700 X-Received: by mail-pj1-f50.google.com with SMTP id 13-20020a17090a08cdb029016eed209ca4so5563153pjn.1 for ; Fri, 18 Jun 2021 02:48:41 -0700 (PDT) X-Gm-Message-State: LTABAplS99bchUavqZtmSzdux1787277AA= X-Google-Smtp-Source: ABdhPJyETJfZVhgzEY9yQR8oAvr7TA8JHllc16EkucXYCAfEANMyarPyrB48NA03F3R1Ec9TRvNTQw== X-Received: by 2002:a17:903:304e:b029:11d:75ff:c304 with SMTP id u14-20020a170903304eb029011d75ffc304mr3870428pla.33.1624009720626; Fri, 18 Jun 2021 02:48:40 -0700 (PDT) X-Received: from localhost.localdomain ([50.35.88.161]) by smtp.gmail.com with ESMTPSA id j7sm12930291pjf.0.2021.06.18.02.48.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jun 2021 02:48:40 -0700 (PDT) From: "Kun Qin" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu , Michael Kubacki Subject: [edk2-devel] [PATCH v1 1/2] MdePkg: MmConfiguration: Moved EFI_MM_RESERVED_MMRAM_REGION to PiMmCis.h Date: Fri, 18 Jun 2021 02:48:28 -0700 Message-Id: <20210618094829.2651-2-kuqin12@gmail.com> In-Reply-To: <20210618094829.2651-1-kuqin12@gmail.com> References: <20210618094829.2651-1-kuqin12@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: 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,kuqin12@gmail.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1624009726; bh=VxFicRBloGQSVo2LGlrmGnO4Tm8AOXPQL2adhlnpszs=; h=Cc:Date:From:Reply-To:Subject:To; b=hDorG9IV9Va1kR8zRNOucYqg2esJwOk+nGav3ll2gmf6oOK1sf/IrMtFRToaTy6QW3H LdsSpmf0FILY4vxls/6kPQvcteFdNU6QsT2UV1XG5G+PkpjfXgoqLVFrQ/xHN9nxpz52q dYlW8t5m2iKOCgTIXZckJs480LlmHQXSTW8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3440 The definition of EFI_MM_RESERVED_MMRAM_REGION, according to PI Spec 1.5 is also referenced in EFI_PEI_MM_CONFIGURATION_PPI. Defining this structure as is will enforce any potential usage of MM Configuration PPI interface to include . This change moves EFI_MM_RESERVED_MMRAM_REGION definition into PiMmCis.h, which is already included in Protocol/MmConfiguration.h. It also paves way for introducing Ppi/MmConfiguration.h with proper dependency. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Michael Kubacki Signed-off-by: Kun Qin --- MdePkg/Include/Pi/PiMmCis.h | 16 ++++++++++++++++ MdePkg/Include/Protocol/MmConfiguration.h | 16 ---------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/MdePkg/Include/Pi/PiMmCis.h b/MdePkg/Include/Pi/PiMmCis.h index fdf0591a03d6..422a3ea6c2bb 100644 --- a/MdePkg/Include/Pi/PiMmCis.h +++ b/MdePkg/Include/Pi/PiMmCis.h @@ -242,6 +242,22 @@ VOID IN CONST EFI_MM_ENTRY_CONTEXT *MmEntryContext ); =20 +/// +/// Structure describing a MMRAM region which cannot be used for the MMRAM= heap. +/// +typedef struct _EFI_MM_RESERVED_MMRAM_REGION { + /// + /// Starting address of the reserved MMRAM area, as it appears while MMR= AM is open. + /// Ignored if MmramReservedSize is 0. + /// + EFI_PHYSICAL_ADDRESS MmramReservedStart; + /// + /// Number of bytes occupied by the reserved MMRAM area. A size of zero = indicates the + /// last MMRAM area. + /// + UINT64 MmramReservedSize; +} EFI_MM_RESERVED_MMRAM_REGION; + /// /// Management Mode System Table (MMST) /// diff --git a/MdePkg/Include/Protocol/MmConfiguration.h b/MdePkg/Include/Pro= tocol/MmConfiguration.h index eeb94f64bdf7..d2fb6a13d4af 100644 --- a/MdePkg/Include/Protocol/MmConfiguration.h +++ b/MdePkg/Include/Protocol/MmConfiguration.h @@ -21,22 +21,6 @@ 0x26eeb3de, 0xb689, 0x492e, {0x80, 0xf0, 0xbe, 0x8b, 0xd7, 0xda, 0x4b,= 0xa7 } \ } =20 -/// -/// Structure describing a MMRAM region which cannot be used for the MMRAM= heap. -/// -typedef struct _EFI_MM_RESERVED_MMRAM_REGION { - /// - /// Starting address of the reserved MMRAM area, as it appears while MMR= AM is open. - /// Ignored if MmramReservedSize is 0. - /// - EFI_PHYSICAL_ADDRESS MmramReservedStart; - /// - /// Number of bytes occupied by the reserved MMRAM area. A size of zero = indicates the - /// last MMRAM area. - /// - UINT64 MmramReservedSize; -} EFI_MM_RESERVED_MMRAM_REGION; - typedef struct _EFI_MM_CONFIGURATION_PROTOCOL EFI_MM_CONFIGURATION_PROTOC= OL; =20 /** --=20 2.31.1.windows.1 -=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 (#76749): https://edk2.groups.io/g/devel/message/76749 Mute This Topic: https://groups.io/mt/83624719/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- From nobody Mon May 6 11:51:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+76750+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76750+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1624009728; cv=none; d=zohomail.com; s=zohoarc; b=bZ2Jd9GD+/J9Xvzg5nHCUOgV4nsUQY5dwDuAbb5wBeMhqRAZbvX4cLY5cHF0ZPEZJC+SkS43aPQKS0h0TRAY3/4Yy7Zi7EXL1ur+OOGEBv7WX4tJP1vhWumLtexDXwGM3Eg1PtvSd7KznWwfgnnkPVyT+Ac4UknaWH3+XXi/eUg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1624009728; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=Z3HkXaQy1qCe3bsjlXNYfxK9fKQQ7jypM6y9G7Ul0GA=; b=SPEuM493rUPahmX2Hcj+s3xgXN3b2FYEsvBdL/4B5Ql0KELpPQSOc4VilCSgLWbyNTezPXWwTgPQfuTCyJlbIRb3QE/xASEtaQqOGzZCrYkg1CRvl4wIq3JnwHDx+bGqBxbhBiZ2c/Gjo/tfWnnlH8Kb1fEiJEz33pZYpjoeokw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+76750+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 162400972810028.94432817664358; Fri, 18 Jun 2021 02:48:48 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id pELqYY1788612xUjV419I2vv; Fri, 18 Jun 2021 02:48:47 -0700 X-Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mx.groups.io with SMTP id smtpd.web08.5687.1624009722324895840 for ; Fri, 18 Jun 2021 02:48:42 -0700 X-Received: by mail-pj1-f44.google.com with SMTP id pf4-20020a17090b1d84b029016f6699c3f2so442023pjb.0 for ; Fri, 18 Jun 2021 02:48:42 -0700 (PDT) X-Gm-Message-State: Gv1CKcTkcjfAER6TVdwfK2gjx1787277AA= X-Google-Smtp-Source: ABdhPJzMeXdQl2KpC9CAGqN5z/T4opUtyaxtPjkPfg/uEd3gWeN8TITp5j7Oduis7O0sxd10rtPlJA== X-Received: by 2002:a17:903:31d3:b029:ee:bccd:e686 with SMTP id v19-20020a17090331d3b02900eebccde686mr4149748ple.1.1624009721727; Fri, 18 Jun 2021 02:48:41 -0700 (PDT) X-Received: from localhost.localdomain ([50.35.88.161]) by smtp.gmail.com with ESMTPSA id j7sm12930291pjf.0.2021.06.18.02.48.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Jun 2021 02:48:41 -0700 (PDT) From: "Kun Qin" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu , Michael Kubacki Subject: [edk2-devel] [PATCH v1 2/2] MdePkg: MmConfiguration: Added definition of MM Configuration PPI Date: Fri, 18 Jun 2021 02:48:29 -0700 Message-Id: <20210618094829.2651-3-kuqin12@gmail.com> In-Reply-To: <20210618094829.2651-1-kuqin12@gmail.com> References: <20210618094829.2651-1-kuqin12@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: 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,kuqin12@gmail.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1624009727; bh=13+nvS/Ug9F57a4WvrM1Tl8qu/gpkhgPIQOZVbqpFrM=; h=Cc:Date:From:Reply-To:Subject:To; b=WIHxibXJYnhNe0lkAs2B3iGWgoGVTAFw6LoTRkzckWchqNThO4BiFjBtcxSTvoAZ6nQ RTb0zaAlH670wvUAB7PPvULm03Af1+m/MISceGIHo9j4uojET/jqcHbdXe3Hn0yxvoHil mTm0d9IXCJSJXAE1mq6rBIfdT/1QgQyusWU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3440 MM Configuration PPI was defined in PI Specification since v1.5. This change added definition of such PPI and related GUIDs into MdePkg. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Michael Kubacki Signed-off-by: Kun Qin --- MdePkg/Include/Ppi/MmConfiguration.h | 62 ++++++++++++++++++++ MdePkg/MdePkg.dec | 3 + 2 files changed, 65 insertions(+) diff --git a/MdePkg/Include/Ppi/MmConfiguration.h b/MdePkg/Include/Ppi/MmCo= nfiguration.h new file mode 100644 index 000000000000..f950322b3877 --- /dev/null +++ b/MdePkg/Include/Ppi/MmConfiguration.h @@ -0,0 +1,62 @@ +/** @file + EFI MM Configuration PPI as defined in PI 1.5 specification. + + This PPI is used to: + 1) report the portions of MMRAM regions which cannot be used for the MMR= AM heap. + 2) register the MM Foundation entry point with the processor code. The e= ntry + point will be invoked by the MM processor entry code. + + Copyright (c) Microsoft Corporation. + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef MM_CONFIGURATION_PPI_H_ +#define MM_CONFIGURATION_PPI_H_ + +#include + +#define EFI_PEI_MM_CONFIGURATION_PPI_GUID \ + { \ + 0xc109319, 0xc149, 0x450e, { 0xa3, 0xe3, 0xb9, 0xba, 0xdd, 0x9d, 0xc3,= 0xa4 } \ + } + +typedef struct _EFI_PEI_MM_CONFIGURATION_PPI EFI_PEI_MM_CONFIGURATION_PPI; + +/** + This function registers the MM Foundation entry point with the processor= code. This entry point will be + invoked by the MM Processor entry code as defined in PI specification. + + @param[in] This The EFI_PEI_MM_CONFIGURATION_PPI instance. + @param[in] MmEntryPoint MM Foundation entry point. + + @retval EFI_SUCCESS The entry-point was successfully registered. + +**/ +typedef +EFI_STATUS +(EFIAPI *EFI_PEI_MM_REGISTER_MM_ENTRY) ( + IN CONST EFI_PEI_MM_CONFIGURATION_PPI *This, + IN EFI_MM_ENTRY_POINT MmEntryPoint + ); + +/// +/// This PPI is a PPI published by a CPU PEIM to indicate which areas with= in MMRAM are reserved for use by +/// the CPU for any purpose, such as stack, save state or MM entry point. = If a platform chooses to let a CPU +/// PEIM do MMRAM relocation, this PPI must be produced by this CPU PEIM. +/// +/// The MmramReservedRegions points to an array of one or more EFI_MM_RESE= RVED_MMRAM_REGION structures, with +/// the last structure having the MmramReservedSize set to 0. An empty arr= ay would contain only the last +/// structure. +/// +/// The RegisterMmEntry() function allows the MM IPL PEIM to register the = MM Foundation entry point with the +/// MM entry vector code. +/// +struct _EFI_PEI_MM_CONFIGURATION_PPI { + EFI_MM_RESERVED_MMRAM_REGION *MmramReservedRegions; + EFI_PEI_MM_REGISTER_MM_ENTRY RegisterMmEntry; +}; + +extern EFI_GUID gEfiPeiMmConfigurationPpi; + +#endif diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index b49f88d8e18f..c5319fdd71ca 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -983,6 +983,9 @@ [Ppis] ## Include/Ppi/MmControl.h gEfiPeiMmControlPpiGuid =3D { 0x61c68702, 0x4d7e, 0x4f43, { 0x8= d, 0xef, 0xa7, 0x43, 0x5, 0xce, 0x74, 0xc5 }} =20 + ## Include/Ppi/MmConfiguration.h + gEfiPeiMmConfigurationPpi =3D { 0xc109319, 0xc149, 0x450e, { 0xa3= , 0xe3, 0xb9, 0xba, 0xdd, 0x9d, 0xc3, 0xa4 } } + # # PPIs defined in PI 1.7. # --=20 2.31.1.windows.1 -=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 (#76750): https://edk2.groups.io/g/devel/message/76750 Mute This Topic: https://groups.io/mt/83624720/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-