From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web11.4001.1643093768980745900 for ; Mon, 24 Jan 2022 22:56:09 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=eFpLn0yo; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: star.zeng@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643093769; x=1674629769; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=O1GqguOUxnTz4q8KcW/BL+mb7iTlvauYDuHf7kHpIcg=; b=eFpLn0yoF/mWNAQUEgulbSXxBZ/coTmfgI6qguuknd3wAMYf14RWdzow Hbt3RBCTk7edVNjosKTMXADldKKmVlRrdNOplN15oMKPpPp2ErBci/oHt IRifseZdCLKXuQlRvZ65UitboAasWtqUOQ86Tu07ILJFofgg2JZQJcQ/g mN7f+qLbWPK/5btdwSvMBzw4J3H4J0TOcnh+nY4zSzIpgexOv5AjYUuz/ 3FOm2pKo9YVk0SVHVO61oMZG+IHocwJnMsGApWvUd3bxJB69XrZiFJR02 p0L1d6rg3ssK8NbqwM3sxAe91/EnORZ0pbtr2BR8+EPYqHvctP2z5nccC A==; X-IronPort-AV: E=McAfee;i="6200,9189,10237"; a="309555497" X-IronPort-AV: E=Sophos;i="5.88,314,1635231600"; d="scan'208";a="309555497" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jan 2022 22:56:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,314,1635231600"; d="scan'208";a="479385268" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga006.jf.intel.com with ESMTP; 24 Jan 2022 22:56:07 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 24 Jan 2022 22:56:07 -0800 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 24 Jan 2022 22:56:07 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Mon, 24 Jan 2022 22:56:07 -0800 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.49) 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; Mon, 24 Jan 2022 22:56:06 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ELxhQp0GSmODXPZRYeWciWlYrkud/AL3zzmrXeQHvVSzcIOP2a42SKV94BIVIwGKLYIRi93XSBzVjih4U28WmKGfeveiMQxUhvde0U/IX0ANbf6kjXBBXlTpo+VOqxmWcjtzcanNU453pBvothTrgwYmPVF4Q/SoTLz2X04etIpkWYpYglAYjpybBGXppgWvZ7polEV+nDiHppRpydQsv4Uc0USrqP08IxgkeFrnkTQhagCRWRmTbaCn6jlBvxv4FwEj2VpTjeVD5E8aY3eDyr3mzuw0KkS1/6U+KnSO7ho2CvbB5vefsoZP2P6Yh3CA/AGNP3Ei8QQIEC8Mz1RQpw== 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=0gnoltYgUA1TdAcRlppK0GLUZTRTsX0DcOa6UYjMNfY=; b=DMaQKcgoFOz+UARyTbhlI8evH9x1hnYGSRf60Q4G4gTLOW6/Z7+4/MRWN2oS4Z/MO4sT+DZd2LZp4988GpCzz2YVWzutCPSwDLGyyCFicn47FCqxrwTpZ8c6kzPSmYjWwxvz5uUJ5T1krrqPedvjH3pHa0jhekBo/ZJPFdNzn8yWH8Fk3piyg6gfOQ8ugGKmteDSY4W2umSkRB976vcUHwtqh0iEz+HtjkVwb3e6LmTUmagWq2N/29/cKWYV9qL/nfHVv1aWSB6XzyO/+48YVQQqkRav7oHtcannGkpQoRXfrbSrzJJ3dKcWJ4THeGWEc0KLPl9I6WhMyjg2lB74JQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from DM5PR11MB1244.namprd11.prod.outlook.com (2603:10b6:3:13::7) by MN2PR11MB4400.namprd11.prod.outlook.com (2603:10b6:208:18c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.12; Tue, 25 Jan 2022 06:56:04 +0000 Received: from DM5PR11MB1244.namprd11.prod.outlook.com ([fe80::cc3:8a67:455a:c06f]) by DM5PR11MB1244.namprd11.prod.outlook.com ([fe80::cc3:8a67:455a:c06f%7]) with mapi id 15.20.4909.019; Tue, 25 Jan 2022 06:55:57 +0000 From: "Zeng, Star" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: "Wu, Hao A" , "Ni, Ray" , "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: AQHYDzElVYQTG6yw9kKzCwY38wbpnKxzUo+Q Date: Tue, 25 Jan 2022 06:55:55 +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: zh-CN, 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: 5dacd68e-41db-4d0c-e716-08d9dfcfbd68 x-ms-traffictypediagnostic: MN2PR11MB4400: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: Q0Pac1/1RbmvaAMWcXBhiJU+Gd/rLaC+Vxtt8HIdDfZM8y5Vqfzz8MxCtxucG5YpKAMzMV5yC/InoMdEU6/ccg9RjMQX+41VzbhJOWCsa9NJZmeygIgGvrTXw/yuDgeaocNOvDJG97sJh08fssYR4c+dETqsvEGb2kSwQcEry3Q28PIseZHrZPK2FxwCyGRp4hLwqEGi9tnWVn0xSPvXa7amQZDZxNw7EjPe9ndV590sEZy3Q9OT3+YqWDzi6bI/MxST/o8cNF6QmTJZQbCLgabetbc+kJ8c/bzyJ6G+A+KWqP0zIqm8LMVfEOsnKcAm0OcCw7DDKkfwfQyKyDcuyCHcdYtNiu3WnSs79sZhblhKfiMEnfiBx4JDdonijXaYO4LfLx3VC/ySiYd1IDjm7eFriJBfb3kpBoMcNu8TdjauGegFnvf0ebHKh9GZCb3MvYUCITlbS4hkkAo96QXJaE4wEe+QHTOs3vLSD7lgmAfmWiEwFFA9SxbtX1LFTdPdnKDPw+cGKVsrsFeNcNFPRBPY5xMGa87ZamU1fXI9DJm4C90fuk0PALqz6/jkM3FDBaqeRNK/j3wbHLAZoA9uiSJlBK9yD5rYX6o/Kic7P++CRBE/GlfYVZjXYJT+LWOpZKvOzrdqaaQsM31iKXnzC6IqFiHtBI4gEGT+79IEnWsFTp0kZ29k9+JdQUQioJm6Dpz+g/6yWxnuj5z6yvKRWw/kF+Jh/wYo8O9kiUYNUzIQcc59PpOvlJOmLw97a7LPofZDXjht08eG79oAvASBSA/ELiDnLo3m3dJp9/VNMZo= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR11MB1244.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(107886003)(4326008)(122000001)(52536014)(9686003)(316002)(26005)(33656002)(508600001)(2906002)(82960400001)(186003)(71200400001)(38100700002)(38070700005)(66946007)(6506007)(53546011)(55016003)(83380400001)(76116006)(54906003)(66476007)(8936002)(5660300002)(64756008)(966005)(7696005)(110136005)(66556008)(66446008)(86362001)(8676002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?uyAsYCwu+c4jzYdDq3ILQlLnyQ4GRSav1eq6pKgYotml8KGpefndvcVcQ9+o?= =?us-ascii?Q?94Xxg3Zm6GQFA6orWAcYgsksy2KbxmjgMeQe5qui9WGYvoATcZsSAc7P3Q7f?= =?us-ascii?Q?rQ51bQCokrm4MipchnpETPvKm3e1AgEVcCAUoXBd1cpSa/j11T8bHQZU9mEo?= =?us-ascii?Q?3+8oMUVniZrhZq7IjbVF69fhlCColtqQz1HeOLJi2B45f8Adictkqu3g4S4c?= =?us-ascii?Q?3Zd/F2siflSt4O3jfDXmHi4Hj9ebOg0QPK+yDNxBr+cKorPNkMCrSCeGaNbV?= =?us-ascii?Q?m61zOJuPtC2NnzCDP4cBK0ZwNMf/IT/aEYYjX7IH/mr2+KpW2Iq7uFTl5xUy?= =?us-ascii?Q?HtEzmgGAt4GeReJZ310Q+dxkgUh6ZLRDMs/9no+bTQbBhV9IUkWr7ZEY3MTW?= =?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Y3kwm5lNxEG27WqQvZDoya?= =?us-ascii?Q?Smxr7OSd1VCKSaEALjFy37YcDQ/INvnZYpvKsUQJRIMrGAqOp9jNkv/VbuDH?= =?us-ascii?Q?uMe2rsZ9FKLnVpeH5FM3jFV0nkb7vGnPWbXXdo41Rc7vWM3ke3qfOCVTc4if?= =?us-ascii?Q?DtQB0b5Lh/RE8Wc+UliuVeWj04c03snaQSMx7tKgel/Bgk0JUtIa4V0ra+2s?= =?us-ascii?Q?9CKXr+uNgSHMl7jKKeWUUaKQq7YTcdnO13TyxAhsl2S1MRPKnhBS5LmDHT0j?= =?us-ascii?Q?6juHN23XWJhr12PbhfKiQPX0d5d7pEriiNKyOTnYRZQpuNdZEMJIJ7GO3qV5?= =?us-ascii?Q?/magkdJNDjAPWIrtPZ7DBbA=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM5PR11MB1244.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5dacd68e-41db-4d0c-e716-08d9dfcfbd68 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Jan 2022 06:55:55.8005 (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: 5w7IUHr6WquqDJ3qRn11Fm1HV0t3SU849kKss4+dBQ9SNhDe74Yth5rzyfiJOgOPEJTn5pAJcgtMVhjdvcZ2pg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4400 Return-Path: star.zeng@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Star Zeng -----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