From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 67086941A55 for ; Mon, 30 Oct 2023 19:27:23 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=JCPc03NnOBf6fBy7Ss+VJ55EEKT8hnxrzZ0P2MD/4dI=; c=relaxed/simple; d=groups.io; h=DKIM-Filter:Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1698694041; v=1; b=rWmseFZaTZorLq+1Us9Rxp0xpM+EbGlAyiGAWVYcUadXUe+rfvGHyxZvYGbrdVA/pC+us+iL xdbyoLmQU3vqLErWFvE1VQMZ3MVimtI9ltMNFcuXRFIhAv1D5BK8maxU3LlmcSZW2ywoe4ZzSHa JglYYDKnAxFc1CEIaRfU5DO8= X-Received: by 127.0.0.2 with SMTP id CwrJYY7687511xGxiMNMt7Mo; Mon, 30 Oct 2023 12:27:21 -0700 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.158555.1698694041400379125 for ; Mon, 30 Oct 2023 12:27:21 -0700 X-Received: from [192.168.4.22] (unknown [47.201.241.95]) by linux.microsoft.com (Postfix) with ESMTPSA id 4947B20B74C0; Mon, 30 Oct 2023 12:27:20 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4947B20B74C0 Message-ID: <5f7532cb-4dc1-42b2-8b77-32b08fffb6c5@linux.microsoft.com> Date: Mon, 30 Oct 2023 15:27:19 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH 0/2] Add Platform Hook Lib into StandaloneMmCore To: devel@edk2.groups.io, lersek@redhat.com, wei6.xu@intel.com Cc: Ard Biesheuvel , Sami Mujawar , Ray Ni References: <6add8265-f950-404c-be10-8a8bd8763af7@linux.microsoft.com> <05a756e5-63b8-fce9-00de-5e9360fe7760@redhat.com> From: "Michael Kubacki" In-Reply-To: <05a756e5-63b8-fce9-00de-5e9360fe7760@redhat.com> Precedence: Bulk 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,mikuback@linux.microsoft.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 8g6DcQR32sEOxgvtAeiU4tU5x7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=rWmseFZa; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=linux.microsoft.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io On 10/28/2023 10:03 AM, Laszlo Ersek wrote: > On 10/27/23 18:08, Michael Kubacki wrote: >> This allows ambiguous "platform" code in the critical path of the MM >> core. Is this necessary? >> >> Do you need this for one feature that others might too and can be >> abstracted? Or, do you plan to perform an unknown and arbitrary number >> of changes behind the hook over time? >=20 > Not sure if it's necessary, but it's somewhat "customary". Platform hook > libs are not uncommon; for example PiSmmCpuDxeSmm consumes > SmmCpuPlatformHookLib and SmmCpuFeaturesLib. >=20 > My request would be for Wei to file a TianoCore Feature Request > bugzilla, with a bit more information than "We need this library to > implement our feature". Reference the BZ in the commit messages, then > add the BZ to the > . >=20 That would be helpful. Hooks are sometimes necessary of course, but I=20 generally consider these open-ended hook libraries a design wart. They=20 introduce an inherently incohesive interface and a convenient place for=20 new APIs to land instead of more focused interfaces that may be more=20 appropriate. This extends to the implementation where, over time, it can=20 become a mess of dependencies and unrelated code coupled together. I'd like to see if there's a way to avoid that or such a library=20 interface is the best choice. > Laszlo >=20 >> >> Thanks, >> Michael >> >> On 10/26/2023 11:28 PM, Xu, Wei6 wrote: >>> This patch set is to add StandaloneMmCorePlatformHookLib into >>> StandaloneMmCore. >>> >>> This library class defines a set of platform hooks called by the >>> Standalone Mm Core. With this library, platform can perform specific >>> tasks before and after invoking registered MMI handlers. >>> We need this library to implement our feature. >>> >>> PR: https://github.com/tianocore/edk2/pull/4949 >>> >>> >>> >>> Cc: Ard Biesheuvel >>> >>> Cc: Sami Mujawar >>> >>> Cc: Ray Ni >>> >>> >>> Wei6 Xu (2): >>> =C2=A0=C2=A0 StandaloneMmPkg: Add Standalone Mm Core platform hook lib= . >>> =C2=A0=C2=A0 StandaloneMmPkg/Core: Consumes Standalone Mm Core Platfor= m Hook Lib. >>> >>> =C2=A0 StandaloneMmPkg/Core/StandaloneMmCore.c=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 |=C2=A0 7 ++- >>> =C2=A0 .../StandaloneMmCorePlatformHookLibNull.c=C2=A0=C2=A0=C2=A0=C2= =A0 | 45 +++++++++++++++++++ >>> =C2=A0 StandaloneMmPkg/Core/StandaloneMmCore.h=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 |=C2=A0 1 + >>> =C2=A0 StandaloneMmPkg/Core/StandaloneMmCore.inf=C2=A0=C2=A0=C2=A0=C2= =A0 |=C2=A0 1 + >>> =C2=A0 .../Library/StandaloneMmCorePlatformHookLib.h | 44 ++++++++++++= ++++++ >>> =C2=A0 .../StandaloneMmCorePlatformHookLibNull.inf=C2=A0=C2=A0 | 30 ++= +++++++++++ >>> =C2=A0 StandaloneMmPkg/StandaloneMmPkg.dec=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 4 ++ >>> =C2=A0 StandaloneMmPkg/StandaloneMmPkg.dsc=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 2 + >>> =C2=A0 8 files changed, 133 insertions(+), 1 deletion(-) >>> =C2=A0 create mode 100644 >>> StandaloneMmPkg/Library/StandaloneMmCorePlatformHookLibNull/StandaloneM= mCorePlatformHookLibNull.c >>> =C2=A0 create mode 100644 >>> StandaloneMmPkg/Include/Library/StandaloneMmCorePlatformHookLib.h >>> =C2=A0 create mode 100644 >>> StandaloneMmPkg/Library/StandaloneMmCorePlatformHookLibNull/StandaloneM= mCorePlatformHookLibNull.inf >>> >> >> >> >> >> >=20 >=20 >=20 >=20 >=20 -=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 (#110336): https://edk2.groups.io/g/devel/message/110336 Mute This Topic: https://groups.io/mt/102214566/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-