]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Ppi/NvmExpressHostController.h
MdeModulePkg/S3SmmInitDone.h: Fix copyright coding style error.
[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
4 This program and the accompanying materials\r
5 are licensed and made available under the terms and conditions of the BSD License\r
6 which accompanies this distribution. The full text of the license may be found at\r
7 http://opensource.org/licenses/bsd-license.php\r
8\r
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
12**/\r
13\r
14#ifndef _EDKII_NVM_EXPRESS_HOST_CONTROLLER_PPI_H_\r
15#define _EDKII_NVM_EXPRESS_HOST_CONTROLLER_PPI_H_\r
16\r
17#include <Protocol/DevicePath.h>\r
18\r
19///\r
20/// Global ID for the EDKII_NVM_EXPRESS_HOST_CONTROLLER_PPI.\r
21///\r
22#define EDKII_NVME_EXPRESS_HOST_CONTROLLER_PPI_GUID \\r
23 { \\r
24 0xcae3aa63, 0x676f, 0x4da3, { 0xbd, 0x50, 0x6c, 0xc5, 0xed, 0xde, 0x9a, 0xad } \\r
25 }\r
26\r
27//\r
28// Forward declaration for the EDKII_NVM_EXPRESS_HOST_CONTROLLER_PPI.\r
29//\r
30typedef struct _EDKII_NVM_EXPRESS_HOST_CONTROLLER_PPI EDKII_NVM_EXPRESS_HOST_CONTROLLER_PPI;\r
31\r
32/**\r
33 Get the MMIO base address of NVM Express host controller.\r
34\r
35 @param[in] This The PPI instance pointer.\r
36 @param[in] ControllerId The ID of the NVM Express host controller.\r
37 @param[out] MmioBar The MMIO base address of the controller.\r
38\r
39 @retval EFI_SUCCESS The operation succeeds.\r
40 @retval EFI_INVALID_PARAMETER The parameters are invalid.\r
41 @retval EFI_NOT_FOUND The specified NVM Express host controller not\r
42 found.\r
43\r
44**/\r
45typedef\r
46EFI_STATUS\r
47(EFIAPI *EDKII_NVM_EXPRESS_HC_GET_MMIO_BAR) (\r
48 IN EDKII_NVM_EXPRESS_HOST_CONTROLLER_PPI *This,\r
49 IN UINT8 ControllerId,\r
50 OUT UINTN *MmioBar\r
51 );\r
52\r
53/**\r
54 Get the device path of NVM Express host controller.\r
55\r
56 @param[in] This The PPI instance pointer.\r
57 @param[in] ControllerId The ID of the NVM Express host controller.\r
58 @param[out] DevicePathLength The length of the device path in bytes specified\r
59 by DevicePath.\r
60 @param[out] DevicePath The device path of NVM Express host controller.\r
61 This field re-uses EFI Device Path Protocol as\r
62 defined by Section 10.2 EFI Device Path Protocol\r
63 of UEFI 2.7 Specification.\r
64\r
65 @retval EFI_SUCCESS The operation succeeds.\r
66 @retval EFI_INVALID_PARAMETER The parameters are invalid.\r
67 @retval EFI_NOT_FOUND The specified NVM Express host controller not\r
68 found.\r
69 @retval EFI_OUT_OF_RESOURCES The operation fails due to lack of resources.\r
70\r
71**/\r
72typedef\r
73EFI_STATUS\r
74(EFIAPI *EDKII_NVM_EXPRESS_HC_GET_DEVICE_PATH) (\r
75 IN EDKII_NVM_EXPRESS_HOST_CONTROLLER_PPI *This,\r
76 IN UINT8 ControllerId,\r
77 OUT UINTN *DevicePathLength,\r
78 OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath\r
79 );\r
80\r
81//\r
82// This PPI contains a set of services to interact with the NVM Express host\r
83// controller.\r
84//\r
85struct _EDKII_NVM_EXPRESS_HOST_CONTROLLER_PPI {\r
86 EDKII_NVM_EXPRESS_HC_GET_MMIO_BAR GetNvmeHcMmioBar;\r
87 EDKII_NVM_EXPRESS_HC_GET_DEVICE_PATH GetNvmeHcDevicePath;\r
88};\r
89\r
90extern EFI_GUID gEdkiiPeiNvmExpressHostControllerPpiGuid;\r
91\r
92#endif\r