Date
1 - 6 of 6
'PciIO->Map' is returning "EFI_OUT_OF_RESOURCES" on Intel CRB device
UdayS
Hello Experts,
Need your help to understand why is PciIO->Map is returning "EFI_OUT_OF_RESOURCES" in my Intel CRB DQ57TM (v2.31) but same driver works in other SuperMicro system ( v2.31 and v2.4).
I understand it is specific to the IO mem allocated to the device, but I don't know how to find the memory map of the system and find the difference and the root cause of it.
Below is the code where I get error:
Status = PciIo->Map ( PciIo, // This
EfiPciIoOperationBusMasterRead, // Operation
(VOID *)RxBuffer, // HostAddress
(UINTN *)&RxSize, // NumberOfBytes
&DeviceAddress, // DeviceAddress
&RxBufferDMAMapping // Mapping
);
if (EFI_ERROR (Status)) {
AsciiPrint("\n PciIO->Map (RxBuffer[%d]): Status[%d]", RxSize, Status);
return CSIO_NOMEM;
}
And "RxBuffer", I have allocated using AllocateBuffer.
Regards,
US
Need your help to understand why is PciIO->Map is returning "EFI_OUT_OF_RESOURCES" in my Intel CRB DQ57TM (v2.31) but same driver works in other SuperMicro system ( v2.31 and v2.4).
I understand it is specific to the IO mem allocated to the device, but I don't know how to find the memory map of the system and find the difference and the root cause of it.
Below is the code where I get error:
Status = PciIo->Map ( PciIo, // This
EfiPciIoOperationBusMasterRead, // Operation
(VOID *)RxBuffer, // HostAddress
(UINTN *)&RxSize, // NumberOfBytes
&DeviceAddress, // DeviceAddress
&RxBufferDMAMapping // Mapping
);
if (EFI_ERROR (Status)) {
AsciiPrint("\n PciIO->Map (RxBuffer[%d]): Status[%d]", RxSize, Status);
return CSIO_NOMEM;
}
And "RxBuffer", I have allocated using AllocateBuffer.
Regards,
US
Laszlo Ersek
On 01/14/21 16:45, UdayS via groups.io wrote:
is only needed for CommonBuffer operations. For BusMasterRead and
BusMasterWrite, Map will handle bounce buffers internally.
(2) PciIo->Map can run out of resources dependent on the IOMMU I guess,
as one reason. It can also run out of resources if you leak mappings
somewhere. All systems need not react to such issues the same way.
Laszlo
Hello Experts,(1) For BusMasterRead, you should not use AllocateBuffer. AllocateBuffer
Need your help to understand why is PciIO->Map is returning "EFI_OUT_OF_RESOURCES" in my Intel CRB DQ57TM (v2.31) but same driver works in other SuperMicro system ( v2.31 and v2.4).
I understand it is specific to the IO mem allocated to the device, but I don't know how to find the memory map of the system and find the difference and the root cause of it.
Below is the code where I get error:
Status = PciIo->Map ( PciIo, // This
EfiPciIoOperationBusMasterRead, // Operation
(VOID *)RxBuffer, // HostAddress
(UINTN *)&RxSize, // NumberOfBytes
&DeviceAddress, // DeviceAddress
&RxBufferDMAMapping // Mapping
);
if (EFI_ERROR (Status)) {
AsciiPrint("\n PciIO->Map (RxBuffer[%d]): Status[%d]", RxSize, Status);
return CSIO_NOMEM;
}
And "RxBuffer", I have allocated using AllocateBuffer.
is only needed for CommonBuffer operations. For BusMasterRead and
BusMasterWrite, Map will handle bounce buffers internally.
(2) PciIo->Map can run out of resources dependent on the IOMMU I guess,
as one reason. It can also run out of resources if you leak mappings
somewhere. All systems need not react to such issues the same way.
Laszlo
UdayS
Hi Laszlo,
Thanks for replying.
-US
Thanks for replying.
(1) For BusMasterRead, you should not use AllocateBuffer. AllocateBufferRight. I have updated it now.
is only needed for CommonBuffer operations.
(2) PciIo->Map can run out of resources dependent on the IOMMU I guess,Prior to calling to above mentioned call, I do map two 16 bytes chunks for reading and current chunk where I get error is 128bytes long.
as one reason. It can also run out of resources if you leak mappings
somewhere.
All systems need not react to such issues the same way.What do you recommend how do I approach to this issue.
-US
Laszlo Ersek
On 01/15/21 06:33, udai16787 via [] wrote:
that you can analyze yourself.
Thanks
Laszlo
Hi Laszlo,Ask your firmware vendor, or build your stuff upon open source software
Thanks for replying.(1) For BusMasterRead, you should not use AllocateBuffer. AllocateBufferRight. I have updated it now.
is only needed for CommonBuffer operations.(2) PciIo->Map can run out of resources dependent on the IOMMU I guess,Prior to calling to above mentioned call, I do map two 16 bytes chunks for reading and current chunk where I get error is 128bytes long.
as one reason. It can also run out of resources if you leak mappings
somewhere.
All systems need not react to such issues the same way.What do you recommend how do I approach to this issue.
that you can analyze yourself.
Thanks
Laszlo
Laszlo Ersek
On 02/01/21 11:14, udai16787 via [] wrote:
deal with gets fragmented in the part of code that you have now
eliminated, by moving the call earlier.
Laszlo
Small Update:Could be that the portion of the address space that PciIo->Map() can
I could fix the issue by moving the PCI->Map little early in the initialization but couldn't root cause it yet.
deal with gets fragmented in the part of code that you have now
eliminated, by moving the call earlier.
Laszlo