]> git.proxmox.com Git - mirror_edk2.git/commit
MdePkg/UefiDebugLibDebugPortProtocol: Make it runtime safe
authorAaron Antone <aanton@microsoft.com>
Mon, 8 Apr 2019 02:48:00 +0000 (10:48 +0800)
committerLiming Gao <liming.gao@intel.com>
Mon, 22 Apr 2019 01:52:54 +0000 (09:52 +0800)
commit2b5778c68b631789ffcf96535001ad36643b0d66
tree2055172fbec3187487222e84b0c0c9e8281f7891
parentc0b2816d69a27db903ce2eaf1f48fb4719b26bd9
MdePkg/UefiDebugLibDebugPortProtocol: Make it runtime safe

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1416

After ExitBootServices, some pointer would be invalid such as
the Protocol pointer and gBS. The function depend on those should
be prevent. So disable the related function while after
ExitBootServices.
Change the gBS to a internal one, because there will be a cycle
consume between UefiBootServicesTableLib and DebugLib due to the
library constructors.
Also remove the SMM support for this instance.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Sean Brogan <sean.brogan@microsoft.com>
Cc: Michael Turner <Michael.Turner@microsoft.com>
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLib.c
MdePkg/Library/UefiDebugLibDebugPortProtocol/DebugLibConstructor.c [new file with mode: 0644]
MdePkg/Library/UefiDebugLibDebugPortProtocol/UefiDebugLibDebugPortProtocol.inf