public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Jeff Brasen" <jbrasen@nvidia.com>
To: Pierre Gondois <pierre.gondois@arm.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Sami.Mujawar@arm.com" <Sami.Mujawar@arm.com>,
	"Alexei.Fedorov@arm.com" <Alexei.Fedorov@arm.com>
Subject: Re: [PATCH 1/4] DynamicTablesPkg: AcpiSsdtPcieLibArm: Correct translation value
Date: Fri, 1 Jul 2022 15:48:40 +0000	[thread overview]
Message-ID: <DS7PR12MB5789ACD040FD717E811E6577CBBD9@DS7PR12MB5789.namprd12.prod.outlook.com> (raw)
In-Reply-To: <77d31b75-4288-e397-7b9b-3e18667e62ee@arm.com>

Yes, I'll try to add a v2 patch for this shortly.

Thanks,
Jeff

> -----Original Message-----
> From: Pierre Gondois <pierre.gondois@arm.com>
> Sent: Friday, July 1, 2022 6:40 AM
> To: Jeff Brasen <jbrasen@nvidia.com>; devel@edk2.groups.io
> Cc: Sami.Mujawar@arm.com; Alexei.Fedorov@arm.com
> Subject: Re: [PATCH 1/4] DynamicTablesPkg: AcpiSsdtPcieLibArm: Correct
> translation value
> 
> External email: Use caution opening links or attachments
> 
> 
> 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 <jbrasen@nvidia.com>
> > ---
> >   .../Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenerator.c | 6 +++---
> >   1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git
> >
> a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenera
> t
> > or.c
> >
> b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenera
> t
> > or.c
> > index a34018151f..f0d15f69a4 100644
> > ---
> >
> a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGenera
> t
> > or.c
> > +++
> b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtPcieLibArm/SsdtPcieGen
> > +++ erator.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,

  reply	other threads:[~2022-07-01 15:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30 15:48 [PATCH 0/4] DynamicTablesPkg: Pcie generation updates Jeff Brasen
2022-06-30 15:48 ` [PATCH 1/4] DynamicTablesPkg: AcpiSsdtPcieLibArm: Correct translation value Jeff Brasen
2022-07-01 12:40   ` PierreGondois
2022-07-01 15:48     ` Jeff Brasen [this message]
2022-06-30 15:48 ` [PATCH 2/4] DynamicTablesPkg: AcpiSsdtPcieLibArm: Allow use of segment number as UID Jeff Brasen
2022-07-01 12:42   ` PierreGondois
2022-07-01 15:54     ` Jeff Brasen
2022-07-04  8:37       ` PierreGondois
2022-07-08 15:24         ` Jeff Brasen
2022-06-30 15:48 ` [PATCH 3/4] DynamicTablesPkg: AcpiSsdtPcieLibArm: Support UID > 0xF Jeff Brasen
2022-06-30 15:48 ` [PATCH 4/4] DynamicTablesPkg: AcpiSsdtPcieLibArm: Add support for override protocol Jeff Brasen
2022-07-01 12:39   ` PierreGondois
2022-07-01 15:52     ` Jeff Brasen
2022-07-04  8:47       ` PierreGondois
2022-07-08 15:36         ` Jeff Brasen
2022-07-11 15:01           ` PierreGondois
2022-07-11 15:32             ` Jeff Brasen
2022-07-11 17:14               ` PierreGondois
2022-07-11 17:56                 ` Jeff Brasen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DS7PR12MB5789ACD040FD717E811E6577CBBD9@DS7PR12MB5789.namprd12.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox