From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web10.1175.1592587754330661644 for ; Fri, 19 Jun 2020 10:29:14 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=0439c154de=brian.johnson@hpe.com) Received: from pps.filterd (m0134421.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 05JHPlil004981; Fri, 19 Jun 2020 17:29:14 GMT Received: from g9t5009.houston.hpe.com (g9t5009.houston.hpe.com [15.241.48.73]) by mx0b-002e3701.pphosted.com with ESMTP id 31rsdhuksd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 Jun 2020 17:29:13 +0000 Received: from g9t2301.houston.hpecorp.net (g9t2301.houston.hpecorp.net [16.220.97.129]) by g9t5009.houston.hpe.com (Postfix) with ESMTP id E87055B; Fri, 19 Jun 2020 17:29:12 +0000 (UTC) Received: from [16.99.144.15] (unknown [16.99.144.15]) by g9t2301.houston.hpecorp.net (Postfix) with ESMTP id 70CDB50; Fri, 19 Jun 2020 17:29:10 +0000 (UTC) Subject: Re: [edk2-devel] [edk2-rfc] MdeModulePkg/StatusCodeHandler: Separate NULL class libraries for Memory and serial handlers from MdeModulePkg/Universal/StatusCodeHandler modules To: devel@edk2.groups.io, dandan.bi@intel.com, "rfc@edk2.groups.io" Cc: "Dong, Eric" , "Ni, Ray" , "Wang, Jian J" , "Wu, Hao A" , "Tan, Ming" References: From: "Brian J. Johnson" Message-ID: Date: Fri, 19 Jun 2020 12:29:09 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 In-Reply-To: X-Proofpoint-UnRewURL: 2 URL's were un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216,18.0.687 definitions=2020-06-19_20:2020-06-19,2020-06-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 impostorscore=0 suspectscore=0 mlxlogscore=999 priorityscore=1501 clxscore=1011 lowpriorityscore=0 phishscore=0 malwarescore=0 mlxscore=0 spamscore=0 cotscore=-2147483648 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006190129 Content-Type: multipart/alternative; boundary="------------EBE0E6688455ECC522F9D18E" Content-Language: en-US --------------EBE0E6688455ECC522F9D18E Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable On 6/18/20 2:01 AM, Dandan Bi wrote: > > Hi All, > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2816=20 > > > We plan to separate two kinds of NULL class libraries for Memory and=20 > serial handlers from *MdeModulePkg/Universal/StatusCodeHandler/=85/=20 > StatusCodeHandlerPei/RuntimeDxe/Smm* modules. > > The benefit we want to gain from this separation is to 1) make the=20 > code clear and easy to maintain, 2) make platform flexible to choose=20 > any handler library they need, and it also can reduce image size since=20 > the unused handlers can be excluded. > > If you have any concern or comments for this separation, please let me=20 > know. > > We plan to add new separated NULL class library=20 > *MemoryStausCodeHandlerLib *and*SerialStatusCodeHandlerLib *with=20 > different phase implementation into *MdeModulePkg\Library\* directory. > > The main tree structure may like below: > > MdeModulePkg\Library > > |------*MemoryStausCodeHandlerLib* > > |------|------ PeiMemoryStausCodeHandlerLib.inf > > |------|------ RuntimeDxeMemoryStatusCodeHandlerLib.inf > > |------|------ SmmMemoryStausCodeHandlerLib.inf > > |------*SerialStatusCodeHandlerLib* > > |------|------ PeiSerialStatusCodeHandlerLib.inf > > |------|------ RuntimeDxeSerialStatusCodeHandlerLib.inf > > |------|------ SmmSerialStatusCodeHandlerLib.inf > > ** > > ** > > We will update existing platform use cases in edk2 and edk2-platform=20 > repo to cover the new NULL class library to make sure this change=20 > doesn=92t impact any platform. > > After this separation, StatusCodeHandler module usage will like below,=20 > and it=92s also very flexible for platform to cover more handler=20 > libraries to meet their requirements. > > MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf { > > =A0 > > NULL|MdeModulePkg/Library/MemoryStausCodeHandlerLib/PeiMemoryStausCodeHan= dlerLib.inf > > NULL|MdeModulePkg/Library/SerialStatusCodeHandlerLib/PeiSerialStatusCodeH= andlerLib.inf > > =A0=A0=A0 =85 > > } > > MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRunt= imeDxe.inf=20 > { > > =A0 > > NULL|MdeModulePkg/Library/MemoryStausCodeHandlerLib/RuntimeDxeMemoryStaus= CodeHandlerLib.inf > > NULL|MdeModulePkg/Library/SerialStatusCodeHandlerLib/RuntimeDxeSerialStat= usCodeHandlerLib.inf > > =A0=A0=A0 =85 > > } > > MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf { > > =A0 > > =A0NULL|MdeModulePkg/Library/MemoryStausCodeHandlerLib/SmmMemoryStausCode= HandlerLib.inf > > NULL|MdeModulePkg/Library/SerialStatusCodeHandlerLib/SmmSerialStatusCodeH= andlerLib.inf > > =A0=A0=A0 =85 > > } > > Thanks, > > Dandan > Dandan, We'll have a lot of layers of indirection....=A0 The=20 ReportStatusCodeRouter modules will call one or more=20 StatusCodeHandlerModules, and the standard StatusCodeHandler modules=20 will call multiple StatusCodeHandlerLib libraries. How about adding StatusCodeHandlerLib support directly to the=20 ReportStatusCodeRouter modules?=A0 Then platforms could omit the=20 StatusCodeHandler modules if they're only using the open-source code.=A0=20 That sounds like less overhead since fewer modules would be needed. Thanks, --=20 *Brian J. Johnson *Enterprise X86 Lab Hewlett Packard Enterprise *hpe.com* <3D"hpe.com"> --------------EBE0E6688455ECC522F9D18E Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable
On 6/18/20 2:01 AM, Dandan Bi wrote:

Hi All,

=A0

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2816<= /o:p>

=A0

We plan to separate two kinds of NULL class libraries for Memory and serial handlers from MdeModulePkg/Universal/StatusCodeHandler/=85/ StatusCodeHandlerPei/RuntimeDxe/Smm modules.

The benefit we want to gain from this separation is to 1) make the code clear and easy to maintain, 2) make platform flexible to choose any handler library they need, and it also can reduce image size since the unused handlers can be excluded.

