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