From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: UefiPayloadPkg: Slimboot assign PCIe resource above 4GB. but not supported in UEFIPayload To: devel@edk2.groups.io From: "Andrey V" X-Originating-Location: Ashbourne, England, GB (86.186.252.182) X-Originating-Platform: Windows Chrome 84 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Wed, 12 Aug 2020 07:22:15 -0700 Message-ID: Content-Type: multipart/alternative; boundary="BffzcZQIUtqjSSY3sQMj" --BffzcZQIUtqjSSY3sQMj Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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/PciHostBri= dgeDxe/PciRootBridgeIo.c(120): Bridge->Mem.Limit < 0x0000000100000000ULL The proposed workaround for this is something like in function AdjustRootB= ridgeResource() of=C2=A0 UefiPayloadPkg\Library\PciHostBridgeLib\PciHostBri= dgeSupport.c : VOID AdjustRootBridgeResource ( IN=C2=A0 PCI_ROOT_BRIDGE_APERTURE *Io, IN=C2=A0 PCI_ROOT_BRIDGE_APERTURE *Mem, IN=C2=A0 PCI_ROOT_BRIDGE_APERTURE *MemAbove4G, IN=C2=A0 PCI_ROOT_BRIDGE_APERTURE *PMem, IN=C2=A0 PCI_ROOT_BRIDGE_APERTURE *PMemAbove4G ) { Io->Base =3D 0x1000; Io->Limit =3D 0xEFFF; Mem ->Base =3D 0x80000000; Mem ->Limit =3D 0xCFFFFFFF; PMem ->Base =3D MAX_UINT64; PMem ->Limit =3D 0; MemAbove4G->Base =3D MAX_UINT64; MemAbove4G->Limit =3D 0; PMemAbove4G->Base =3D 0x400000000ULL; PMemAbove4G->Limit =3D 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 --BffzcZQIUtqjSSY3sQMj Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi

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

The proposed workaround for this is something like in=C2=A0function AdjustRootBridgeResource() of=C2=A0 Ue= fiPayloadPkg\Library\PciHostBridgeLib\PciHostBridgeSupport.c=C2=A0:<= br/>

VOID

AdjustRootBridgeResource (

=C2=A0 IN=C2=A0 PCI_ROOT_BRIDGE_APERTURE *Io,

=C2=A0 IN=C2=A0 PCI_ROOT_BRIDGE_APERTURE *Mem,

=C2=A0 IN=C2=A0 PCI_ROOT_BRIDGE_APERTURE *MemAbove4G,

=C2=A0 IN=C2=A0 PCI_ROOT_BRIDGE_APERTURE *PMem,

=C2=A0 IN=C2=A0 PCI_ROOT_BRIDGE_APERTURE *PMemAbove4G

)

{

=C2=A0=C2=A0 Io->Base =3D 0x1000;

=C2=A0=C2=A0 Io->Limit =3D 0xEFFF;

=C2=A0=C2=A0 Mem ->Base =3D 0x80000000;

=C2=A0=C2=A0 Mem ->Limit =3D 0xCFFFFFFF;

=C2=A0=C2=A0 PMem ->Base =3D MAX_UINT64;

=C2=A0=C2=A0 PMem ->Limit =3D 0;

=C2=A0=C2=A0 MemAbove4G->Base =3D MAX_UINT64;

=C2=A0=C2=A0 MemAbove4G->Limit =3D 0;

=C2=A0=C2=A0 PMemAbove4G->Base =3D 0x400000000ULL;

=C2=A0=C2=A0 PMemAbove4G->Limit =3D 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 --BffzcZQIUtqjSSY3sQMj--