summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Core/Dxe/Image
diff options
context:
space:
mode:
authorMichael D Kinney <michael.d.kinney@intel.com>2017-11-06 16:57:36 -0800
committerMichael D Kinney <michael.d.kinney@intel.com>2017-11-13 09:56:49 -0800
commit471048388cda4935866f829365922cdf70a6a45c (patch)
tree25bde0a6e797e0e67e0931dfcf5eccd83f61f3dd /MdeModulePkg/Core/Dxe/Image
parentffc1fffd65eb95753985467dd9a2db002ebc49e1 (diff)
downloadedk2-471048388cda4935866f829365922cdf70a6a45c.tar.gz
edk2-471048388cda4935866f829365922cdf70a6a45c.tar.bz2
edk2-471048388cda4935866f829365922cdf70a6a45c.zip
MdeModulePkg/Core/Dxe: Remove extra connects for UEFI Applications
https://bugzilla.tianocore.org/show_bug.cgi?id=765 The UEFI Specification Boot Services chapter, StartImage() service, EFF 1.10 Extension requires extra calls to ConnectController() if a UEFI Driver produces handles. The DXE Core is performing these extra calls to ConnectController() without evaluating the ImageType. A filter is added to not make extra calls to ConnectController() if the ImageType is EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION. Without this filter, extra calls to ConnectController() may be performed by UEFI Applications or a UEFI Shell Applications that also call ConnectController(). Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
Diffstat (limited to 'MdeModulePkg/Core/Dxe/Image')
-rw-r--r--MdeModulePkg/Core/Dxe/Image/Image.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c
index 4e22aa6dc7..c49ddfcc81 100644
--- a/MdeModulePkg/Core/Dxe/Image/Image.c
+++ b/MdeModulePkg/Core/Dxe/Image/Image.c
@@ -1703,9 +1703,17 @@ CoreStartImage (
mCurrentImage = LastImage;
//
- // Go connect any handles that were created or modified while the image executed.
+ // UEFI Specification - StartImage() - EFI 1.10 Extension
+ // To maintain compatibility with UEFI drivers that are written to the EFI
+ // 1.02 Specification, StartImage() must monitor the handle database before
+ // and after each image is started. If any handles are created or modified
+ // when an image is started, then EFI_BOOT_SERVICES.ConnectController() must
+ // be called with the Recursive parameter set to TRUE for each of the newly
+ // created or modified handles before StartImage() returns.
//
- CoreConnectHandlesByKey (HandleDatabaseKey);
+ if (Image->Type != EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION) {
+ CoreConnectHandlesByKey (HandleDatabaseKey);
+ }
//
// Handle the image's returned ExitData