]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Ppi/UsbController.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdeModulePkg / Include / Ppi / UsbController.h
CommitLineData
4b1bf81c 1/** @file\r
d1102dba 2 Define APIs to retrieve USB Host Controller Info such as controller type and\r
4b1bf81c 3 I/O Port Base Address.\r
4\r
d1102dba 5Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
4b1bf81c 6\r
9d510e61 7SPDX-License-Identifier: BSD-2-Clause-Patent\r
4b1bf81c 8\r
9**/\r
10\r
11#ifndef _PEI_USB_CONTROLLER_PPI_H_\r
12#define _PEI_USB_CONTROLLER_PPI_H_\r
13\r
14///\r
15/// Global ID for the PEI_USB_CONTROLLER_PPI.\r
16///\r
17#define PEI_USB_CONTROLLER_PPI_GUID \\r
18 { \\r
19 0x3bc1f6de, 0x693e, 0x4547,{ 0xa3, 0x0, 0x21, 0x82, 0x3c, 0xa4, 0x20, 0xb2} \\r
20 }\r
21\r
22///\r
23/// Forward declaration for the PEI_USB_CONTROLLER_PPI.\r
24///\r
25typedef struct _PEI_USB_CONTROLLER_PPI PEI_USB_CONTROLLER_PPI;\r
26\r
27///\r
28/// This bit is used in the ControllerType return parameter of GetUsbController()\r
29/// to identify the USB Host Controller type as UHCI\r
30///\r
1436aea4 31#define PEI_UHCI_CONTROLLER 0x01\r
4b1bf81c 32\r
33///\r
34/// This bit is used in the ControllerType return parameter of GetUsbController()\r
35/// to identify the USB Host Controller type as OHCI\r
36///\r
1436aea4 37#define PEI_OHCI_CONTROLLER 0x02\r
4b1bf81c 38\r
39///\r
40/// This bit is used in the ControllerType return parameter of GetUsbController()\r
41/// to identify the USB Host Controller type as EHCI\r
42///\r
1436aea4 43#define PEI_EHCI_CONTROLLER 0x03\r
4b1bf81c 44\r
d987459f
SZ
45///\r
46/// This bit is used in the ControllerType return parameter of GetUsbController()\r
47/// to identify the USB Host Controller type as XHCI\r
48///\r
1436aea4 49#define PEI_XHCI_CONTROLLER 0x04\r
d987459f 50\r
4b1bf81c 51/**\r
52 Retrieve USB Host Controller Info such as controller type and I/O Base Address.\r
53\r
54 @param[in] PeiServices The pointer to the PEI Services Table.\r
55 @param[in] This The pointer to this instance of the PEI_USB_CONTROLLER_PPI.\r
56 @param[in] ControllerId The ID of the USB controller.\r
57 @param[out] ControllerType On output, returns the type of the USB controller.\r
58 @param[out] BaseAddress On output, returns the base address of UHCI's I/O ports\r
d1102dba 59 if UHCI is enabled or the base address of EHCI's MMIO\r
4b1bf81c 60 if EHCI is enabled.\r
61\r
62 @retval EFI_SUCCESS USB controller attributes were returned successfully.\r
d1102dba 63 @retval EFI_INVALID_PARAMETER ControllerId is greater than the maximum number\r
4b1bf81c 64 of USB controller supported by this platform.\r
65\r
66**/\r
67typedef\r
68EFI_STATUS\r
69(EFIAPI *PEI_GET_USB_CONTROLLER)(\r
70 IN EFI_PEI_SERVICES **PeiServices,\r
71 IN PEI_USB_CONTROLLER_PPI *This,\r
72 IN UINT8 UsbControllerId,\r
73 OUT UINTN *ControllerType,\r
74 OUT UINTN *BaseAddress\r
75 );\r
76\r
77///\r
78/// This PPI contains a single service to retrieve the USB Host Controller type\r
79/// and the base address of the I/O ports used to access the USB Host Controller.\r
80///\r
81struct _PEI_USB_CONTROLLER_PPI {\r
1436aea4 82 PEI_GET_USB_CONTROLLER GetUsbController;\r
4b1bf81c 83};\r
84\r
1436aea4 85extern EFI_GUID gPeiUsbControllerPpiGuid;\r
4b1bf81c 86\r
87#endif\r