From patchwork Mon Oct 29 03:32:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Huang X-Patchwork-Id: 149616 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3597915ljp; Sun, 28 Oct 2018 20:33:05 -0700 (PDT) X-Google-Smtp-Source: AJdET5dWmCOmQmVtaviHOhH40/XanyjChQubnidPwv7HqbCATPzNc4sH4lWx2xnIp11Jnh/xrVDH X-Received: by 2002:ac8:36f3:: with SMTP id b48-v6mr11750158qtc.49.1540783985199; Sun, 28 Oct 2018 20:33:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540783985; cv=none; d=google.com; s=arc-20160816; b=gsaLWVabMTBWS0hOYvc8jOUyRi2sLfj8ehAv3ont5sRaB6xbx55xPKrnei5FawSCJG Qnm9o0TjSijetdpmVLhZM2vftBH5e9vkJyD1MpPH3FyBBb4K04+DOLAhAnfADEgTD5pI 3rWWLW927JYlbbg3zcEq+nclCp1gGFi1q+TgAPLwlVv2SM8X8PP0YJ31XE/yuLAcnd7k GfYMIH7BQMcBHHHIracnG2CBTvab8MnzJ55boEGoirgzPfUjlZHw8V4M8ok2mtVo2Fd5 /McwuFbWJmjyZtncw4LI90Tjpw+GhTnwS55kKGB/gtcUEfesKuZZSUlgAKw8LzI7zzEv i9iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to; bh=2ltdALx86oKOcpEmJsra6JmJwmo1A4VXdLIC0vnbUio=; b=UuA0BhnpDw2yvpY11uYcC/E1Pvgf2ZtxCMAHiVoElDosCFHU7kde36kjOg9IkzEr/2 ScmWYuhvsg8fiDJBZGyrakHPcDhFG3JE4PIL8jmw0Zju70tdIZCp17lV2nvIcn82i1gY qa4KwLymMP2ppW8i9LbyNgMiXW2/l0JhMuqJNMaAA3Xw55RQJeReK1DWAxcayi66FHIK NPeSahqJ2M5kV1k/8MtU/GZPT9yNTs2zllBLx7KrUDSRFtZ2GGCOTwvYAdhW6PgT0Lfr tn97JIFZ96VIK50PIu8b9kuXJMvNgDYyY4nw7un0/Ui/1E/XBbufHiEkhEXGDi/TqZhe 24MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="fc/jOcAy"; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id z13-v6si8097245qta.58.2018.10.28.20.33.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 Oct 2018 20:33:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="fc/jOcAy"; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 7728A21184ABC; Sun, 28 Oct 2018 20:33:02 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::541; helo=mail-pg1-x541.google.com; envelope-from=ming.huang@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) (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 2092221167459 for ; Sun, 28 Oct 2018 20:33:01 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id m9-v6so483104pgl.13 for ; Sun, 28 Oct 2018 20:33:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kT1MhhBv6fAhVJMZydRP+BPio3V9jf6HRxcjwCth24M=; b=fc/jOcAyjGGj0ObIAQCULO0+A1G7cGsrI9RoiD6WNEQ0riU+jilFCq3Za5YgMp8jd4 4jwGEALec49UH1iXvRZHIDYQU3jy8qM25bJMSmGDzlDtxw+KzwWqrKizjW9Go3FAUA63 zjI8ASRP34J6YMJ/CyhoxVVDVYfEIhjNktSto= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kT1MhhBv6fAhVJMZydRP+BPio3V9jf6HRxcjwCth24M=; b=dhcL5QTHUAAe1ZMeeiI+vMwqyV3Cn6zPxqyIr8PgQLjLuYhrllmblDm+vzhkKlu1W+ iwyx7/xBhCF31qLD9YuIqCBwUrZXfli34ONgVXRywh/LRzKvOXRbaS9ANiADKjOaYnvX 89N+jCEmmsQwoO5Lt5M7Av3WxHLq3FUWUEWRJlRWlOX+YzmbCNxc3phmbkn6/9MuDikq ugNDjHgcBzie1UP4dvE1DzszRM+13ByP3+V0N6jqcU2m/iueg7aYQT2CDIggXaywWFuj 9Azzi0wXGLUW9lv4B6v5AyAQpEF0lQH5aQL18Spja33xuA60uC39CmTfr4/WsdzYesFZ GfJA== X-Gm-Message-State: AGRZ1gJTfEWhGizk1LD97PwczjRXm5z4I53jvdpXWOK6zT3/aMSW3Brx BqQdBLtkuztqir4JMFy0YA3tKQ== X-Received: by 2002:a63:8948:: with SMTP id v69mr12301740pgd.39.1540783980724; Sun, 28 Oct 2018 20:33:00 -0700 (PDT) Received: from localhost.localdomain ([120.31.149.194]) by smtp.gmail.com with ESMTPSA id j5-v6sm22318872pgm.79.2018.10.28.20.32.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 28 Oct 2018 20:33:00 -0700 (PDT) From: Ming Huang To: leif.lindholm@linaro.org, linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org, graeme.gregory@linaro.org Date: Mon, 29 Oct 2018 11:32:38 +0800 Message-Id: <20181029033249.45363-2-ming.huang@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20181029033249.45363-1-ming.huang@linaro.org> References: <20181029033249.45363-1-ming.huang@linaro.org> Subject: [edk2] [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: , Cc: huangming23@huawei.com, xinliang.liu@linaro.org, john.garry@huawei.com, zhangjinsong2@huawei.com, huangdaode@hisilicon.com, zhangfeng56@huawei.com, michael.d.kinney@intel.com, lersek@redhat.com, wanghuiqiang@huawei.com MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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(-) -- 2.18.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Leif Lindholm 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 - 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