Closed gowthamsiddarthd closed 1 year ago
@gowthamsiddarthd, Sorry that this comment is late. I just got a chance to review this change. The change works, but I think that there is a memory leak. The handle buffer is never freed. Each HandleBuffer needs a FreePool (HandleBuffer); See: https://github.com/tianocore-docs/edk2-UefiDriverWritersGuide/blob/master/5_uefi_services/51_services_that_uefi_drivers_commonly_use/513_handle_database_and_protocol_services.md#5132-locatehandlebuffer
It looks like this might be an issue in some other functions that use HandleBuffer in the codebase.
Hi @marcjones-ampere,
We have handled the memory leak issue. Kindly review the code: https://github.com/ARM-software/bsa-acs/pull/163
Thanks, ACS team
A fixed offset translation scheme is implemented to establish a connection between the physical address space of the PE and the PCI memory. This scheme enables the mirroring of a PE physical address space window above 4GB into the PCI memory space below 4GB. To achieve this, the PHB must support the translation method (_TRA) to convert the address from the PE's perspective, particularly when the MMIO32 BAR exceeds 4GB. In UEFI, the EFI_PCI_IO_PROTOCOL handles this translation, which is utilized by the modified ACS to incorporate the PCIIO protocol and leverage UEFI's offset translation mechanism.
Fixes https://github.com/ARM-software/bsa-acs/issues/26