public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* UefiPayloadPkg: Slimboot assign PCIe resource above 4GB. but not supported in UEFIPayload
@ 2020-08-12 14:22 Andrey V
  2020-08-12 17:48 ` [edk2-devel] " Laszlo Ersek
  0 siblings, 1 reply; 4+ messages in thread
From: Andrey V @ 2020-08-12 14:22 UTC (permalink / raw)
  To: devel

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

Hi

I've encountered a problem after using the patch from SBL (slimboot) https://github.com/slimbootloader/slimbootloader/pull/809
The SBL supports resource allocation above the 4GB, but it fails on ASSERT [PciHostBridgeDxe] /home/andreyv/edk2/edk2/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c(120): Bridge->Mem.Limit < 0x0000000100000000ULL

The proposed workaround for this is something like in function AdjustRootBridgeResource() of  UefiPayloadPkg\Library\PciHostBridgeLib\PciHostBridgeSupport.c :

VOID

AdjustRootBridgeResource (

IN  PCI_ROOT_BRIDGE_APERTURE *Io,

IN  PCI_ROOT_BRIDGE_APERTURE *Mem,

IN  PCI_ROOT_BRIDGE_APERTURE *MemAbove4G,

IN  PCI_ROOT_BRIDGE_APERTURE *PMem,

IN  PCI_ROOT_BRIDGE_APERTURE *PMemAbove4G

)

{

Io->Base = 0x1000;

Io->Limit = 0xEFFF;

Mem ->Base = 0x80000000;

Mem ->Limit = 0xCFFFFFFF;

PMem ->Base = MAX_UINT64;

PMem ->Limit = 0;

MemAbove4G->Base = MAX_UINT64;

MemAbove4G->Limit = 0;

PMemAbove4G->Base = 0x400000000ULL;

PMemAbove4G->Limit = 0x7FFFFFFFFULL;

}

It is working in my board using SBL, but still with a following error

PciHostBridge driver failed to set EFI_MEMORY_UC to MMIO aperture - Out of Resources.

Can someone help to resolve this issue ?

Andrey

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] UefiPayloadPkg: Slimboot assign PCIe resource above 4GB. but not supported in UEFIPayload
  2020-08-12 14:22 UefiPayloadPkg: Slimboot assign PCIe resource above 4GB. but not supported in UEFIPayload Andrey V
@ 2020-08-12 17:48 ` Laszlo Ersek
  2020-08-17 22:43   ` Guo Dong
  0 siblings, 1 reply; 4+ messages in thread
From: Laszlo Ersek @ 2020-08-12 17:48 UTC (permalink / raw)
  To: devel, avinok; +Cc: Maurice Ma, Guo Dong, Benjamin You

CC'ing Maurice, Guo, Benjamin

Thanks
Laszlo

On 08/12/20 16:22, Andrey V wrote:
> Hi
> 
> I've encountered a problem after using the patch from SBL (slimboot) https://github.com/slimbootloader/slimbootloader/pull/809
> The SBL supports resource allocation above the 4GB, but it fails on ASSERT [PciHostBridgeDxe] /home/andreyv/edk2/edk2/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c(120): Bridge->Mem.Limit < 0x0000000100000000ULL
> 
> The proposed workaround for this is something like in function AdjustRootBridgeResource() of  UefiPayloadPkg\Library\PciHostBridgeLib\PciHostBridgeSupport.c :
> 
> VOID
> 
> AdjustRootBridgeResource (
> 
> IN  PCI_ROOT_BRIDGE_APERTURE *Io,
> 
> IN  PCI_ROOT_BRIDGE_APERTURE *Mem,
> 
> IN  PCI_ROOT_BRIDGE_APERTURE *MemAbove4G,
> 
> IN  PCI_ROOT_BRIDGE_APERTURE *PMem,
> 
> IN  PCI_ROOT_BRIDGE_APERTURE *PMemAbove4G
> 
> )
> 
> {
> 
> Io->Base = 0x1000;
> 
> Io->Limit = 0xEFFF;
> 
> Mem ->Base = 0x80000000;
> 
> Mem ->Limit = 0xCFFFFFFF;
> 
> PMem ->Base = MAX_UINT64;
> 
> PMem ->Limit = 0;
> 
> MemAbove4G->Base = MAX_UINT64;
> 
> MemAbove4G->Limit = 0;
> 
> PMemAbove4G->Base = 0x400000000ULL;
> 
> PMemAbove4G->Limit = 0x7FFFFFFFFULL;
> 
> }
> 
> It is working in my board using SBL, but still with a following error
> 
> PciHostBridge driver failed to set EFI_MEMORY_UC to MMIO aperture - Out of Resources.
> 
> Can someone help to resolve this issue ?
> 
> Andrey
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] UefiPayloadPkg: Slimboot assign PCIe resource above 4GB. but not supported in UEFIPayload
  2020-08-12 17:48 ` [edk2-devel] " Laszlo Ersek
