From patchwork Thu Dec 1 17:55:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 86125 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp810233qgi; Thu, 1 Dec 2016 09:56:06 -0800 (PST) X-Received: by 10.84.216.6 with SMTP id m6mr87964288pli.130.1480614966444; Thu, 01 Dec 2016 09:56:06 -0800 (PST) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id x77si984990pfa.171.2016.12.01.09.56.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Dec 2016 09:56:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 3798D81F24; Thu, 1 Dec 2016 09:56:06 -0800 (PST) X-Original-To: edk2-devel@ml01.01.org Delivered-To: edk2-devel@ml01.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0FF0281F1E for ; Thu, 1 Dec 2016 09:56:05 -0800 (PST) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 77A7D7FD44; Thu, 1 Dec 2016 17:56:04 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-138.phx2.redhat.com [10.3.116.138]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uB1Hu0Al017729; Thu, 1 Dec 2016 12:56:03 -0500 From: Laszlo Ersek To: edk2-devel-01 Date: Thu, 1 Dec 2016 18:55:54 +0100 Message-Id: <20161201175556.2479-2-lersek@redhat.com> In-Reply-To: <20161201175556.2479-1-lersek@redhat.com> References: <20161201175556.2479-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 01 Dec 2016 17:56:04 +0000 (UTC) Subject: [edk2] [PATCH 1/3] MdePkg, MdeModulePkg: S3BootScriptSaveMemPoll(): accept 64-bit LoopTimes X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael D Kinney , Feng Tian , Star Zeng , Liming Gao MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" The BaseNull instance of S3BootScriptLib obviously doesn't care about the type of the S3BootScriptSaveMemPoll() function's LoopTimes parameter; this lib instance doesn't do anything with the parameters received in S3BootScriptSaveMemPoll(). The PiDxe instance saves the LoopTimes parameter in EFI_BOOT_SCRIPT_MEM_POLL.LoopTimes. This target field already has UINT64 type. Furthermore, the BootScriptExecuteMemPoll() function in the same library instance already uses a local UINT64 variable called LoopTimes to count up to EFI_BOOT_SCRIPT_MEM_POLL.LoopTimes. This means that the the UINTN type for S3BootScriptSaveMemPoll()'s LoopTimes parameter is an unnecessary restriction. The callers of S3BootScriptSaveMemPoll() will be updated in the next patches, functionally. At this stage, they will continue to compile, since UINT64 parameters can accept UINTN arguments. Cc: Feng Tian Cc: Liming Gao Cc: Michael D Kinney Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- MdePkg/Include/Library/S3BootScriptLib.h | 2 +- MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c | 2 +- MdePkg/Library/BaseS3BootScriptLibNull/BootScriptLib.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) -- 2.9.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/MdePkg/Include/Library/S3BootScriptLib.h b/MdePkg/Include/Library/S3BootScriptLib.h index 0a8cbe355aff..3f43da879469 100644 --- a/MdePkg/Include/Library/S3BootScriptLib.h +++ b/MdePkg/Include/Library/S3BootScriptLib.h @@ -343,7 +343,7 @@ S3BootScriptSaveMemPoll ( IN VOID *BitMask, IN VOID *BitValue, IN UINTN Duration, - IN UINTN LoopTimes + IN UINT64 LoopTimes ); /** diff --git a/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c b/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c index 9ff5b80e7a36..5698c9166399 100644 --- a/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c +++ b/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c @@ -1672,7 +1672,7 @@ S3BootScriptSaveMemPoll ( IN VOID *BitMask, IN VOID *BitValue, IN UINTN Duration, - IN UINTN LoopTimes + IN UINT64 LoopTimes ) { UINT8 Length; diff --git a/MdePkg/Library/BaseS3BootScriptLibNull/BootScriptLib.c b/MdePkg/Library/BaseS3BootScriptLibNull/BootScriptLib.c index 373ce6b388e5..3dee64746ad9 100644 --- a/MdePkg/Library/BaseS3BootScriptLibNull/BootScriptLib.c +++ b/MdePkg/Library/BaseS3BootScriptLibNull/BootScriptLib.c @@ -303,7 +303,7 @@ S3BootScriptSaveMemPoll ( IN VOID *BitMask, IN VOID *BitValue, IN UINTN Duration, - IN UINTN LoopTimes + IN UINT64 LoopTimes ) { return RETURN_SUCCESS;