From patchwork Sat Apr 1 11:29:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chenhui Sun X-Patchwork-Id: 96572 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp1124834qgd; Sat, 1 Apr 2017 04:37:35 -0700 (PDT) X-Received: by 10.55.72.4 with SMTP id v4mr7505497qka.21.1491046655415; Sat, 01 Apr 2017 04:37:35 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 12si1337445qkz.323.2017.04.01.04.37.35; Sat, 01 Apr 2017 04:37:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linaro-uefi-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=linaro-uefi-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 153F760EA6; Sat, 1 Apr 2017 11:37:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 0B15663666; Sat, 1 Apr 2017 11:35:31 +0000 (UTC) X-Original-To: linaro-uefi@lists.linaro.org Delivered-To: linaro-uefi@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 07EEC63669; Sat, 1 Apr 2017 11:35:26 +0000 (UTC) Received: from mail-pf0-f172.google.com (mail-pf0-f172.google.com [209.85.192.172]) by lists.linaro.org (Postfix) with ESMTPS id 333CC63666 for ; Sat, 1 Apr 2017 11:34:24 +0000 (UTC) Received: by mail-pf0-f172.google.com with SMTP id o126so15289552pfb.3 for ; Sat, 01 Apr 2017 04:34:24 -0700 (PDT) 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:mime-version:content-transfer-encoding; bh=6P4LSu78Sy3ZMqIXExLqd1XusY7xCpX6btdYYTDe2tE=; b=lKmrKXbhKQSHGyJSBqokOm4hnjtgssKg91sfFhEDVFHfjlvz+hqnbIHYGiMEE7IY2x vB5g1AaQFjJ4EB14+I3IJofHvXjtJ13fR63tMXGPCYM5ILFxkpyqBxojSwteGdeQiACf 4saV1x9ggItCZpXYfXLQ9Q+oV9jdUsQjIkeE8Uu45a/DI+BcyWKPZXiLRHGsgJF1GQA1 7bpeXm1NT1IPNwoAxnwBPeSJhoLohkt+KbB+cRp35BhaSiqOpioOzRxMeoRspe+lYbGM 18fl9XdVKAZAiWT4qneCPwprSt1uhupDxXZGgTOhYZD2GjSybMgy2gGHaDuwOLhjcFjx 8jZQ== X-Gm-Message-State: AFeK/H332sZazMiCycDRpbc7k0dwJilj2ozGJbl3G/Mn3m+XYQ0Vbr4bl4HYZgd3yqPQanM4JXs= X-Received: by 10.84.225.17 with SMTP id t17mr8992167plj.153.1491046463482; Sat, 01 Apr 2017 04:34:23 -0700 (PDT) Received: from localhost.localdomain ([119.145.15.121]) by smtp.gmail.com with ESMTPSA id a62sm15704868pgc.60.2017.04.01.04.34.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 01 Apr 2017 04:34:23 -0700 (PDT) From: Chenhui Sun To: leif.lindholm@linaro.org, linaro-uefi@lists.linaro.org, graeme.gregory@linaro.org Date: Sat, 1 Apr 2017 19:29:18 +0800 Message-Id: <1491046162-53797-14-git-send-email-chenhui.sun@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1491046162-53797-1-git-send-email-chenhui.sun@linaro.org> References: <1491046162-53797-1-git-send-email-chenhui.sun@linaro.org> MIME-Version: 1.0 Cc: Yi Li , Chenhui Sun , wanghuiqiang@huawei.com, sunchenhui@huawei.com, Chenhui Sun Subject: [Linaro-uefi] [Linaro-uefi v2 13/17] Hisilicon/D03/D05: Change Monotonic Drive X-BeenThere: linaro-uefi@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linaro-uefi-bounces@lists.linaro.org Sender: "Linaro-uefi" SCT test report: "BS.GetNextMonotonicCount - GetNextMonotonicCount() gets the high 32-bit after reset at EFI_TPL_APPLICATION." Reference 《UEFI Spec 2.6》chapter 7.5.2: “The GetNextHighMonotonicCount() function returns the next high 32 bits of the platform’s monotonic counter. The platform’s monotonic counter is comprised of two 32-bit quantities: the high 32 bits and the low 32 bits. During boot service time the low 32-bit value is volatile: it is reset to zero on every system reset and is increased by 1 on every call to GetNextMonotonicCount(). The high 32-bit value is nonvolatile and is increased by 1 whenever the system resets, whenever GetNextHighMonotonicCount() is called, or whenever the low 32-bit count (returned by GetNextMonoticCount()) overflows.” In EmbeddedMonotonicCounter.inf driver, The high 32-bit value is nonvolatile and is increased by 1 whenever the system resets, but When GetNextHighMonotonicCount() is called, or whenever the low 32-bit count (returned by GetNextMonoticCount()) overflows don’t increased by 1. So Monotonic Driver is switched from EmbeddedPkg to MdeModulePkg. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chenhui Sun Signed-off-by: Heyi Guo Signed-off-by: Yi Li Reviewed-by: Leif Lindholm --- Platforms/Hisilicon/D03/D03.dsc | 1 - Platforms/Hisilicon/D03/D03.fdf | 2 +- Platforms/Hisilicon/D05/D05.dsc | 1 - Platforms/Hisilicon/D05/D05.fdf | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Platforms/Hisilicon/D03/D03.dsc b/Platforms/Hisilicon/D03/D03.dsc index 9c73494..ca6295e 100644 --- a/Platforms/Hisilicon/D03/D03.dsc +++ b/Platforms/Hisilicon/D03/D03.dsc @@ -372,7 +372,6 @@ } MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf - EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.inf MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf diff --git a/Platforms/Hisilicon/D03/D03.fdf b/Platforms/Hisilicon/D03/D03.fdf index 3302ec9..3102f94 100644 --- a/Platforms/Hisilicon/D03/D03.fdf +++ b/Platforms/Hisilicon/D03/D03.fdf @@ -167,7 +167,7 @@ READ_LOCK_STATUS = TRUE INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf - INF EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.inf + INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf diff --git a/Platforms/Hisilicon/D05/D05.dsc b/Platforms/Hisilicon/D05/D05.dsc index 2877da0..c1f4dfd 100644 --- a/Platforms/Hisilicon/D05/D05.dsc +++ b/Platforms/Hisilicon/D05/D05.dsc @@ -492,7 +492,6 @@ } MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf - EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.inf MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf diff --git a/Platforms/Hisilicon/D05/D05.fdf b/Platforms/Hisilicon/D05/D05.fdf index bdfb211..5a646f3 100644 --- a/Platforms/Hisilicon/D05/D05.fdf +++ b/Platforms/Hisilicon/D05/D05.fdf @@ -171,7 +171,7 @@ READ_LOCK_STATUS = TRUE INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf - INF EmbeddedPkg/EmbeddedMonotonicCounter/EmbeddedMonotonicCounter.inf + INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf