From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::444; helo=mail-wr1-x444.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 26EB92118DC52 for ; Tue, 13 Nov 2018 16:39:50 -0800 (PST) Received: by mail-wr1-x444.google.com with SMTP id l9so2466955wrt.13 for ; Tue, 13 Nov 2018 16:39:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ZonhiLNLsBgfLBNmsMiNl/hLRaOEnwSNfb4xul97wjI=; b=kOXzV4bHsGcYaw9kgQ6FzAK5P5hDD8OTwiGXjxH+1bNOyz8jDmIwRS94k1wbxzmkEE 6bzST60C65vZwCiWVDD47hxB2AVWRjDnixnvhYCpFtDOlbNvc+Hav9GDcc8HIjI6nM5P LR8f90i8trhmc9dQodszzDmA4LKm/HyFWnH1w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ZonhiLNLsBgfLBNmsMiNl/hLRaOEnwSNfb4xul97wjI=; b=KcVHX6i6xp9Je06Cca2wxPv2cJvOcON2d0VzXLVeG0Kxl6d71NYTkt3i3pZwbxAKTP jv154V13WI07TqlaDxPtr0cJua3TfUjuADiwie80piRt8VV9YdP1JDLwpjH4M+GyZk+r 6b6oYGuqU4nNtnIxg/SfNGNZweOBgGGN7QvlV5WGfpEjnCkvNFaUq9VcFZ871W7n5O3N odgLWFLbd3eqveMfOsKgZxVs7DHPVKBLmg5pRcat3+5GPXr4mVp0MvXNL+kZlhihEhZ9 4ObHskmvtCh7dV7UF7chOJxz4UNxqG2EzPfF+t6lz2THw3sTOErNVSWAAFBb0H0qTTZG kYcA== X-Gm-Message-State: AGRZ1gLXNcLJLhWJ4+KQ2n0fpQEh+UeHBktfHfAVCrV2cpCUySADer2v Z7RQRBsXFQJdW5GKxAf6kEPRwg== X-Google-Smtp-Source: AJdET5druJCTFH++fLx5tVIYpqS9JB/pON9RUysjkSG9fALGzWdPSo8/n9uCmBz3LKCDDe21eXNYGg== X-Received: by 2002:adf:e08c:: with SMTP id c12mr2825303wri.199.1542155988639; Tue, 13 Nov 2018 16:39:48 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id x142-v6sm38541283wmd.20.2018.11.13.16.39.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Nov 2018 16:39:47 -0800 (PST) Date: Wed, 14 Nov 2018 00:39:46 +0000 From: Leif Lindholm To: Ming Huang 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 Message-ID: <20181114003946.b2qc3p6d3of25d57@bivouac.eciton.net> References: <20181029033249.45363-1-ming.huang@linaro.org> <20181029033249.45363-2-ming.huang@linaro.org> MIME-Version: 1.0 In-Reply-To: <20181029033249.45363-2-ming.huang@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [PATCH edk2-platforms v1 01/12] Silicon/Hisilicon/D06: Add watchdog to GTDT X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2018 00:39:50 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > --- > 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 > > -#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 > - 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 >