If you have any concern or comments for this separation, please let me know.

=A0

We plan to add new separated NULL class library MemoryStausCodeHandlerLib and SerialStatusCodeHandlerLib with different phase implementation into MdeModulePkg\Library\ directory.

The main tree structure may like below:=

MdeModulePkg\Library

|------MemoryStausCodeHandlerLib=

|------|------ PeiMemoryStausCodeHandlerLib.inf

|------|------ RuntimeDxeMemoryStatusCodeHandlerLib.inf

|------|------ SmmMemoryStausCodeHandlerLib.inf

|------SerialStatusCodeHandlerLib

|------|------ PeiSerialStatusCodeHandlerLib.inf

|------|------ RuntimeDxeSerialStatusCodeHandlerLib.inf

|------|------ SmmSerialStatusCodeHandlerLib.inf

=A0

=A0

We will update existing platform use cases in edk2 and edk2-platform repo to cover the new NULL class library to make sure this change doesn=92t impact any platform.

After this separation, StatusCodeHandler module usage will like below, and it=92s also very flexible for platform to cover more handler libraries to meet their requirements.

MdeModulePkg/Universal/StatusCodeHandler/Pei= /StatusCodeHandlerPei.inf {

=A0 <LibraryClasses>

NULL|MdeModuleP= kg/Library/MemoryStausCodeHandlerLib/PeiMemoryStausCodeHandlerLib.inf<= /o:p>

NULL|MdeModuleP= kg/Library/SerialStatusCodeHandlerLib/PeiSerialStatusCodeHandlerLib.inf

=A0=A0=A0 =85

}

=A0

MdeModulePkg/Universal/StatusCodeHandler/Run= timeDxe/StatusCodeHandlerRuntimeDxe.inf=A0 {

=A0 <LibraryClasses>

NULL|MdeModuleP= kg/Library/MemoryStausCodeHandlerLib/RuntimeDxeMemoryStausCodeHandlerLib.in= f

NULL|MdeModuleP= kg/Library/SerialStatusCodeHandlerLib/RuntimeDxeSerialStatusCodeHandlerLib.= inf

=A0=A0=A0 =85

}

=A0

MdeModulePkg/Universal/StatusCodeHandler/Smm= /StatusCodeHandlerSmm.inf {

=A0 <LibraryClasses>

=A0=A0 =A0NULL|MdeModulePkg/Library/MemoryStausCodeHandlerLib/SmmMemoryStausCodeHa= ndlerLib.inf

NULL|MdeModuleP= kg/Library/SerialStatusCodeHandlerLib/SmmSerialStatusCodeHandlerLib.inf

=A0=A0=A0 =85

}

=A0

=A0

Thanks,

Dandan


Dandan,

We'll have a lot of layers of indirection....=A0 The ReportStatusCodeRouter modules will call one or more StatusCodeHandlerModules, and the standard StatusCodeHandler modules will call multiple StatusCodeHandlerLib libraries.

How about adding StatusCodeHandlerLib support directly to the ReportStatusCodeRouter modules?=A0 Then platforms could omit the StatusCodeHandler modules if they're only using the open-source code.=A0 That sounds like less overhead since fewer modules would be needed.

Thanks,

--

Brian J. Johnson
Enterprise X86 Lab

Hewlett Packard Enterprise

hpe.com

--------------EBE0E6688455ECC522F9D18E--