MdeModulePkg/NvmExpressPei: Use PCI_DEVICE_PPI to manage Nvme device
https://bugzilla.tianocore.org/show_bug.cgi?id=4017 This change modifies NvmExpressPei library to allow usage both EDKII_PCI_DEVICE_PPI and EDKII_NVM_EXPRESS_HOST_CONTROLLER_PPI to manage Nvme device. Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Signed-off-by: Xiao X Chen <xiao.x.chen@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
committed by
mergify[bot]
parent
31a94f7fba
commit
9ca7ece8b3
@ -37,50 +37,6 @@ EFI_DEVICE_PATH_PROTOCOL mNvmeEndDevicePathNodeTemplate = {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
Returns the 16-bit Length field of a device path node.
|
||||
|
||||
Returns the 16-bit Length field of the device path node specified by Node.
|
||||
Node is not required to be aligned on a 16-bit boundary, so it is recommended
|
||||
that a function such as ReadUnaligned16() be used to extract the contents of
|
||||
the Length field.
|
||||
|
||||
If Node is NULL, then ASSERT().
|
||||
|
||||
@param Node A pointer to a device path node data structure.
|
||||
|
||||
@return The 16-bit Length field of the device path node specified by Node.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
DevicePathNodeLength (
|
||||
IN CONST VOID *Node
|
||||
)
|
||||
{
|
||||
ASSERT (Node != NULL);
|
||||
return ReadUnaligned16 ((UINT16 *)&((EFI_DEVICE_PATH_PROTOCOL *)(Node))->Length[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
Returns a pointer to the next node in a device path.
|
||||
|
||||
If Node is NULL, then ASSERT().
|
||||
|
||||
@param Node A pointer to a device path node data structure.
|
||||
|
||||
@return a pointer to the device path node that follows the device path node
|
||||
specified by Node.
|
||||
|
||||
**/
|
||||
EFI_DEVICE_PATH_PROTOCOL *
|
||||
NextDevicePathNode (
|
||||
IN CONST VOID *Node
|
||||
)
|
||||
{
|
||||
ASSERT (Node != NULL);
|
||||
return (EFI_DEVICE_PATH_PROTOCOL *)((UINT8 *)(Node) + DevicePathNodeLength (Node));
|
||||
}
|
||||
|
||||
/**
|
||||
Get the size of the current device path instance.
|
||||
|
||||
|
Reference in New Issue
Block a user