]> git.proxmox.com Git - mirror_edk2.git/commit - MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c
MdePkg/UefiDebugLibStdErr: Make it runtime safe
authorAaron Antone <aanton@microsoft.com>
Mon, 8 Apr 2019 03:03:26 +0000 (11:03 +0800)
committerLiming Gao <liming.gao@intel.com>
Mon, 22 Apr 2019 01:52:54 +0000 (09:52 +0800)
commite72920ec617ba1fceb114b3bb2a587a8e836734b
treef73e210794bde721094fa451ef240b74ded64d41
parent452702d0bc51b608491a96b3634ded7a57727455
MdePkg/UefiDebugLibStdErr: 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/UefiDebugLibStdErr/DebugLib.c
MdePkg/Library/UefiDebugLibStdErr/DebugLibConstructor.c [new file with mode: 0644]
MdePkg/Library/UefiDebugLibStdErr/UefiDebugLibStdErr.inf