From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.9812.1600162718378437479 for ; Tue, 15 Sep 2020 02:38:38 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ard.biesheuvel@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1021212FC; Tue, 15 Sep 2020 02:38:37 -0700 (PDT) Received: from [192.168.1.205] (unknown [10.37.8.121]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CC5413F68F; Tue, 15 Sep 2020 02:38:35 -0700 (PDT) Subject: Re: [edk2-devel][PATCH] ArmPkg/ArmPciCpuIo2Dxe: Correct pci io memmap address To: LiuYu , leif@nuviainc.com Cc: devel@edk2.groups.io References: From: "Ard Biesheuvel" Message-ID: Date: Tue, 15 Sep 2020 12:38:32 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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 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 >