From patchwork Wed Mar 7 06:55:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gary guo X-Patchwork-Id: 130851 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp4845145lja; Tue, 6 Mar 2018 22:56:47 -0800 (PST) X-Google-Smtp-Source: AG47ELtEbM2JEjbP5P0CqcWfwN8al9O8qy+3eTu1Bs2In0ULJBOGgxobJEJ84J4xHhJ39BV2Q0gK X-Received: by 10.99.108.66 with SMTP id h63mr16969944pgc.177.1520405807736; Tue, 06 Mar 2018 22:56:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520405807; cv=none; d=google.com; s=arc-20160816; b=ywchtGyeFa/Ee6PAridR+IUUu2oVsDHMTat2cIAeri2ktbTYncG2/PcXzAOwwaE52S ufnbbc8L1mcn2YGhekbwf4Etvj6yBwVOOVb0kxhiRm+bUmNbShes1TEqs2lcgLQxyuFM szj6kiHA+6ToGdY/h9VwO4LTc9AzSL+nisNdkAzQwNXw4+Q/GTa2auJ2K9eUBykzJHFS teNDTQHet05+yd89+a+M90o30AVZQ2D+9WyQcSKj1HpE0PQ2l7xnQ8ikGaRr8TWTLm8V S3qGqzN2ZZhqiPbQ7M5Ejj1yNiIAsYs3wp65MlcLCB3g++/x9LaaMO/+dDdyUBTWYDMw uh1Q== 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:arc-authentication-results; bh=0DN7AGeuIo9zvU96psaSzaVHyuiw0TC3T69jk7eCOv4=; b=CqgR9tn769A5SUqWrW58IJX8x3rf77VIEnAooLk9ahWjxcdTx2U2557cKqgZLcsh8p UahgJ5l94NcHzfYXr5r6NDao84yeaAM9GliXZYfbQ6kJKF+a6i434W/J7y+CJtosBUjf z4qCqU/7nDokovfFV8qMQ7jLTHFp+ps4w0WA2gkNgVUE7otA+CwBRiZ7E30TBGykZaW9 5AeAHPSQKVED9HbGk7DhzOD/OXPp76uZFzWeip9f5HksbTVkp9ZaQOFQIMRdFCVM0LEt ZW8IcNE0tbin7F6BC+vGElEQhIPtnVFXGJcoGaq63heHxL3js0YS9XCZT8Afj2pBfQFY bwTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=EXYlVdrS; 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 h8-v6si12609836pli.210.2018.03.06.22.56.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Mar 2018 22:56:47 -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=EXYlVdrS; 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 47869223CDC39; Tue, 6 Mar 2018 22:50:32 -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:400e:c05::244; helo=mail-pg0-x244.google.com; envelope-from=heyi.guo@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pg0-x244.google.com (mail-pg0-x244.google.com [IPv6:2607:f8b0:400e:c05::244]) (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 0996D21E082A0 for ; Tue, 6 Mar 2018 22:50:30 -0800 (PST) Received: by mail-pg0-x244.google.com with SMTP id l4so555901pgp.11 for ; Tue, 06 Mar 2018 22:56:45 -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=neDvKqgPRZmZUqTkOs6TXabH1xIh/p/4x2zBRIfaVLQ=; b=EXYlVdrS3megoEcrHKlQ8woW09hFWXegAVpxtUj9Po8jYEkdtxt2ZiVcliHuKHBhDS +9QlkenfXii2YLisxP2QM9zR6O83QrDReSS8mezY7ocxgLqBxb4LtAWCkW1O2B+f9u1J VqHTN8UCe2vDnGj0NnEqwedgcy2TQPYQOwG0c= 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=neDvKqgPRZmZUqTkOs6TXabH1xIh/p/4x2zBRIfaVLQ=; b=eQNQ0U8TGvyFYesFzVsVUTeiUT2/gTMtNM68wmL8WCcc2PpWHqcNRMb7ZTRedF7emc MF3c76H+9xaQqqnonL0cpD591sstoE0jgpNdoz2Tg7gRG54uri1zPG1xBG1E3EzzpSEM r7E81rQyp8KjW53VIL616OK9q4+P61mKnztwSQOMQsMEcC+PZfLMbN6E8jqOYn5LFoQs xH1wy9igwYIU+glyWZzWYppmu0/axKmCL/sTuY3/+J5IShmLdziMktZyWUI9DHqOicCV U0k/wnNgRo+gxAEYtuObt2nXzQW4FbXvyqWWx3oEWX/2/r+sPzYRbChlTSQXlWSrsZlv BFjw== X-Gm-Message-State: APf1xPDIhefP21ovwNlkIg3B3B3dvtdR9+Gann1B0xE/2aH/hQfi1kT9 4ojJ5hYvfUepdDtkAhmLdg11XTBdAfA= X-Received: by 10.98.15.72 with SMTP id x69mr21570367pfi.16.1520405805244; Tue, 06 Mar 2018 22:56:45 -0800 (PST) Received: from localhost.localdomain ([45.56.152.76]) by smtp.gmail.com with ESMTPSA id m18sm28340291pgu.51.2018.03.06.22.56.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Mar 2018 22:56:44 -0800 (PST) From: Heyi Guo To: edk2-devel@lists.01.org Date: Wed, 7 Mar 2018 14:55:47 +0800 Message-Id: <1520405747-11023-3-git-send-email-heyi.guo@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520405747-11023-1-git-send-email-heyi.guo@linaro.org> References: <1520405747-11023-1-git-send-email-heyi.guo@linaro.org> Subject: [edk2] [PATCH 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: , Cc: Heyi Guo , Chenhui Sun , Leif Lindholm , Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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 --- Platform/Hisilicon/D05/D05.dsc | 4 ++++ Silicon/Hisilicon/Hi1616/D05AcpiTables/AcpiTablesHi1616.inf | 2 ++ Silicon/Hisilicon/Hi1616/D05AcpiTables/Gtdt.aslc | 19 +++++++------------ 3 files changed, 13 insertions(+), 12 deletions(-) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/Platform/Hisilicon/D05/D05.dsc b/Platform/Hisilicon/D05/D05.dsc index 0792b0814ea1..22eaf356224d 100644 --- a/Platform/Hisilicon/D05/D05.dsc +++ b/Platform/Hisilicon/D05/D05.dsc @@ -418,6 +418,10 @@ [PcdsFixedAtBuild.common] gHisiTokenSpaceGuid.Pcdsoctype|0x1610 + # SBSA watchdog on Hi1616 + gArmTokenSpaceGuid.PcdGenericWatchdogControlBase|0x40500000 + gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase|0x40600000 + ################################################################################ # # Components Section - list of all EDK II Modules needed by this Platform diff --git a/Silicon/Hisilicon/Hi1616/D05AcpiTables/AcpiTablesHi1616.inf b/Silicon/Hisilicon/Hi1616/D05AcpiTables/AcpiTablesHi1616.inf index bb279c8e428e..6955e6145c30 100644 --- a/Silicon/Hisilicon/Hi1616/D05AcpiTables/AcpiTablesHi1616.inf +++ b/Silicon/Hisilicon/Hi1616/D05AcpiTables/AcpiTablesHi1616.inf @@ -55,5 +55,7 @@ [FixedPcd] gArmTokenSpaceGuid.PcdArmArchTimerIntrNum gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum + gArmTokenSpaceGuid.PcdGenericWatchdogControlBase + gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase diff --git a/Silicon/Hisilicon/Hi1616/D05AcpiTables/Gtdt.aslc b/Silicon/Hisilicon/Hi1616/D05AcpiTables/Gtdt.aslc index 2a9d209c00f0..6bc1bde2a490 100644 --- a/Silicon/Hisilicon/Hi1616/D05AcpiTables/Gtdt.aslc +++ b/Silicon/Hisilicon/Hi1616/D05AcpiTables/Gtdt.aslc @@ -29,6 +29,7 @@ #define GTDT_TIMER_ALWAYS_ON_CAPABILITY EFI_ACPI_6_1_GTDT_TIMER_FLAG_ALWAYS_ON_CAPABILITY #define GTDT_GTIMER_FLAGS (GTDT_TIMER_ALWAYS_ON_CAPABILITY | GTDT_TIMER_ACTIVE_LOW | GTDT_TIMER_LEVEL_TRIGGERED) +#define WATCHDOG_SPAN 0x20000000 #pragma pack (1) @@ -57,22 +58,16 @@ 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( + FixedPcdGet32 (PcdGenericWatchdogRefreshBase), FixedPcdGet32 (PcdGenericWatchdogControlBase), 400, 0), + EFI_ACPI_5_1_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT( + FixedPcdGet32 (PcdGenericWatchdogRefreshBase) + WATCHDOG_SPAN, FixedPcdGet32 (PcdGenericWatchdogControlBase) + WATCHDOG_SPAN, 496, 0) + } -#else /* !notyet */ - 0, 0 - } -#endif }; //