[edk2-devel][PATCH] ArmPkg/ArmPciCpuIo2Dxe: Correct pci io memmap address

Yu Liu posted 1 patch 4 days ago
Failed in applying to current master (apply log)
ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.c | 2 --
1 file changed, 2 deletions(-)

[edk2-devel][PATCH] ArmPkg/ArmPciCpuIo2Dxe: Correct pci io memmap address

Posted by Yu Liu 4 days ago
Since the device addresss has been translated in PciRootBridgeIo.c
so shuldn't translate it twice in ArmPciCpuIo2Dxe.c

Signed-off-by: LiuYu <liuyu@greatwall.com.cn>
---
 ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.c b/ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.c
index d8625e1593..8c46a2778b 100644
--- a/ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.c
+++ b/ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.c
@@ -399,7 +399,6 @@ CpuIoServiceRead (
     return Status;
   }
 
-  Address += PcdGet64 (PcdPciIoTranslation);
 
   //
   // Select loop based on the width of the transfer
@@ -485,7 +484,6 @@ CpuIoServiceWrite (
     return Status;
   }
 
-  Address += PcdGet64 (PcdPciIoTranslation);
 
   //
   // Select loop based on the width of the transfer
-- 
2.20.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#65263): https://edk2.groups.io/g/devel/message/65263
Mute This Topic: https://groups.io/mt/76861324/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel][PATCH] ArmPkg/ArmPciCpuIo2Dxe: Correct pci io memmap address

Posted by Ard Biesheuvel 4 days ago
On 9/15/20 11:35 AM, LiuYu wrote:
> Since the device addresss has been translated in PciRootBridgeIo.c
> so shuldn't translate it twice in ArmPciCpuIo2Dxe.c
> 
> Signed-off-by: LiuYu <liuyu@greatwall.com.cn>

Nack. The I/O translation in the I/O domain and the mapping of the I/O 
window in the physical memory space are two different translations, and 
they both need to be applied.

PciRootBridgeIo.c deals with the former, whereas this driver deals with 
the latter.


> ---
>   ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.c b/ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.c
> index d8625e1593..8c46a2778b 100644
> --- a/ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.c
> +++ b/ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.c
> @@ -399,7 +399,6 @@ CpuIoServiceRead (
>       return Status;
>     }
>   
> -  Address += PcdGet64 (PcdPciIoTranslation);
>   
>     //
>     // Select loop based on the width of the transfer
> @@ -485,7 +484,6 @@ CpuIoServiceWrite (
>       return Status;
>     }
>   
> -  Address += PcdGet64 (PcdPciIoTranslation);
>   
>     //
>     // Select loop based on the width of the transfer
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#65264): https://edk2.groups.io/g/devel/message/65264
Mute This Topic: https://groups.io/mt/76861324/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-