From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web08.1163.1610564478485114580 for ; Wed, 13 Jan 2021 11:01:18 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: aiden.park@intel.com) IronPort-SDR: gqSU9SqdhGSGMchS5JzZpJ3yQ9Y4gsDJxMWg/r0o1vFwDhP/1nHGJViiIqR1fZeZ97ETJyAfQb hXvKb25H3UMw== X-IronPort-AV: E=McAfee;i="6000,8403,9863"; a="174748394" X-IronPort-AV: E=Sophos;i="5.79,345,1602572400"; d="scan'208";a="174748394" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jan 2021 11:01:17 -0800 IronPort-SDR: +l24925BHwozH/rUZYrFIpMbZKQ0HDBB5XgNml/Radc0qJ7Giu/2ehsUsPGvgt/Ci0KI08M8C4 bWlJFpu9yV9A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,345,1602572400"; d="scan'208";a="397812313" Received: from plxs0284.pdx.intel.com ([10.38.240.7]) by fmsmga004.fm.intel.com with ESMTP; 13 Jan 2021 11:01:17 -0800 Received: from younghyu-desk1.jf.intel.com (younghyu-desk1.jf.intel.com [134.134.154.164]) by plxs0284.pdx.intel.com with ESMTP id 10DJ1Ger012273; Wed, 13 Jan 2021 11:01:16 -0800 From: "Park, Aiden" To: hao.a.wu@intel.com, ray.ni@intel.com, devel@edk2.groups.io Cc: aiden.park@intel.com, maurice.ma@intel.com, guo.dong@intel.com Subject: [PATCH] MdeModulePkg/PciBusDxe: Fix a bug in ProcessOptionRomLight Date: Wed, 13 Jan 2021 11:01:14 -0800 Message-Id: <20210113190114.19888-1-aiden.park@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Aiden Park The ProcessOptionRomLight() assumes that OpRom has already been processed in the previous full enumeration and updates AllOpRomProcessed flag to TRUE by default. However, this may not be applicable with other pre-stage boot firmwares. This will update AllOpRomProcessed flag properly by checking PciRomGetImageMapping(). Signed-off-by: Aiden Park --- MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c index 1b64924b7b..e8337e865e 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c @@ -1168,12 +1168,7 @@ ProcessOptionRomLight ( ProcessOptionRomLight (Temp); } - PciRomGetImageMapping (Temp); - - // - // The OpRom has already been processed in the first round - // - Temp->AllOpRomProcessed = TRUE; + Temp->AllOpRomProcessed = PciRomGetImageMapping (Temp); CurrentLink = CurrentLink->ForwardLink; } -- 2.20.1