MdePkg: Update Delayed Dispatch PPI as per PI 1.8 A Spec

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4496

PI spec defined the `Register` function input argument `Delay` as output.
However, this parameter should be used to define the minmal time delay
the callback should fire. Thus it should be an input parameter.

This change fixed the argument type.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>

Co-authored-by: Mike Turner <mikeyt@pobox.com>
Co-authored-by: Sachin Ganesh <sachinganesh@ami.com>
Signed-off-by: Kun Qin <kuqin12@gmail.com>
This commit is contained in:
Kun Qin 2024-09-19 14:09:03 -07:00 committed by mergify[bot]
parent e19cc32bce
commit b3f36e151d

View File

@ -1,9 +1,10 @@
/** @file /** @file
EFI Delayed Dispatch PPI as defined in the PI 1.7 Specification EFI Delayed Dispatch PPI as defined in the PI 1.8A Specification
Provide timed event service in PEI Provide timed event service in PEI
Copyright (c) 2020, American Megatrends International LLC. All rights reserved. Copyright (c) 2020, American Megatrends International LLC. All rights reserved.
Copyright (c) Microsoft Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
**/ **/
@ -15,7 +16,7 @@
/// ///
#define EFI_DELAYED_DISPATCH_PPI_GUID \ #define EFI_DELAYED_DISPATCH_PPI_GUID \
{ \ { \
0x869c711d, 0x649c, 0x44fe, { 0x8b, 0x9e, 0x2c, 0xbb, 0x29, 0x11, 0xc3, 0xe6} } \ 0x869c711d, 0x649c, 0x44fe, { 0x8b, 0x9e, 0x2c, 0xbb, 0x29, 0x11, 0xc3, 0xe6} \
} }
/** /**
@ -31,8 +32,8 @@
typedef typedef
VOID VOID
(EFIAPI *EFI_DELAYED_DISPATCH_FUNCTION)( (EFIAPI *EFI_DELAYED_DISPATCH_FUNCTION)(
IN OUT UINT64 *Context, IN OUT UINT64 *Context,
OUT UINT32 *NewDelay OUT UINT32 *NewDelay
); );
/// ///
@ -44,13 +45,11 @@ typedef struct _EFI_DELAYED_DISPATCH_PPI EFI_DELAYED_DISPATCH_PPI;
/** /**
Register a callback to be called after a minimum delay has occurred. Register a callback to be called after a minimum delay has occurred.
This service is the single member function of the EFI_DELAYED_DISPATCH_PPI @param[in] This Pointer to the EFI_DELAYED_DISPATCH_PPI instance
@param[in] Function Function to call back
@param This Pointer to the EFI_DELAYED_DISPATCH_PPI instance @param[in] Context Context data
@param Function Function to call back @param[in] DelayedGroupId Delayed dispatch request ID the caller will wait on
@param Context Context data @param[in] Delay Delay interval
@param UniqueId UniqueId
@param Delay Delay interval
@retval EFI_SUCCESS Function successfully loaded @retval EFI_SUCCESS Function successfully loaded
@retval EFI_INVALID_PARAMETER One of the Arguments is not supported @retval EFI_INVALID_PARAMETER One of the Arguments is not supported
@ -62,17 +61,18 @@ EFI_STATUS
(EFIAPI *EFI_DELAYED_DISPATCH_REGISTER)( (EFIAPI *EFI_DELAYED_DISPATCH_REGISTER)(
IN EFI_DELAYED_DISPATCH_PPI *This, IN EFI_DELAYED_DISPATCH_PPI *This,
IN EFI_DELAYED_DISPATCH_FUNCTION Function, IN EFI_DELAYED_DISPATCH_FUNCTION Function,
IN UINT64 Context, IN UINT64 Context,
IN EFI_GUID *UniqueId OPTIONAL, IN EFI_GUID *DelayedGroupId OPTIONAL,
OUT UINT32 Delay IN UINT32 Delay
); );
/** /**
Function invoked by a PEIM to wait until all specified UniqueId events have been dispatched. The other events Wait on a registered Delayed Dispatch unit that has a DelayedGroupId. Continue
will continue to dispatch while this process is being paused to dispatch all registered delayed dispatch entries until *ALL* entries with
DelayedGroupId have completed.
@param This Pointer to the EFI_DELAYED_DISPATCH_PPI instance @param[in] This The Delayed Dispatch PPI pointer.
@param UniqueId Delayed dispatch request ID the caller will wait on @param[in] DelayedGroupId Delayed dispatch request ID the caller will wait on
@retval EFI_SUCCESS Function successfully invoked @retval EFI_SUCCESS Function successfully invoked
@retval EFI_INVALID_PARAMETER One of the Arguments is not supported @retval EFI_INVALID_PARAMETER One of the Arguments is not supported
@ -82,8 +82,8 @@ will continue to dispatch while this process is being paused
typedef typedef
EFI_STATUS EFI_STATUS
(EFIAPI *EFI_DELAYED_DISPATCH_WAIT_ON_EVENT)( (EFIAPI *EFI_DELAYED_DISPATCH_WAIT_ON_EVENT)(
IN EFI_DELAYED_DISPATCH_PPI *This, IN EFI_DELAYED_DISPATCH_PPI *This,
IN EFI_GUID UniqueId IN EFI_GUID DelayedGroupId
); );
/// ///