public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Leif Lindholm <leif.lindholm@linaro.org>
To: Ming Huang <ming.huang@linaro.org>
Cc: linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org,
	graeme.gregory@linaro.org, ard.biesheuvel@linaro.org,
	michael.d.kinney@intel.com, lersek@redhat.com,
	wanghuiqiang@huawei.com, huangming23@huawei.com,
	zhangjinsong2@huawei.com, huangdaode@hisilicon.com,
	john.garry@huawei.com, xinliang.liu@linaro.org,
	zhangfeng56@huawei.com
Subject: Re: [PATCH edk2-platforms v1 01/12] Silicon/Hisilicon/D06: Add watchdog to GTDT
Date: Wed, 14 Nov 2018 00:39:46 +0000	[thread overview]
Message-ID: <20181114003946.b2qc3p6d3of25d57@bivouac.eciton.net> (raw)
In-Reply-To: <20181029033249.45363-2-ming.huang@linaro.org>

On Mon, Oct 29, 2018 at 11:32:38AM +0800, Ming Huang wrote:
> Add watchdog to GTDT for SBSA test 41,42.
> 
> Change-Id: I175ba59f160e4965c26df62e195e423e4e421e8b
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ming Huang <ming.huang@linaro.org>
> ---
>  Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Platform.h |  2 +-
>  Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Gtdt.aslc        | 31 ++++++++++----------
>  2 files changed, 16 insertions(+), 17 deletions(-)
> 
> diff --git a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Platform.h b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Platform.h
> index faaeb83781..eaf3ff10e3 100644
> --- a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Platform.h
> +++ b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Platform.h
> @@ -22,6 +22,6 @@
>  
>  #include <PlatformArch.h>
>  
> -#define HI1620_WATCHDOG_COUNT  2
> +#define HI1620_WATCHDOG_COUNT  1
>  
>  #endif
> diff --git a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Gtdt.aslc b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Gtdt.aslc
> index 45f5d20704..d07070a912 100644
> --- a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Gtdt.aslc
> +++ b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Gtdt.aslc
> @@ -30,6 +30,16 @@
>  #define SYSTEM_TIMER_BASE_ADDRESS     0xFFFFFFFFFFFFFFFF
>  
>  #define GTDT_GTIMER_FLAGS           (GTDT_TIMER_ACTIVE_LOW | GTDT_TIMER_LEVEL_TRIGGERED)
> +#define GENERIC_WATCHDOG_CONTROL_BASE_CPU1_TOTEM_A 0x9C200000
> +#define GENERIC_WATCHDOG_REFRESH_BASE_CPU1_TOTEM_A 0X9C210000
> +
> +#define EFI_ACPI_6_2_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT(RefreshFramePhysicalAddress,                  \
> +    ControlFramePhysicalAddress, WatchdogTimerGSIV, WatchdogTimerFlags)                                 \
> +  {                                                                                                     \
> +    EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG, sizeof(EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE), \
> +    EFI_ACPI_RESERVED_BYTE, RefreshFramePhysicalAddress, ControlFramePhysicalAddress,                   \
> +    WatchdogTimerGSIV, WatchdogTimerFlags                                                               \
> +  }
>  
>  #pragma pack (1)
>  
> @@ -44,7 +54,7 @@ EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLES Gtdt = {
>    {
>      ARM_ACPI_HEADER(
>        EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE,
> -      EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE,
> +      EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLES,
>        EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION
>      ),
>      SYSTEM_TIMER_BASE_ADDRESS,                    // UINT64  PhysicalAddress
> @@ -58,25 +68,14 @@ EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLES Gtdt = {
>      FixedPcdGet32 (PcdArmArchTimerHypIntrNum),    // UINT32  NonSecurePL2TimerGSIV
>      GTDT_GTIMER_FLAGS,                            // UINT32  NonSecurePL2TimerFlags
>      0xFFFFFFFFFFFFFFFF,                           // UINT64  CntReadBasePhysicalAddress
> -#ifdef notyet

Clearly this code wasn't sufficiently reviewed on the way in - that
ifdef should never have got through. At least we're getting rid of it
now.

Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

/
    Leif

> -    PV660_WATCHDOG_COUNT,                          // UINT32  PlatformTimerCount
> +    HI1620_WATCHDOG_COUNT,                        // UINT32  PlatformTimerCount
>      sizeof (EFI_ACPI_6_2_GENERIC_TIMER_DESCRIPTION_TABLE) // UINT32 PlatfromTimerOffset
>    },
>    {
> -    {
> -      EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG, sizeof(EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE),
> -      EFI_ACPI_RESERVED_BYTE, 0, 0, 0, 0
> -    },
> -    {
> -      EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG, sizeof(EFI_ACPI_6_2_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE),
> -      EFI_ACPI_RESERVED_BYTE, 0, 0, 0, 0
> -    }
> -  }
> -#else /* !notyet */
> -  0, 0
> +    EFI_ACPI_6_2_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT(
> +      GENERIC_WATCHDOG_REFRESH_BASE_CPU1_TOTEM_A, GENERIC_WATCHDOG_CONTROL_BASE_CPU1_TOTEM_A, 88, 1)
>    }
> -#endif
> -  };
> +};
>  
>  //
>  // Reference the table being generated to prevent the optimizer from removing the
> -- 
> 2.18.0
> 


  reply	other threads:[~2018-11-14  0:39 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-29  3:32 [PATCH edk2-platforms v1 00/12] Fix D06 SBSA/SBBR issue and improve Ming Huang
2018-10-29  3:32 ` [PATCH edk2-platforms v1 01/12] Silicon/Hisilicon/D06: Add watchdog to GTDT Ming Huang
2018-11-14  0:39   ` Leif Lindholm [this message]
2018-10-29  3:32 ` [PATCH edk2-platforms v1 02/12] Silicon/Hisilicon/D06: Drop _CID for fwts issue Ming Huang
2018-11-14  0:48   ` Leif Lindholm
2018-10-29  3:32 ` [PATCH edk2-platforms v1 03/12] Silicon/Hisilicon/D06: Fix fwts issue in Dbg2 Ming Huang
2018-11-14  0:50   ` Leif Lindholm
2018-10-29  3:32 ` [PATCH edk2-platforms v1 04/12] Silicon/Hisilicon/D06: Fix fwts issue in FADT Ming Huang
2018-11-14  0:50   ` Leif Lindholm
2018-10-29  3:32 ` [PATCH edk2-platforms v1 05/12] Hisilicon/D06: Move some functions to OemMiscLib Ming Huang
2018-11-14  0:04   ` Leif Lindholm
2018-11-14 14:30     ` Ming Huang
2018-10-29  3:32 ` [PATCH edk2-platforms v1 06/12] Silicon/Hisilicon: Modify for SBBR fwts SetTime_Func test case Ming Huang
     [not found]   ` <20181113235222.amykmhqlh5gltg7p@bivouac.eciton.net>
2018-11-14 14:31     ` Ming Huang
2018-11-14 17:20       ` Leif Lindholm
2018-10-29  3:32 ` [PATCH edk2-platforms v1 07/12] Hisilicon/D0x: Fix secure boot bug in FlashFvbDxe Ming Huang
2018-11-13 23:57   ` Leif Lindholm
2018-11-15  7:09     ` Ming Huang
2018-10-29  3:32 ` [PATCH edk2-platforms v1 08/12] Hisilicon/D06: Fix SBBR-SCT AuthVar issue Ming Huang
2018-11-14  0:18   ` Leif Lindholm
2018-11-14 14:31     ` Ming Huang
2018-10-29  3:32 ` [PATCH edk2-platforms v1 09/12] Silicon/Hisilicon/D06: Reserve ECAM resource in DSDT Ming Huang
2018-11-14  0:23   ` Leif Lindholm
2018-10-29  3:32 ` [PATCH edk2-platforms v1 10/12] Silicon/Hisilicon/D06: Modify GTDT timer flag Ming Huang
2018-11-14  0:24   ` Leif Lindholm
2018-10-29  3:32 ` [PATCH edk2-platforms v1 11/12] Hisilicon/D06: Modify Gic base Ming Huang
2018-11-14  0:29   ` Leif Lindholm
2018-11-14 14:31     ` Ming Huang
2018-10-29  3:32 ` [PATCH edk2-platforms v1 12/12] Silicon/Hisilicon/D06: Set TA as Node 0 for TA boot Ming Huang
2018-11-14  0:36   ` Leif Lindholm
2018-11-14 14:32     ` Ming Huang
2018-10-29 11:43 ` [PATCH edk2-platforms v1 00/12] Fix D06 SBSA/SBBR issue and improve Leif Lindholm
2018-10-29 15:01   ` Ming Huang
2018-10-29 16:14     ` Leif Lindholm
     [not found]       ` <5eaaf9d7-e76b-2e98-f4c8-bb0a27007cfc@huawei.com>
2018-10-30  9:37         ` Leif Lindholm

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=20181114003946.b2qc3p6d3of25d57@bivouac.eciton.net \
    --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