public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: edk2-devel-01 <edk2-devel@ml01.01.org>
Cc: Feng Tian <feng.tian@intel.com>,
	Liming Gao <liming.gao@intel.com>,
	Michael D Kinney <michael.d.kinney@intel.com>,
	Star Zeng <star.zeng@intel.com>
Subject: [PATCH 1/3] MdePkg, MdeModulePkg: S3BootScriptSaveMemPoll(): accept 64-bit LoopTimes
Date: Thu,  1 Dec 2016 18:55:54 +0100	[thread overview]
Message-ID: <20161201175556.2479-2-lersek@redhat.com> (raw)
In-Reply-To: <20161201175556.2479-1-lersek@redhat.com>

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 <feng.tian@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 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(-)

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;
-- 
2.9.2




  reply	other threads:[~2016-12-01 17:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-01 17:55 [PATCH 0/3] MdePkg, MdeModulePkg, Vlv2TbltDevicePkg: 64-bit LoopTimes in S3 MEM_POLL Laszlo Ersek
2016-12-01 17:55 ` Laszlo Ersek [this message]
2016-12-01 17:55 ` [PATCH 2/3] MdeModulePkg: S3SaveStateDxe, SmmS3SaveState: save 64-bit LoopTimes Laszlo Ersek
2016-12-01 17:55 ` [PATCH 3/3] Vlv2TbltDevicePkg/BootScriptSaveDxe: " Laszlo Ersek
2016-12-02  1:53 ` [PATCH 0/3] MdePkg, MdeModulePkg, Vlv2TbltDevicePkg: 64-bit LoopTimes in S3 MEM_POLL Yao, Jiewen
2016-12-02  4:54   ` Zeng, Star
2016-12-02  9:46     ` Laszlo Ersek
2016-12-02 23:56       ` Yao, Jiewen
2016-12-03 18:33         ` Laszlo Ersek
2016-12-09 22:58           ` Yao, Jiewen
2016-12-16  1:00             ` Kinney, Michael D
2017-01-03 11:35               ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161201175556.2479-2-lersek@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox