]> git.proxmox.com Git - mirror_edk2.git/commit - MdePkg/Library/UefiDebugLibConOut/DebugLib.c
MdePkg/UefidebugLibConOut: Make it runtime safe
authorAaron Antone <aanton@microsoft.com>
Mon, 8 Apr 2019 03:00:28 +0000 (11:00 +0800)
committerLiming Gao <liming.gao@intel.com>
Mon, 22 Apr 2019 01:52:54 +0000 (09:52 +0800)
commit452702d0bc51b608491a96b3634ded7a57727455
treed86722b9ec0ee8cb4828c6011f83c10b742affdb
parent2b5778c68b631789ffcf96535001ad36643b0d66
MdePkg/UefidebugLibConOut: 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 gST. The function depend on those should
be prevent. So disable the related function while after
ExitBootServices.
Change the gST 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/UefiDebugLibConOut/DebugLib.c
MdePkg/Library/UefiDebugLibConOut/DebugLibConstructor.c [new file with mode: 0644]
MdePkg/Library/UefiDebugLibConOut/UefiDebugLibConOut.inf