From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web11.24080.1643254476564919497 for ; Wed, 26 Jan 2022 19:34:37 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Afyj0Nif; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643254476; x=1674790476; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=oFAuPrhVqvSMJdTShAwFJ8MEWs494RzZaazuZgfcTXY=; b=Afyj0NifYAUyY41PZ8Wp8QNdgZL31iMEj39XEvTWSQL17xVj2eAm9OzZ 65YUuI34sLX0GhLaurU7Rz+dQ5CeIlX2El4dfdY/nwHqOM12EF+OgNrdx HMkXqUedPZ6/LYb/n4cpiigwqAiuSp6DpmRgORiJ1GoPPZiKNl5WwB5PT XxxkNWGQBALAr1uug/gAxL6E4UrQ5OuY+IA00c+zyAFlZGW1MOGR3DBw+ 2moYzOsNeVgwLRMO7Td7RAjlHymzC0WH0zBw3VpXT+r9UuRTTIzP70Qbw td7MTBPa5DfdruRAIUbVrEFFzLzP+DNixEo6o85HY7GuF6P7WVEZTRiNy g==; X-IronPort-AV: E=McAfee;i="6200,9189,10239"; a="246514767" X-IronPort-AV: E=Sophos;i="5.88,319,1635231600"; d="scan'208";a="246514767" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2022 19:34:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,319,1635231600"; d="scan'208";a="480131845" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga006.jf.intel.com with ESMTP; 26 Jan 2022 19:34:35 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 26 Jan 2022 19:34:35 -0800 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Wed, 26 Jan 2022 19:34:34 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Wed, 26 Jan 2022 19:34:34 -0800 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.42) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Wed, 26 Jan 2022 19:34:34 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RYwcnqVlzUO66ZQNGslYZCVYdySRGSrXpejsdPn/ov+rvzaXBX0h+AAksVo+3M4D0fVf7TD7qnfgTAkAyamiXp9Qup3YTsjsjgdNpixdmwrAfp2hODvWUc0LjcykJRySbCExXHNXmA7+WrXYBQupmv+mGFShdhofRNgklcRTnl3i5FfawLqnvcrC7JyS50MaqRDBF/MoWjFURcfvVZORgfkw0Rg85g4fGDaH76yB7IE7VG9wEAHwfbh5QZZFcI8ca6Lp0rz5iCiI9D9wTvYEbSgo55RXd3vUg4SUgBPg7qB5QhDP3Io9xfQ4+Hs0b2Rg5O2yfjKWxAVrYW04pi84CQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8m4gc2cnuB4CVDVqE3nEfeVcrjL1mAp31fqI5TkGl20=; b=eeOiRXyrmcFzMB1A7fJ5+zmvkKbEKLaUbgyRi7UI/pU7MapgYxnQJJNmHPORuywWe+oaYSiIy53Uk3wjvmsGiBSszxzTcPjQNgfHDtfGtNvni2sL+gaLTJZpOuv/AskDu7NZrUUd8w5pReBGNsSgG9QePQTMtloSWC3yqILKUbV0yH/j86TXsNie+fwY19Ube3njWNWg3FSCekUoi+urntR7Z42kiYJb9KkzZxOU04biB5qiMkn/VvWljNobr38eKdVoG5VRohku7Qzb2hlaY1CCu9kobZKjf6JyQGjztC4EBxfb+1GH3CWzhZ2DCH0OuRbLdA2LCJhbmzofrQxWDw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from MWHPR11MB1631.namprd11.prod.outlook.com (2603:10b6:301:10::10) by DM6PR11MB4218.namprd11.prod.outlook.com (2603:10b6:5:201::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.8; Thu, 27 Jan 2022 03:34:27 +0000 Received: from MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::e0fb:ec1d:4e67:375f]) by MWHPR11MB1631.namprd11.prod.outlook.com ([fe80::e0fb:ec1d:4e67:375f%8]) with mapi id 15.20.4930.017; Thu, 27 Jan 2022 03:34:27 +0000 From: "Ni, Ray" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: "Wu, Hao A" , "Zeng, Star" Subject: Re: [Patch 1/1] MdeModulePkg/Bus/Pci/PciBusDxe: Support platform PCI ROM override Thread-Topic: [Patch 1/1] MdeModulePkg/Bus/Pci/PciBusDxe: Support platform PCI ROM override Thread-Index: AQHYDzElCuQehObG50Gjv7vESg0Qjqx2Prog Date: Thu, 27 Jan 2022 03:34:26 +0000 Message-ID: References: <20220122014056.1367-1-michael.d.kinney@intel.com> In-Reply-To: <20220122014056.1367-1-michael.d.kinney@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 072b7a80-860a-428e-bbd8-08d9e145ebce x-ms-traffictypediagnostic: DM6PR11MB4218:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mdi6NbIdBw8oK/X39xh4lZIFDSbUak02Qns3MDoOYmKjcvUL5A63tLb0RcCL6Re1OcAw9B9jY/Q3LjZMHBefW25RcZOhTi0C1/Q+8+K7ejzgUciuNzluica5Jtk9y5NH6SL5XK+g6l4o7XjDjPHZ+QqJbWSEk0NomQd9swj/78sb2jxdphjWDPfu5UTHo1P3wVamG9hvY78mUEOZ/Ro2rLsNA5pS/BoMwKsMX2aNRJrtfuU/caj+uGgSjmr9vC19MwTK6DdCx2fBl73UYYEzBKCBxciaIo4+dlfIVRcLA9zdPmgNt+XV/pnUB2uipsa65xGF3mznbtyiCC8k+rjpWMCJM5npIDCwR73XGqPVGgD3bT7Hu2Elpr8Uy/KL3koukt0uZ/zBKMQ4f6nldd/ruL2Lh3eE+zdnBaQJjDI/TBs0oa5EpoF8ei8FuNCu9lPkCS/alBPsGnxB/mOvW2vW+Ul+UyNhX1lSaih/LFGdUyB1fBVwu7yskhO6EfaDx2g31kEC09TD7Y1BexlhbE2lRSTmBj6b21BlSzGi8fKPV9n4db1j2TM4n00O8hnKd1eKZ1UyZvPq9J4Sd0zg0R3c1jMV2t0KmfjGjDLGa7anhGaHIm0Oy8SuGwwQJtCI4wabf4Y5HANMls3ir+6apCOOTefCyRMAwJhTC0iGUh8/iJA2I6/9xEkmYaJyeDFMy9kVEsu8hA4jubfxen3Dv9V6qMUa+dpgupsR8m7F/nTkV0dZ7baZGrYXwNG3xKfCEnnc8qj1uyXtjTPoHmWA3WL+liBFwBLOgMsPGg6CnlWn0js= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR11MB1631.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(8936002)(86362001)(76116006)(8676002)(38100700002)(966005)(66446008)(4326008)(52536014)(66476007)(66946007)(66556008)(508600001)(122000001)(83380400001)(33656002)(2906002)(6506007)(54906003)(82960400001)(26005)(55016003)(7696005)(38070700005)(53546011)(71200400001)(107886003)(110136005)(64756008)(9686003)(316002)(5660300002)(186003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?72JzaDIlzxBLxFKBhq24RioqltCY6tn2mj246GxOfqhY9HIxte1kmEuic2nb?= =?us-ascii?Q?z4qwwc/ulmpAT2fgVg3pGPe/E01zn1oAUcDwacu53rkTqco8fHaVFP12YwqZ?= =?us-ascii?Q?9nZOaolkY9XI71OU98E/6a8+RC1LVMaggnYkms5InuBPBr3/M8DJu5prnURl?= =?us-ascii?Q?n5JRQHd4WhSfWCshjA681/e/X53DWBnR3Dke0tEqD78kq4+Polf0fDJCzwsT?= =?us-ascii?Q?p+/t6OYQq3Q+zl7Su58oPXktamMPWO9kYBzhoIcIvL7C25+w9ubllHmD+Pkx?= =?us-ascii?Q?fAsSHqEfKDWu79RiMtex4vEqFw1a/IxEuXlwetmNgzX/ZV+urjRdTULzUP7j?= =?us-ascii?Q?RCpu1/wapimSUW3CKLLawy+6RF0yFUeO8sDINDYO7uICIo6oE3GwsU/FwZFB?= =?us-ascii?Q?W817qLrwloOIbLYgJFooIXXsai1j8do+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ascii?Q?iYQTtSRAP9SDVmhvw+aqaEmf2/CMNa6xtGXtDJ9TsaRu5OyP4YPfSIbcYR7v?= =?us-ascii?Q?JAKzA5FhLARnSP7Z+tZC2OvyGcZ6UWTRcpOpmU/RdTdSB77RP5Wh4qs399AC?= =?us-ascii?Q?cO9/wn9CRYuMZ9alYYYfoMqPiOIR0+vG6tExw01AMk6YeBZQRKlOlOpXsApZ?= =?us-ascii?Q?H/kGsGgzra++IjATst1HEBGE2Sra+h0LV8HijOE5t0T8tjsilyZ2uIxZfqnM?= =?us-ascii?Q?rS8RBiWu+9n7g8847czJYzuEQ9ZNU/HmrVgiJ0ZReM0NcF2RuVdt2xs+VsEs?= =?us-ascii?Q?iLLq7A23NA2dYaLx243Z5G4=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1631.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 072b7a80-860a-428e-bbd8-08d9e145ebce X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jan 2022 03:34:26.7479 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 2k5T6WFG5NX5vxaGAnFFoYb4aB0APIodosB0eAVw/qgR7XAYAxxdMSN196MqhfiW6jQ8QAjRZoe6Z2H/JGYtsA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4218 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni -----Original Message----- From: Kinney, Michael D =20 Sent: Saturday, January 22, 2022 9:41 AM To: devel@edk2.groups.io Cc: Wu, Hao A ; Ni, Ray ; Zeng, Star = Subject: [Patch 1/1] MdeModulePkg/Bus/Pci/PciBusDxe: Support platform PCI R= OM override REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3811 Remove ASSERT() statements that are triggered if a platform provides an ove= rride of PCI ROM attached to a PCI Controller. The PCI Platform Protocol a= llows the platform to provide a PCI ROM image for a PCI Controller. This w= orks for PCI Controllers that do not have an attached PCI ROM, but the plat= form is not allowed to replace the PCI ROM for a PCI Controller that has it= s 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/Bu= s/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 passe= d in - // later when updating ImageHandle + // later when updating ImageHandle. They may also be updated with ne= w + // values if the platform provides an override of RomImage and RomSi= ze. // - ASSERT ((mRomImageTable[Index].RomImage =3D=3D NULL) || (RomImage = =3D=3D mRomImageTable[Index].RomImage)); - ASSERT ((mRomImageTable[Index].RomSize =3D=3D 0) || (RomSize =3D= =3D mRomImageTable[Index].RomSize)); break; } } -- 2.32.0.windows.1