From patchwork Fri Nov 16 06:56:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Huang X-Patchwork-Id: 151288 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp69289ljp; Thu, 15 Nov 2018 22:57:29 -0800 (PST) X-Google-Smtp-Source: AJdET5cegb4xBT3h2v/8Asa8nbvQ/nvAlI5vyECpN6WIWaHd9yimaIcLJx2lpWrhNRnmFAII2RVd X-Received: by 2002:a17:902:28e7:: with SMTP id f94-v6mr9653284plb.297.1542351449526; Thu, 15 Nov 2018 22:57:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542351449; cv=none; d=google.com; s=arc-20160816; b=uFYtUIFflfU8eDQGaWW7acBXS6Em8IT+h2o4Q8p6Qyry2EQPiw6YN4F7pa416chZKl yZHVmisSLisIvJ557/2E+jGhuuJkzjsFppjQrG7lK2rJROvtEWLwZoZJOR02NWNwd+fa 9JFCTUdiSb0KX5JGT/GnlMDipLUsfdeT+zKGMfWILbqg2Zn5BRGbMS1S76Jsmf/HXq55 bpncLmI1m9Y13FW0E+rUfHJ7947IH11Gd5okJUCg56cdX5hEPjIP+LYcNQNyTT4+H9dR jS8G/mpe4qmrChnZpqEmkToeL0YuFqnaFTOZCthsxbbExbMTKMp6uK3GjPVxCRNU9chz xSDA== 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=Mduqm8zdNyIxsGi5WdLoI8JaAlR4Qsj+GCEA6ZqvGKg=; b=YS81rLZNSd+k0PiHbckjJaZN9E2vGu3xwUqsNXSeAZ6KAc9pJm/w7Kcn31JMNQ9BGK HDYG+KbJcaGNb+6x0QCoV1J/gdJkRm261mijkIFxHzpFFwXHy9q/TO0JGqu84MqomPl4 oQ9cDO7ydC6SBgYr2de8QqTcUlfc28b3EqrsLbYF+uriQd8KvNfInYtDIdjiaTYcDFlY EEjQLmX0NzYg/IOjqZLZNV4P9sAfwHXt3Zu5hTWmsyPsULYZg7jU/EnjcmnaO36/+f7x NvdpQ9EJaXVW1HqWHBXH4HKADDVtFzVUjr3TmNLVJ/CIE4sCeUflqnxvrRBq5mOkpR9e c5Jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ZOh9ooqq; 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 c81si13539679pfc.196.2018.11.15.22.57.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Nov 2018 22:57:29 -0800 (PST) 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=ZOh9ooqq; 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 07C7A21191757; Thu, 15 Nov 2018 22:57:29 -0800 (PST) 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::543; helo=mail-pg1-x543.google.com; envelope-from=ming.huang@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) (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 4CCF521191747 for ; Thu, 15 Nov 2018 22:57:27 -0800 (PST) Received: by mail-pg1-x543.google.com with SMTP id w7so10163249pgp.13 for ; Thu, 15 Nov 2018 22:57:27 -0800 (PST) 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=yup+EwESu+XzOta+pjVRSiiwtAEsiav8ykiV8maFQaI=; b=ZOh9ooqqS8PZ5lAw2Zk7qnmFUWXJOHaAOpIeSVmGLzz6QVqS8xKywlrBYsqlCn7hMX ul0SA8slyoxs7gL9+AyYbXOqEEYSkB416M9fF9dZFE3CO/TUvyU6IHvtY0NdHRA64oWO nQyZEfLWAJ5Ug4mL3YPmgh16bi2OOhsqUnb5M= 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=yup+EwESu+XzOta+pjVRSiiwtAEsiav8ykiV8maFQaI=; b=HNX+w+JZ4e2o9zJmzK/EVn45NDTuC7uxZuA7sKf6ELn+upPsL9/l946Z4cIFNR1tzv rOQu9DdKm/FbmyD/71EW5GtOYZ8eBw3lu5srhyahZc5F9+NxWpWkWiVAjFQ7lTqBJ5rM hNUtDXsN8Iip7kBb3caISQ4wRnDiY7mdMDUnnKL5pEpbL3R/hvBYQWkI8VCtGKsUeHbe sIRF2ru0QP4GlftMmQvgsF0b28eXoe/JhZ6SFBhrgFlfHP3TDq6PP62E0lYE1/iryUwg leQreMviytRP62EKR4lHdZzNLDIdoLnh9FCiWmNYV3W6Lz7F5gplr5fKgFKVi3KE928k o2lg== X-Gm-Message-State: AGRZ1gJ6qTfr78eIh2lyeIYcZZZNuW+LrEBTI+BAfHclSqArDh/iAAB1 bW+maxCZ1X2YdlAQTW/1iL3qfA== X-Received: by 2002:a62:9402:: with SMTP id m2mr9737118pfe.34.1542351446977; Thu, 15 Nov 2018 22:57:26 -0800 (PST) Received: from localhost.localdomain ([203.160.91.226]) by smtp.gmail.com with ESMTPSA id h134sm2835905pfe.27.2018.11.15.22.57.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Nov 2018 22:57:26 -0800 (PST) From: Ming Huang To: leif.lindholm@linaro.org, linaro-uefi@lists.linaro.org, edk2-devel@lists.01.org, graeme.gregory@linaro.org Date: Fri, 16 Nov 2018 14:56:49 +0800 Message-Id: <20181116065702.30559-3-ming.huang@linaro.org> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20181116065702.30559-1-ming.huang@linaro.org> References: <20181116065702.30559-1-ming.huang@linaro.org> Subject: [edk2] [PATCH edk2-platforms v2 02/15] 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. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ming Huang Reviewed-by: Leif Lindholm --- Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Platform.h | 2 +- Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Gtdt.aslc | 31 ++++++++++---------- 2 files changed, 16 insertions(+), 17 deletions(-) -- 2.9.5 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Platform.h b/Silicon/Hisilicon/Hi1620/Hi1620AcpiTables/Hi1620Platform.h index faaeb83781db..eaf3ff10e3c5 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 45f5d20704c4..d07070a912e3 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 - } + 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) } -#else /* !notyet */ - 0, 0 - } -#endif - }; +}; // // Reference the table being generated to prevent the optimizer from removing the