#include <PiPei.h>\r
\r
#include <IndustryStandard/Nvme.h>\r
+#include <IndustryStandard/Pci.h>\r
\r
#include <Ppi/NvmExpressHostController.h>\r
#include <Ppi/BlockIo.h>\r
#include <Ppi/NvmExpressPassThru.h>\r
#include <Ppi/IoMmu.h>\r
#include <Ppi/EndOfPeiPhase.h>\r
+#include <Ppi/PciDevice.h>\r
\r
#include <Library/DebugLib.h>\r
#include <Library/PeiServicesLib.h>\r
#include <Library/BaseMemoryLib.h>\r
#include <Library/IoLib.h>\r
#include <Library/TimerLib.h>\r
+#include <Library/DevicePathLib.h>\r
\r
//\r
// Structure forward declarations\r
typedef struct _PEI_NVME_NAMESPACE_INFO PEI_NVME_NAMESPACE_INFO;\r
typedef struct _PEI_NVME_CONTROLLER_PRIVATE_DATA PEI_NVME_CONTROLLER_PRIVATE_DATA;\r
\r
+/**\r
+ Macro that checks whether device is a NVMHCI Interface.\r
+\r
+ @param _p Specified device.\r
+\r
+ @retval TRUE Device is a NVMHCI Interface.\r
+ @retval FALSE Device is not a NVMHCI Interface.\r
+\r
+**/\r
+#define IS_PCI_NVMHCI(_p) IS_CLASS3 (_p, PCI_CLASS_MASS_STORAGE, PCI_CLASS_MASS_STORAGE_SOLID_STATE, PCI_IF_MASS_STORAGE_SOLID_STATE_ENTERPRISE_NVMHCI)\r
+\r
#include "NvmExpressPeiHci.h"\r
#include "NvmExpressPeiPassThru.h"\r
#include "NvmExpressPeiBlockIo.h"\r
IN UINTN HcDevicePathLength\r
);\r
\r
+/**\r
+ Callback for EDKII_PCI_DEVICE_PPI installation.\r
+\r
+ @param[in] PeiServices Pointer to PEI Services Table.\r
+ @param[in] NotifyDescriptor Pointer to the descriptor for the Notification\r
+ event that caused this function to execute.\r
+ @param[in] Ppi Pointer to the PPI data associated with this function.\r
+\r
+ @retval EFI_SUCCESS The function completes successfully\r
+ @retval Others Cannot initialize Nvme controller from given PCI_DEVICE_PPI\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+NvmePciDevicePpiInstallationCallback (\r
+ IN EFI_PEI_SERVICES **PeiServices,\r
+ IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,\r
+ IN VOID *Ppi\r
+ );\r
+\r
+/**\r
+ Callback for EDKII_NVM_EXPRESS_HOST_CONTROLLER_PPI installation.\r
+\r
+ @param[in] PeiServices Pointer to PEI Services Table.\r
+ @param[in] NotifyDescriptor Pointer to the descriptor for the Notification\r
+ event that caused this function to execute.\r
+ @param[in] Ppi Pointer to the PPI data associated with this function.\r
+\r
+ @retval EFI_SUCCESS The function completes successfully\r
+ @retval Others Cannot initialize Nvme controller from given EDKII_NVM_EXPRESS_HOST_CONTROLLER_PPI\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+NvmeHostControllerPpiInstallationCallback (\r
+ IN EFI_PEI_SERVICES **PeiServices,\r
+ IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,\r
+ IN VOID *Ppi\r
+ );\r
+\r
#endif\r