From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 101EC81D80 for ; Tue, 8 Nov 2016 04:29:29 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP; 08 Nov 2016 04:29:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,462,1473145200"; d="scan'208";a="188977065" Received: from ray-dev.ccr.corp.intel.com ([10.239.9.25]) by fmsmga004.fm.intel.com with ESMTP; 08 Nov 2016 04:29:31 -0800 From: Ruiyu Ni To: edk2-devel@lists.01.org Date: Tue, 8 Nov 2016 20:29:19 +0800 Message-Id: <20161108122928.53984-1-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.9.0.windows.1 Subject: [PATCH v2 0/9] Defer 3rd party images loading to after EndOfDxe X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Nov 2016 12:29:29 -0000 The patches change the default image loading policy by deferring 3rd party images loading to after EndOfDxe and add a new BDS API to dispatch the deferred images. Platform needs to call the new BDS API EfiBootManagerDispatchDeferredImages after EndOfDxe to ensure that any deferred images are loaded. v2 puts the deferred images checking in DEBUG_CODE macro, corrects a typo of function name, and puts CpuDeadLoop() after ASSERT(FALSE). v2 includes all the platform changes. Ruiyu Ni (9): MdeModulePkg/SecurityStubDxe: Defer 3rd party image before EndOfDxe MdeModulePkg/UefiBootManager: Add EfiBootManagerDispatchDeferredImages MdeModulePkg/BdsDxe: Check deferred images before booting to OS MdeModulePkg/SecurityStubDxe: Report failure if image is load earlier ArmVirPkg/PlatformBds: Dispatch deferred images after EndOfDxe OvmfPkg/PlatformBds: Dispatch deferred images after EndOfDxe CorebootPayload/PlatformBds: Dispatch deferred images after EndOfDxe QuarkPlatformPkg/PlatformBds: Dispatch deferred images after EndOfDxe Nt32Pkg/PlatformBds: Dispatch deferred images after EndOfDxe .../Library/PlatformBootManagerLib/PlatformBm.c | 5 + .../PlatformBootManagerLib/PlatformBootManager.c | 5 + MdeModulePkg/Include/Library/UefiBootManagerLib.h | 13 + MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c | 113 ++++++ .../Library/UefiBootManagerLib/InternalBm.h | 1 + .../UefiBootManagerLib/UefiBootManagerLib.inf | 1 + MdeModulePkg/Universal/BdsDxe/Bds.h | 4 +- MdeModulePkg/Universal/BdsDxe/BdsDxe.inf | 2 + MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 90 +++++ .../SecurityStubDxe/Defer3rdPartyImageLoad.c | 414 +++++++++++++++++++++ .../SecurityStubDxe/Defer3rdPartyImageLoad.h | 95 +++++ .../Universal/SecurityStubDxe/SecurityStub.c | 14 +- .../Universal/SecurityStubDxe/SecurityStubDxe.inf | 11 +- .../PlatformBootManagerLib/PlatformBootManager.c | 5 + .../Library/PlatformBootManagerLib/BdsPlatform.c | 5 + .../PlatformBootManagerLib/PlatformBootManager.c | 7 +- 16 files changed, 781 insertions(+), 4 deletions(-) create mode 100644 MdeModulePkg/Universal/SecurityStubDxe/Defer3rdPartyImageLoad.c create mode 100644 MdeModulePkg/Universal/SecurityStubDxe/Defer3rdPartyImageLoad.h -- 2.9.0.windows.1