public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Laszlo Ersek" <lersek@redhat.com>
To: "Bi, Dandan" <dandan.bi@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>,
	"rfc@edk2.groups.io" <rfc@edk2.groups.io>
Cc: "Dong, Eric" <eric.dong@intel.com>, "Ni, Ray" <ray.ni@intel.com>,
	"Wang, Jian J" <jian.j.wang@intel.com>,
	"Wu, Hao A" <hao.a.wu@intel.com>,
	"Tan, Ming" <ming.tan@intel.com>
Subject: Re: [edk2-devel] [edk2-rfc] MdeModulePkg/StatusCodeHandler: Separate NULL class libraries for Memory and serial handlers from MdeModulePkg/Universal/StatusCodeHandler modules
Date: Mon, 22 Jun 2020 17:02:36 +0200	[thread overview]
Message-ID: <e41c7918-ad58-67dc-5b51-d44d1780c78d@redhat.com> (raw)
In-Reply-To: <BN6PR11MB13931D3E267B54AFE9B095E7EA970@BN6PR11MB1393.namprd11.prod.outlook.com>

On 06/22/20 06:57, Bi, Dandan wrote:
>> -----Original Message-----
>> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Laszlo
>> Ersek
>> Sent: Friday, June 19, 2020 8:48 PM
>> To: rfc@edk2.groups.io; Bi, Dandan <dandan.bi@intel.com>;
>> devel@edk2.groups.io
>> Cc: Dong, Eric <eric.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Wang,
>> Jian J <jian.j.wang@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Tan,
>> Ming <ming.tan@intel.com>
>> Subject: Re: [edk2-devel] [edk2-rfc] MdeModulePkg/StatusCodeHandler:
>> Separate NULL class libraries for Memory and serial handlers from
>> MdeModulePkg/Universal/StatusCodeHandler modules
>>
>> On 06/18/20 09:01, Dandan Bi wrote:
>>> Hi All,
>>>
>>> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2816
>>>
>>> We plan to separate two kinds of NULL class libraries for Memory and serial
>> handlers from MdeModulePkg/Universal/StatusCodeHandler/.../
>> 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.
>>>
>>> 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
>>>
>>>
>>> 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't impact
>> any platform.
>>> After this separation, StatusCodeHandler module usage will like below, and
>> it's also very flexible for platform to cover more handler libraries to meet
>> their requirements.
>>>
>> MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.in
>> f {
>>>   <LibraryClasses>
>>>
>> NULL|MdeModulePkg/Library/MemoryStausCodeHandlerLib/PeiMemorySt
>> ausCode
>>> NULL|HandlerLib.inf
>>>
>> NULL|MdeModulePkg/Library/SerialStatusCodeHandlerLib/PeiSerialStatusC
>> o
>>> NULL|deHandlerLib.inf
>>>     ...
>>> }
>>>
>>>
>> MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHan
>> dlerRuntimeDxe.inf  {
>>>   <LibraryClasses>
>>>
>> NULL|MdeModulePkg/Library/MemoryStausCodeHandlerLib/RuntimeDxeM
>> emorySt
>>> NULL|ausCodeHandlerLib.inf
>>>
>> NULL|MdeModulePkg/Library/SerialStatusCodeHandlerLib/RuntimeDxeSeri
>> alS
>>> NULL|tatusCodeHandlerLib.inf
>>>     ...
>>> }
>>>
>>>
>> MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSm
>> m.inf {
>>>   <LibraryClasses>
>>>
>>>
>> NULL|MdeModulePkg/Library/MemoryStausCodeHandlerLib/SmmMemory
>> StausCode
>>> HandlerLib.inf
>>>
>> NULL|MdeModulePkg/Library/SerialStatusCodeHandlerLib/SmmSerialStatus
>> Co
>>> NULL|deHandlerLib.inf
>>>     ...
>>> }
>>
>> So I assume you're going to remove PcdStatusCodeUseSerial and
>> PcdStatusCodeUseMemory, and when converting the existent platforms,
>> the new NULL class resolutions in the DSC files will reflect the specific PCD
>> values used in those DSC files until then. Is that right?
>>
> Thanks for pointing out the PCD part which I miss in this RFC.
> This commit https://github.com/tianocore/edk2/commit/45bc28172fbf38ac21e2592c07189b55f57695e3 have updated PcdStatusCodeUseSerial and PcdStatusCodeUseMemory type.
> We plan to keep PcdStatusCodeUseSerial and PcdStatusCodeUseMemory.  Through NULL class resolutions in the DSC can make the code handler code included or not, then we still can control handler enable/disable through the PCD dynamically if the handler is included.
> What do you think of this?

Hm... OK.

Thanks
Laszlo


  reply	other threads:[~2020-06-22 15:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-18  7:01 [edk2-devel] [edk2-rfc] MdeModulePkg/StatusCodeHandler: Separate NULL class libraries for Memory and serial handlers from MdeModulePkg/Universal/StatusCodeHandler modules Dandan Bi
2020-06-19 12:48 ` Laszlo Ersek
2020-06-22  4:57   ` Dandan Bi
2020-06-22 15:02     ` Laszlo Ersek [this message]
2020-06-19 17:29 ` Brian J. Johnson
2020-06-19 18:03   ` Andrew Fish
2020-06-22  7:27     ` Dandan Bi
2020-06-24 20:24       ` Brian J. Johnson
2020-06-25 15:41         ` Dong, Eric
2020-06-25 22:26           ` Brian J. Johnson
2020-06-20  4:30   ` Dong, Eric

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e41c7918-ad58-67dc-5b51-d44d1780c78d@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox