TianoCore EDK2 master
|
Go to the source code of this file.
Usb Hub Request Support In PEI Phase
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file HubPeim.c.
EFI_STATUS PeiDoHubConfig | ( | IN EFI_PEI_SERVICES ** | PeiServices, |
IN PEI_USB_DEVICE * | PeiUsbDevice | ||
) |
Configure a given hub.
PeiServices | General-purpose services that are available to every PEIM. |
PeiUsbDevice | Indicating the hub controller device that will be configured |
EFI_SUCCESS | Hub configuration is done successfully. |
EFI_DEVICE_ERROR | Cannot configure the hub due to a hardware error. |
EFI_STATUS PeiGetHubDescriptor | ( | IN EFI_PEI_SERVICES ** | PeiServices, |
IN PEI_USB_DEVICE * | PeiUsbDevice, | ||
IN PEI_USB_IO_PPI * | UsbIoPpi, | ||
IN UINTN | DescriptorSize, | ||
OUT EFI_USB_HUB_DESCRIPTOR * | HubDescriptor | ||
) |
Get a given (SuperSpeed) hub descriptor.
PeiServices | General-purpose services that are available to every PEIM. |
PeiUsbDevice | Indicates the hub controller device. |
UsbIoPpi | Indicates the PEI_USB_IO_PPI instance. |
DescriptorSize | The length of Hub Descriptor buffer. |
HubDescriptor | Caller allocated buffer to store the hub descriptor if successfully returned. |
EFI_SUCCESS | Hub descriptor is obtained successfully. |
EFI_DEVICE_ERROR | Cannot get the hub descriptor due to a hardware error. |
Others | Other failure occurs. |
EFI_STATUS PeiHubClearHubFeature | ( | IN EFI_PEI_SERVICES ** | PeiServices, |
IN PEI_USB_IO_PPI * | UsbIoPpi, | ||
IN UINT8 | Value | ||
) |
Clear specified feature on a given hub.
PeiServices | General-purpose services that are available to every PEIM. |
UsbIoPpi | Indicates the PEI_USB_IO_PPI instance. |
Value | Feature value that will be cleared from the hub port. |
EFI_SUCCESS | Hub feature is cleared successfully. |
EFI_DEVICE_ERROR | Cannot clear the hub feature due to a hardware error. |
Others | Other failure occurs. |
EFI_STATUS PeiHubClearPortFeature | ( | IN EFI_PEI_SERVICES ** | PeiServices, |
IN PEI_USB_IO_PPI * | UsbIoPpi, | ||
IN UINT8 | Port, | ||
IN UINT8 | Value | ||
) |
Clear specified feature on a given hub port.
PeiServices | General-purpose services that are available to every PEIM. |
UsbIoPpi | Indicates the PEI_USB_IO_PPI instance. |
Port | Usb hub port number (starting from 1). |
Value | Feature value that will be cleared from the hub port. |
EFI_SUCCESS | Port feature is cleared successfully. |
EFI_DEVICE_ERROR | Cannot clear the port feature due to a hardware error. |
Others | Other failure occurs. |
EFI_STATUS PeiHubGetHubStatus | ( | IN EFI_PEI_SERVICES ** | PeiServices, |
IN PEI_USB_IO_PPI * | UsbIoPpi, | ||
OUT UINT32 * | HubStatus | ||
) |
Get a given hub status.
PeiServices | General-purpose services that are available to every PEIM. |
UsbIoPpi | Indicates the PEI_USB_IO_PPI instance. |
HubStatus | Current Hub status and change status. |
EFI_SUCCESS | Hub status is obtained successfully. |
EFI_DEVICE_ERROR | Cannot get the hub status due to a hardware error. |
Others | Other failure occurs. |
EFI_STATUS PeiHubGetPortStatus | ( | IN EFI_PEI_SERVICES ** | PeiServices, |
IN PEI_USB_IO_PPI * | UsbIoPpi, | ||
IN UINT8 | Port, | ||
OUT UINT32 * | PortStatus | ||
) |
Get a given hub port status.
PeiServices | General-purpose services that are available to every PEIM. |
UsbIoPpi | Indicates the PEI_USB_IO_PPI instance. |
Port | Usb hub port number (starting from 1). |
PortStatus | Current Hub port status and change status. |
EFI_SUCCESS | Port status is obtained successfully. |
EFI_DEVICE_ERROR | Cannot get the port status due to a hardware error. |
Others | Other failure occurs. |
EFI_STATUS PeiHubSetPortFeature | ( | IN EFI_PEI_SERVICES ** | PeiServices, |
IN PEI_USB_IO_PPI * | UsbIoPpi, | ||
IN UINT8 | Port, | ||
IN UINT8 | Value | ||
) |
Set specified feature to a given hub port.
PeiServices | General-purpose services that are available to every PEIM. |
UsbIoPpi | Indicates the PEI_USB_IO_PPI instance. |
Port | Usb hub port number (starting from 1). |
Value | New feature value. |
EFI_SUCCESS | Port feature is set successfully. |
EFI_DEVICE_ERROR | Cannot set the port feature due to a hardware error. |
Others | Other failure occurs. |
VOID PeiResetHubPort | ( | IN EFI_PEI_SERVICES ** | PeiServices, |
IN PEI_USB_IO_PPI * | UsbIoPpi, | ||
IN UINT8 | PortNum | ||
) |
EFI_STATUS PeiUsbHubCtrlSetHubDepth | ( | IN EFI_PEI_SERVICES ** | PeiServices, |
IN PEI_USB_DEVICE * | PeiUsbDevice, | ||
IN PEI_USB_IO_PPI * | UsbIoPpi | ||
) |
USB hub control transfer to set the hub depth.
PeiServices | General-purpose services that are available to every PEIM. |
PeiUsbDevice | Indicates the hub controller device. |
UsbIoPpi | Indicates the PEI_USB_IO_PPI instance. |
EFI_SUCCESS | Depth of the hub is set. |
Others | Failed to set the depth. |
EFI_STATUS PeiUsbHubReadDesc | ( | IN EFI_PEI_SERVICES ** | PeiServices, |
IN PEI_USB_DEVICE * | PeiUsbDevice, | ||
IN PEI_USB_IO_PPI * | UsbIoPpi, | ||
OUT EFI_USB_HUB_DESCRIPTOR * | HubDescriptor | ||
) |
Read the whole usb hub descriptor. It is necessary to do it in two steps because hub descriptor is of variable length.
PeiServices | General-purpose services that are available to every PEIM. |
PeiUsbDevice | Indicates the hub controller device. |
UsbIoPpi | Indicates the PEI_USB_IO_PPI instance. |
HubDescriptor | Caller allocated buffer to store the hub descriptor if successfully returned. |
EFI_SUCCESS | Hub descriptor is obtained successfully. |
EFI_DEVICE_ERROR | Cannot get the hub descriptor due to a hardware error. |
Others | Other failure occurs. |