@ 2020-08-17 22:43   ` Guo Dong
  2020-08-20  9:47     ` Andrey V
  0 siblings, 1 reply; 4+ messages in thread
From: Guo Dong @ 2020-08-17 22:43 UTC (permalink / raw)
  To: Laszlo Ersek, devel@edk2.groups.io, avinok@gmail.com
  Cc: Ma, Maurice, You, Benjamin


Thanks for reporting this issue in UEFI payload.
We would enhance the UEFI payload to support the PCI resource to be allocated below 4GB and above 4GB at same time.

Thanks,
Guo

> -----Original Message-----
> From: Laszlo Ersek <lersek@redhat.com>
> Sent: Wednesday, August 12, 2020 10:49 AM
> To: devel@edk2.groups.io; avinok@gmail.com
> Cc: Ma, Maurice <maurice.ma@intel.com>; Dong, Guo <guo.dong@intel.com>;
> You, Benjamin <benjamin.you@intel.com>
> Subject: Re: [edk2-devel] UefiPayloadPkg: Slimboot assign PCIe resource above
> 4GB. but not supported in UEFIPayload
> 
> CC'ing Maurice, Guo, Benjamin
> 
> Thanks
> Laszlo
> 
> On 08/12/20 16:22, Andrey V wrote:
> > Hi
> >
> > I've encountered a problem after using the patch from SBL (slimboot)
> https://github.com/slimbootloader/slimbootloader/pull/809
> > The SBL supports resource allocation above the 4GB, but it fails on ASSERT
> [PciHostBridgeDxe]
> /home/andreyv/edk2/edk2/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRoot
> BridgeIo.c(120): Bridge->Mem.Limit < 0x0000000100000000ULL
> >
> > The proposed workaround for this is something like in function
> AdjustRootBridgeResource()
> of  UefiPayloadPkg\Library\PciHostBridgeLib\PciHostBridgeSupport.c :
> >
> > VOID
> >
> > AdjustRootBridgeResource (
> >
> > IN  PCI_ROOT_BRIDGE_APERTURE *Io,
> >
> > IN  PCI_ROOT_BRIDGE_APERTURE *Mem,
> >
> > IN  PCI_ROOT_BRIDGE_APERTURE *MemAbove4G,
> >
> > IN  PCI_ROOT_BRIDGE_APERTURE *PMem,
> >
> > IN  PCI_ROOT_BRIDGE_APERTURE *PMemAbove4G
> >
> > )
> >
> > {
> >
> > Io->Base = 0x1000;
> >
> > Io->Limit = 0xEFFF;
> >
> > Mem ->Base = 0x80000000;
> >
> > Mem ->Limit = 0xCFFFFFFF;
> >
> > PMem ->Base = MAX_UINT64;
> >
> > PMem ->Limit = 0;
> >
> > MemAbove4G->Base = MAX_UINT64;
> >
> > MemAbove4G->Limit = 0;
> >
> > PMemAbove4G->Base = 0x400000000ULL;
> >
> > PMemAbove4G->Limit = 0x7FFFFFFFFULL;
> >
> > }
> >
> > It is working in my board using SBL, but still with a following error
> >
> > PciHostBridge driver failed to set EFI_MEMORY_UC to MMIO aperture - Out
> of Resources.
> >
> > Can someone help to resolve this issue ?
> >
> > Andrey
> >
> > 
> >
> >


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] UefiPayloadPkg: Slimboot assign PCIe resource above 4GB. but not supported in UEFIPayload
  2020-08-17 22:43   ` Guo Dong
@ 2020-08-20  9:47     ` Andrey V
  0 siblings, 0 replies; 4+ messages in thread
From: Andrey V @ 2020-08-20  9:47 UTC (permalink / raw)
  To: Guo Dong, devel

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

would you be able to update me when this will be in some sort of state and ready for testing on my side ?

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-08-20  9:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-12 14:22 UefiPayloadPkg: Slimboot assign PCIe resource above 4GB. but not supported in UEFIPayload Andrey V
2020-08-12 17:48 ` [edk2-devel] " Laszlo Ersek
2020-08-17 22:43   ` Guo Dong
2020-08-20  9:47     ` Andrey V

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox