3 Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
4 SPDX-License-Identifier: BSD-2-Clause-Patent
8 #ifndef _EDKII_ATA_AHCI_HOST_CONTROLLER_PPI_H_
9 #define _EDKII_ATA_AHCI_HOST_CONTROLLER_PPI_H_
11 #include <Protocol/DevicePath.h>
14 /// Global ID for the EDKII_ATA_AHCI_HOST_CONTROLLER_PPI.
16 #define EDKII_ATA_AHCI_HOST_CONTROLLER_PPI_GUID \
18 0x61dd33ea, 0x421f, 0x4cc0, { 0x89, 0x29, 0xff, 0xee, 0xa9, 0xa1, 0xa2, 0x61 } \
22 // Forward declaration for the EDKII_ATA_AHCI_HOST_CONTROLLER_PPI.
24 typedef struct _EDKII_ATA_AHCI_HOST_CONTROLLER_PPI EDKII_ATA_AHCI_HOST_CONTROLLER_PPI
;
27 Get the MMIO base address of ATA AHCI host controller.
29 @param[in] This The PPI instance pointer.
30 @param[in] ControllerId The ID of the ATA AHCI host controller.
31 @param[out] MmioBar The MMIO base address of the controller.
33 @retval EFI_SUCCESS The operation succeeds.
34 @retval EFI_INVALID_PARAMETER The parameters are invalid.
35 @retval EFI_NOT_FOUND The specified ATA AHCI host controller not found.
40 (EFIAPI
*EDKII_ATA_AHCI_HC_GET_MMIO_BAR
) (
41 IN EDKII_ATA_AHCI_HOST_CONTROLLER_PPI
*This
,
42 IN UINT8 ControllerId
,
47 Get the device path of ATA AHCI host controller.
49 @param[in] This The PPI instance pointer.
50 @param[in] ControllerId The ID of the ATA AHCI host controller.
51 @param[out] DevicePathLength The length of the device path in bytes specified
53 @param[out] DevicePath The device path of ATA AHCI host controller.
54 This field re-uses EFI Device Path Protocol as
55 defined by Section 10.2 EFI Device Path Protocol
56 of UEFI 2.7 Specification.
58 @retval EFI_SUCCESS The operation succeeds.
59 @retval EFI_INVALID_PARAMETER The parameters are invalid.
60 @retval EFI_NOT_FOUND The specified ATA AHCI host controller not found.
61 @retval EFI_OUT_OF_RESOURCES The operation fails due to lack of resources.
66 (EFIAPI
*EDKII_ATA_AHCI_HC_GET_DEVICE_PATH
) (
67 IN EDKII_ATA_AHCI_HOST_CONTROLLER_PPI
*This
,
68 IN UINT8 ControllerId
,
69 OUT UINTN
*DevicePathLength
,
70 OUT EFI_DEVICE_PATH_PROTOCOL
**DevicePath
74 // This PPI contains a set of services to interact with the ATA AHCI host controller.
76 struct _EDKII_ATA_AHCI_HOST_CONTROLLER_PPI
{
77 EDKII_ATA_AHCI_HC_GET_MMIO_BAR GetAhciHcMmioBar
;
78 EDKII_ATA_AHCI_HC_GET_DEVICE_PATH GetAhciHcDevicePath
;
81 extern EFI_GUID gEdkiiPeiAtaAhciHostControllerPpiGuid
;