From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400e:c01::243; helo=mail-pl0-x243.google.com; envelope-from=heyi.guo@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pl0-x243.google.com (mail-pl0-x243.google.com [IPv6:2607:f8b0:400e:c01::243]) (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 11248223DB100 for ; Mon, 12 Mar 2018 01:10:55 -0700 (PDT) Received: by mail-pl0-x243.google.com with SMTP id 61-v6so8916035plf.3 for ; Mon, 12 Mar 2018 01:17:15 -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=4Uys4lrtLy0k1BUWH/73abDysI7SHOky+Q2GcpQ2Hu0=; b=bQ9K242BI+CrarZNMU+uXQvFWdm2VbMNqBbiGq+JjTXmn5/eSeMlcedVYKNVMp+fl2 8O27OaOURkvcam7+TXJy5nRfp7O8L9WUEmVYR7/bqsP23E8B4QpnRZVHHQupOIGCjSLc gix2goU0HOgMzpK5qdczk57miVcqokzDPvBJM= 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=4Uys4lrtLy0k1BUWH/73abDysI7SHOky+Q2GcpQ2Hu0=; b=aV4iybHLpZKQ/S3wayWkrO3600YYNhBsq8C+U8vNPiD9X4TnToEDAeR6MnOfk8JMpa VErf3YjM/ppU7nOrGduRrNmpo8R4FKzWLR0YWv1sdjUnbEkWAwC9cHU+ZWAU11wYS1zQ zohtLxSN7aLB4Qy/Rc01WRV7p+h+IHB18nmxHxS8rQpWByHAy8sIz8vOgYGnccS/GaPu 40FvOo5/jL3JHZyL591MuNlMJdXgvIVlEApYUJbyQG58jMLv+A5XlBEoO2fhUkZFNCJk RoQIT7aDu/GC95x33BarLIiOjFYOYQI1diHY3qsHRvccABpeYbphugvbsc9GQTj+S8xF k1Ew== X-Gm-Message-State: AElRT7HYzb+q2lC2QKMWYFBETKnwaVI9reZERTXla+ncZ69eat2tgpQA 2yxLwWzSotv/im9aFbRxWoWR95t1WN4= X-Google-Smtp-Source: AG47ELunSGaDKxwckd9VgbSmV4tSiXd4rMR515o2R+GChuz9W+UPclByIvjYarwHDiT/XK9sDkbr+g== X-Received: by 2002:a17:902:9a08:: with SMTP id v8-v6mr7360933plp.252.1520842635216; Mon, 12 Mar 2018 01:17:15 -0700 (PDT) Received: from localhost.localdomain ([45.56.152.76]) by smtp.gmail.com with ESMTPSA id q81sm16560512pfl.188.2018.03.12.01.17.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Mar 2018 01:17:14 -0700 (PDT) From: Heyi Guo To: edk2-devel@lists.01.org Cc: Chenhui Sun , Heyi Guo , Ard Biesheuvel , Leif Lindholm , Graeme Gregory Date: Mon, 12 Mar 2018 16:16:18 +0800 Message-Id: <1520842578-95453-4-git-send-email-heyi.guo@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520842578-95453-1-git-send-email-heyi.guo@linaro.org> References: <1520842578-95453-1-git-send-email-heyi.guo@linaro.org> Subject: [edk2-platforms PATCH v2 3/3] Hisilicon/D05: Support SBSA watchdog X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Mar 2018 08:10:55 -0000 From: Chenhui Sun Add description of SBSA watchdogs to ACPI GTDT on D05. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chenhui Sun Signed-off-by: Heyi Guo Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Graeme Gregory --- Notes: v2: - Use local defines instead of PCD+define for watchdog base address [Ard] Silicon/Hisilicon/Hi1616/D05AcpiTables/Gtdt.aslc | 25 ++++++++++---------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/Silicon/Hisilicon/Hi1616/D05AcpiTables/Gtdt.aslc b/Silicon/Hisilicon/Hi1616/D05AcpiTables/Gtdt.aslc index 2a9d209c00f0..9f27696cf022 100644 --- a/Silicon/Hisilicon/Hi1616/D05AcpiTables/Gtdt.aslc +++ b/Silicon/Hisilicon/Hi1616/D05AcpiTables/Gtdt.aslc @@ -30,6 +30,14 @@ #define GTDT_GTIMER_FLAGS (GTDT_TIMER_ALWAYS_ON_CAPABILITY | GTDT_TIMER_ACTIVE_LOW | GTDT_TIMER_LEVEL_TRIGGERED) +// Generic watchdog address for SCCL (Super CPU cluster) A and SCCL B on Hi1616. +// Watchdogs on socket 1 are not mapped to SPI interrupts so we can't describe +// them in GTDT. +#define GENERIC_WATCHDOG_CONTROL_BASE_SCCL_A 0x40500000 +#define GENERIC_WATCHDOG_REFRESH_BASE_SCCL_A 0x40600000 +#define GENERIC_WATCHDOG_CONTROL_BASE_SCCL_B 0x60500000 +#define GENERIC_WATCHDOG_REFRESH_BASE_SCCL_B 0x60600000 + #pragma pack (1) typedef struct { @@ -57,22 +65,15 @@ EFI_ACPI_6_1_GENERIC_TIMER_DESCRIPTION_TABLES Gtdt = { FixedPcdGet32 (PcdArmArchTimerHypIntrNum), // UINT32 NonSecurePL2TimerGSIV GTDT_GTIMER_FLAGS, // UINT32 NonSecurePL2TimerFlags 0xFFFFFFFFFFFFFFFF, // UINT64 CntReadBasePhysicalAddress -#ifdef notyet - PV660_WATCHDOG_COUNT, // UINT32 PlatformTimerCount + HI1616_WATCHDOG_COUNT, // UINT32 PlatformTimerCount sizeof (EFI_ACPI_6_1_GENERIC_TIMER_DESCRIPTION_TABLE) // UINT32 PlatfromTimerOffset }, { - EFI_ACPI_6_1_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT( - //FixedPcdGet32 (PcdGenericWatchdogRefreshBase), FixedPcdGet32 (PcdGenericWatchdogControlBase), 93, 0), - 0, 0, 0, 0), - EFI_ACPI_6_1_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT( - //FixedPcdGet32 (PcdGenericWatchdogRefreshBase), FixedPcdGet32 (PcdGenericWatchdogControlBase), 94, EFI_ACPI_6_1_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_SECURE_TIMER) - 0, 0, 0, 0) + EFI_ACPI_5_1_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT( + GENERIC_WATCHDOG_REFRESH_BASE_SCCL_A, GENERIC_WATCHDOG_CONTROL_BASE_SCCL_A, 400, 0), + EFI_ACPI_5_1_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT( + GENERIC_WATCHDOG_REFRESH_BASE_SCCL_B, GENERIC_WATCHDOG_CONTROL_BASE_SCCL_B, 496, 0) } -#else /* !notyet */ - 0, 0 - } -#endif }; // -- 2.7.4