public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Sami Mujawar" <sami.mujawar@arm.com>
To: Pranav Madhu <Pranav.Madhu@arm.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Leif Lindholm <leif@nuviainc.com>, nd <nd@arm.com>
Subject: Re: [edk2-platforms][PATCH V2 5/6] Platform/Sgi: define PCD for timer interrupt numbers
Date: Mon, 12 Apr 2021 11:21:28 +0000	[thread overview]
Message-ID: <AECF86F0-EF89-49D4-B9E5-E77085A85EFF@arm.com> (raw)
In-Reply-To: <20210401053543.17308-6-pranav.madhu@arm.com>

Hi Pranav,

This patch looks good to me.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>

Regards,

Sami Mujawar

On 01/04/2021, 06:36, "Pranav Madhu" <pranav.madhu@arm.com> wrote:

    The generic timer and watchdog timer interrupt numbers on the RD-N2
    platform is different than those on the other platforms supported by
    SgiPkg. So in order to reuse the existing GTDT ACPI table for all the
    supported platforms including RD-N2, introduce and use PCD to provide
    the interrupt numbers for watchdog and generic timers.

    Signed-off-by: Pranav Madhu <pranav.madhu@arm.com>
    ---
     Platform/ARM/SgiPkg/SgiPlatform.dec                     | 6 ++++++
     Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc                | 6 ++++++
     Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc               | 6 ++++++
     Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf   | 4 ++++
     Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf   | 4 ++++
     Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf | 4 ++++
     Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf       | 4 ++++
     Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf       | 4 ++++
     Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf     | 4 ++++
     Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf     | 4 ++++
     Platform/ARM/SgiPkg/AcpiTables/Gtdt.aslc                | 8 ++++----
     11 files changed, 50 insertions(+), 4 deletions(-)

    diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec b/Platform/ARM/SgiPkg/SgiPlatform.dec
    index 3f0d38a013f2..86ead241a67c 100644
    --- a/Platform/ARM/SgiPkg/SgiPlatform.dec
    +++ b/Platform/ARM/SgiPkg/SgiPlatform.dec
    @@ -57,5 +57,11 @@
       gArmSgiTokenSpaceGuid.PcdSysPeriphBase|0x00000000|UINT64|0x0000000E
       gArmSgiTokenSpaceGuid.PcdSysPeriphSysRegBase|0x0|UINT64|0x0000000F

    +  # Timer & Watchdog interrupts
    +  gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv|0|UINT32|0x00000011
    +  gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv|0|UINT32|0x00000012
    +  gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv|0|UINT32|0x00000013
    +  gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv|0|UINT32|0x00000014
    +
     [Ppis]
       gNtFwConfigDtInfoPpiGuid     = { 0x6f606eb3, 0x9123, 0x4e15, { 0xa8, 0x9b, 0x0f, 0xac, 0x66, 0xef, 0xd0, 0x17 } }
    diff --git a/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc b/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc
    index e423a6b50c91..efbb013b0b60 100644
    --- a/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc
    +++ b/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc
    @@ -44,3 +44,9 @@
       gArmTokenSpaceGuid.PcdPciMmio64Base|0x5000000000
       gArmTokenSpaceGuid.PcdPciMmio64Size|0x3000000000
       gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x60000000
    +
    +  # Timer & Watchdog interrupts
    +  gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv|92
    +  gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv|91
    +  gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv|93
    +  gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv|94
    diff --git a/Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc b/Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc
    index 41291eddfe74..1167f1a6ff9d 100644
    --- a/Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc
    +++ b/Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc
    @@ -44,3 +44,9 @@
       gArmTokenSpaceGuid.PcdPciMmio64Base|0x4000000000
       gArmTokenSpaceGuid.PcdPciMmio64Size|0x4000000000
       gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x1010000000
    +
    +  # Timer & Watchdog interrupts
    +  gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv|109
    +  gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv|108
    +  gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv|110
    +  gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv|111
    diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
    index 7ebd70b197a6..2dd2275665a2 100644
    --- a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
    +++ b/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf
    @@ -50,11 +50,15 @@
       gArmTokenSpaceGuid.PcdPciBusMin
       gArmTokenSpaceGuid.PcdPciBusMax

    +  gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv
    +  gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv
       gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
       gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
       gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt
       gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress
       gArmSgiTokenSpaceGuid.PcdVirtioNetSize
       gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt
    +  gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv
    +  gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv

       gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
    diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
    index 2d4354f33018..22e33239070b 100644
    --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
    +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf
    @@ -50,11 +50,15 @@
       gArmTokenSpaceGuid.PcdPciBusMin
       gArmTokenSpaceGuid.PcdPciBusMax

    +  gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv
    +  gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv
       gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
       gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
       gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt
       gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress
       gArmSgiTokenSpaceGuid.PcdVirtioNetSize
       gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt
    +  gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv
    +  gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv

       gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
    diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
    index d44f02ab0c16..ba400de0454b 100644
    --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
    +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf
    @@ -58,11 +58,15 @@
       gArmTokenSpaceGuid.PcdPciBusMin
       gArmTokenSpaceGuid.PcdPciBusMax

    +  gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv
    +  gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv
       gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
       gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
       gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt
       gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress
       gArmSgiTokenSpaceGuid.PcdVirtioNetSize
       gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt
    +  gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv
    +  gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv

       gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
    diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf
    index 63fc249bb77b..2ec3e42473a9 100644
    --- a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf
    +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf
    @@ -50,11 +50,15 @@
       gArmTokenSpaceGuid.PcdPciBusMin
       gArmTokenSpaceGuid.PcdPciBusMax

    +  gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv
    +  gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv
       gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
       gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
       gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt
       gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress
       gArmSgiTokenSpaceGuid.PcdVirtioNetSize
       gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt
    +  gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv
    +  gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv

       gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
    diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf
    index 583ffac70b71..a21dcfafef1a 100644
    --- a/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf
    +++ b/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf
    @@ -50,11 +50,15 @@
       gArmTokenSpaceGuid.PcdPciBusMin
       gArmTokenSpaceGuid.PcdPciBusMax

    +  gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv
    +  gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv
       gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
       gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
       gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt
       gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress
       gArmSgiTokenSpaceGuid.PcdVirtioNetSize
       gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt
    +  gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv
    +  gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv

       gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
    diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf
    index 2d6a65b103b4..08351b1e98e6 100644
    --- a/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf
    +++ b/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf
    @@ -58,11 +58,15 @@
       gArmTokenSpaceGuid.PcdPciBusMin
       gArmTokenSpaceGuid.PcdPciBusMax

    +  gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv
    +  gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv
       gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
       gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
       gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt
       gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress
       gArmSgiTokenSpaceGuid.PcdVirtioNetSize
       gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt
    +  gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv
    +  gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv

       gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
    diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf b/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
    index 466e0fb658eb..2121fd39f2f0 100644
    --- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
    +++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf
    @@ -49,11 +49,15 @@
       gArmTokenSpaceGuid.PcdPciBusMin
       gArmTokenSpaceGuid.PcdPciBusMax

    +  gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv
    +  gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv
       gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress
       gArmSgiTokenSpaceGuid.PcdVirtioBlkSize
       gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt
       gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress
       gArmSgiTokenSpaceGuid.PcdVirtioNetSize
       gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt
    +  gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv
    +  gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv

       gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress
    diff --git a/Platform/ARM/SgiPkg/AcpiTables/Gtdt.aslc b/Platform/ARM/SgiPkg/AcpiTables/Gtdt.aslc
    index a8b587ba881d..b53cbb228f92 100644
    --- a/Platform/ARM/SgiPkg/AcpiTables/Gtdt.aslc
    +++ b/Platform/ARM/SgiPkg/AcpiTables/Gtdt.aslc
    @@ -23,11 +23,11 @@
     #define SGI_GT_BLOCK_CTL_BASE             0x2A810000
     #define SGI_GT_BLOCK_FRAME1_CTL_BASE      0x2A820000
     #define SGI_GT_BLOCK_FRAME1_CTL_EL0_BASE  0xFFFFFFFFFFFFFFFF
    -#define SGI_GT_BLOCK_FRAME1_GSIV          0x5B
    +#define SGI_GT_BLOCK_FRAME1_GSIV          FixedPcdGet32 (PcdGtFrame1Gsiv)

     #define SGI_GT_BLOCK_FRAME0_CTL_BASE      0x2A830000
     #define SGI_GT_BLOCK_FRAME0_CTL_EL0_BASE  0xFFFFFFFFFFFFFFFF
    -#define SGI_GT_BLOCK_FRAME0_GSIV          0x5C
    +#define SGI_GT_BLOCK_FRAME0_GSIV          FixedPcdGet32 (PcdGtFrame0Gsiv)

     #define SGI_GTX_TIMER_FLAGS               0
     #define GTX_TIMER_SECURE                  EFI_ACPI_6_2_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER
    @@ -127,13 +127,13 @@ STATIC EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLES Gtdt = {
         EFI_ACPI_6_2_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT (
           FixedPcdGet32 (PcdGenericWatchdogRefreshBase),
           FixedPcdGet32 (PcdGenericWatchdogControlBase),
    -      93,
    +      FixedPcdGet32 (PcdWdogWS0Gsiv),
           0
         ),
         EFI_ACPI_6_2_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT (
           FixedPcdGet32 (PcdGenericWatchdogRefreshBase),
           FixedPcdGet32 (PcdGenericWatchdogControlBase),
    -      94,
    +      FixedPcdGet32 (PcdWdogWS1Gsiv),
           EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER
         )
       }
    -- 
    2.17.1



  reply	other threads:[~2021-04-12 11:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01  5:35 [edk2-platforms][PATCH V2 0/6] Platform/Sgi: improvements in RD platform support Pranav Madhu
2021-04-01  5:35 ` [edk2-platforms][PATCH V2 1/6] Platform/Sgi: include SSDT table for RD-V1 platform Pranav Madhu
2021-04-01  5:35 ` [edk2-platforms][PATCH V2 2/6] Platform/Sgi: fix the list of CPU devices on RD-V1-MC platform Pranav Madhu
2021-04-12 11:21   ` Sami Mujawar
2021-04-01  5:35 ` [edk2-platforms][PATCH V2 3/6] Platform/Sgi: fix CPU acpi-id for " Pranav Madhu
2021-04-12 11:21   ` Sami Mujawar
2021-04-01  5:35 ` [edk2-platforms][PATCH V2 4/6] Platform/Sgi: update ACPI table revision Pranav Madhu
2021-04-01  5:35 ` [edk2-platforms][PATCH V2 5/6] Platform/Sgi: define PCD for timer interrupt numbers Pranav Madhu
2021-04-12 11:21   ` Sami Mujawar [this message]
2021-04-01  5:35 ` [edk2-platforms][PATCH V2 6/6] Platform/Sgi: add SMMU and timer entries to memory description table Pranav Madhu
2021-04-12 11:21   ` Sami Mujawar

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=AECF86F0-EF89-49D4-B9E5-E77085A85EFF@arm.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