public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Thomas Abraham <thomas.abraham@arm.com>
To: Alexei Fedorov <Alexei.Fedorov@arm.com>
Cc: Thomas Abraham <thomas.abraham@arm.com>,
	 "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	 "leif.lindholm@linaro.org" <leif.lindholm@linaro.org>,
	 "ard.biesheuvel@linaro.org" <ard.biesheuvel@linaro.org>
Subject: Re: [PATCH edk2-platforms v6 5/9] Platform/ARM/Sgi: add the initial set of acpi tables
Date: Thu, 24 May 2018 17:06:14 +0530	[thread overview]
Message-ID: <CAJuA9ah0XXSJBdEn7gSZZ4PsDgKe2kx0p4cpwpapSvH5ziKmHA@mail.gmail.com> (raw)
In-Reply-To: <VI1PR0801MB1773189FA5B9322ABEE28EC49A6B0@VI1PR0801MB1773.eurprd08.prod.outlook.com>

Hi Alexei,

On Wed, May 23, 2018 at 4:20 PM, Alexei Fedorov <Alexei.Fedorov@arm.com> wrote:
> Please see my comment in-lined.
>
>> -----Original Message-----
>> From: edk2-devel <edk2-devel-bounces@lists.01.org> On Behalf Of Thomas
>> Abraham
>> Sent: 23 May 2018 06:46
>> To: edk2-devel@lists.01.org
>> Cc: leif.lindholm@linaro.org; ard.biesheuvel@linaro.org
>> Subject: [edk2] [PATCH edk2-platforms v6 5/9] Platform/ARM/Sgi: add the initial
>> set of acpi tables
>>
>> From: Daniil Egranov <daniil.egranov@arm.com>
>>
>> Add the initial set of Acpi tables for the SGI-575 platform. These tables conform
>> to the ACPI specification version 6.1. Some of the mandatory tables required for
>> SBBR v1.0 compilance are not included in this initial set of Acpi tables.
>>
>> Contributed-under: TianoCore Contribution Agreement 1.1
>> Signed-off-by: Daniil Egranov <daniil.egranov@arm.com>
>> Signed-off-by: Thomas Abraham <thomas.abraham@arm.com>
>> ---
>>  .../ARM/SgiPkg/AcpiTables/Sgi575/AcpiTables.inf    |  51 ++++++
>>  Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dbg2.aslc    |  90 +++++++++++
>>  Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dsdt.asl     |  99 ++++++++++++
>>  Platform/ARM/SgiPkg/AcpiTables/Sgi575/Fadt.aslc    |  87 +++++++++++
>>  Platform/ARM/SgiPkg/AcpiTables/Sgi575/Gtdt.aslc    | 151
>> ++++++++++++++++++
>>  Platform/ARM/SgiPkg/AcpiTables/Sgi575/Madt.aslc    | 173
>> +++++++++++++++++++++
>>  Platform/ARM/SgiPkg/AcpiTables/Sgi575/Spcr.aslc    |  77 +++++++++
>>  .../ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.c   |   7 +
>>  .../ARM/SgiPkg/Drivers/PlatformDxe/PlatformDxe.inf |   6 +
>>  Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h        |  41 +++++
>>  .../ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf |   4 +
>>  11 files changed, 786 insertions(+)
>>  create mode 100644 Platform/ARM/SgiPkg/AcpiTables/Sgi575/AcpiTables.inf
>>  create mode 100644 Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dbg2.aslc
>>  create mode 100644 Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dsdt.asl
>>  create mode 100644 Platform/ARM/SgiPkg/AcpiTables/Sgi575/Fadt.aslc
>>  create mode 100644 Platform/ARM/SgiPkg/AcpiTables/Sgi575/Gtdt.aslc
>>  create mode 100644 Platform/ARM/SgiPkg/AcpiTables/Sgi575/Madt.aslc
>>  create mode 100644 Platform/ARM/SgiPkg/AcpiTables/Sgi575/Spcr.aslc
>>  create mode 100644 Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h
>>

<snip>

>> diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Gtdt.aslc
>> b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Gtdt.aslc
>> new file mode 100644
>> index 0000000..40657c9
>> --- /dev/null
>> +++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Gtdt.aslc
>> @@ -0,0 +1,151 @@
>> +/** @file
>> +*  Generic Timer Description Table (GTDT)
>> +*
>> +*  Copyright (c) 2018, ARM Limited. All rights reserved.
>> +*
>> +*  This program and the accompanying materials are licensed and made
>> +available
>> +*  under the terms and conditions of the BSD License which accompanies
>> +this
>> +*  distribution.  The full text of the license may be found at
>> +*  http://opensource.org/licenses/bsd-license.php
>> +*
>> +*  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS"
>> +BASIS,
>> +*  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER
>> EXPRESS OR IMPLIED.
>> +*
>> +**/
>> +
>> +#include "SgiAcpiHeader.h"
>> +#include <Library/AcpiLib.h>
>> +#include <Library/PcdLib.h>
>> +#include <IndustryStandard/Acpi61.h>
>> +
>> +#define SGI_PLATFORM_WATCHDOG_COUNT       2
>> +#define SGI_TIMER_FRAMES_COUNT            2
>> +
>> +#define SYSTEM_TIMER_BASE_ADDRESS         0xFFFFFFFFFFFFFFFF
>> +#define GTDT_GLOBAL_FLAGS                 0
>> +#define GTDT_GTIMER_FLAGS
>> EFI_ACPI_6_1_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY
>> +
>> +#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_FRAME0_CTL_BASE      0x2A830000
>> +#define SGI_GT_BLOCK_FRAME0_CTL_EL0_BASE  0xFFFFFFFFFFFFFFFF
>> +#define SGI_GT_BLOCK_FRAME0_GSIV          0x5C
>> +
>> +#define SGI_GTX_TIMER_FLAGS               0
>> +#define GTX_TIMER_SECURE
>> EFI_ACPI_6_1_GTDT_GT_BLOCK_COMMON_FLAG_SECURE_TIMER
>> +#define GTX_TIMER_NON_SECURE              0
>> +#define GTX_TIMER_SAVE_CONTEXT
>> EFI_ACPI_6_1_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY
>> +#define SGI_GTX_COMMON_FLAGS_S            (GTX_TIMER_SAVE_CONTEXT |
>> GTX_TIMER_SECURE)
>> +#define SGI_GTX_COMMON_FLAGS_NS           (GTX_TIMER_SAVE_CONTEXT |
>> GTX_TIMER_NON_SECURE)
>> +
>> +#define EFI_ACPI_6_1_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT(        \
>> +  RefreshFramePhysicalAddress, ControlFramePhysicalAddress,       \
>> +  WatchdogTimerGSIV, WatchdogTimerFlags)                          \
>> +  {                                                               \
>> +    EFI_ACPI_6_1_GTDT_SBSA_GENERIC_WATCHDOG,                      \
>> +    sizeof (EFI_ACPI_6_1_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE),   \
>> +    EFI_ACPI_RESERVED_WORD,                                       \
>> +    RefreshFramePhysicalAddress,                                  \
>> +    ControlFramePhysicalAddress,                                  \
>> +    WatchdogTimerGSIV,                                            \
>> +    WatchdogTimerFlags                                            \
>> +  }
>> +
>> +#pragma pack (1)
>> +
>> +typedef struct {
>> +  EFI_ACPI_6_1_GENERIC_TIMER_DESCRIPTION_TABLE       Gtdt;
>> +  EFI_ACPI_6_1_GTDT_GT_BLOCK_STRUCTURE               GtBlock;
>> +  EFI_ACPI_6_1_GTDT_GT_BLOCK_TIMER_STRUCTURE
>> Frames[SGI_TIMER_FRAMES_COUNT];
>> +  EFI_ACPI_6_1_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE
>> +Watchdogs[SGI_PLATFORM_WATCHDOG_COUNT];
>> +} EFI_ACPI_6_1_GENERIC_TIMER_DESCRIPTION_TABLES;
>> +
>> +#pragma pack ()
>> +
>> +STATIC EFI_ACPI_6_1_GENERIC_TIMER_DESCRIPTION_TABLES Gtdt = {
>> +  {
>> +    ARM_ACPI_HEADER (
>> +      EFI_ACPI_6_1_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE,
>> +      EFI_ACPI_6_1_GENERIC_TIMER_DESCRIPTION_TABLES,
>> +      EFI_ACPI_6_1_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION
>> +    ),
>> +    SYSTEM_TIMER_BASE_ADDRESS,                    // UINT64  PhysicalAddress
>> +    0,                                            // UINT32  Reserved
>> +    FixedPcdGet32 (PcdArmArchTimerSecIntrNum),    // UINT32
>> SecurePL1TimerGSIV
>> +    GTDT_GTIMER_FLAGS,                            // UINT32  SecurePL1TimerFlags
>> +    FixedPcdGet32 (PcdArmArchTimerIntrNum),       // UINT32
>> NonSecurePL1TimerGSIV
>> +    GTDT_GTIMER_FLAGS,                            // UINT32  NonSecurePL1TimerFlags
>> +    FixedPcdGet32 (PcdArmArchTimerVirtIntrNum),   // UINT32  VirtualTimerGSIV
>> +    GTDT_GTIMER_FLAGS,                            // UINT32  VirtualTimerFlags
>> +    FixedPcdGet32 (PcdArmArchTimerHypIntrNum),    // UINT32
>> NonSecurePL2TimerGSIV
>> +    GTDT_GTIMER_FLAGS,                            // UINT32  NonSecurePL2TimerFlags
>> +    0xFFFFFFFFFFFFFFFF,                           // UINT64  CntReadBasePhysicalAddress
>> +    SGI_PLATFORM_WATCHDOG_COUNT,                  // UINT32
>> PlatformTimerCount
>
> This is incorrect, because doesn't take in account GT block.

Thanks for your review. This has been fixed now. Can you please have a
look at the updated patch.

Thanks,
Thomas.

<snip>


  reply	other threads:[~2018-05-24 11:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-23  5:45 [PATCH edk2-platforms v6 0/9] Platform/ARM/Sgi: Add Arm's SGI platform support Thomas Abraham
2018-05-23  5:45 ` [PATCH edk2-platforms v6 1/9] Platform/ARM/Sgi: Add Platform library implementation Thomas Abraham
2018-05-23  5:45 ` [PATCH edk2-platforms v6 2/9] Platform/ARM/Sgi: add NOR flash platform " Thomas Abraham
2018-05-23  5:45 ` [PATCH edk2-platforms v6 3/9] Platform/ARM/Sgi: add initial platform dxe driver implementation Thomas Abraham
2018-05-23  5:45 ` [PATCH edk2-platforms v6 4/9] Platform/ARM/Sgi: add support for virtio block device Thomas Abraham
2018-05-23  5:45 ` [PATCH edk2-platforms v6 5/9] Platform/ARM/Sgi: add the initial set of acpi tables Thomas Abraham
2018-05-23 10:50   ` Alexei Fedorov
2018-05-24 11:36     ` Thomas Abraham [this message]
2018-05-24 11:52       ` Alexei Fedorov
2018-05-23 12:19   ` Alexei Fedorov
2018-05-24 11:31     ` Thomas Abraham
2018-05-24 11:33       ` Thomas Abraham
2018-05-24 12:11         ` Ard Biesheuvel
2018-05-23  5:45 ` [PATCH edk2-platforms v6 6/9] Platform/ARM/Sgi: add initial support for ARM SGI platform Thomas Abraham
2018-05-23  5:45 ` [PATCH edk2-platforms v6 7/9] Platform/ARM/Sgi: add support for smsc91x ethernet controller Thomas Abraham
2018-05-23  5:45 ` [PATCH edk2-platforms v6 8/9] Platform/ARM/Sgi: implement PciHostBridgeLib support Thomas Abraham
2018-05-23  5:45 ` [PATCH edk2-platforms v6 9/9] Platform/ARM/Sgi: Add Ssdt, Iort and Mcfg tables Thomas Abraham
2018-05-24 12:27 ` [PATCH edk2-platforms v6 0/9] Platform/ARM/Sgi: Add Arm's SGI platform support Ard Biesheuvel
2018-05-24 12:33   ` Thomas Abraham

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=CAJuA9ah0XXSJBdEn7gSZZ4PsDgKe2kx0p4cpwpapSvH5ziKmHA@mail.gmail.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