]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/Ppi/AtaAhciController.h
2bdd53ff36ff40d411f840e2c16a71eb8636fbd6
[mirror_edk2.git] / MdeModulePkg / Include / Ppi / AtaAhciController.h
1 /** @file
2
3 Copyright (c) 2019, 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_ATA_AHCI_HOST_CONTROLLER_PPI_H_
15 #define _EDKII_ATA_AHCI_HOST_CONTROLLER_PPI_H_
16
17 #include <Protocol/DevicePath.h>
18
19 ///
20 /// Global ID for the EDKII_ATA_AHCI_HOST_CONTROLLER_PPI.
21 ///
22 #define EDKII_ATA_AHCI_HOST_CONTROLLER_PPI_GUID \
23 { \
24 0x61dd33ea, 0x421f, 0x4cc0, { 0x89, 0x29, 0xff, 0xee, 0xa9, 0xa1, 0xa2, 0x61 } \
25 }
26
27 //
28 // Forward declaration for the EDKII_ATA_AHCI_HOST_CONTROLLER_PPI.
29 //
30 typedef struct _EDKII_ATA_AHCI_HOST_CONTROLLER_PPI EDKII_ATA_AHCI_HOST_CONTROLLER_PPI;
31
32 /**
33 Get the MMIO base address of ATA AHCI host controller.
34
35 @param[in] This The PPI instance pointer.
36 @param[in] ControllerId The ID of the ATA AHCI 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 ATA AHCI host controller not found.
42
43 **/
44 typedef
45 EFI_STATUS
46 (EFIAPI *EDKII_ATA_AHCI_HC_GET_MMIO_BAR) (
47 IN EDKII_ATA_AHCI_HOST_CONTROLLER_PPI *This,
48 IN UINT8 ControllerId,
49 OUT UINTN *MmioBar
50 );
51
52 /**
53 Get the device path of ATA AHCI host controller.
54
55 @param[in] This The PPI instance pointer.
56 @param[in] ControllerId The ID of the ATA AHCI host controller.
57 @param[out] DevicePathLength The length of the device path in bytes specified
58 by DevicePath.
59 @param[out] DevicePath The device path of ATA AHCI host controller.
60 This field re-uses EFI Device Path Protocol as
61 defined by Section 10.2 EFI Device Path Protocol
62 of UEFI 2.7 Specification.
63
64 @retval EFI_SUCCESS The operation succeeds.
65 @retval EFI_INVALID_PARAMETER The parameters are invalid.
66 @retval EFI_NOT_FOUND The specified ATA AHCI host controller not found.
67 @retval EFI_OUT_OF_RESOURCES The operation fails due to lack of resources.
68
69 **/
70 typedef
71 EFI_STATUS
72 (EFIAPI *EDKII_ATA_AHCI_HC_GET_DEVICE_PATH) (
73 IN EDKII_ATA_AHCI_HOST_CONTROLLER_PPI *This,
74 IN UINT8 ControllerId,
75 OUT UINTN *DevicePathLength,
76 OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
77 );
78
79 //
80 // This PPI contains a set of services to interact with the ATA AHCI host controller.
81 //
82 struct _EDKII_ATA_AHCI_HOST_CONTROLLER_PPI {
83 EDKII_ATA_AHCI_HC_GET_MMIO_BAR GetAhciHcMmioBar;
84 EDKII_ATA_AHCI_HC_GET_DEVICE_PATH GetAhciHcDevicePath;
85 };
86
87 extern EFI_GUID gEdkiiPeiAtaAhciHostControllerPpiGuid;
88
89 #endif