Hello Jeff, The patch is correct, but there will be an issue if AddrMapInfo->CpuAddress - AddrMapInfo->PciAddress < 0
AmlCodeGenRdDWordIo() takes an 'IsPosDecode' argment, would it be possible to set IsPosDecode to FALSE in such case ? Regards, Pierre On 6/30/22 17:48, Jeff Brasen wrote:
The translation value in ACPI should be the difference between the CPU and PCIe address. Signed-off-by: Jeff Brasen <jbra...@nvidia.com> --- .../Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c index a34018151f..f0d15f69a4 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c @@ -621,7 +621,7 @@ GeneratePciCrs ( 0, AddrMapInfo->PciAddress, AddrMapInfo->PciAddress + AddrMapInfo->AddressSize - 1, - Translation ? AddrMapInfo->CpuAddress : 0, + Translation ? AddrMapInfo->CpuAddress - AddrMapInfo->PciAddress : 0, AddrMapInfo->AddressSize, 0, NULL, @@ -643,7 +643,7 @@ GeneratePciCrs ( 0, AddrMapInfo->PciAddress, AddrMapInfo->PciAddress + AddrMapInfo->AddressSize - 1, - Translation ? AddrMapInfo->CpuAddress : 0, + Translation ? AddrMapInfo->CpuAddress - AddrMapInfo->PciAddress : 0, AddrMapInfo->AddressSize, 0, NULL, @@ -665,7 +665,7 @@ GeneratePciCrs ( 0, AddrMapInfo->PciAddress, AddrMapInfo->PciAddress + AddrMapInfo->AddressSize - 1, - Translation ? AddrMapInfo->CpuAddress : 0, + Translation ? AddrMapInfo->CpuAddress - AddrMapInfo->PciAddress : 0, AddrMapInfo->AddressSize, 0, NULL,
-=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#90976): https://edk2.groups.io/g/devel/message/90976 Mute This Topic: https://groups.io/mt/92089318/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-