MdeModulePkg/NvmExpressPei: Consume S3StorageDeviceInitList LockBox
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1409 For the NvmExpressPei driver, this commit will update the driver to consume the S3StorageDeviceInitList LockBox in S3 phase. The purpose is to perform an on-demand (partial) NVM Express device enumeration/initialization to benefit the S3 resume performance. Cc: Jian J Wang <jian.j.wang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
@@ -266,6 +266,26 @@ NvmePeimEndOfPei (
|
||||
IN VOID *Ppi
|
||||
);
|
||||
|
||||
/**
|
||||
Get the size of the current device path instance.
|
||||
|
||||
@param[in] DevicePath A pointer to the EFI_DEVICE_PATH_PROTOCOL
|
||||
structure.
|
||||
@param[out] InstanceSize The size of the current device path instance.
|
||||
@param[out] EntireDevicePathEnd Indicate whether the instance is the last
|
||||
one in the device path strucure.
|
||||
|
||||
@retval EFI_SUCCESS The size of the current device path instance is fetched.
|
||||
@retval Others Fails to get the size of the current device path instance.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
GetDevicePathInstanceSize (
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
||||
OUT UINTN *InstanceSize,
|
||||
OUT BOOLEAN *EntireDevicePathEnd
|
||||
);
|
||||
|
||||
/**
|
||||
Check the validity of the device path of a NVM Express host controller.
|
||||
|
||||
@@ -309,4 +329,20 @@ NvmeBuildDevicePath (
|
||||
OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
|
||||
);
|
||||
|
||||
/**
|
||||
Determine if a specific NVM Express controller can be skipped for S3 phase.
|
||||
|
||||
@param[in] HcDevicePath Device path of the controller.
|
||||
@param[in] HcDevicePathLength Length of the device path specified by
|
||||
HcDevicePath.
|
||||
|
||||
@retval The number of ports that need to be enumerated.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
NvmeS3SkipThisController (
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *HcDevicePath,
|
||||
IN UINTN HcDevicePathLength
|
||||
);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user