]> git.proxmox.com Git - mirror_edk2.git/commit - MdeModulePkg/Library/DxeResetSystemLib/DxeResetSystemLib.c
MdeModulePkg/DxeResetSystemLib: Avoid depending on UefiRuntimeLib
authorRuiyu Ni <ruiyu.ni@intel.com>
Fri, 1 Jun 2018 07:09:58 +0000 (15:09 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Tue, 5 Jun 2018 05:49:17 +0000 (13:49 +0800)
commit6c252691c3be5f10df1708589821c8bb65244a8e
treebf1f5d75ccfb01876c40b836121dcf5b35db84de
parentf6406f94dca148f4492ddd1679ada73fe4ac323b
MdeModulePkg/DxeResetSystemLib: Avoid depending on UefiRuntimeLib

Current DxeResetSystemLib depends on UefiRuntimeLib because it calls
EfiResetSystem() API exposed by UefiRuntimeLib.

Due to the commit:
"MdePkg/UefiRuntimeLib: Do not allow to be linked by DXE driver"
which reverts UefiRuntimeLib to only support DXE_RUNTIME_DRIVER,
removing UefiRuntimeLib dependency makes the DxeResetSystemLib
can be used by DXE drivers.

The patch also disallows the DxeResetSystemLib to be linked by
runtime driver, SMM drivers.
Runtime driver cannot link to this library because the gRT is not
converted when entering to RT.
SMM driver cannot link to this library because calling RT services
from SMM after EndOfDxe violates security guideline.

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