public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wu, Hao A" <hao.a.wu@intel.com>
To: "Zhong, Zarcd" <zarcd.zhong@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>,
	Laszlo Ersek <lersek@redhat.com>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Kim, Andrew" <andrew.kim@intel.com>,
	"Ni, Ray" <ray.ni@intel.com>
Subject: Re: [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizing fail in high 32bit of MEM64.
Date: Fri, 15 Jan 2021 08:36:36 +0000	[thread overview]
Message-ID: <BN8PR11MB36665D1DA6A6B3141139AFCFCAA70@BN8PR11MB3666.namprd11.prod.outlook.com> (raw)
In-Reply-To: <MWHPR11MB130970DBC41B1719DB1C1B4AFBA70@MWHPR11MB1309.namprd11.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 8118 bytes --]

Hello,

Could you help to follow the suggestion by Laszlo and use the 'git-send-email' command rather than attaching the patch file:
https://edk2.groups.io/g/devel/message/69828

You can keep the "Reviewed-by" tag by Ray when sending out the patch.
Thanks in advance.

Best Regards,
Hao Wu

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

Hi Hao,

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

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

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

From: Zhong, Zarcd <zarcd.zhong@intel.com<mailto:zarcd.zhong@intel.com>>
Sent: Friday, January 15, 2021 4:11 PM
To: Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>
Cc: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; Kinney, Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Kim, Andrew <andrew.kim@intel.com<mailto:andrew.kim@intel.com>>
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 <andrew.kim@intel.com<mailto:andrew.kim@intel.com>>
Sent: Friday, January 15, 2021 3:53 PM
To: Zhong, Zarcd <zarcd.zhong@intel.com<mailto:zarcd.zhong@intel.com>>
Cc: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; Kinney, Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>
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 <zarcd.zhong@intel.com<mailto:zarcd.zhong@intel.com>>
Cc: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; Kinney, Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>
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 = PciBarTypeUnknown;

        return Offset + 4;
      }


-Andrew

From: Kim, Andrew
Sent: Thursday, January 14, 2021 9:38 AM
To: Zhong, Zarcd <zarcd.zhong@intel.com<mailto:zarcd.zhong@intel.com>>
Cc: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; Kinney, Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>
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 <zarcd.zhong@intel.com<mailto:zarcd.zhong@intel.com>>
Sent: Wednesday, January 13, 2021 10:32 PM
To: Kim, Andrew <andrew.kim@intel.com<mailto:andrew.kim@intel.com>>
Cc: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; Kinney, Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>; Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>
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 = PciBarTypeUnknown;

Could you help to verify Ray's solution on that card?




From: Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>
Sent: Thursday, January 14, 2021 1:59 PM
To: Zhong, Zarcd <zarcd.zhong@intel.com<mailto:zarcd.zhong@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; Kinney, Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>
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 = PciBarTypeUnknown;

Thanks,
Ray

From: Zhong, Zarcd <zarcd.zhong@intel.com<mailto:zarcd.zhong@intel.com>>
Sent: Thursday, January 14, 2021 10:48 AM
To: Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; Kinney, Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>
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 = PciBarTypeUnknown;


From: Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>
Sent: Wednesday, January 13, 2021 3:01 PM
To: Zhong, Zarcd <zarcd.zhong@intel.com<mailto:zarcd.zhong@intel.com>>; devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>; Kinney, Michael D <michael.d.kinney@intel.com<mailto:michael.d.kinney@intel.com>>
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 normal
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     = 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 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<mailto:zarcd.zhong@intel.com>>
Sent: Monday, January 4, 2021 5:48 PM
To: devel@edk2.groups.io<mailto:devel@edk2.groups.io>
Cc: Ni, Ray <ray.ni@intel.com<mailto:ray.ni@intel.com>>; Wu, Hao A <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>
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 <zarcd.zhong@intel.com<mailto:zarcd.zhong@intel.com>>
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=3149

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

    Cc: Ray Ni <ray.ni@intel.com<mailto:ray.ni@intel.com>>
    Cc: Hao A Wu <hao.a.wu@intel.com<mailto:hao.a.wu@intel.com>>

[-- Attachment #2: Type: text/html, Size: 18166 bytes --]

  reply	other threads:[~2021-01-15  8:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-04  9:48 [PATCH] MdeModulePkg/Bus/Pci/PciBusDxe: Handle BAR sizing fail in high 32bit of MEM64 Zhong, Zarcd
2021-01-06 14:27 ` [edk2-devel] " Laszlo Ersek
2021-01-13  7:01 ` Ni, Ray
2021-01-14  2:47   ` Zhong, Zarcd
2021-01-14  5:58     ` Ni, Ray
2021-01-14  6:31       ` Zhong, Zarcd
2021-01-14 17:37         ` Kim, Andrew
2021-01-14 18:13           ` Kim, Andrew
2021-01-15  7:52             ` Kim, Andrew
2021-01-15  8:10               ` Zhong, Zarcd
2021-01-15  8:11                 ` Ni, Ray
2021-01-15  8:30                   ` Zhong, Zarcd
2021-01-15  8:36                     ` Wu, Hao A [this message]
2021-01-15  9:00             ` [edk2-devel] " Laszlo Ersek
     [not found] <3149>
2021-01-15  9:34 ` nmd5434
2021-01-15  9:39   ` Zhong, Zarcd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BN8PR11MB36665D1DA6A6B3141139AFCFCAA70@BN8PR11MB3666.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox