From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 6FB4B2034A87F for ; Thu, 26 Oct 2017 23:50:54 -0700 (PDT) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Oct 2017 23:54:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,303,1505804400"; d="scan'208";a="1030015291" Received: from ray-dev.ccr.corp.intel.com ([10.239.9.7]) by orsmga003.jf.intel.com with ESMTP; 26 Oct 2017 23:54:40 -0700 From: Ruiyu Ni To: edk2-devel@lists.01.org Date: Fri, 27 Oct 2017 14:54:35 +0800 Message-Id: <20171027065438.284440-1-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.12.2.windows.2 Subject: [PATCH 0/3] MdeModulePkg/PciBus: Fix bug that doesn't produce BusOverride X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Oct 2017 06:50:56 -0000 It's a regression of below commit: SHA-1: 8be37a5cee700777ca8e8e8a34cc2225b21931a7 * MdeModulePkg/SecurityStubDxe: Defer 3rd party image before EndOfDxe When PciBus driver fails to load the Option ROM, it doesn't produce BusOverride protocol. It was a correct behavior before the above commit. But due to the above commit, BusOverride protocol never is produced by PciBus driver. The patch fixes this issue using the following solution: 1. PciBus records the image device path when LoadImage fails. 2. Override.GetDriver() tries to look for the image handle using the stored image device path. Ruiyu Ni (3): MdeModulePkg/PciBus: Refine EFI_PCI_ROM_IMAGE_MAPPING MdeModulePkg/PciBus: Don't create entry when recording ImageHandle MdeModulePkg/PciBus: Fix bug that doesn't produce BusOverride MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.h | 7 +- MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf | 3 +- MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c | 4 +- MdeModulePkg/Bus/Pci/PciBusDxe/PciDriverOverride.c | 147 ++++++++++++++------- MdeModulePkg/Bus/Pci/PciBusDxe/PciDriverOverride.h | 17 ++- .../Bus/Pci/PciBusDxe/PciOptionRomSupport.c | 21 ++- MdeModulePkg/Bus/Pci/PciBusDxe/PciRomTable.c | 99 ++++++++------ MdeModulePkg/Bus/Pci/PciBusDxe/PciRomTable.h | 10 +- 8 files changed, 190 insertions(+), 118 deletions(-) -- 2.12.2.windows.2