From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web09.3304.1642815668110212588 for ; Fri, 21 Jan 2022 17:41:08 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=JyNEbpar; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: michael.d.kinney@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642815668; x=1674351668; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=CZDerg+RDE/7eEuVhMfT1Ck2w2yAuLin4ogc9u+RbwE=; b=JyNEbpariBIC4nSlMvU0atf2QZqQEewZR/ZaRsykpQrfJ0hwacKrE/wG plBRN6+ZnV3j5DTgiEQmKb83q0o6Fpltyakz6GCpeKA9E/+foFDsjpLsh GP6hJzsdbEC+cKDcthGIRH4mz4mO1Mro3O0L9SFWwBSknJ/x1sMjKV5be nQ74W3yJXZHmmGJsKpKL+9NDDbrQa5ngjm36cFO0PhuDiY4JtTvHnNMOO ftJlVKT9DfFO8CarULWwnJ3I9lNoWoJ6INMWuy+pAllshHeUvcsaoKMl/ 5Vl0P7nUmhtfNhMHONZniYslMH5pKvfpOyRo25moANboiZdHjKi8fLBj6 Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10234"; a="226453676" X-IronPort-AV: E=Sophos;i="5.88,307,1635231600"; d="scan'208";a="226453676" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jan 2022 17:41:07 -0800 X-IronPort-AV: E=Sophos;i="5.88,307,1635231600"; d="scan'208";a="596293152" Received: from mdkinney-mobl2.amr.corp.intel.com ([10.209.29.60]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jan 2022 17:41:07 -0800 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Hao A Wu , Ray Ni , Star Zeng Subject: [Patch 1/1] MdeModulePkg/Bus/Pci/PciBusDxe: Support platform PCI ROM override Date: Fri, 21 Jan 2022 17:40:56 -0800 Message-Id: <20220122014056.1367-1-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.32.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3811 Remove ASSERT() statements that are triggered if a platform provides an override of PCI ROM attached to a PCI Controller. The PCI Platform Protocol allows the platform to provide a PCI ROM image for a PCI Controller. This works for PCI Controllers that do not have an attached PCI ROM, but the platform is not allowed to replace the PCI ROM for a PCI Controller that has its own PCI ROM. Removing these ASSERT() statements enables this additional use case. Cc: Hao A Wu Cc: Ray Ni Cc: Star Zeng Signed-off-by: Michael D Kinney --- MdeModulePkg/Bus/Pci/PciBusDxe/PciRomTable.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciRomTable.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciRomTable.c index 5535bd3013b8..cb845ec2b186 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciRomTable.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciRomTable.c @@ -58,10 +58,9 @@ PciRomAddImageMapping ( { // // Expect once RomImage and RomSize are recorded, they will be passed in - // later when updating ImageHandle + // later when updating ImageHandle. They may also be updated with new + // values if the platform provides an override of RomImage and RomSize. // - ASSERT ((mRomImageTable[Index].RomImage == NULL) || (RomImage == mRomImageTable[Index].RomImage)); - ASSERT ((mRomImageTable[Index].RomSize == 0) || (RomSize == mRomImageTable[Index].RomSize)); break; } } -- 2.32.0.windows.1