]> git.proxmox.com Git - mirror_edk2.git/commit
MdePkg/UefiRuntimeLib: Do not allow to be linked by DXE driver
authorRuiyu Ni <ruiyu.ni@intel.com>
Fri, 1 Jun 2018 07:18:02 +0000 (15:18 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Tue, 5 Jun 2018 05:49:16 +0000 (13:49 +0800)
commitf6406f94dca148f4492ddd1679ada73fe4ac323b
tree7326334f3f856c5f38364f4c90625a5de81fb30c
parent0b6457efabf6f47bc55690874dde82d2f8616abc
MdePkg/UefiRuntimeLib: Do not allow to be linked by DXE driver

When UefiRuntimeLib links to a DXE driver, its constructor
still registers a Virtual Address Change event. The event callback
will get called when RT.SetVirtualAddressMap() is called from OS.
But when the driver is a DXE driver, the memory occupied by the
callback function might be zeroed or used by OS since the BS type
memory is free memory when entering to RT phase.

The patch reverts commit 97511979b4fdd84cf7cd51e43c22dc03e79bd4f3
"MdePkg/UefiRuntimeLib: Support more module types."
It makes sure that DXE driver cannot link to this library.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf