Re: [edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory

2022-06-02 Thread Ni, Ray
> This doesn't work currently because the code > considers a pcie host bridge without I/O window a hard failure even in > case there are no I/O allocation requests. For fixing that the five > lines above should be enough I think. That's a real bug we should fix. I agree!! -=-=-=-=-=-=-=-=-=-=

Re: [edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory

2022-05-31 Thread Gerd Hoffmann
Hi, > To make things worse I see that if we return success there EDK2 will > actually go ahead and start assigning trash addresses to the device > and enable IO space decoding in case of the PCI root port which means > that device will try to decode invalid IO ranges. > Logs: > PciBus: Resourc

Re: [edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory

2022-05-25 Thread Albecki, Mateusz
On Mon, May 23, 2022 at 11:24 PM, Gerd Hoffmann wrote: > > On Mon, May 23, 2022 at 04:48:05AM -0700, Albecki, Mateusz wrote: > >> @Ni, Ray >> >> I think EDK2 needs to provide a way for root port to operate without IO >> space assigned in a platform-independent way. I can think of the following

Re: [edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory

2022-05-23 Thread Gerd Hoffmann
On Mon, May 23, 2022 at 04:48:05AM -0700, Albecki, Mateusz wrote: > @Ni, Ray > > I think EDK2 needs to provide a way for root port to operate without IO space > assigned in a platform-independent way. I can think of the following cases > when root port didn't get IO space: > > 1. We have run ou

Re: [edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory

2022-05-23 Thread Albecki, Mateusz
@Ni, Ray I think EDK2 needs to provide a way for root port to operate without IO space assigned in a platform-independent way. I can think of the following cases when root port didn't get IO space: 1. We have run out of IO space but it's fine since the device under the root port doesn't use IO

Re: [edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory

2022-05-02 Thread Gerd Hoffmann
Hi, > If IO requirement of certain PCI(E) devices can be ignored, can you change > the IncompatiblePciDevice protocol implementation to override the IO request > from the devices? Hmm, how can the IncompatiblePciDevice protocol specify that IO bars should be ignored? Seems I can override the

Re: [edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory

2022-04-29 Thread Gerd Hoffmann
Hi, > > > Can Linux allocate resource for PCI(E) devices? How does it deal with the > > > IO type? > > > > Yes. Details depend a bit on the specific configuration, but in general > > linux will try assign io address space to pcie root ports and devices > > plugged into those ports. A failure

Re: [edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory

2022-04-29 Thread Ni, Ray
> > Hi, > > > > I'd say the risk for regressions is rather low, though, given that it > > > only affects configurations that would fail PCI resource allocation > > > today. Or am I missing something? > > > > > > In any case, the PCIe spec is clear about this: I/O space is optional, > > > and we

Re: [edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory

2022-04-29 Thread Gerd Hoffmann
Hi, > > I'd say the risk for regressions is rather low, though, given that it > > only affects configurations that would fail PCI resource allocation > > today. Or am I missing something? > > > > In any case, the PCIe spec is clear about this: I/O space is optional, > > and we need to incorpora

Re: [edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory

2022-04-29 Thread Ni, Ray
t; ; Leif Lindholm ; Justen, > Jordan L ; Yao, > Jiewen ; Chang, Abner ; Wang, Jian > J > Subject: Re: [edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range > is not mandatory > > On Fri, 29 Apr 2022 at 08:50, Gerd Hoffmann wrote: > > > > On Wed

Re: [edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory

2022-04-29 Thread Ard Biesheuvel
On Fri, 29 Apr 2022 at 08:50, Gerd Hoffmann wrote: > > On Wed, Apr 27, 2022 at 03:08:50AM +, Ni, Ray wrote: > > Ard, > > can you explain more? > > > > Your code changes the PciHostBridge driver to ignore the failure of IO > > allocation. > > If IO requirement of certain PCI(E) devices can be

Re: [edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory

2022-04-28 Thread Gerd Hoffmann
On Wed, Apr 27, 2022 at 03:08:50AM +, Ni, Ray wrote: > Ard, > can you explain more? > > Your code changes the PciHostBridge driver to ignore the failure of IO > allocation. > If IO requirement of certain PCI(E) devices can be ignored, can you change > the IncompatiblePciDevice protocol imple

Re: [edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory

2022-04-26 Thread Ni, Ray
, Jiewen ; Chang, > Abner ; Wang, Jian J > Subject: Re: [edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range > is not mandatory > > Ard, > can you explain more? > > Your code changes the PciHostBridge driver to ignore the failure of IO > allocation. > If I

Re: [edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory

2022-04-26 Thread Ni, Ray
> ; Leif Lindholm ; Justen, > Jordan L ; Yao, > Jiewen ; Chang, Abner ; Wang, Jian > J > Subject: Re: [edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range > is not mandatory > > On Fri, 22 Apr 2022 at 09:37, Gerd Hoffmann wrote: > > > > io ran

回复: [edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory

2022-04-26 Thread gaoliming
wen Yao ; > Abner Chang ; Jian J Wang > 主题: Re: [edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io > range is not mandatory > > On Fri, 22 Apr 2022 at 09:37, Gerd Hoffmann wrote: > > > > io range is not mandatory according to pcie spec, > > so al

Re: [edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory

2022-04-25 Thread Ard Biesheuvel
On Fri, 22 Apr 2022 at 09:37, Gerd Hoffmann wrote: > > io range is not mandatory according to pcie spec, > so allow bridge configurations without io address > space assigned. > > Signed-off-by: Gerd Hoffmann > Reviewed-by: Ard Biesheuvel Could one of the MdeModulePkg maintainers please get this

[edk2-devel] [PATCH v5 1/6] MdeModulePkg/PciHostBridge: io range is not mandatory

2022-04-22 Thread Gerd Hoffmann
io range is not mandatory according to pcie spec, so allow bridge configurations without io address space assigned. Signed-off-by: Gerd Hoffmann Reviewed-by: Ard Biesheuvel --- MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MdeModule