]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Ppi/NvmExpressHostController.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Include / Ppi / NvmExpressHostController.h
CommitLineData
508acb5f
HW
1/** @file\r
2\r
3 Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>\r
9d510e61 4 SPDX-License-Identifier: BSD-2-Clause-Patent\r
508acb5f
HW
5\r
6**/\r
7\r
8#ifndef _EDKII_NVM_EXPRESS_HOST_CONTROLLER_PPI_H_\r
9#define _EDKII_NVM_EXPRESS_HOST_CONTROLLER_PPI_H_\r
10\r
11#include <Protocol/DevicePath.h>\r
12\r
13///\r
14/// Global ID for the EDKII_NVM_EXPRESS_HOST_CONTROLLER_PPI.\r
15///\r
16#define EDKII_NVME_EXPRESS_HOST_CONTROLLER_PPI_GUID \\r
17 { \\r
18 0xcae3aa63, 0x676f, 0x4da3, { 0xbd, 0x50, 0x6c, 0xc5, 0xed, 0xde, 0x9a, 0xad } \\r
19 }\r
20\r
21//\r
22// Forward declaration for the EDKII_NVM_EXPRESS_HOST_CONTROLLER_PPI.\r
23//\r
24typedef struct _EDKII_NVM_EXPRESS_HOST_CONTROLLER_PPI EDKII_NVM_EXPRESS_HOST_CONTROLLER_PPI;\r
25\r
26/**\r
27 Get the MMIO base address of NVM Express host controller.\r
28\r
29 @param[in] This The PPI instance pointer.\r
30 @param[in] ControllerId The ID of the NVM Express host controller.\r
31 @param[out] MmioBar The MMIO base address of the controller.\r
32\r
33 @retval EFI_SUCCESS The operation succeeds.\r
34 @retval EFI_INVALID_PARAMETER The parameters are invalid.\r
35 @retval EFI_NOT_FOUND The specified NVM Express host controller not\r
36 found.\r
37\r
38**/\r
39typedef\r
40EFI_STATUS\r
41(EFIAPI *EDKII_NVM_EXPRESS_HC_GET_MMIO_BAR) (\r
42 IN EDKII_NVM_EXPRESS_HOST_CONTROLLER_PPI *This,\r
43 IN UINT8 ControllerId,\r
44 OUT UINTN *MmioBar\r
45 );\r
46\r
47/**\r
48 Get the device path of NVM Express host controller.\r
49\r
50 @param[in] This The PPI instance pointer.\r
51 @param[in] ControllerId The ID of the NVM Express host controller.\r
52 @param[out] DevicePathLength The length of the device path in bytes specified\r
53 by DevicePath.\r
54 @param[out] DevicePath The device path of NVM Express host controller.\r
55 This field re-uses EFI Device Path Protocol as\r
56 defined by Section 10.2 EFI Device Path Protocol\r
57 of UEFI 2.7 Specification.\r
58\r
59 @retval EFI_SUCCESS The operation succeeds.\r
60 @retval EFI_INVALID_PARAMETER The parameters are invalid.\r
61 @retval EFI_NOT_FOUND The specified NVM Express host controller not\r
62 found.\r
63 @retval EFI_OUT_OF_RESOURCES The operation fails due to lack of resources.\r
64\r
65**/\r
66typedef\r
67EFI_STATUS\r
68(EFIAPI *EDKII_NVM_EXPRESS_HC_GET_DEVICE_PATH) (\r
69 IN EDKII_NVM_EXPRESS_HOST_CONTROLLER_PPI *This,\r
70 IN UINT8 ControllerId,\r
71 OUT UINTN *DevicePathLength,\r
72 OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath\r
73 );\r
74\r
75//\r
76// This PPI contains a set of services to interact with the NVM Express host\r
77// controller.\r
78//\r
79struct _EDKII_NVM_EXPRESS_HOST_CONTROLLER_PPI {\r
80 EDKII_NVM_EXPRESS_HC_GET_MMIO_BAR GetNvmeHcMmioBar;\r
81 EDKII_NVM_EXPRESS_HC_GET_DEVICE_PATH GetNvmeHcDevicePath;\r
82};\r
83\r
84extern EFI_GUID gEdkiiPeiNvmExpressHostControllerPpiGuid;\r
85\r
86#endif\r