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 9F66FAC0A6D for ; Tue, 31 Oct 2023 01:40:09 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=nYV2UefbBdS5/c5X+c4buiH4MZ6qLFouCSu3AGdqVoo=; 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=1698716408; v=1; b=rErJLLYrvAInk21Qa9guRUd1HxoJSOFL4OvhQaRLnbwNx954rmhhKkuepe9hwstAcWq6FE39 04p55As623Fjt8ZNu+TXQqmAGKOhMejOy46aiQC1TAmc8erkpsv2ruQiPL/7mDjeFx8yOt1S2uI 0iKo8w+w2prh4CSWvl53xvVE= X-Received: by 127.0.0.2 with SMTP id nWSQYY7687511xCPABwPmVjg; Mon, 30 Oct 2023 18:40:08 -0700 X-Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.177416.1698716407614444487 for ; Mon, 30 Oct 2023 18:40:07 -0700 X-Received: from [192.168.4.22] (unknown [47.201.241.95]) by linux.microsoft.com (Postfix) with ESMTPSA id 6C03720B74C0; Mon, 30 Oct 2023 18:40:06 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6C03720B74C0 Message-ID: Date: Mon, 30 Oct 2023 21:40:05 -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, wei6.xu@intel.com, "lersek@redhat.com" Cc: Ard Biesheuvel , Sami Mujawar , "Ni, Ray" References: <6add8265-f950-404c-be10-8a8bd8763af7@linux.microsoft.com> <05a756e5-63b8-fce9-00de-5e9360fe7760@redhat.com> <5f7532cb-4dc1-42b2-8b77-32b08fffb6c5@linux.microsoft.com> From: "Michael Kubacki" In-Reply-To: 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: ysiT1ahJ7J484upQLWb6fwPvx7686176AA= 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=rErJLLYr; 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 Thank you for the update. On 10/30/2023 9:18 PM, Xu, Wei6 wrote: > Hi Michael and Laszlo, >=20 > Thanks a lot for the review. > We reconsidered the solution and find better way to implement the 'platfo= rm hook'. So Let's drop this patch. > Thanks Ray for suggesting a better solution. >=20 > BR, > Wei >=20 > -----Original Message----- > From: Michael Kubacki > Sent: Tuesday, October 31, 2023 3:27 AM > To: devel@edk2.groups.io; lersek@redhat.com; Xu, Wei6 > Cc: Ard Biesheuvel ; Sami Mujawar ; Ni, Ray > Subject: Re: [edk2-devel] [PATCH 0/2] Add Platform Hook Lib into Standalo= neMmCore >=20 > 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? >> >> Not sure if it's necessary, but it's somewhat "customary". Platform >> hook libs are not uncommon; for example PiSmmCpuDxeSmm consumes >> SmmCpuPlatformHookLib and SmmCpuFeaturesLib. >> >> 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 >> . >> > That would be helpful. Hooks are sometimes necessary of course, but I gen= erally consider these open-ended hook libraries a design wart. They introdu= ce an inherently incohesive interface and a convenient place for new APIs t= o land instead of more focused interfaces that may be more appropriate. Thi= s extends to the implementation where, over time, it can become a mess of d= ependencies and unrelated code coupled together. >=20 > I'd like to see if there's a way to avoid that or such a library interfac= e is the best choice. >=20 >> Laszlo >> >>> >>> 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 l= ib. >>>> =C2=A0=C2=A0 StandaloneMmPkg/Core: Consumes Standalone Mm Core Platf= orm 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/Standalo >>>> neMmCorePlatformHookLibNull.c >>>> =C2=A0 create mode 100644 >>>> StandaloneMmPkg/Include/Library/StandaloneMmCorePlatformHookLib.h >>>> =C2=A0 create mode 100644 >>>> StandaloneMmPkg/Library/StandaloneMmCorePlatformHookLibNull/Standalo >>>> neMmCorePlatformHookLibNull.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 (#110353): https://edk2.groups.io/g/devel/message/110353 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-