]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Ppi/AtaAhciController.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdeModulePkg / Include / Ppi / AtaAhciController.h
CommitLineData
af2cf989
HW
1/** @file\r
2\r
3 Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>\r
9d510e61 4 SPDX-License-Identifier: BSD-2-Clause-Patent\r
af2cf989
HW
5\r
6**/\r
7\r
8#ifndef _EDKII_ATA_AHCI_HOST_CONTROLLER_PPI_H_\r
9#define _EDKII_ATA_AHCI_HOST_CONTROLLER_PPI_H_\r
10\r
11#include <Protocol/DevicePath.h>\r
12\r
13///\r
14/// Global ID for the EDKII_ATA_AHCI_HOST_CONTROLLER_PPI.\r
15///\r
16#define EDKII_ATA_AHCI_HOST_CONTROLLER_PPI_GUID \\r
17 { \\r
18 0x61dd33ea, 0x421f, 0x4cc0, { 0x89, 0x29, 0xff, 0xee, 0xa9, 0xa1, 0xa2, 0x61 } \\r
19 }\r
20\r
21//\r
22// Forward declaration for the EDKII_ATA_AHCI_HOST_CONTROLLER_PPI.\r
23//\r
1436aea4 24typedef struct _EDKII_ATA_AHCI_HOST_CONTROLLER_PPI EDKII_ATA_AHCI_HOST_CONTROLLER_PPI;\r
af2cf989
HW
25\r
26/**\r
27 Get the MMIO base address of ATA AHCI host controller.\r
28\r
29 @param[in] This The PPI instance pointer.\r
30 @param[in] ControllerId The ID of the ATA AHCI 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 ATA AHCI host controller not found.\r
36\r
37**/\r
38typedef\r
39EFI_STATUS\r
1436aea4 40(EFIAPI *EDKII_ATA_AHCI_HC_GET_MMIO_BAR)(\r
af2cf989
HW
41 IN EDKII_ATA_AHCI_HOST_CONTROLLER_PPI *This,\r
42 IN UINT8 ControllerId,\r
43 OUT UINTN *MmioBar\r
44 );\r
45\r
46/**\r
47 Get the device path of ATA AHCI host controller.\r
48\r
49 @param[in] This The PPI instance pointer.\r
50 @param[in] ControllerId The ID of the ATA AHCI host controller.\r
51 @param[out] DevicePathLength The length of the device path in bytes specified\r
52 by DevicePath.\r
53 @param[out] DevicePath The device path of ATA AHCI host controller.\r
54 This field re-uses EFI Device Path Protocol as\r
55 defined by Section 10.2 EFI Device Path Protocol\r
56 of UEFI 2.7 Specification.\r
57\r
58 @retval EFI_SUCCESS The operation succeeds.\r
59 @retval EFI_INVALID_PARAMETER The parameters are invalid.\r
60 @retval EFI_NOT_FOUND The specified ATA AHCI host controller not found.\r
61 @retval EFI_OUT_OF_RESOURCES The operation fails due to lack of resources.\r
62\r
63**/\r
64typedef\r
65EFI_STATUS\r
1436aea4 66(EFIAPI *EDKII_ATA_AHCI_HC_GET_DEVICE_PATH)(\r
af2cf989
HW
67 IN EDKII_ATA_AHCI_HOST_CONTROLLER_PPI *This,\r
68 IN UINT8 ControllerId,\r
69 OUT UINTN *DevicePathLength,\r
70 OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath\r
71 );\r
72\r
73//\r
74// This PPI contains a set of services to interact with the ATA AHCI host controller.\r
75//\r
76struct _EDKII_ATA_AHCI_HOST_CONTROLLER_PPI {\r
77 EDKII_ATA_AHCI_HC_GET_MMIO_BAR GetAhciHcMmioBar;\r
78 EDKII_ATA_AHCI_HC_GET_DEVICE_PATH GetAhciHcDevicePath;\r
79};\r
80\r
1436aea4 81extern EFI_GUID gEdkiiPeiAtaAhciHostControllerPpiGuid;\r
af2cf989
HW
82\r
83#endif\r