> -----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: r...@edk2.groups.io; Bi, Dandan <dandan...@intel.com>;
> devel@edk2.groups.io
> Cc: Dong, Eric <eric.d...@intel.com>; Ni, Ray <ray...@intel.com>; Wang,
> Jian J <jian.j.w...@intel.com>; Wu, Hao A <hao.a...@intel.com>; Tan,
> Ming <ming....@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?


Thanks,
Dandan
> I'm OK with it.
> 
> Thanks
> Laszlo
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#61550): https://edk2.groups.io/g/devel/message/61550
Mute This Topic: https://groups.io/mt/74953841/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to