]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg, MdeModulePkg: S3BootScriptSaveMemPoll(): accept 64-bit LoopTimes
authorLaszlo Ersek <lersek@redhat.com>
Wed, 30 Nov 2016 19:07:50 +0000 (20:07 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Tue, 3 Jan 2017 11:22:47 +0000 (12:22 +0100)
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>
Reviewed-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c
MdePkg/Include/Library/S3BootScriptLib.h
MdePkg/Library/BaseS3BootScriptLibNull/BootScriptLib.c

index 9ff5b80e7a3683057f1bfd621b77a1a35f30e535..5698c916639952056700dba391e8ece5b25600b9 100644 (file)
@@ -1672,7 +1672,7 @@ S3BootScriptSaveMemPoll (
   IN  VOID                              *BitMask,\r
   IN  VOID                              *BitValue,\r
   IN  UINTN                             Duration,\r
-  IN  UINT                            LoopTimes\r
+  IN  UINT64                            LoopTimes\r
   )\r
 {\r
   UINT8                 Length;\r
index 0a8cbe355aff6790d322c2b6f04d460cab6678a2..3f43da8794693900de49f7121c597475ca13439f 100644 (file)
@@ -343,7 +343,7 @@ S3BootScriptSaveMemPoll (
   IN  VOID                      *BitMask,\r
   IN  VOID                      *BitValue,\r
   IN  UINTN                     Duration,\r
-  IN  UINT                    LoopTimes\r
+  IN  UINT64                    LoopTimes\r
   );\r
 \r
 /**\r
index 373ce6b388e5712bf88f0720ff383ec4f2231d23..3dee64746ad93dd482a8bb1f10bf127c483eca57 100644 (file)
@@ -303,7 +303,7 @@ S3BootScriptSaveMemPoll (
   IN  VOID                              *BitMask,\r
   IN  VOID                              *BitValue,\r
   IN  UINTN                             Duration,\r
-  IN  UINT                            LoopTimes\r
+  IN  UINT64                            LoopTimes\r
   )\r
 {\r
        return RETURN_SUCCESS;\r