From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web09.1374.1610699406821364796 for ; Fri, 15 Jan 2021 00:30:07 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=UX2BdKMm; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: zarcd.zhong@intel.com) IronPort-SDR: BJhxL4UZbR1eWU/ErNEDGPQjcjRyJoeDvg2cWyU9weGxa2GfC7ESxdsRmaMkRc9m+Jt4XPT9To 4UOdIZm38dJg== X-IronPort-AV: E=McAfee;i="6000,8403,9864"; a="157698032" X-IronPort-AV: E=Sophos;i="5.79,348,1602572400"; d="scan'208,217,223";a="157698032" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jan 2021 00:30:05 -0800 IronPort-SDR: 7dGXd7Tci6PWIMirLD1+52adJ6XqK11WptcIXtAQM2hqTPBxcyOGVkaGLZnYlo0owz4iBVUHUP 9LPDqDC/Ao2g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,348,1602572400"; d="scan'208,217,223";a="401218164" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga002.fm.intel.com with ESMTP; 15 Jan 2021 00:30:05 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 15 Jan 2021 00:30:04 -0800 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 15 Jan 2021 00:30:04 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 15 Jan 2021 00:30:04 -0800 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.176) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Fri, 15 Jan 2021 00:30:03 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aG+ZAbe/NH0N3tTJgh/kGvq6cj+dbNgn5S8hHaSNp70RSjfUzeHmVJar8an2tRER5+u7pBpTwOXlVF7wI0k9v1DBCtq4aDa/l0khVdAasyFjJpJTOA2q+v4lfUgR5xQocvV8wHH0OGUmQmJV/+3SlcwbZzKvdjcc5uEqFS1u0uY8oVlUzeMHIrFd6cSVT32jsyD6CG3nbj8f5U3Sg1VpA60tUOY42t0nqL7RGfCYyPKCT2VNIARqWio7HISVwQCa/X6IxmfH4AtR3ji7kTfP7d5sbnGBFNf5DG37mKuY1Rt59e0EuROpT/NtByi7wBC4rC4UQsZ65pKn+kNNZpI9gw== 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-SenderADCheck; bh=ilB/TtNMyiniyBhVOrYKqcn8tOGffcJYuKIlJetwcIg=; b=MFAXQRyM0A9mtQgwpNkpWpxjFPpZTrQE2NwYb/7H5nPqfjXORpy3dDghWBaqrMmgLHa3qVm2HcBwz7TeBgPf4yPxwQGqvnTB9V6dhmcfB8k4B3PJZmVAsq7J/FsvEg/MS83/mwXlLNf94SWsX0BM2szHjiNeetf1PafYXLqWOzz4UoH3PkqNrTbFpjuHbQKTMk78Gp62tyqiKqtOudx+qwUNu4ipsrcrtIerOz8Gmxs0bnJ0IEZZuXYFh0PXhdD3v71SMLCCu4DxiwUF+5nuToTKLPpsiVCav62sv42nlDlzHxc1phS/UGh0eRqsSux8QBMxm20aK5SQaN0vl//LyQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ilB/TtNMyiniyBhVOrYKqcn8tOGffcJYuKIlJetwcIg=; b=UX2BdKMmiHC2pFFO2NSUSRt0/Nb+cG2TdxBLB629OXOpju4/L0/Wbu2BRJNrmKJl/4kFZ/5ziuTZc2xhyPmPb8qJRtbgIpuBp3HDj5WOLRAGctDJMlaEt0DAKkgvsaqlj0WX+dyJkmRJCIoQUYw4IobQllmNGVAXP5AYWSwNBkc= Received: from MWHPR11MB1309.namprd11.prod.outlook.com (2603:10b6:300:20::20) by CO1PR11MB4977.namprd11.prod.outlook.com (2603:10b6:303:6d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.9; Fri, 15 Jan 2021 08:30:02 +0000 Received: from MWHPR11MB1309.namprd11.prod.outlook.com ([fe80::a084:4090:7dee:dfb9]) by MWHPR11MB1309.namprd11.prod.outlook.com ([fe80::a084:4090:7dee:dfb9%10]) with mapi id 15.20.3763.011; Fri, 15 Jan 2021 08:30:02 +0000 From: "Zhong, Zarcd" To: "Wu, Hao A" CC: "Kinney, Michael D" , "devel@edk2.groups.io" , "Kim, Andrew" , "Ni, Ray" Subject: Re: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizing fail in high 32bit of MEM64. Thread-Topic: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizing fail in high 32bit of MEM64. Thread-Index: AdbifqrbMhe/1KwPTxui//AvwMCRQAG+ZBhAACnK61AABqDE4AABJCGQABb6sdAAAZOskAAcnoNwAACjh0AAABL98AAAkRcw Date: Fri, 15 Jan 2021 08:30:02 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.37] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 73e30db2-1ac2-493f-29c4-08d8b92fc108 x-ms-traffictypediagnostic: CO1PR11MB4977: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: DdPmv5Ej/4PyMhKBLjWt8ZmLTd2nIckS/etGdtf52sw0I8KrewZ5mGNQD88kbxDe9GwZ2gnAnVNqFdbkU3bemg1EIkYwsy5JY6hTCPcFGYf6eDkgEKyQwBx/MtgxtcFBinkQbXHnoiC7yEWljJeh6kLSuZgfHqOBx3fLevdPXKOSMerz5556Z9lXVc+nUTX00eNfju+7kxR6q+/ZOfcvWLbgu6eazZNbiGrXkCf11hMSFglovoyDLE8/Zq8pLQw5ioRC2xiHSoAyi1/ViSI9+wl3CTYOGFtExA/NKBXn8Q5nrmRDiQQRmULVi4uE2bEIfIyD9RH8GfUNv0SYqmLp0MwSBQGvGeY5n08gwWCYSpXUaINw9XyJQseMGImQhao6amJAkp8W6W0ludS34+U8nPNpd1dqKMQgRM39TvBwzYrybRJTD/l+yV+ug9ag9bV2PDD5ArL69c4w72M/hrmyDA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR11MB1309.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(346002)(39860400002)(136003)(376002)(366004)(99936003)(166002)(54906003)(6506007)(76116006)(966005)(33656002)(71200400001)(9326002)(64756008)(8936002)(9686003)(5660300002)(478600001)(55016002)(66946007)(4326008)(6862004)(83380400001)(2906002)(86362001)(7696005)(8676002)(52536014)(107886003)(26005)(6636002)(66476007)(53546011)(186003)(66446008)(316002)(66556008)(66616009);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?mdmBabA/kY/P81POw2KE0YRB/9JdFq3SCx/sDqvjcDJT/dFtrVVYgB7xemRf?= =?us-ascii?Q?jOo96gJYFAZF1qM9FVwEtd0LAlJtBVp+qEOxBqrAEokz8Lo0EbTXMhxK3NqH?= =?us-ascii?Q?XqcaeFsaPd1GAxDBgJ0jR0ep4B4anzcJGmqPi0gYTIH1G74t7r8FWVoEiFhO?= =?us-ascii?Q?KFy90+9uNhyUeY+JiSamp/lfB4Q+tJkM4FyXl13eb9CD1QBc3iy43jO3FMId?= =?us-ascii?Q?WgzXSS10Qo7lKUtaVkgJ/BF2nVnajavTDIKOUx94lhNtckB8iar+11UD4iN/?= =?us-ascii?Q?Btu4JwUpNRPj6xtMM0xii/yuCo7noSHZ6mnLpY6gxGbL8QbVReKDLIVYavoC?= =?us-ascii?Q?WWsKhATs0OJHytTp8lkajtdOpLRhcuetJQ4cck+aPUDv0Rykcu0mRBduV/2W?= =?us-ascii?Q?xidKrDljfJ9J3iKqkJJtJIJd0SQYXLcfR4azTBr4/kuUS6wMV0QWZ0vuBdUE?= =?us-ascii?Q?UgwbgkpNCmWKDQSjcYrlvzhAL/QDCpN/lqrdPEHbcURoK6kDTrbb+gal9uSS?= =?us-ascii?Q?Mt8fkkrZ3EVDJ+nPJ8SZAUQiVPpRbcLXluqDPzCo52+CTBQAp6EjiRYLkMjD?= =?us-ascii?Q?09THZ5aef3LJaf8pl+NmBTc+7p1Mry1G3BIsVItTiCzvreS+BKPWh7R+YxJj?= =?us-ascii?Q?ciaRVSMdPykMIx5m76pTY8+Z5G7CnQKNgsyXjpTFlaJ1swgEeFKTQvl78FVP?= =?us-ascii?Q?nM331ccjSNXldbEqjCSF6d/nO7JqYTYs9Hhjf5uNqcXY2b4BOT2nxqjO+uFv?= =?us-ascii?Q?yFF1HCEL/Qo6k+d1YRpMhPwkmTjZ1jO9C1Vwis15tOzC9S0AfqZuUB/cNcme?= =?us-ascii?Q?rNpQL0XlFC5deS6b621UXj+Mui8ZV27atllKP9U3VEzStFfFtdLcSWb/Xscj?= =?us-ascii?Q?sN1iSg2j8rQVKF1l9UrHHcMTRd38OkpxHtLwnCKBifR4mXavuMcZXHPI5Phb?= =?us-ascii?Q?CmVaGnz90PIDPKlp/81qjGqdMouYk2jMrJIedKoG/Uk=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 73e30db2-1ac2-493f-29c4-08d8b92fc108 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jan 2021 08:30:02.5024 (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: ZnQFNbId9fkpaHBNSk1VEJO4ZHK2NNwkC0D6psEkFNKJPvgtjtacY+ZdaqpK6JyIDGbft7K6Og8K/6eZJCrPog== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB4977 Return-Path: zarcd.zhong@intel.com X-OriginatorOrg: intel.com X-Groupsio-MsgNum: 70409 Content-Language: en-US Content-Type: multipart/mixed; boundary="_004_MWHPR11MB130970DBC41B1719DB1C1B4AFBA70MWHPR11MB1309namp_" --_004_MWHPR11MB130970DBC41B1719DB1C1B4AFBA70MWHPR11MB1309namp_ Content-Type: multipart/alternative; boundary="_000_MWHPR11MB130970DBC41B1719DB1C1B4AFBA70MWHPR11MB1309namp_" --_000_MWHPR11MB130970DBC41B1719DB1C1B4AFBA70MWHPR11MB1309namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Hao, Please help to review this patch and push it to open source EDKii. Thanks From: Ni, Ray Sent: Friday, January 15, 2021 4:12 PM To: Zhong, Zarcd Cc: Wu, Hao A ; Kinney, Michael D ; devel@edk2.groups.io; Kim, Andrew Subject: RE: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizing fail= in high 32bit of MEM64. Reviewed-by: Ray Ni > From: Zhong, Zarcd > Sent: Friday, January 15, 2021 4:11 PM To: Ni, Ray > Cc: Wu, Hao A >; Kinney, Mich= ael D >; deve= l@edk2.groups.io; Kim, Andrew > Subject: RE: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizing fail= in high 32bit of MEM64. Hi Ray, Your suggestion for one line patch test PASS. Attached file is the patch. Please help to review. From: Kim, Andrew > Sent: Friday, January 15, 2021 3:53 PM To: Zhong, Zarcd > Cc: Wu, Hao A >; Kinney, Mich= ael D >; deve= l@edk2.groups.io; Ni, Ray > Subject: RE: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizing fail= in high 32bit of MEM64. Hi Zarcd, It works fine with this Ray's solution. Customer confirmed it. -Andrew From: Kim, Andrew Sent: Thursday, January 14, 2021 10:14 AM To: Zhong, Zarcd > Cc: Wu, Hao A >; Kinney, Mich= ael D >; deve= l@edk2.groups.io; Ni, Ray > Subject: RE: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizing fail= in high 32bit of MEM64. BTW, to be clear for this to try. Could you confirm if this is right update with your suggestion? if (EFI_ERROR (Status)) { PciIoDevice->VfPciBar[BarIndex].BarType =3D PciBarTypeUnknown; return Offset + 4; } -Andrew From: Kim, Andrew Sent: Thursday, January 14, 2021 9:38 AM To: Zhong, Zarcd > Cc: Wu, Hao A >; Kinney, Mich= ael D >; deve= l@edk2.groups.io; Ni, Ray > Subject: RE: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizing fail= in high 32bit of MEM64. Hi Zarcd, Thanks for this update. Sure, I will let you know once it has been verified. -Andrew From: Zhong, Zarcd > Sent: Wednesday, January 13, 2021 10:32 PM To: Kim, Andrew > Cc: Wu, Hao A >; Kinney, Mich= ael D >; deve= l@edk2.groups.io; Ni, Ray > Subject: RE: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizing fail= in high 32bit of MEM64. Hi Kim, Ray suggests a one line patch instead of google's solution. + PciIoDevice->VfPciBar[BarIndex].BarType =3D PciBarTypeUnknown; Could you help to verify Ray's solution on that card? From: Ni, Ray > Sent: Thursday, January 14, 2021 1:59 PM To: Zhong, Zarcd >; dev= el@edk2.groups.io Cc: Wu, Hao A >; Kinney, Mich= ael D > Subject: RE: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizing fail= in high 32bit of MEM64. Zarcd, I may not say very clearly. I prefer to just keep below line. Can you check= whether that can work? + PciIoDevice->VfPciBar[BarIndex].BarType =3D PciBarTypeUnknown; Thanks, Ray From: Zhong, Zarcd > Sent: Thursday, January 14, 2021 10:48 AM To: Ni, Ray >; devel@edk2.groups.= io Cc: Wu, Hao A >; Kinney, Mich= ael D > Subject: RE: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizing fail= in high 32bit of MEM64. Hi Ray, Attached patch is updated with below add. Thanks for your remind. PciIoDevice->VfPciBar[BarIndex].BarType =3D PciBarTypeUnknown; From: Ni, Ray > Sent: Wednesday, January 13, 2021 3:01 PM To: Zhong, Zarcd >; dev= el@edk2.groups.io Cc: Wu, Hao A >; Kinney, Mich= ael D > Subject: RE: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizing fail= in high 32bit of MEM64. Zarcd, I can understand that this patch is needed for some buggy pci devices whose VF bar behaves strangely. Incompatible PCI protocol can only deal with norm= al PCI bar. And this patch is just to enhance the error handling logic. Can you please use below code for error handling? + PciIoDevice->VfPciBar[BarIndex].BarType =3D PciBarTypeUnknown I understand that your change is aligned to existing error handling in the = beginning of PciIovParseVfBar(). But that logic runs before PciIoDevice->VfPciBar[BarIndex].BarType is assig= ned. The key is to reset the BarType to PciBarTypeUnknown so that the resource s= ummary code doesn't count this bar. Thanks, Ray From: Zhong, Zarcd > Sent: Monday, January 4, 2021 5:48 PM To: devel@edk2.groups.io Cc: Ni, Ray >; Wu, Hao A > Subject: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizing fail in = high 32bit of MEM64. >>From 7518212a85269e486d06dcea927a3d34e23372c2 Mon Sep 17 00:00:00 2001 From: Zarcd Zhong > Date: Mon, 4 Jan 2021 17:32:54 +0800 Subject: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizing fail in = high 32bit of MEM64. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3149 Clear length and alignment for low 32bit of MEM64 BAR if sizing fail in= high 32bit. Cc: Ray Ni > Cc: Hao A Wu > --_000_MWHPR11MB130970DBC41B1719DB1C1B4AFBA70MWHPR11MB1309namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi Hao,

 

Please help to review this patch and push it to open= source EDKii. Thanks

 

From: Ni, Ray <ray.ni@intel.com>
Sent: Friday, January 15, 2021 4:12 PM
To: Zhong, Zarcd <zarcd.zhong@intel.com>
Cc: Wu, Hao A <hao.a.wu@intel.com>; Kinney, Michael D <mich= ael.d.kinney@intel.com>; devel@edk2.groups.io; Kim, Andrew <andrew.ki= m@intel.com>
Subject: RE: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizi= ng fail in high 32bit of MEM64.

 

Reviewed-by: Ray Ni <ray.ni@intel.com>

 

From: Zhong, Zarcd <zarcd.zhong@intel.com>
Sent: Friday, January 15, 2021 4:11 PM
To: Ni, Ray <ray.ni@intel.com= >
Cc: Wu, Hao A <hao.a.wu@int= el.com>; Kinney, Michael D <michael.d.kinney@intel.com>; devel@edk2.groups.io; Kim, Andr= ew <andrew.kim@intel.com>=
Subject: RE: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizi= ng fail in high 32bit of MEM64.

 

Hi Ray,

 

  Your suggestion for one line patch test PASS.=   

 

Attached file is the patch. Please help to review. <= o:p>

 

From: Kim, Andrew <andrew.kim@intel.com>
Sent: Friday, January 15, 2021 3:53 PM
To: Zhong, Zarcd <zarcd.= zhong@intel.com>
Cc: Wu, Hao A <hao.a.wu@int= el.com>; Kinney, Michael D <michael.d.kinney@intel.com>; devel@edk2.groups.io; Ni, Ray &= lt;ray.ni@intel.com>
Subject: RE: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizi= ng fail in high 32bit of MEM64.

 

