From 63042a718887693a07e6575fc8c8f58cdd0933cc Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Wed, 30 Nov 2016 20:07:50 +0100 Subject: [PATCH] MdePkg, MdeModulePkg: S3BootScriptSaveMemPoll(): accept 64-bit LoopTimes 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 Reviewed-by: "Yao, Jiewen" Reviewed-by: Michael Kinney --- MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c | 2 +- MdePkg/Include/Library/S3BootScriptLib.h | 2 +- MdePkg/Library/BaseS3BootScriptLibNull/BootScriptLib.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c b/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c index 9ff5b80e7a..5698c91663 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/Include/Library/S3BootScriptLib.h b/MdePkg/Include/Library/S3BootScriptLib.h index 0a8cbe355a..3f43da8794 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/MdePkg/Library/BaseS3BootScriptLibNull/BootScriptLib.c b/MdePkg/Library/BaseS3BootScriptLibNull/BootScriptLib.c index 373ce6b388..3dee64746a 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.39.2