Hi Zarcd,

 

It works fine with this Ray’s solution. Custom= er confirmed it.

 

-Andrew

 

From: Kim, Andrew
Sent: Thursday, January 14, 2021 10:14 AM
To: Zhong, Zarcd <zarcd.= zhong@intel.com>
Cc: Wu, Hao A <hao.a.wu@int= el.com>; Kinney, Michael D <michael.d.kinney@intel.com>; devel@edk2.groups.io; Ni, Ray &= lt;ray.ni@intel.com>
Subject: RE: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizi= ng fail in high 32bit of MEM64.

 

BTW, to be clear for this to try.

Could you confirm if this is right update with your = suggestion?

 

 

      if (EFI_ERROR (Status= )) {

        PciIoDevice->VfPciBar[BarIndex].BarType =3D PciBarTypeU= nknown;

 

        return Of= fset + 4;

      }

 

 

-Andrew

 

From: Kim, Andrew
Sent: Thursday, January 14, 2021 9:38 AM
To: Zhong, Zarcd <zarcd.= zhong@intel.com>
Cc: Wu, Hao A <hao.a.wu@int= el.com>; Kinney, Michael D <michael.d.kinney@intel.com>; devel@edk2.groups.io; Ni, Ray &= lt;ray.ni@intel.com>
Subject: RE: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizi= ng fail in high 32bit of MEM64.

 

Hi Zarcd,

 

Thanks for this update.

 

Sure, I will let you know once it has been verified.=

 

-Andrew

 

From: Zhong, Zarcd <zarcd.zhong@intel.com>
Sent: Wednesday, January 13, 2021 10:32 PM
To: Kim, Andrew <andrew.k= im@intel.com>
Cc: Wu, Hao A <hao.a.wu@int= el.com>; Kinney, Michael D <michael.d.kinney@intel.com>; devel@edk2.groups.io; Ni, Ray &= lt;ray.ni@intel.com>
Subject: RE: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizi= ng fail in high 32bit of MEM64.

 

Hi Kim,

 

Ray suggests  a one line patch instead of googl= e’s solution.

+        PciIoDev= ice->VfPciBar[BarIndex].BarType =3D PciBarTypeUnknown;

 

Could you help to verify Ray’s solution on tha= t card?

 

 

 

 

From: Ni, Ray <ray.ni@intel.com>
Sent: Thursday, January 14, 2021 1:59 PM
To: Zhong, Zarcd <zarcd.= zhong@intel.com>; devel@edk2.groups.io
Cc: Wu, Hao A <hao.a.wu@int= el.com>; Kinney, Michael D <michael.d.kinney@intel.com>
Subject: RE: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizi= ng fail in high 32bit of MEM64.

 

Zarcd,

I may not say very clearly. I prefer to just keep be= low line. Can you check whether that can work?

+        PciIoDev= ice->VfPciBar[BarIndex].BarType =3D PciBarTypeUnknown;

 

Thanks,
Ray

 

From: Zhong, Zarcd <zarcd.zhong@intel.com>
Sent: Thursday, January 14, 2021 10:48 AM
To: Ni, Ray <ray.ni@intel.com= >; devel@edk2.groups.io
Cc: Wu, Hao A <hao.a.wu@int= el.com>; Kinney, Michael D <michael.d.kinney@intel.com>
Subject: RE: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizi= ng fail in high 32bit of MEM64.

 

Hi Ray,

 

Attached patch is updated with below add. Thanks for= your remind.

 

PciIoDevice->VfPciBar[BarIndex].BarType =3D PciBa= rTypeUnknown;

 

 

From: Ni, Ray <ray.ni@intel.com>
Sent: Wednesday, January 13, 2021 3:01 PM
To: Zhong, Zarcd <zarcd.= zhong@intel.com>; devel@edk2.groups.io
Cc: Wu, Hao A <hao.a.wu@int= el.com>; Kinney, Michael D <michael.d.kinney@intel.com>
Subject: RE: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizi= ng fail in high 32bit of MEM64.

 

Zarcd,

I can understand that this patch is needed for some = buggy pci devices whose
VF bar behaves strangely. Incompatible PCI protocol can only deal with norm= al
PCI bar. And this patch is just to enhance the error handling logic.

 

Can you please use below code for error handling?

+        PciIoDev= ice->VfPciBar[BarIndex].BarType     =3D PciBarTypeUn= known

 

I understand that your change is aligned to existing= error handling in the beginning
of PciIovParseVfBar().

But that logic runs before PciIoDevice->VfPciBar[= BarIndex].BarType is assigned.

The key is to reset the BarType to PciBarTypeUnknown= so that the resource summary
code doesn’t count this bar.

 

Thanks,

Ray

 

From: Zhong, Zarcd <zarcd.zhong@intel.com>
Sent: Monday, January 4, 2021 5:48 PM
To: devel@edk2.groups.io=
Cc: Ni, Ray <ray.ni@intel.com= >; Wu, Hao A <hao.a.wu@inte= l.com>
Subject: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizing f= ail in high 32bit of MEM64.

 

From 7518212a85269e486d06dcea927a3d34e23372c2 Mon Se= p 17 00:00:00 2001

From: Zarcd Zhong <zarcd.zhong@intel.com>

Date: Mon, 4 Jan 2021 17:32:54 +0800

Subject: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Han= dle BAR sizing fail in high 32bit of MEM64.

 

    REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3149

 

    Clear length and alignment for lo= w 32bit of MEM64 BAR if sizing fail in high 32bit.

 

    Cc: Ray Ni <ray.ni@intel.com>

    Cc: Hao A Wu <hao.a.wu@intel.com>

--_000_MWHPR11MB130970DBC41B1719DB1C1B4AFBA70MWHPR11MB1309namp_-- --_004_MWHPR11MB130970DBC41B1719DB1C1B4AFBA70MWHPR11MB1309namp_ Content-Type: application/octet-stream; name="0001-MdeModulePkg-Bus-Pci-PciBusDxe-Handle-BAR-sizing-fai.patch" Content-Description: 0001-MdeModulePkg-Bus-Pci-PciBusDxe-Handle-BAR-sizing-fai.patch Content-Disposition: attachment; filename="0001-MdeModulePkg-Bus-Pci-PciBusDxe-Handle-BAR-sizing-fai.patch"; size=1062; creation-date="Fri, 15 Jan 2021 08:28:00 GMT"; modification-date="Fri, 15 Jan 2021 08:28:00 GMT" Content-Transfer-Encoding: base64 RnJvbSBkODBmZDY5MGU2N2QwODk5MTAzN2I3MTdjZDc2NmFlYmQxOTk2NTAyIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBaYXJjZCBaaG9uZyA8emFyY2QuemhvbmdAaW50ZWwuY29tPgpE YXRlOiBNb24sIDQgSmFuIDIwMjEgMTc6MzI6NTQgKzA4MDAKU3ViamVjdDogW1BBVENIXSBNZGVN b2R1bGVQa2cvQnVzL1BjaS9QY2lCdXNEeGU6IEhhbmRsZSBCQVIgc2l6aW5nIGZhaWwgaW4KIGhp Z2ggMzJiaXQgb2YgTUVNNjQuCgogICAgUkVGOiBodHRwczovL2J1Z3ppbGxhLnRpYW5vY29yZS5v cmcvc2hvd19idWcuY2dpP2lkPTMxNDkKCiAgICBBZGRyZXNzIE1FTTY0IEJBUiBpbiB0eXBlIHVu a25vd24gaWYgc2l6aW5nIGZhaWwgaW4gaGlnaCAzMmJpdC4KCiAgICBDYzogUmF5IE5pIDxyYXku bmlAaW50ZWwuY29tPgogICAgQ2M6IEhhbyBBIFd1IDxoYW8uYS53dUBpbnRlbC5jb20+Ci0tLQog TWRlTW9kdWxlUGtnL0J1cy9QY2kvUGNpQnVzRHhlL1BjaUVudW1lcmF0b3JTdXBwb3J0LmMgfCAx ICsKIDEgZmlsZSBjaGFuZ2VkLCAxIGluc2VydGlvbigrKQoKZGlmZiAtLWdpdCBhL01kZU1vZHVs ZVBrZy9CdXMvUGNpL1BjaUJ1c0R4ZS9QY2lFbnVtZXJhdG9yU3VwcG9ydC5jIGIvTWRlTW9kdWxl UGtnL0J1cy9QY2kvUGNpQnVzRHhlL1BjaUVudW1lcmF0b3JTdXBwb3J0LmMKaW5kZXggMWI2NDky NGI3Yi4uYTI0MDY1ZThiYSAxMDA2NDQKLS0tIGEvTWRlTW9kdWxlUGtnL0J1cy9QY2kvUGNpQnVz RHhlL1BjaUVudW1lcmF0b3JTdXBwb3J0LmMKKysrIGIvTWRlTW9kdWxlUGtnL0J1cy9QY2kvUGNp QnVzRHhlL1BjaUVudW1lcmF0b3JTdXBwb3J0LmMKQEAgLTE2ODYsNiArMTY4Niw3IEBAIFBjaUlv dlBhcnNlVmZCYXIgKAogICAgICAgICAgICAgICAgICk7DQogDQogICAgICAgaWYgKEVGSV9FUlJP UiAoU3RhdHVzKSkgew0KKyAgICAgICAgUGNpSW9EZXZpY2UtPlZmUGNpQmFyW0JhckluZGV4XS5C YXJUeXBlID0gUGNpQmFyVHlwZVVua25vd247DQogICAgICAgICByZXR1cm4gT2Zmc2V0ICsgNDsN CiAgICAgICB9DQogDQotLSAKMi4xNi4yLndpbmRvd3MuMQoK --_004_MWHPR11MB130970DBC41B1719DB1C1B4AFBA70MWHPR11MB1309namp_--