American Megatrends, Inc.

USB

Copyright

Release Notes

© American Megatrends, Inc.


Copyright

American Megatrends, Inc.
5555 Oakbrook Parkway
Suite 200
Norcross, GA 30093 (USA)

Copyright (c) 1999-2016 American Megatrends, Inc. All Rights Reserved.

This publication contains proprietary information, which is protected by copyright. No part of this publication may be reproduced, transcribed, stored in a retrieval system, translated into any language or computer language, or transmitted in any form whatsoever without the prior written consent of the publisher, American Megatrends, Inc.

American Megatrends, Inc. retains the right to update, change, modify this publication at any time, without notice.

For Additional Information

Call American Megatrends BIOS Sales Department at 1-800-828-9264 for additional information.

Limitations of Liability

In no event shall American Megatrends be held liable for any loss, expenses, or damages of any kind whatsoever, whether direct, indirect, incidental, or consequential, arising from the design or use of this product or the support materials provided with the product.

Limited Warranty

No warranties are made, either expressed or implied, with regard to the contents of this work, its merchantability, or fitness for a particular use. American Megatrends assumes no responsibility for errors and omissions or for the uses made of the material contained herein or reader decisions based on such use.

Trademark and Copyright Acknowledgments

All product names used in this publication are for identification purposes only and are trademarks of their respective Companies.


Release Notes - NDA Required

Component Information:
Component Title: USB
Component Reference Name: USB
Component Type: eModule
Release Date: 2016-10-28
Source Control Label: 4.6.5.1_USB_08.10.36
Source Control Location: SS: Alaska;$/Alaska:/Source/Modules/USB/Alaska;
Dependencies
Component Dependencies
AmiBufferValidationLib
Dependent Component Title: AmiBufferValidationLib
Dependent Component Reference Name: AmiBufferValidationLib
Dependent Source Control Label: AmiBufferValidationLib_01
Dependent Source Control Location: Path:$/Alaska/SOURCE/Modules/AmiBufferValidationLib;

File Dependencies
N0NE

Protocol Dependencies
ONE
Dependent Protocol Name: SmmBaseProtocol
Dependent Protocol GUID: EFI_SMM_BASE_PROTOCOL_GUID
TWO
Dependent Protocol Name: LegacyBiosProtocol
Dependent Protocol GUID: EFI_LEGACY_BIOS_PROTOCOL_GUID
Non-Compiled BIN and LIB File(s) within this Component:

UI13.bin
Component Title: USB
Component Reference Name: USB
Component Source Control Label: CSM16_USB_03
Component Source Control Location: SS: ALASKA;$/Alaska/CSM16/USB;
Project Source Control Label: 8.00.10.00.0x.77
Project Source Control Location: SS: ALASKA;$/Alaska/CSM16/Complete Project/Furball10.64K/Furball10.veb;
Component Description:
This component, termed as "USB" is designed to provide support for:
UHCI, OHCI, EHCI, and XHCI controllers, and USB devices
Filename | Description
Main Component | Root\Board\em\usb
amiusb.cif | Component information file for the eModule.
Usb.sdl | BIOS build parameters for USB component.
UsbPort.c | Porting Specific functions implementation.
Usb.chm | Contains module description and release note of USB component.
UsbRt ModulePart | Root\Core\em\usb\rt – Runtime functions.
UsbRt.cif | Component information file of USB runtime module part
AmiUsb.c | AMI USB API Implementation functions.
Guids.c | AMI USB guids library.
Debug.c | AMI USB Debug output implementation routines.
Elib.c | AMI USB MEM/IO/PCI access routines.
SysKbc.c | KBC related functions for platform with HW KBC.
SysNoKbc.c | KBC related functions for platform without HW KBC.
Usb.c | AMI USB main wrapper.
UsbHub.c | Runtime functions for USB hub support.
UsbMass.c | Runtime functions for USB mass storage device support.
UsbMass.h | Definitions for USB mass storage device support.
UsbHid.c | Runtime functions for USB HID device support.
UsbMs.c | Runtime functions for USB mice support.
UsbPoint.c | Runtime functions for USB pointer device support.
UsbKbd.c | Runtime functions for USB keyboard support.
UsbKbd.h | Definitions for USB keyboard support.
UsbCcid.c | Runtime functions for USB CCID device support.
Uhci.c | USB 1.1 host UHCI specific functions.
Uhci.h | Definitions for UHCI host functions.
Ohci.c | USB 1.1 host OHCI specific functions.
Ohci.h | Definitions for OHCI host functions.
Ehci.c | USB 2.0 host EHCI specific functions.
Ehci.h | Definitions for EHCI host functions.
Xhci.c | USB 3.0 & 3.1 host XHCI specific functions
Xhci.h | Definitions for XHCI host functions.
UHCD ModulePart | Root\Core\em\usb – USB functions in UEFI environment.
Uhcd.cif | Component information file of UHCD module part.
Uhcd.c | AMI USB host controller driver.
AmiUsbHc.c | AMI USB HC protocol wrapper.
UsbBus.c | Source code of USB bus driver.
UsbBus.h | Definitions of USB bus driver.
UsbMisc.c | Miscellaneous functions for USB component.
Tree.c | USB device tree manipulation functions.
Tree.h | Definitions of USB device tree function.
UsbSrc.sdl | BIOS build parameters and elinks for USB component.
EfiUsbHid.c | EFI driver for USB HID device support.
EfiUsbKb.c | EFI driver for USB keyboard support.
EfiUsbKb.h | Definitions for EFI driver of USB keyboard.
EfiUsbMass.c | EFI Driver for USB mass storage devices support.
EfiUsbMs.c | EFI Driver for USB mice support.
EfiUsbPoint.c | EFI Driver for USB pointer support.
EfiUsbCcid.c | EFI Driver for USB CCID device support.
ComponentName.c | Contains EFI component name for EFI standard.
ComponentName.h | Definitions for EFI component name.
Framework ModulePart | Root\Core\em\usb - UEFI Framework.
Framework.cif | Component information file of framework module part.
Uhcd.mak | Makefile for UHCD module part.
Uhcd.h | AMI USB host controller driver header file.
Usbdef.h | AMI USB driver definitions.
Amidef.h | AMI USB driver framework specific definitions.
Uhcd.dxs | Dependency file for UHCD driver.
AmiUsb.dxs | Dependency file for AMI USB wrapper driver.
Usbrt.mak | Makefile for USB runtime component.
AmiUsb.h | AMI USB driver definitions.
AmiUsbRtCcid.h | AMI USB CCID runtime driver definitions.
AmiUsbProtocols ModulePart | Root\Include\Protocol - USB Protocols definitions.
AmiUsbProtocols.cif | Component information file of AMI USB protocols module part.
AmiUsbController.h | Definitions of AMI specific USB protocol.
UsbIo.h | EFI USB IO protocol definitions.
UsbHc.h | USB HC protocol definitions.
UsbPolicy.h | USB policy definitions.
Emul6064Trap.h | Definitions of KBC emulation functions.
Emul6064KbdInput.h | Definitions of keyboard support of KBC emulation functions.
Emul6064MsInput.h | Definitions of mouse support of KBC emulation functions.
AmiUsbCcid.h | AMI USB CCID protocol definitions
UsbSetup ModulePart | Root\Core\em\usb\setup - Setup items and functions.
UsbSetup.cif | Component information file of USB setup module part.
Usb.uni | Unicode strings of USB component.
Usb.sd | Setup definitions of USB component.
UsbSetup.c | Setup functions of USB component.
UsbLegacy ModulePart | Root\Core\em\usb – Contains module parts for legacy support.
UsbLegacy.cif | Component information file of USB legacy module part.
Usb Int13 ModulePart | Root\Core\em\usb\int13 - Usb Int13 driver.
UsbInt13.cif | Component information file of USB Int13 module part.
UsbInt13.sdl | BIOS build parameters of USB Int13 module part.
UsbInt13.mak | Makefile of Usb Int13 module part.
UsbInt13.inf | Description file for inject USB int13 binary to BIOS ROM image.
UsbBbs.c | Functions for BBS table of USB mass storage devices.
UsbInt13.c | Functions for USB Int13 functions installation.
UsbInt13.h | Definitions for USB Int13 functions installation.
UsbInt13ComponentName.c | Component Name Protocol Member Functions for USB Int13.
UsbInt13.dxs | Dependency file for USB int13.
USB INT13 16-bit Binary ModulePart | Root\Addon - USB Int13 service binary image.
UsbI13bin.cif | Component information file of USB Int13 binary module part.
Ui13.bin | Int13 functions for USB module.
SouthBridge - Template ModulePart | Root\Chipset\sb\usb – Template for SB specific changes.
UsbSb.cif | Component information file of SB component.
UsbSb.c | Contain South bridge specific changes for USB.
AmiUsbLib ModulePart | Root\Core\EM\usb\AmiUsbLib – AmiUsb library.
AmiUsbLib.cif | Component information file of AmiUsbLib module part.
AmiUsbLibInclude ModulePart | Root\Include
AmiUsbLibInclude.cif | Component information file of AmiUsbLibInclude module part.
AmiUsbGlobalDataValidationLib.h | The AmiUsbGlobalDataValidationLib definitions.
AmiUsbGlobalDataValidationLib ModulePart | Root\Core\EM\usb\AmiUsbLib
AmiUsbGlobalDataValidationLib.cif | Component information file of AmiUsbGlobalDataValidationLib ModulePart.
AmiUsbGlobalDataValidationLib.c | AmiUsbGlobalDataValidationLib functions.
AmiUsbGlobalDataValidationLib.mak | Makefile of AmiUsbGlobalDataValidationLib ModulePart.
Crc32.c | CalculateCrc32 functions.
Non-Compiled BIN and LIB File(s) in Flavor:
N0NE
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_41, Dated: 2013-03-19
Visual eBios: RSS.5.73.0244, Dated: 2013-03-19
Compiler Tool(s): Microsoft Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
NONE
General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
Fixed Cppcheck error.
Fixed build error if USB_RUNTIME_DRIVER_IN_SMM is 0.

EIP Addressed
EIP #284071 - Clear USBDataPt from EFI_USB_PROTOCOL at the readytoboot event.
EIP #288158 - Check if gUsbData is integrity.
EIP #297268 - Update Media information only in EfiUsbMass driver when Media is changed.
EIP #300142 - Remove USB Int1C module part because we use the other method to service xhci.
Files Changed for General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
core/em/usb/rt/usb.c
core/em/usb/rt/xhci.c

EIP Addressed
board/em/usb/usbport.c (EIP #300142)
core/em/usb/rt/amiusb.c (EIP #288158)
core/em/usb/rt/ehci.c (EIP #288158)
core/em/usb/rt/elib.c (EIP #288158)
core/em/usb/rt/ohci.c (EIP #288158)
core/em/usb/rt/syskbc.c (EIP #288158)
core/em/usb/rt/uhci.c (EIP #288158)
core/em/usb/rt/usb.c (EIP #288158)
core/em/usb/rt/usbCCID.c (EIP #288158)
core/em/usb/rt/usbhid.c (EIP #288158)
core/em/usb/rt/usbhub.c (EIP #288158)
core/em/usb/rt/usbkbd.c (EIP #288158)
core/em/usb/rt/usbmass.c (EIP #288158) (EIP #297268)
core/em/usb/rt/usbms.c (EIP #288158) (EIP #297268)
core/em/usb/rt/xhci.c (EIP #288158)
core/em/usb/amiusbhc.c (EIP #288158) (EIP300142)
core/em/usb/efiusbccid.c (EIP #288158)
core/em/usb/efiusbmass.c (EIP #288158) (EIP #297268)
core/em/usb/efiusbms.c (EIP #254309)
core/em/usb/uhcd.c (EIP #288158) (EIP #284071)
core/em/usb/usbmisc.c (EIP #288158)
core/em/usb/rt/amidef.h (EIP #300142)
core/em/usb/rt/amiusb.h (EIP #288158)
core/em/usb/uhcd.h (EIP #284071)
core/em/usb/rt/usbdef.h (EIP #288158)
core/em/usb/rt/usbrt.mak (EIP #288158)
Include/Protocol/AmiUsbController.h (EIP #288158)
core/em/usb/UsbLegacy.cif (EIP #300142)
chipset/sb/usb/usbsb.c (EIP #288158)
core/em/usb/AmiUsbLib/AmiUsbLib.cif (EIP #288158)
core/em/usb/AmiUsbLib/AmiUsbLib.sdl (EIP #288158)
core/Include/AmiUsbLibInclude.cif (EIP #288158)
core/Include/AmiUsbSmmGlobalDataValidationLib.h (EIP #288158)
core/em/usb/AmiUsbLib/AmiUsbSmmGlobalDataValidationLib.cif (EIP #288158)
core/em/usb/AmiUsbLib/AmiUsbSmmGlobalDataValidationLib.c (EIP #288158)
core/em/usb/AmiUsbLib/AmiUsbSmmGlobalDataValidationLib.mak (EIP #288158)
core/em/usb/AmiUsbLib/Crc32.c (EIP #288158)
Known Limitations and Erratas in this label:
NONE
Remaining Issues:
NONE
Unit Testing:
Test1: USB Device Function.
1. Connect USB devices (Keyboard, Mice and Mass Storage) to SUT.
2. Power on SUT
3. Enter BIOS setup or boot to DOS, Shell or Win8.1.
4. Ensure USB device behaviors well.
Test2: USB Device Hotpluggability.
1. Power on system with target USB devices (Keyboard, Mice and Mass Storage) are connected.
2. Power on SUT
3. Enter BIOS setup or boot to DOS, Shell or Win8.1
4. Remove USB devices
5. Insert USB devices
6. Ensure USB device behaviors well.
7. Repeat steps #4, #5, #6 five times.
Validation Testing:
The test report will provide upon request.
Release History:
4.6.3_USB_08.10.35 Release Notes
4.6.3_USB_08.10.34 Release Notes
4.6.3_USB_08.10.33 Release Notes
4.6.3_USB_08.10.32 Release Notes
4.6.3_USB_08.10.31 Release Notes
4.6.3_USB_08.10.30 Release Notes
4.6.3_USB_08.10.29 Release Notes
4.6.3_USB_08.10.28 Release Notes
4.6.3_USB_08.10.27 Release Notes
4.6.3_USB_08.10.26 Release Notes
4.6.3_USB_08.10.24 Release Notes

© American Megatrends Inc.


Function by File Name

AMIBIOS Function Reference

By File Name

The following is a list of the source files.
For a list in alphabetical order, see In Alphabetical Order.

  • amidef.h
  • amiusb.c
  • amiusb.h
  • AmiUsbCCID.h
  • AmiUsbController.h
  • amiusbhc.c
  • amiusbrtCCID.h
  • AmiUsbSmmGlobalDataValidationLib.c
  • AmiUsbSmmGlobalDataValidationLib.h
  • AmiUsbSmmGlobalDataValidationLib.mak
  • componentname.c
  • componentname.h
  • debug.c
  • efiusbccid.c
  • efiusbhid.c
  • efiusbkb.c
  • efiusbkb.h
  • efiusbmass.c
  • efiusbms.c
  • efiusbpoint.c
  • ehci.c
  • ehci.h
  • elib.c
  • Emul6064KbdInput.h
  • Emul6064MsInput.h
  • Emul6064Trap.h
  • guids.c
  • ohci.c
  • ohci.h
  • syskbc.c
  • sysnokbc.c
  • tree.c
  • tree.h
  • uhcd.c
  • uhcd.h
  • uhcd.mak
  • uhci.c
  • uhci.h
  • usb.c
  • usb.sd
  • UsbBbs.c
  • usbbus.c
  • usbbus.h
  • usbCCID.c
  • usbdef.h
  • usbhid.c
  • usbhub.c
  • UsbInt13.c
  • UsbInt13.h
  • UsbInt13ComponentName.c
  • UsbIo.h
  • usbkbd.c
  • usbkbd.h
  • usbmass.c
  • UsbMass.h
  • usbmisc.c
  • usbms.c
  • usbpoint.c
  • UsbPolicy.h
  • usbport.c
  • usbrt.mak
  • usbsb.c
  • usbsetup.c
  • xhci.c
  • xhci.h
Built on 16:12:02 10/28/16


amidef.h

Description:
AMI USB driver definitions, framework specific
Built on 16:12:01 10/28/16


amiusb.c

Description:
AMI USB API implementation. The following code will be
   copied to SMM; only RT functions can be used. gUsbData
   is obtained from AMIUHCD in the entry point and can be
   used afterwards.

The following functions are used in the file: amiusb.c.

Function | Description
Emul6064TrapCallback | Update the KbcEmul feature when the Emul6064Trap Protocol becomes available.
InitializeUsbGlobalData | This function initializes the USB global data.
InSmmFunction | SMM entry point of AMIUSB driver
InstallUsbProtocols | This function initializes the USB global data.
MemCopy | This routine copies data from source to destination.
MemFill | This routine fills the given memory range with the given value.
USB_StartLegacy | This function is part of the USB BIOS API. This function init USB legacy support.
USB_StopLegacy | This function is part of the USB BIOS API. This function init USB legacy support.
USB_StopUnsupportedHc | This routine is called, from host controllers that supports OS handover functionality, when OS wants the BIOS to hand-over the host controllers to the OS. This routine will stop HC that does not support this functionality.
USBAPI_ChangeOwner | This function is part of the USB BIOS API. This function updates the global variables according to the new owner
USBAPI_CheckDevicePresence | This routine checks whether a particular type of USB device is installed in the system or not.
USBAPI_CheckPresence | This routine services the USB API function number 0. It reports the USB BIOS presence, its version number and its current status information
USBAPI_Core_Proc | Bridge to a number of procedures supplied by Core proc table
USBAPI_DisableInterrupts | This routine stops the USB host controllers interrupts
USBAPI_EnableInterrupts | This routine re-enable the USB host controller interrupts
USBAPI_ExtDriverRequest |
USBAPI_GetDeviceAddress |
USBAPI_GetDeviceInfo | This routine returns the information regarding a USB device like keyboard, mouse, floppy drive etc
USBAPI_HC_Proc | Bridge to a number of procedures supplied by HC driver
USBAPI_HcStartStop | This function is part of the USB BIOS API. This function starts/stops the USB host controller.
USBAPI_invoke_in_frame | Invokes procedure passing parameters supplied in the buffer It replicates the stack frame so that target procedure can see the parameters passed to the stub.
USBAPI_KbcAccessControl | This function is part of the USB BIOS API. This function is used to control whether KBC access in USB module should be blocked or not.
USBAPI_LegacyControl | This function is part of the USB BIOS API. This function is used to shutdown/init USB legacy support.
USBAPI_LightenKeyboardLEDs | This function is part of the USB BIOS API. This function controls LED state on the connected USB keyboards
USBAPI_MassDeviceRequest | This routine services the USB API function number 27h. It handles all the mass storage related calls from the higher layer. Different sub-functions are invoked depending on the sub-function number
USBAPI_MoveDataArea | This routine stops the USB host controllers and moves the data area used by host controllers to a new area. The host controller is started from the new place.
USBAPI_PowerManageUSB | This routine suspends the USB host controllers
USBAPI_PrepareForOS | This routine updates data structures to reflect that POST is completed
USBAPI_SecureInterface | This routine handles the calls related to security device
USBAPI_Start | This API routine configures the USB host controllers and enumerate the devices
USBAPI_Stop | This routine stops the USB host controllers
USBAPI_UsbStopController | This function is part of the USB BIOS API. This function stops the USB host controller.
UsbApiHandler |
USBDriverEntryPoint | USB Driver entry point
UsbHwSmiHandler | USB Hardware SMI handler.
USBInstallHwSmiHandler | This function registers USB hardware SMI callback function.
USBMassAPIAssignDriveNumber | This function is part of the USB BIOS MASS API. This function assigns the logical drive device according to the information of the mass storage device
USBMassAPICheckDevStatus | This function is part of the USB BIOS MASS API. This function invokes USB Mass Storage API handler to check whether device is ready. If called for the first time, this function retrieves the mass storage device geometry and fills the corresponding fpDevInfo fields.
USBMassAPICommandPassThru | This function is part of the USB BIOS MASS API. This function can be used to pass raw command/data sequence to the USB mass storage device
USBMassAPIFormatDevice | This function is part of the USB BIOS MASS API.
USBMassAPIGetDeviceGeometry | This function is part of the USB BIOS MASS API.
USBMassAPIGetDeviceInformation | This function is part of the USB BIOS MASS API. This function returns the device information of the mass storage device
USBMassAPIGetDevStatus | This function returns the drive status and media presence status
USBMassAPIReadDevice | This function is part of the USB BIOS MASS API.
USBMassAPIResetDevice | This function is part of the USB BIOS MASS API.
USBMassAPIVerifyDevice | This function is part of the USB BIOS MASS API.
USBMassAPIWriteDevice | This function is part of the USB BIOS MASS API.
UsbPowerButtonSmiCallback | This function enter s5 callback if press power button.
UsbS5SmiCallback | This function enter usb s5 callback.
USBSWSMIHandler | Invoked on reads from SW SMI port with value USB_SWSMI. This function dispatches the USB Request Packets (URP) to the appropriate functions.
USBWrap_GetDeviceCount | This routine searches through the device entry table and returns number of active USB devices configured by the BIOS.
USBWrap_GetnthDeviceInfoStructure | This routine finds the 'n'th device's DeviceInfo entry.
USBWrapGetATAError | This routine converts the sense data information into ATAPI error code
xhciHWSMIHandler | USB Hardware SMI handler.

The following tables are used in the file: amiusb.c.

Table | Description
aUsbApiTable | This is the table of functions used by USB API
USBMassAPITable | This is the table of functions used by USB Mass Storage API


aUsbApiTable in the amiusb.c

Table : aUsbApiTable

File: amiusb.c
Description:
This is the table of functions used by USB API
Notes:
This functions are invoked via software SMI
Built on 16:12:00 10/28/16


Emul6064TrapCallback in the amiusb.c

Function : Emul6064TrapCallback

File: amiusb.c
Description:
Update the KbcEmul feature when the Emul6064Trap Protocol becomes available.
Built on 16:12:00 10/28/16


InitializeUsbGlobalData in the amiusb.c

Function : InitializeUsbGlobalData

File: amiusb.c
Description:
This function initializes the USB global data.


InSmmFunction in the amiusb.c

Function : InSmmFunction

File: amiusb.c
Description:
SMM entry point of AMIUSB driver


InstallUsbProtocols in the amiusb.c

Function : InstallUsbProtocols

File: amiusb.c
Description:
This function initializes the USB global data.


MemCopy in the amiusb.c

Function : MemCopy

File: amiusb.c
Description:
This routine copies data from source to destination.
Input:
fpSrc    - Pointer to the source.
fpDest   - Pointer to the destination.
wSize    - Number of bytes to copy.
Output:
None


MemFill in the amiusb.c

Function : MemFill

File: amiusb.c
Description:
This routine fills the given memory range with the given value.
Input:
fpPtr    - Pointer to the memory region to fill.
wSize    - Size in bytes of the area to be filled.
Value    - Byte value to fill the given range with.
Output:
None


USB_StartLegacy in the amiusb.c

Function : USB_StartLegacy

File: amiusb.c
Description:
This function is part of the USB BIOS API. This function init USB
legacy support.
Input:
fpURP   Pointer to the URP structure
Output:
None
Notes:


USB_StopLegacy in the amiusb.c

Function : USB_StopLegacy

File: amiusb.c
Description:
This function is part of the USB BIOS API. This function init USB
legacy support.
Input:
fpURP   Pointer to the URP structure
Output:
None
Notes:


USB_StopUnsupportedHc in the amiusb.c

Function : USB_StopUnsupportedHc

File: amiusb.c
Description:
This routine is called, from host controllers that supports
        OS handover functionality, when OS wants the BIOS to hand-over
        the host controllers to the OS.  This routine will stop HC that
        does not support this functionality.
Input:
None
Output:
None
Notes:


USBAPI_ChangeOwner in the amiusb.c

Function : USBAPI_ChangeOwner

File: amiusb.c
Description:
This function is part of the USB BIOS API. This function
updates the global variables according to the new owner
Input:
fpURP   Pointer to the URP structure
Output:
Return code USB_ERROR - Failure, USB_SUCCESS - Success
Notes:
It is a caller responsibility to release the keyboard only if it
was previously acquired.


USBAPI_CheckDevicePresence in the amiusb.c

Function : USBAPI_CheckDevicePresence

File: amiusb.c
Description:
This routine checks whether a particular type of USB device
is installed in the system or not.
Input:
fpURPPointer            URP structure with input parameters
ChkDevPrsnc.bDevType    Device type to find
ChkDevPrsnc.fpHCStruc   Pointer to HC being checked for device
connection; if NULL then the total number of devices
connected to ANY controller is returned.
ChkDevPrsnc.bNumber     Number of devices connected
Output:
bRetValue will be one of the following value
USB_SUCCESS     if device type present, ChkDevPrsnc.bNumber <> 0
USB_ERROR       if device type absent, ChkDevPrsnc.bNumber returns 0


USBAPI_CheckPresence in the amiusb.c

Function : USBAPI_CheckPresence

File: amiusb.c
Description:
This routine services the USB API function number 0.  It
reports the USB BIOS presence, its version number and
its current status information
Input:
fpURPPointer - Pointer to the URP structure
Output:
URP structure is updated with the following information
CkPresence.wBiosRev       USB BIOS revision (0210h means r2.10)
CkPresence.bBiosActive    0 - if USB BIOS is not running
CkPresence.bNumBootDev    Number of USB boot devices found
CkPresence.bNumHC         Number of host controller present
CkPresence.bNumPorts      Number of root hub ports
CkPresence.dUsbDataArea   Current USB data area


USBAPI_Core_Proc in the amiusb.c

Function : USBAPI_Core_Proc

File: amiusb.c
Description:
Bridge to a number of procedures supplied by Core proc table
Input:
fpURP   Pointer to the URP structure
Output:
Return code USB_ERROR - Failure, USB_SUCCESS - Success
Notes:
Assumes that buffer has a correct image of the stack that
corresponding function reads argument from
Size of the buffer can be biger than actually used.

Following code copies the buffer (some stack frame) into new
stack frame such that invoked proc can read parametes
supplied by buffer


USBAPI_DisableInterrupts in the amiusb.c

Function : USBAPI_DisableInterrupts

File: amiusb.c
Description:
This routine stops the USB host controllers interrupts
Input:
fpURPPointer    Pointer to the URP structure
Output:
bRetValue   USB_SUCCESS on success
USB_ERROR on error (Like data area not found)


USBAPI_EnableInterrupts in the amiusb.c

Function : USBAPI_EnableInterrupts

File: amiusb.c
Description:
This routine re-enable the USB host controller interrupts
Input:
fpURPPointer    Pointer to the URP structure
Output:
bRetValue   USB_SUCCESS on success
USB_ERROR on error (Like data area not found)


USBAPI_ExtDriverRequest in the amiusb.c

Function : USBAPI_ExtDriverRequest

File: amiusb.c
Description:
Input:
Output:


USBAPI_GetDeviceAddress in the amiusb.c

Function : USBAPI_GetDeviceAddress

File: amiusb.c
Description:
Input:
Output:


USBAPI_GetDeviceInfo in the amiusb.c

Function : USBAPI_GetDeviceInfo

File: amiusb.c
Description:
This routine returns the information regarding
a USB device like keyboard, mouse, floppy drive etc
Input:
fpURPPointer            URP structure with input parameters
GetDevInfo.bDevNumber   Device number (1-based) whose
   information is requested
Output:
URP structure is updated with the following information
GetDevInfo.bHCNumber - HC number in which the device is found
GetDevInfo.bDevType  - Type of the device
bRetValue will be one of the following value
USB_SUCCESS         on successfull completion
USB_PARAMETER_ERROR if bDevNumber is invalid
USB_ERROR           on error


USBAPI_HC_Proc in the amiusb.c

Function : USBAPI_HC_Proc

File: amiusb.c
Description:
Bridge to a number of procedures supplied by HC driver
Input:
fpURP   Pointer to the URP structure
Output:
Return code USB_ERROR - Failure, USB_SUCCESS - Success)
Notes:
Assumes that buffer has a correct image of the stack that
corresponding function reads argument from
Size of the buffer can be biger than actually used.

Following code copies the buffer (some stack frame) into new
stack frame such that invoked dirver proc can read parametes
supplied by buffer


USBAPI_HcStartStop in the amiusb.c

Function : USBAPI_HcStartStop

File: amiusb.c
Description:
This function is part of the USB BIOS API. This function
starts/stops the USB host controller.
Input:
fpURP   Pointer to the URP structure
Output:
None
Notes:


USBAPI_invoke_in_frame in the amiusb.c

Function : USBAPI_invoke_in_frame

File: amiusb.c
Description:
Invokes procedure passing parameters supplied in the buffer
It replicates the stack frame so that target procedure can
see the parameters passed to the stub.
Output:
Returns result of invoked proc


USBAPI_KbcAccessControl in the amiusb.c

Function : USBAPI_KbcAccessControl

File: amiusb.c
Description:
This function is part of the USB BIOS API. This function
is used to control whether KBC access in USB module
should be blocked or not.
Input:
fpURP   Pointer to the URP structure
Output:
Return code USB_ERROR - Failure, USB_SUCCESS - Success
Notes:


USBAPI_LegacyControl in the amiusb.c

Function : USBAPI_LegacyControl

File: amiusb.c
Description:
This function is part of the USB BIOS API. This function
is used to shutdown/init USB legacy support.
Input:
fpURP   Pointer to the URP structure
Output:
None
Notes:


USBAPI_LightenKeyboardLEDs in the amiusb.c

Function : USBAPI_LightenKeyboardLEDs

File: amiusb.c
Description:
This function is part of the USB BIOS API. This function
controls LED state on the connected USB keyboards
Input:
fpURP   Pointer to the URP structure
Output:
Return code USB_ERROR - Failure, USB_SUCCESS - Success


USBAPI_MassDeviceRequest in the amiusb.c

Function : USBAPI_MassDeviceRequest

File: amiusb.c
Description:
This routine services the USB API function number 27h.  It
handles all the mass storage related calls from the higher
layer. Different sub-functions are invoked depending on
the sub-function number
Input:
fpURPPointer    Pointer to the URP structure
fpURPPointer.bSubFunc   Subfunction number
00  Get Device Information
01  Get Device Parameter
02  Reset Device
03  Read Device
04  Write Device
05  Verify Device
06  Format Device
07  Request Sense
08  Test Unit Ready
09  Start Stop Unit
0A  Read Capacity
0B  Mode Sense
0C  Device Inquiry
0D  Send Command
0E  Assign drive number
Output:
URP structure is updated with the relevant information


USBAPI_MoveDataArea in the amiusb.c

Function : USBAPI_MoveDataArea

File: amiusb.c
Description:
This routine stops the USB host controllers and moves
the data area used by host controllers to a new area.
The host controller is started from the new place.
Input:
fpURPPointer    URP structure with input parameters
StartHc.wDataAreaFlag   Indicates which data area to use
Output:
bRetValue   USB_SUCCESS


USBAPI_PowerManageUSB in the amiusb.c

Function : USBAPI_PowerManageUSB

File: amiusb.c
Description:
This routine suspends the USB host controllers
Input:
fpURPPointer    Pointer to the URP structure
Output:
None


USBAPI_PrepareForOS in the amiusb.c

Function : USBAPI_PrepareForOS

File: amiusb.c
Description:
This routine updates data structures to reflect that
POST is completed
Input:
fpURPPointer    Pointer to the URP structure
Output:
None


USBAPI_SecureInterface in the amiusb.c

Function : USBAPI_SecureInterface

File: amiusb.c
Description:
This routine handles the calls related to security device
Input:
fpURPPointer    Pointer to the URP structure
Output:
None


USBAPI_Start in the amiusb.c

Function : USBAPI_Start

File: amiusb.c
Description:
This API routine configures the USB host controllers and
enumerate the devices
Input:
fpURPPointer  URP structure with input parameters
StartHc.wDataAreaFlag Indicates which data area to use
Output:
StartHc.wDataAreaFlag Returns current data area pointer
bRetValue - USB_SUCCESS on success, USB_ERROR on error.


USBAPI_Stop in the amiusb.c

Function : USBAPI_Stop

File: amiusb.c
Description:
This routine stops the USB host controllers
Input:
fpURPPointer    Pointer to the URP structure
Output:
bRetValue   USB_SUCCESS on success
USB_ERROR on error


USBAPI_UsbStopController in the amiusb.c

Function : USBAPI_UsbStopController

File: amiusb.c
Description:
This function is part of the USB BIOS API. This function stops
the USB host controller.
Input:
fpURP   Pointer to the URP structure
Output:
None
Notes:


UsbApiHandler in the amiusb.c

Function : UsbApiHandler

File: amiusb.c
Description:


USBDriverEntryPoint in the amiusb.c

Function : USBDriverEntryPoint

File: amiusb.c
Description:
USB Driver entry point


UsbHwSmiHandler in the amiusb.c

Function : UsbHwSmiHandler

File: amiusb.c
Description:
USB Hardware SMI handler.
Input:
Host controller type.


USBInstallHwSmiHandler in the amiusb.c

Function : USBInstallHwSmiHandler

File: amiusb.c
Description:
This function registers USB hardware SMI callback function.


USBMassAPIAssignDriveNumber in the amiusb.c

Function : USBMassAPIAssignDriveNumber

File: amiusb.c
Description:
This function is part of the USB BIOS MASS API. This function
assigns the logical drive device according to the information of the
mass storage device
Input:
fpURPPointer    Pointer to the URP structure
bDevAddr    USB device address of the device
bLogDevNum  Logical Drive Number to assign to the device
Output:
Return code USB_ERROR - Failure, USB_SUCCESS - Success


USBMassAPICheckDevStatus in the amiusb.c

Function : USBMassAPICheckDevStatus

File: amiusb.c
Description:
This function is part of the USB BIOS MASS API. This function
invokes USB Mass Storage API handler to check whether device
is ready. If called for the first time, this function retrieves
the mass storage device geometry and fills the corresponding
fpDevInfo fields.
Input:
fpURPPointer    Pointer to the URP structure
fpURP->ApiData.fpDevInfo - pointer to USB device that is
requested to be checked
Output:
Return code USB_ERROR - Failure, USB_SUCCESS - Success


USBMassAPICommandPassThru in the amiusb.c

Function : USBMassAPICommandPassThru

File: amiusb.c
Description:
This function is part of the USB BIOS MASS API. This
function can be used to pass raw command/data sequence to
the USB mass storage device
Input:
fpURPPointer    Pointer to the URP structure
Output:
bRetValue   Return value
Modified:
Nothing


USBMassAPIFormatDevice in the amiusb.c

Function : USBMassAPIFormatDevice

File: amiusb.c
Description:
This function is part of the USB BIOS MASS API.
Input:
fpURPPointer    Pointer to the URP structure
Output:
bRetValue   Return value


USBMassAPIGetDeviceGeometry in the amiusb.c

Function : USBMassAPIGetDeviceGeometry

File: amiusb.c
Description:
This function is part of the USB BIOS MASS API.
Input:
fpURPPointer    Pointer to the URP structure
bDevAddr    USB device address of the device
Output:
bRetValue   Return value
fpURPPointer    Pointer to the URP structure
dSenseData  Sense data of the last command
bNumHeads   Number of heads
wNumCylinders   Number of cylinders
bNumSectors Number of sectors
wBytesPerSector Number of bytes per sector
bMediaType  Media type


USBMassAPIGetDeviceInformation in the amiusb.c

Function : USBMassAPIGetDeviceInformation

File: amiusb.c
Description:
This function is part of the USB BIOS MASS API. This function
returns the device information of the mass storage device
Input:
fpURPPointer    Pointer to the URP structure
bDevAddr    USB device address of the device
Output:
bRetValue   Return value
fpURPPointer    Pointer to the URP structure
dSenseData  Sense data of the last command
bDevType    Device type byte (HDD, CD, Removable)
bEmuType    Emulation type used
fpDevId     Far pointer to the device ID
dInt13Entry INT 13h entry point
Notes:
Initially the bDevAddr should be set to 0 as input. This
function returns the information regarding the first mass
storage device (if no device found it returns bDevAddr as
0FFh) and also updates bDevAddr to the device address of
the current mass storage device. If no other mass storage
device is found then the routine sets the bit7 to 1
indicating current information is valid but no more mass
device found in the system. The caller can get the next
device info if bDevAddr is not 0FFh and bit7 is not set


USBMassAPIGetDevStatus in the amiusb.c

Function : USBMassAPIGetDevStatus

File: amiusb.c
Description:
This function returns the drive status and media presence
status
Input:
fpURPPointer    Pointer to the URP structure
fpURP->ApiData.fpDevInfo - pointer to USB device that is
requested to be checked
Output:
Return code USB_ERROR - Failure, USB_SUCCESS - Success


USBMassAPIReadDevice in the amiusb.c

Function : USBMassAPIReadDevice

File: amiusb.c
Description:
This function is part of the USB BIOS MASS API.
Input:
fpURPPointer    Pointer to the URP structure, it contains the following:
   bDevAddr      USB device address of the device
   dStartLBA     Starting LBA address
   wNumBlks      Number of blocks to read
   wPreSkipSize  Number of bytes to skip before
   wPostSkipSize Number of bytes to skip after
   fpBufferPtr   Far buffer pointer
Output:
fpURPPointer Pointer to the URP structure
   bRetValue    Return value
   dSenseData   Sense data of the last command


USBMassAPIResetDevice in the amiusb.c

Function : USBMassAPIResetDevice

File: amiusb.c
Description:
This function is part of the USB BIOS MASS API.
Input:
fpURPPointer    Pointer to the URP structure
Output:
bRetValue   Return value


USBMassAPITable in the amiusb.c

Table : USBMassAPITable

File: amiusb.c
Description:
This is the table of functions used by USB Mass Storage API


USBMassAPIVerifyDevice in the amiusb.c

Function : USBMassAPIVerifyDevice

File: amiusb.c
Description:
This function is part of the USB BIOS MASS API.
Input:
fpURPPointer    Pointer to the URP structure
bDevAddr    USB device address of the device
dStartLBA   Starting LBA address
wNumBlks    Number of blocks to write
wPreSkipSize    Number of bytes to skip before
wPostSkipSize   Number of bytes to skip after
fpBufferPtr Far buffer pointer
Output:
fpURPPointer    Pointer to the URP structure
bRetValue   Return value
dSenseData  Sense data of the last command


USBMassAPIWriteDevice in the amiusb.c

Function : USBMassAPIWriteDevice

File: amiusb.c
Description:
This function is part of the USB BIOS MASS API.
Input:
fpURPPointer    Pointer to the URP structure
bDevAddr    USB device address of the device
dStartLBA   Starting LBA address
wNumBlks    Number of blocks to write
wPreSkipSize    Number of bytes to skip before
wPostSkipSize   Number of bytes to skip after
fpBufferPtr Far buffer pointer
Output:
fpURPPointer    Pointer to the URP structure
bRetValue   Return value
dSenseData  Sense data of the last command


UsbPowerButtonSmiCallback in the amiusb.c

Function : UsbPowerButtonSmiCallback

File: amiusb.c
Description:
This function enter s5 callback if press power button.


UsbS5SmiCallback in the amiusb.c

Function : UsbS5SmiCallback

File: amiusb.c
Description:
This function enter usb s5 callback.


USBSWSMIHandler in the amiusb.c

Function : USBSWSMIHandler

File: amiusb.c
Description:
Invoked on reads from SW SMI port with value USB_SWSMI. This
function dispatches the USB Request Packets (URP) to the
appropriate functions.
Input:
EBDA:USB_DATA_EBDA_OFFSET - Pointer to the URP (USB Request
Packet structure)
DispatchHandle  - EFI Handle
DispatchContext - Pointer to the EFI_SMM_SW_DISPATCH_CONTEXT
Output:
bRetValue   Zero on successfull completion
Non-zero on error


USBWrap_GetDeviceCount in the amiusb.c

Function : USBWrap_GetDeviceCount

File: amiusb.c
Description:
This routine searches through the device entry table
and returns number of active USB devices configured
by the BIOS.
Input:
fpURPPointer    Pointer to the URP
Output:
Following fields in the URP are modified
CkPresence.bNumBootDev      Number of USB boot devices found
CkPresence.bNumKeyboards    Number of USB keyboards present
CkPresence.bNumMice         Number of USB mice present
CkPresence.bNumHubs         Number of USB hubs present
CkPresence.bNumStorage      Number of USB storage devices present


USBWrap_GetnthDeviceInfoStructure in the amiusb.c

Function : USBWrap_GetnthDeviceInfoStructure

File: amiusb.c
Description:
This routine finds the 'n'th device's DeviceInfo entry.
Input:
bDevNumber  Device number (1-based)
Output:
DeviceInfo structure


USBWrapGetATAError in the amiusb.c

Function : USBWrapGetATAError

File: amiusb.c
Description:
This routine converts the sense data information into
ATAPI error code
Input:
dSenseData  Sense data obtained from the device
Output:
BYTE - ATAPI error code


xhciHWSMIHandler in the amiusb.c

Function : xhciHWSMIHandler

File: amiusb.c
Description:
USB Hardware SMI handler.
Input:
DispatchHandle  - EFI Handle
DispatchContext - Pointer to the EFI_SMM_SW_DISPATCH_CONTEXT
Output:
Nothing


amiusb.h

Description:
AMI UsbRt driver definitions


AmiUsbCCID.h

Description:
AMI USB CCID Protocol definition


AmiUsbController.h

Description:
AMI USB Driver Protocol definition

The following data structures are used in the file: AmiUsbController.h.

Variable | Description
API_DATA | This is a union data type of all the API related data
CCID_ATR | This is a Core Procedure URP structure for the BIOS API call USB_API_CCID_DEVICE_REQUEST command (API #2Fh )
CCID_GET_PARAMS | This is a Core Procedure URP structure for the BIOS API call USB_API_CCID_DEVICE_REQUEST command (API #2Fh )
CCID_GETSLOT_STATUS | This is a Core Procedure URP structure for the BIOS API call USB_API_CCID_DEVICE_REQUEST command (API #2Fh )
CCID_GETSMARTCLASSDESCRIPTOR | This is a Core Procedure URP structure for the BIOS API call USB_API_CCID_DEVICE_REQUEST command (API #2Fh )
CCID_POWERDOWN_SLOT | This is a Core Procedure URP structure for the BIOS API call USB_API_CCID_DEVICE_REQUEST command (API #2Fh )
CCID_POWERUP_SLOT | This is a Core Procedure URP structure for the BIOS API call USB_API_CCID_DEVICE_REQUEST command (API #2Fh )
CCID_XFRBLOCK | This is a Core Procedure URP structure for the BIOS API call USB_API_CCID_DEVICE_REQUEST command (API #2Fh )
CHK_DEV_PRSNC | This is a URP (USB Request Packet) structure for the BIOS API call CheckDevicePresence (API #26)
CK_PRESENCE | This is a URP (USB Request Packet) structure for the BIOS API call CheckPresence (API #0)
COREPROC_PARAM | This is a Core Procedure URP structure for the BIOS API call core command (API #2eh )
DEV_DRIVER | USB Device Driver Structure
DEV_INFO | USB Device Information Structure
GET_DEV_ADDR | This is a URP structure for the BIOS API(API #32h)
GET_DEV_INFO | This is a URP (USB Request Packet) structure for the BIOS API call GetDeviceInfo (API #25)
HC_START_STOP | This is a URP structure for the BIOS API(API #36)
HC_STRUC | USB Host Controller structure
HCPROC_PARAM | N/A
KB_LEDS_DATA | This is a URP (USB Request Packet) structure for the BIOS API call LightenKeyboardLeds(API #2B)
MASS_ASSIGN_DRIVE_NUM | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call USBMass_AssignDriveNumber (API #27h, SubFunc 0Eh)
MASS_CMD_PASS_THRU | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassCmdPassThru command (API #27h, SubFunc 0Dh)
MASS_FORMAT | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassFormatDevice (API #27h, SubFunc 06h)
MASS_GET_DEV_GEO | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassGetDeviceGeometry (API #27h, SubFunc 01h)
MASS_GET_DEV_INFO | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassGetDeviceInfo (API #27h, SubFunc 00h)
MASS_GET_DEV_STATUS | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MASS_GET_DEV_STATUS (API #27h, SubFunc XXh)
MASS_INQUIRY | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassInquiry (API #27h, SubFunc 0Ch)
MASS_MODE_SENSE | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassModeSense (API #27h, SubFunc 0Bh)
MASS_READ | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassReadDevice (API #27h, SubFunc 03h)
MASS_READ_CAPACITY | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassReadCapacity (API #27h, SubFunc 0Ah)
MASS_REQ_SENSE | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassRequestSense (API #27h, SubFunc 07h)
MASS_RESET | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassResetDevice (API #27h, SubFunc 02h)
MASS_START_STOP_UNIT | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassStartStopUnit (API #27h, SubFunc 09h)
MASS_TEST_UNIT_RDY | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassTestUnitReady (API #27h, SubFunc 08h)
MASS_VERIFY | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassVerifyDevice (API #27h, SubFunc 05h)
MASS_WRITE | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassWriteDevice (API #27h, SubFunc 04h)
SECURITY_IF | This is a URP (USB Request Packet) structure for the BIOS API call SecurityInterface (API #2Ah)
START_HC | This is a URP (USB Request Packet) structure for the BIOS API call StartHC and MoveDataArea (API #20 & #24)
URP_STRUC | This structure is the URP structure
USB_SKIP_LIST | If your roothub port 4 insert a hub.You want to skip hub's port 2. Set bRootPort = 4, dRoutePath =2 If your roothub port 4 insert a hub1.And hub1 port 2 insert a hub2. You want to skip hub2's port 1. Set bRootPort = 4, dRoutePath =21


API_DATA in the AmiUsbController.h

Variable : API_DATA

File: AmiUsbController.h
Description:
This is a union data type of all the API related data
Built on 16:12:00 10/28/16


CCID_ATR in the AmiUsbController.h

Variable : CCID_ATR

File: AmiUsbController.h
Description:
This is a Core Procedure URP  structure for
the BIOS API call USB_API_CCID_DEVICE_REQUEST command (API #2Fh )
Built on 16:12:00 10/28/16


CCID_GET_PARAMS in the AmiUsbController.h

Variable : CCID_GET_PARAMS

File: AmiUsbController.h
Description:
This is a Core Procedure URP  structure for
the BIOS API call USB_API_CCID_DEVICE_REQUEST command (API #2Fh )
Built on 16:12:00 10/28/16


CCID_GETSLOT_STATUS in the AmiUsbController.h

Variable : CCID_GETSLOT_STATUS

File: AmiUsbController.h
Description:
This is a Core Procedure URP  structure for
the BIOS API call USB_API_CCID_DEVICE_REQUEST command (API #2Fh )
Built on 16:12:00 10/28/16


CCID_GETSMARTCLASSDESCRIPTOR in the AmiUsbController.h

Variable : CCID_GETSMARTCLASSDESCRIPTOR

File: AmiUsbController.h
Description:
This is a Core Procedure URP  structure for
the BIOS API call USB_API_CCID_DEVICE_REQUEST command (API #2Fh )
Built on 16:12:00 10/28/16


CCID_POWERDOWN_SLOT in the AmiUsbController.h

Variable : CCID_POWERDOWN_SLOT

File: AmiUsbController.h
Description:
This is a Core Procedure URP  structure for
the BIOS API call USB_API_CCID_DEVICE_REQUEST command (API #2Fh )
Built on 16:12:00 10/28/16


CCID_POWERUP_SLOT in the AmiUsbController.h

Variable : CCID_POWERUP_SLOT

File: AmiUsbController.h
Description:
This is a Core Procedure URP  structure for
the BIOS API call USB_API_CCID_DEVICE_REQUEST command (API #2Fh )
Built on 16:12:00 10/28/16


CCID_XFRBLOCK in the AmiUsbController.h

Variable : CCID_XFRBLOCK

File: AmiUsbController.h
Description:
This is a Core Procedure URP  structure for
the BIOS API call USB_API_CCID_DEVICE_REQUEST command (API #2Fh )
Built on 16:12:00 10/28/16


CHK_DEV_PRSNC in the AmiUsbController.h

Variable : CHK_DEV_PRSNC

File: AmiUsbController.h
Fields:

Name | Type | Description
bDevType | UINT8 | Type of device to look for
fpHCStruc | FPHC_STRUC | Pointer to HC being checked for device connection
bNumber | UINT8 | Number of devices connected

Description:
This is a URP (USB Request Packet) structure for the BIOS
API call CheckDevicePresence (API #26)
Built on 16:12:00 10/28/16


CK_PRESENCE in the AmiUsbController.h

Variable : CK_PRESENCE

File: AmiUsbController.h
Description:
This is a URP (USB Request Packet) structure for the BIOS
API call CheckPresence (API #0)
Built on 16:12:00 10/28/16


COREPROC_PARAM in the AmiUsbController.h

Variable : COREPROC_PARAM

File: AmiUsbController.h
Description:
This is a Core Procedure URP  structure for
the BIOS API call core command (API #2eh )
Built on 16:12:00 10/28/16


DEV_DRIVER in the AmiUsbController.h

Variable : DEV_DRIVER

File: AmiUsbController.h
Fields:

Name | Type | Description
bDevType | UINT8 | Device Type
bBaseClass | UINT8 | Device Base Type
bSubClass | UINT8 | Device Subclass
bProtocol | UINT8 | Device Protocol
pfnDeviceInit | VOID | Device Initialization Function
pfnCheckDeviceType | UINT8 | Check Device Type Function
pfnConfigureDevice | DEV_INFO* | Configure Device Function
pfnDisconnectDevice | UINT8 | Disconnect Device Function

Description:
USB Device Driver Structure
Built on 16:12:00 10/28/16


DEV_INFO in the AmiUsbController.h

Variable : DEV_INFO

File: AmiUsbController.h
Fields:

Name | Type | Description
bFlag | UINT8 | Device Information flags
bDeviceType | UINT8 | Device Type
wVendorId | UINT16 | Device VID
wDeviceId | UINT16 | Device DID
bDeviceAddress | UINT8 | Device USB Address
bHCNumber | UINT8 | Host Controller Number this device is attached to
bHubDeviceNumber | UINT8 | USB Hub Device Number this device is attached to
bHubPortNumber | UINT8 | USB Hub Port Number this device is attached to
bEndpointNum | UINT8 | Endpoint number
bEndpointSpeed | UINT8 | Endpoint speed
bLUN | UINT8 | Device Logical Unit number
wEndp0MaxPacket | UINT16 | Endpoint0 max packet size, in Bytes
bNumConfigs | UINT8 | Number of configurations
bConfigNum | UINT8 | Active configuration number (0-based)
bInterfaceNum | UINT8 | Active interface number
bAltSettingNum | UINT8 | Alternate setting number (0-based)
bCallBackIndex | UINT8 | Callback function index
fpPollTDPtr | UINT8* | Polling TD pointer
fpPollTEPtr | UINT8* | Polling ED pointer
bHubNumPorts | UINT8 | Hub # of ports (USB hubs only)
bHubPowerOnDelay | UINT8 | Hub power-on delay (USB hubs only)
fpLUN0DevInfoPtr | DEV_INFO* | Pointer to Lun0 device (for multiple-LUN devices)
wDataIn | OutSync | UINT16 toggle tracking information
bStorageType | UINT8 | USB_MASS_DEV_ARMD, USB_MASS_DEV_HDD, etc.
wIntMaxPkt | UINT16 | Interrupt Max Packet size, in Bytes
bPresent | UINT8 | Device presence indicator
bIntEndpoint | UINT8 | Interrupt endpoint number
bBulkInEndpoint | UINT8 | Bulk-In endpoint number
bBulkOutEndpoint | UINT8 | Bulk-Out endpoint number
bProtocol | UINT8 | Protocol
wEmulationOption | UINT16 | USB Mass Storage Drive Emulation Option, from Setup
bHiddenSectors | UINT8 | Number of hidden sectors, for USB mass storage devices only
bSubClass | UINT8 | Device sub-class
wBlockSize | UINT16 | USB Mass Storage Device block size, in Bytes
dMaxLba | UINT32 | USB Mass Storage Device Maximum LBA number
bHeads | UINT8 | USB Mass Storage Device # of heads
bSectors | UINT8 | USB Mass Storage Device # of sectors
wCylinders | UINT16 | USB Mass Storage Device # of cylinders
bNonLBAHeads | UINT8 | USB Mass Storage Device # of heads reported in Non-LBA (CHS) functions
bNonLBASectors | UINT8 | USB Mass Storage Device # of sectors reported in Non-LBA (CHS) functions
wNonLBACylinders | UINT16 | USB Mass Storage Device # of cylinders reported in Non-LBA (CHS) functions
bEmuType | UINT8 | USB Mass Storage Device emulation type
bPhyDevType | UINT8 | USB Mass Storage Device physical type
bMediaType | UINT8 | USB Mass Storage Device media type
bDriveNumber | UINT8 | USB Mass Storage Device INT13 drive number
wBulkInMaxPkt | UINT16 | USB Mass Storage Device Bulk-In max packet size, in Bytes
wBulkOutMaxPkt | UINT16 | USB Mass Storage Device Bulk-Out max packet size, in Bytes
wIncompatFlags | UINT16 | USB Mass Storage Device Incompatibility flags
MassDev | VOID* | USB Mass Storage Device EFI handle
fpDeviceDriver | DEV_DRIVER* | Device driver pointer
bLastStatus | UINT8 | Last transaction status
pExtra | UINT8* | Pointer to extra device specific data
UINT32 | UINT8 | USB Mass Storage Device # of heads
Handle | UINT32 | [2] USB Device Handle

Description:
USB Device Information Structure
Built on 16:12:00 10/28/16


GET_DEV_ADDR in the AmiUsbController.h

Variable : GET_DEV_ADDR

File: AmiUsbController.h
Description:
This is a URP structure for the BIOS API(API #32h)
Built on 16:12:00 10/28/16


GET_DEV_INFO in the AmiUsbController.h

Variable : GET_DEV_INFO

File: AmiUsbController.h
Fields:

Name | Type | Description
bDevNumber | UINT8 | Device # whose info is requested
bHCNumber | UINT8 | HC # to which this device is connected (0 if no such device found)
bDevType | UINT8 | Device type (0 if no such device found)

Description:
This is a URP (USB Request Packet) structure for the BIOS
API call GetDeviceInfo (API #25)
Built on 16:12:00 10/28/16


HC_START_STOP in the AmiUsbController.h

Variable : HC_START_STOP

File: AmiUsbController.h
Description:
This is a URP structure for the BIOS API(API #36)


HC_STRUC in the AmiUsbController.h

Variable : HC_STRUC

File: AmiUsbController.h
Fields:

Name | Type | Description
bHCNumber | UINT8 | Host Controller number, 1-based
bHCType | UINT8 | Host Controller Type, U/O/E HCI
fpFrameList | UINT32* | Host Controller Frame List Address
BaseAddress | UINTN | Host Controller Base Address, memory (EHCI,OHCI) or IO (UHCI)
bNumPorts | UINT8 | Number of root ports, 1-based
wBusDevFuncNum | UINT16 | PCI location, bus (Bits8..15), device (Bits3..7), function(bits0..2)
fpIRQInfo | IRQ_INFO | IRQ information
stDescPtrs | DESC_PTRS | Commonly used descriptor pointers, see definition of DESC_PTRS
wAsyncListSize | UINT16 | Async. list size
bOpRegOffset | UINT8 | Operation region offset
dMaxBulkDataSize | UINT32 | Maximum Bulk Transfer data size
dHCFlag | UINT32 | Host Controller flag
bExtCapPtr | UINT8 | EHCI Extended Capabilities Pointer
bRegOfs | UINT8 | EHCI Capabilities PCI register Offset
DebugPort | UINT8 | Port number of EHCI debug port
usbbus_data | VOID* | USB Bus data specific to this Host Controller
Controller | EFI_HANDLE | EFI Handle of this controller
pHCdp | EFI_DEVICE_PATH_PROTOCOL* | Pointer to this controller's device path

Description:
USB Host Controller structure


HCPROC_PARAM in the AmiUsbController.h

Variable : HCPROC_PARAM

File: AmiUsbController.h
Description:
N/A


KB_LEDS_DATA in the AmiUsbController.h

Variable : KB_LEDS_DATA

File: AmiUsbController.h
Fields:

Name | Type | Description
fpLedMap | UINT32 | 32-bit Pointer to LED_MAP structure

Description:
This is a URP (USB Request Packet) structure for the BIOS
API call LightenKeyboardLeds(API #2B)


MASS_ASSIGN_DRIVE_NUM in the AmiUsbController.h

Variable : MASS_ASSIGN_DRIVE_NUM

File: AmiUsbController.h
Fields:

Name | Type | Description
bDevAddr | UINT8 | USB device address of the device
bLogDevNum | UINT8 | Logical Drive Number to assign to the device
bHeads | UINT8 | Number of heads
bSectors | UINT8 | Number of sectors/track
wCylinders | UINT16 | Number of cylinders
wBlockSize | UINT16 | Sector size in bytes
bLUN | UINT8 | Maximum LUNs in the system
bSpeed | UINT8 | <>0 if the device is hi-speed device

Description:
This is a Mass URP (Mass USB Request Packet) structure for
the BIOS API call USBMass_AssignDriveNumber
(API #27h, SubFunc 0Eh)


MASS_CMD_PASS_THRU in the AmiUsbController.h

Variable : MASS_CMD_PASS_THRU

File: AmiUsbController.h
Fields:

Name | Type | Description
bDevAddr | BYTE | USB device address of the device
dSenseData | UINT32 | Sense data of the last command
fpCmdBuffer | UINT32 | Far pointer to the command buffer
wCmdLength | UINT16 | Command length
fpDataBuffer | UINT32 | Far pointer for data buffer
wDataLength | UINT16 | Data length
bXferDir | BYTE | Data transfer direction

Description:
This is a Mass URP (Mass USB Request Packet) structure for
the BIOS API call MassCmdPassThru command (API #27h,
SubFunc 0Dh)


MASS_FORMAT in the AmiUsbController.h

Variable : MASS_FORMAT

File: AmiUsbController.h
Fields:

Name | Type | Description
bDevAddr | UINT8 | USB device address of the device
dSenseData | UINT32 | Sense data of the last command
bHeadNumber | UINT8 | Head number to format
bTrackNumber | UINT8 | Track number to format

Description:
This is a Mass URP (Mass USB Request Packet) structure for
the BIOS API call MassFormatDevice (API #27h, SubFunc 06h)


MASS_GET_DEV_GEO in the AmiUsbController.h

Variable : MASS_GET_DEV_GEO

File: AmiUsbController.h
Fields:

Name | Type | Description
bDevAddr | UINT8 | USB device address of the device
dSenseData | UINT32 | Sense data of the last command
bNumHeads | UINT8 | Number of heads
wNumCylinders | UINT16 | Number of cylinders
bNumSectors | UINT8 | Number of sectors
bLBANumHeads | UINT8 | Number of heads (for INT13h function 48h)
wLBANumCyls | UINT16 | Number of cylinders (for INT13h function 48h)
bLBANumSectors | UINT8 | Number of sectors (for INT13h function 48h)
wUINT8sPerSector | UINT16 | Number of bytes per sector
bMediaType | UINT8 | Media type
dLastLBA | UINT32 | Last LBA address

Description:
This is a Mass URP (Mass USB Request Packet) structure for
the BIOS API call MassGetDeviceGeometry (API #27h,
SubFunc 01h)


MASS_GET_DEV_INFO in the AmiUsbController.h

Variable : MASS_GET_DEV_INFO

File: AmiUsbController.h
Fields:

Name | Type | Description
bDevAddr | UINT8 | USB device address of the device
dSenseData | UINT32 | Sense data of the last command
bDevType | UINT8 | Device type byte (HDD, CD, Removable)
bEmuType | UINT8 | Emulation type used
fpDevId | UINT32 | Far pointer to the device ID

Description:
This is a Mass URP (Mass USB Request Packet) structure for
the BIOS API call MassGetDeviceInfo (API #27h, SubFunc 00h)


MASS_GET_DEV_STATUS in the AmiUsbController.h

Variable : MASS_GET_DEV_STATUS

File: AmiUsbController.h
Fields:

Name | Type | Description
bDevAddr | UINT8 | USB device address of the device
bDeviceStatus | UINT8 | Connection status of the Mass device

Description:
This is a Mass URP (Mass USB Request Packet) structure for
the BIOS API call MASS_GET_DEV_STATUS (API #27h, SubFunc XXh)


MASS_INQUIRY in the AmiUsbController.h

Variable : MASS_INQUIRY

File: AmiUsbController.h
Fields:

Name | Type | Description
bDevAddr | UINT8 | USB device address of the device
dSenseData | UINT32 | Sense data of the last command
bDevType | UINT8 | Device type byte (HDD, CD, Removable)
bEmuType | BYTE | Emulation type used
fpDevId | UINT32 | Far pointer to the device ID

Description:
This is a Mass URP (Mass USB Request Packet) structure for
the BIOS API call MassInquiry (API #27h, SubFunc 0Ch)


MASS_MODE_SENSE in the AmiUsbController.h

Variable : MASS_MODE_SENSE

File: AmiUsbController.h
Fields:

Name | Type | Description
bDevAddr | UINT8 | USB device address of the device
dSenseData | UINT32 | Sense data of the last command
bNumHeads | UINT8 | Number of heads
wNumCylinders | UINT16 | Number of cylinders
bNumSectors | UINT8 | Number of sectors
wBytesPerSector | UINT16 | Number of bytes per sector
bMediaType | UINT8 | Media type

Description:
This is a Mass URP (Mass USB Request Packet) structure for
the BIOS API call MassModeSense (API #27h, SubFunc 0Bh)


MASS_READ in the AmiUsbController.h

Variable : MASS_READ

File: AmiUsbController.h
Fields:

Name | Type | Description
bDevAddr | UINT8 | USB device address of the device
dSenseData | UINT32 | Sense data of the last command
dStartLBA | UINT32 | Starting LBA address
wNumBlks | UINT16 | Number of blocks to read
wPreSkipSize | UINT16 | Number of bytes to skip before
wPostSkipSize | UINT16 | Number of bytes to skip after
fpBufferPtr | UINT32 | Far buffer pointer

Description:
This is a Mass URP (Mass USB Request Packet) structure for
the BIOS API call MassReadDevice (API #27h, SubFunc 03h)


MASS_READ_CAPACITY in the AmiUsbController.h

Variable : MASS_READ_CAPACITY

File: AmiUsbController.h
Fields:

Name | Type | Description
bDevAddr | UINT8 | USB device address of the device
dSenseData | UINT32 | Sense data of the last command
dMaxLBA | UINT32 | Maximum LBA address
dBlockSize | UINT32 | Block size

Description:
This is a Mass URP (Mass USB Request Packet) structure for
the BIOS API call MassReadCapacity (API #27h, SubFunc 0Ah)


MASS_REQ_SENSE in the AmiUsbController.h

Variable : MASS_REQ_SENSE

File: AmiUsbController.h
Fields:

Name | Type | Description
bDevAddr | UINT8 | USB device address of the device
dSenseData | UINT32 | Sense data of the last command

Description:
This is a Mass URP (Mass USB Request Packet) structure for
the BIOS API call MassRequestSense (API #27h, SubFunc 07h)


MASS_RESET in the AmiUsbController.h

Variable : MASS_RESET

File: AmiUsbController.h
Fields:

Name | Type | Description
bDevAddr | UINT8 | USB device address of the device
dSenseData | UINT32 | Sense data of the last command

Description:
This is a Mass URP (Mass USB Request Packet) structure for
the BIOS API call MassResetDevice (API #27h, SubFunc 02h)


MASS_START_STOP_UNIT in the AmiUsbController.h

Variable : MASS_START_STOP_UNIT

File: AmiUsbController.h
Fields:

Name | Type | Description
bDevAddr | UINT8 | USB device address of the device
dSenseData | UINT32 | Sense data of the last command
bCommand | UINT8 | 0 - Stop, 1 - Start

Description:
This is a Mass URP (Mass USB Request Packet) structure for
the BIOS API call MassStartStopUnit (API #27h, SubFunc 09h)


MASS_TEST_UNIT_RDY in the AmiUsbController.h

Variable : MASS_TEST_UNIT_RDY

File: AmiUsbController.h
Fields:

Name | Type | Description
bDevAddr | UINT8 | USB device address of the device
dSenseData | UINT32 | Sense data of the last command

Description:
This is a Mass URP (Mass USB Request Packet) structure for
the BIOS API call MassTestUnitReady (API #27h, SubFunc 08h)


MASS_VERIFY in the AmiUsbController.h

Variable : MASS_VERIFY

File: AmiUsbController.h
Fields:

Name | Type | Description
bDevAddr | UINT8 | USB device address of the device
dSenseData | UINT32 | Sense data of the last command
dStartLBA | UINT32 | Starting LBA address
wNumBlks | UINT16 | Number of blocks to verify
wPreSkipSize | UINT16 | Number of bytes to skip before
wPostSkipSize | UINT16 | Number of bytes to skip after
fpBufferPtr | UINT32 | Far buffer pointer

Description:
This is a Mass URP (Mass USB Request Packet) structure for
the BIOS API call MassVerifyDevice (API #27h, SubFunc 05h)


MASS_WRITE in the AmiUsbController.h

Variable : MASS_WRITE

File: AmiUsbController.h
Fields:

Name | Type | Description
bDevAddr | UINT8 | USB device address of the device
dSenseData | UINT32 | Sense data of the last command
dStartLBA | UINT32 | Starting LBA address
wNumBlks | UINT16 | Number of blocks to write
wPreSkipSize | UINT16 | Number of bytes to skip before
wPostSkipSize | UINT16 | Number of bytes to skip after
fpBufferPtr | UINT32 | Far buffer pointer

Description:
This is a Mass URP (Mass USB Request Packet) structure for
the BIOS API call MassWriteDevice (API #27h, SubFunc 04h)


SECURITY_IF in the AmiUsbController.h

Variable : SECURITY_IF

File: AmiUsbController.h
Fields:

Name | Type | Description
fpBuffer | FAR | Buffer pointer to read/write data
dLength | UINT32 | Length of the buffer
dWaitTime | UINT32 | Wait time for the transaction in msec

Description:
This is a URP (USB Request Packet) structure for the BIOS
API call SecurityInterface (API #2Ah)


START_HC in the AmiUsbController.h

Variable : START_HC

File: AmiUsbController.h
Fields:

Name | Type | Description
wDataAreaFlag | UINT16 | Indicates which data area to use

Description:
This is a URP (USB Request Packet) structure for the BIOS
API call StartHC and MoveDataArea (API #20 & #24)


URP_STRUC in the AmiUsbController.h

Variable : URP_STRUC

File: AmiUsbController.h
Fields:

Name | Type | Description
bFuncNumber | UINT8 | Function number of the URP
bSubFunc | UINT8 | Sub-func number of the URP
bRetValue | UINT8 | Return value
ApiData | API_DATA | Refer structure definition

Description:
This structure is the URP structure


USB_SKIP_LIST in the AmiUsbController.h

Variable : USB_SKIP_LIST

File: AmiUsbController.h
Fields:

Name | Type | Description
bSkipType | BYTE | Skip by which Type
bSkipAll | BYTE | If this flag is 1 than skip all ports.
wBDF | WORD | Bus Dev Function
bRootPort | BYTE | Root port path
dRoutePath | DWORD | Hub route path. See description.
bBaseClass | BYTE | Device Type

Description:
If your roothub port 4 insert a hub.You want to skip hub's port 2.
  Set bRootPort = 4,  dRoutePath =2
           If your roothub port 4 insert a hub1.And hub1 port 2 insert a hub2.
           You want to skip hub2's port 1.
  Set bRootPort = 4,  dRoutePath =21


amiusbhc.c

Description:
USB_HC_PROTOCOL implementation

The following functions are used in the file: amiusbhc.c.

Function | Description
AllocDevInfo | Allocates temporary DEV_INFO structure in USB data area for use in USB transfer.
AmiUsb2HcAsyncInterruptTransfer | This function performs USB2 HC Async Interrupt Transfer
AmiUsb2HcAsyncIsochronousTransfer | This function performs USB2 HC Async Isochronous Transfer
AmiUsb2HcBulkTransfer | This function performs USB2 HC Bulk Transfer
AmiUsb2HcClearRootHubPortFeature | This function clears root hub port feature.
AmiUsb2HcGetCapability | This is USB2HC API to get the host controller capability.
AmiUsb2HcGetRootHubPortStatus | This function returns HC root port status.
AmiUsb2HcGetState | This is USB2HC API to get the host controller state.
AmiUsb2HcIsochronousTransfer | This function performs USB2 HC Isochronous Transfer
AmiUsb2HcReset | This is USB2HC API to perform host controller reset.
AmiUsb2HcSetRootHubPortFeature | This function set root hub port features.
AmiUsb2HcSetState | This is USB2HC API to set the host controller state.
AmiUsb2HcSyncInterruptTransfer | This function performs USB2 HC Sync Interrupt Transfer
AmiUsb2HcTransfer | This function performs USB2 HC Control Transfer
AmiUsbHcAsyncInterruptTransfer | Protocol USB HC function that performs USB async interrupt transfer.
AmiUsbHcAsyncIsochronousTransfer | Protocol USB HC function that performs USB async isochronous transfer.
AmiUsbHcBulkTransfer | Protocol USB HC function that performs USB bulk transfer.
AmiUsbHcClearRootHubPortFeature | Protocol USB HC function clear root hub port feature
AmiUsbHcGetRootHubPortNumber | Protocol USB HC function that returns the number of ports of a root hub on a given controller.
AmiUsbHcGetRootHubPortStatus | Protocol USB HC function that returns the root port status
AmiUsbHcGetState | Protocol USB HC function that returns Host Controller state.
AmiUsbHcIsochronousTransfer | Protocol USB HC function that performs USB sync isochronous transfer.
AmiUsbHcReset | Provides software reset for the USB host controller.
AmiUsbHcSetRootHubPortFeature | Protocol USB HC function set root hub port feature
AmiUsbHcSetState | Protocol USB HC function that sets Host Controller state.
AmiUsbHcSyncInterruptTransfer | Protocol USB HC function that performs USB sync interrupt transfer.
AmiUsbHcTransfer | Protocol USB HC function that performs USB transfer.
AsyncInterruptOnTimer | This function checks if queue has a new transfer. If yes, calls a callback with data from transfer.
ConvertBitmaps | Converts one bit-strng to another using a convertion table
DevAddr2Info | Returns a DEV_INFO that corresponds to a device that is connected to a specified host controller and has a specified address
FindHcStruc | Search gUsbData for information about HC linked to an EFI handle
FindOldTransfer | Searches a DEV_INFO that was used as a temporary structure for the USB transfer.
FreeDevInfo | Marks DEV_INFO structure that it is free for use in consequent operations.
GetThis | Function returns a pointer to HcProtocol2 record of a given protocol
GetThis1 | Function returns a pointer to HcProtocol record of a given protocol
GetTransferStatus | Function converts the bitmap of gUsbData->dLastCommandStatusExtended into a valid USB error.
InstallHcProtocols | Start the AMI USB driver; Sets USB_FLAG_DRIVER_STARTED
PostStopXhci | This function frees the HC memory and clears XHCI data structures.
PreInitXhci | This function initializes XHCI data structures, allocates HC memory and updates the relevant fields in HcStruc. At this point the controller's resources are assigned and accessible.
SearchDevinfoByAdr | Enumerates DEV_INFO structures in aDevInfoTable array of USB data to find one that matches the specified USB address and connects to a specified USB host controller.
UsbAllocDevInfo | Allocate the empty buffer for USB device
UsbDevDriverDisconnect |
UsbHcStop | This function is a part of Driver Binding Protocol interface.
UsbHcSupported | This function is a part of Driver Binding Protocol interface.
UsbPrepareForLegacyOS | Callback on LEGACY_BOOT event
UsbResetAndReconfigDev |
UsbSmiActivatePolling | Wrappers for calling USB HC driver USB polling functions
UsbSmiControlTransfer | Wrappers for calling USB HC driver USB transfer functions
UsbSmiCore | Bridge between DXE code and function in USB Core proc table which is inside our SMI code.
UsbSmiGetDescriptor | SW SMI to execute GetDescriptor transfer
UsbSmiGetRootHubStatus | Wrappers for calling USB HC driver functions in USBSMI service
UsbSmiHc | Bridge between DXE code and SMI function in USB HC driver.
UsbSmiReConfigDevice | Perform the device specific configuration
XhciAllocateScratchpadBuffers | This function allocates XHCI scratchpad buffers. Data initialization will be done later, in SMI XhciStart function.
XhciExtCapParser |
XhciInitMemory | This function allocates XHCI memory buffers. Data initialization will be done later, in SMI XhciStart function. These are the memory blocks: 1. DCBAAP + ScrPadBuf pointers + InpCtx + ERST <-- 8KB 2. CommandRing <-- 1KB 3. EventRing <-- 1KB 4. XferRings <-- 1KB*MaxSlots, 1KB = 32EP per slot times 32 (padded size of TRB_RING) 4. N*sizeof(XHCI_DEVICE_CONTEXT) for device context segment <-- N KB or 2*N KB, N is SlotNumber from CONFIG register 5. TransferRings <-- MaxSlots*32*1KB


AllocDevInfo in the amiusbhc.c

Function : AllocDevInfo

File: amiusbhc.c
Description:
Allocates temporary DEV_INFO structure in USB data area for use in USB transfer.
Output:
Pointer to a DEV_INFO structure
Built on 16:12:00 10/28/16


AmiUsb2HcAsyncInterruptTransfer in the amiusbhc.c

Function : AmiUsb2HcAsyncInterruptTransfer

File: amiusbhc.c
Description:
This function performs USB2 HC Async Interrupt Transfer
Built on 16:12:00 10/28/16


AmiUsb2HcAsyncIsochronousTransfer in the amiusbhc.c

Function : AmiUsb2HcAsyncIsochronousTransfer

File: amiusbhc.c
Description:
This function performs USB2 HC Async Isochronous Transfer
Built on 16:12:00 10/28/16


AmiUsb2HcBulkTransfer in the amiusbhc.c

Function : AmiUsb2HcBulkTransfer

File: amiusbhc.c
Description:
This function performs USB2 HC Bulk Transfer
Built on 16:12:00 10/28/16


AmiUsb2HcClearRootHubPortFeature in the amiusbhc.c

Function : AmiUsb2HcClearRootHubPortFeature

File: amiusbhc.c
Description:
This function clears root hub port feature.
Built on 16:12:00 10/28/16


AmiUsb2HcGetCapability in the amiusbhc.c

Function : AmiUsb2HcGetCapability

File: amiusbhc.c
Description:
This is USB2HC API to get the host controller capability.
Built on 16:12:00 10/28/16


AmiUsb2HcGetRootHubPortStatus in the amiusbhc.c

Function : AmiUsb2HcGetRootHubPortStatus

File: amiusbhc.c
Description:
This function returns HC root port status.
Built on 16:12:00 10/28/16


AmiUsb2HcGetState in the amiusbhc.c

Function : AmiUsb2HcGetState

File: amiusbhc.c
Description:
This is USB2HC API to get the host controller state.
Built on 16:12:00 10/28/16


AmiUsb2HcIsochronousTransfer in the amiusbhc.c

Function : AmiUsb2HcIsochronousTransfer

File: amiusbhc.c
Description:
This function performs USB2 HC Isochronous Transfer
Built on 16:12:00 10/28/16


AmiUsb2HcReset in the amiusbhc.c

Function : AmiUsb2HcReset

File: amiusbhc.c
Description:
This is USB2HC API to perform host controller reset.
Built on 16:12:00 10/28/16


AmiUsb2HcSetRootHubPortFeature in the amiusbhc.c

Function : AmiUsb2HcSetRootHubPortFeature

File: amiusbhc.c
Description:
This function set root hub port features.
Built on 16:12:00 10/28/16


AmiUsb2HcSetState in the amiusbhc.c

Function : AmiUsb2HcSetState

File: amiusbhc.c
Description:
This is USB2HC API to set the host controller state.
Built on 16:12:00 10/28/16


AmiUsb2HcSyncInterruptTransfer in the amiusbhc.c

Function : AmiUsb2HcSyncInterruptTransfer

File: amiusbhc.c
Description:
This function performs USB2 HC Sync Interrupt Transfer
Built on 16:12:00 10/28/16


AmiUsb2HcTransfer in the amiusbhc.c

Function : AmiUsb2HcTransfer

File: amiusbhc.c
Description:
This function performs USB2 HC Control Transfer
Built on 16:12:00 10/28/16


AmiUsbHcAsyncInterruptTransfer in the amiusbhc.c

Function : AmiUsbHcAsyncInterruptTransfer

File: amiusbhc.c
Description:
Protocol USB HC function that performs USB async interrupt transfer.
Built on 16:12:00 10/28/16


AmiUsbHcAsyncIsochronousTransfer in the amiusbhc.c

Function : AmiUsbHcAsyncIsochronousTransfer

File: amiusbhc.c
Description:
Protocol USB HC function that performs USB async isochronous transfer.
Built on 16:12:00 10/28/16


AmiUsbHcBulkTransfer in the amiusbhc.c

Function : AmiUsbHcBulkTransfer

File: amiusbhc.c
Description:
Protocol USB HC function that performs USB bulk transfer.
Built on 16:12:00 10/28/16


AmiUsbHcClearRootHubPortFeature in the amiusbhc.c

Function : AmiUsbHcClearRootHubPortFeature

File: amiusbhc.c
Description:
Protocol USB HC function clear root hub port feature
Built on 16:12:00 10/28/16


AmiUsbHcGetRootHubPortNumber in the amiusbhc.c

Function : AmiUsbHcGetRootHubPortNumber

File: amiusbhc.c
Description:
Protocol USB HC function that returns the number of ports of a root hub
on a given controller.
Built on 16:12:00 10/28/16


AmiUsbHcGetRootHubPortStatus in the amiusbhc.c

Function : AmiUsbHcGetRootHubPortStatus

File: amiusbhc.c
Description:
Protocol USB HC function that returns the root port status
Built on 16:12:00 10/28/16


AmiUsbHcGetState in the amiusbhc.c

Function : AmiUsbHcGetState

File: amiusbhc.c
Description:
Protocol USB HC function that returns Host Controller state.
Built on 16:12:00 10/28/16


AmiUsbHcIsochronousTransfer in the amiusbhc.c

Function : AmiUsbHcIsochronousTransfer

File: amiusbhc.c
Description:
Protocol USB HC function that performs USB sync isochronous transfer.
Built on 16:12:00 10/28/16


AmiUsbHcReset in the amiusbhc.c

Function : AmiUsbHcReset

File: amiusbhc.c
Description:
Provides software reset for the USB host controller.
Input:
This        A pointer to the EFI_USB_HC_PROTOCOL instance. Type
EFI_USB_HC_PROTOCOL is defined in Section 14.1.
Attributes  A bit mask of the reset operation to perform.
Output:
EFI_SUCCESS             The reset operation succeeded.
EFI_INVALID_PARAMETER   Attributes is not valid.
EFI_UNSUPPORTED         The type of reset specified by Attributes is
           not currently supported by the host controller
           hardware.
EFI_DEVICE_ERROR        An error was encountered while attempting to
           perform the reset operation.
Built on 16:12:00 10/28/16


AmiUsbHcSetRootHubPortFeature in the amiusbhc.c

Function : AmiUsbHcSetRootHubPortFeature

File: amiusbhc.c
Description:
Protocol USB HC function set root hub port feature
Built on 16:12:00 10/28/16


AmiUsbHcSetState in the amiusbhc.c

Function : AmiUsbHcSetState

File: amiusbhc.c
Description:
Protocol USB HC function that sets Host Controller state.
Built on 16:12:00 10/28/16


AmiUsbHcSyncInterruptTransfer in the amiusbhc.c

Function : AmiUsbHcSyncInterruptTransfer

File: amiusbhc.c
Description:
Protocol USB HC function that performs USB sync interrupt transfer.
Built on 16:12:00 10/28/16


AmiUsbHcTransfer in the amiusbhc.c

Function : AmiUsbHcTransfer

File: amiusbhc.c
Description:
Protocol USB HC function that performs USB transfer.
Built on 16:12:00 10/28/16


AsyncInterruptOnTimer in the amiusbhc.c

Function : AsyncInterruptOnTimer

File: amiusbhc.c
Description:
This function checks if queue has a new transfer. If yes, calls a
callback with data from transfer.
Built on 16:12:00 10/28/16


ConvertBitmaps in the amiusbhc.c

Function : ConvertBitmaps

File: amiusbhc.c
Description:
Converts one bit-strng to another using a convertion table
Input:
Val - intial 32 bit wide bit-string
BitT- array of bitmaptable_t recodrds
Cnt - number of records in array BitT
Output:
32-bit wide bit-string - result of conversion applied to Val
Built on 16:12:00 10/28/16


DevAddr2Info in the amiusbhc.c

Function : DevAddr2Info

File: amiusbhc.c
Description:
Returns a DEV_INFO that corresponds to a device that is connected to a
specified host controller and has a specified address
Input:
Addr    Device address
Hc      Pointer to the HCStruc structure
Output:
Pointer to DEV_INFO structure, NULL if device is not found
Built on 16:12:00 10/28/16


FindHcStruc in the amiusbhc.c

Function : FindHcStruc

File: amiusbhc.c
Description:
Search gUsbData for information about HC linked to an EFI handle
Input:
Controller - Host Controller handle
Built on 16:12:00 10/28/16


FindOldTransfer in the amiusbhc.c

Function : FindOldTransfer

File: amiusbhc.c
Description:
Searches a DEV_INFO that was used as a temporary structure for the USB transfer.
Input:
Device address
EndPoint   Interrupt Endpoint number that was assigned to temporary structure
HCStruc    Pointer to the HCStruc structure
Output:
Pointer to DeviceInfo Structure NULL if device is not found
Built on 16:12:00 10/28/16


FreeDevInfo in the amiusbhc.c

Function : FreeDevInfo

File: amiusbhc.c
Description:
Marks DEV_INFO structure that it is free for use in consequent operations.
Built on 16:12:00 10/28/16


GetThis in the amiusbhc.c

Function : GetThis

File: amiusbhc.c
Description:
Function returns a pointer to HcProtocol2 record of a given protocol


GetThis1 in the amiusbhc.c

Function : GetThis1

File: amiusbhc.c
Description:
Function returns a pointer to HcProtocol record of a given protocol


GetTransferStatus in the amiusbhc.c

Function : GetTransferStatus

File: amiusbhc.c
Description:
Function converts the bitmap of gUsbData->dLastCommandStatusExtended into
a valid USB error.


InstallHcProtocols in the amiusbhc.c

Function : InstallHcProtocols

File: amiusbhc.c
Description:
Start the AMI USB driver; Sets USB_FLAG_DRIVER_STARTED
Input:
This                - Protocol instance pointer.
ControllerHandle    - Handle of device to test
RemainingDevicePath - Not used
Output:
EFI_SUCCESS         - USB HC devices were initialized.
EFI_UNSUPPORTED     - pThis device is not supported by USB driver.
EFI_DEVICE_ERROR    - pThis driver cannot be started due to device error
EFI_OUT_OF_RESOURCES


PostStopXhci in the amiusbhc.c

Function : PostStopXhci

File: amiusbhc.c
Description:
This function frees the HC memory and clears XHCI data structures.


PreInitXhci in the amiusbhc.c

Function : PreInitXhci

File: amiusbhc.c
Description:
This function initializes XHCI data structures, allocates HC memory and
updates the relevant fields in HcStruc. At this point the controller's
resources are assigned and accessible.


SearchDevinfoByAdr in the amiusbhc.c

Function : SearchDevinfoByAdr

File: amiusbhc.c
Description:
Enumerates DEV_INFO structures in aDevInfoTable array of USB data to find
one that matches the specified USB address and connects to a specified USB
host controller.
Input:
DEV_INFO    Start Pointer to the device info structure from
where the search begins (if 0 start from first entry)
DevAddr    Device address
HcStruc    Pointer to the HCStruc structure
Output:
Pointer to DEV_INFO structure, NULL if device is not found


UsbAllocDevInfo in the amiusbhc.c

Function : UsbAllocDevInfo

File: amiusbhc.c
Description:
Allocate the empty buffer for USB device


UsbDevDriverDisconnect in the amiusbhc.c

Function : UsbDevDriverDisconnect

File: amiusbhc.c
Description:


UsbHcStop in the amiusbhc.c

Function : UsbHcStop

File: amiusbhc.c
Description:
This function is a part of Driver Binding Protocol interface.


UsbHcSupported in the amiusbhc.c

Function : UsbHcSupported

File: amiusbhc.c
Description:
This function is a part of Driver Binding Protocol interface.


UsbPrepareForLegacyOS in the amiusbhc.c

Function : UsbPrepareForLegacyOS

File: amiusbhc.c
Description:
Callback on LEGACY_BOOT event


UsbResetAndReconfigDev in the amiusbhc.c

Function : UsbResetAndReconfigDev

File: amiusbhc.c
Description:


UsbSmiActivatePolling in the amiusbhc.c

Function : UsbSmiActivatePolling

File: amiusbhc.c
Description:
Wrappers for calling USB HC driver USB polling functions


UsbSmiControlTransfer in the amiusbhc.c

Function : UsbSmiControlTransfer

File: amiusbhc.c
Description:
Wrappers for calling USB HC driver USB transfer functions


UsbSmiCore in the amiusbhc.c

Function : UsbSmiCore

File: amiusbhc.c
Description:
Bridge between DXE code and function in USB Core proc table which is inside
our SMI code.
Input:
Func - function number opUSBCORE_XXX which corresponds to index in Core Proc table.
Rest of the parameters coresponds the callee interface
Output:
Whatever callee returns


UsbSmiGetDescriptor in the amiusbhc.c

Function : UsbSmiGetDescriptor

File: amiusbhc.c
Description:
SW SMI to execute GetDescriptor transfer


UsbSmiGetRootHubStatus in the amiusbhc.c

Function : UsbSmiGetRootHubStatus

File: amiusbhc.c
Description:
Wrappers for calling USB HC driver functions in USBSMI service


UsbSmiHc in the amiusbhc.c

Function : UsbSmiHc

File: amiusbhc.c
Description:
Bridge between DXE code and SMI function in USB HC driver.
Input:
Func       - function number opHC_XXX which corresponds to index in HCD_HEADER
HcType     - type of USB HC controller; selects an HC driver to call
Rest of the parameters coresponds the callee interface
Output:
Whatever callee returns


UsbSmiReConfigDevice in the amiusbhc.c

Function : UsbSmiReConfigDevice

File: amiusbhc.c
Description:
Perform the device specific configuration


XhciAllocateScratchpadBuffers in the amiusbhc.c

Function : XhciAllocateScratchpadBuffers

File: amiusbhc.c
Description:
This function allocates XHCI scratchpad buffers. Data initialization will
be done later, in SMI XhciStart function.
Notes:
Usb3Hc->DcbaaPtr points to the beginning of memory block first 2048 Bytes
of which is used for DCBAA.


XhciExtCapParser in the amiusbhc.c

Function : XhciExtCapParser

File: amiusbhc.c
Description:


XhciInitMemory in the amiusbhc.c

Function : XhciInitMemory

File: amiusbhc.c
Description:
This function allocates XHCI memory buffers. Data initialization will be
done later, in SMI XhciStart function. These are the memory blocks:

1. DCBAAP + ScrPadBuf pointers + InpCtx + ERST <-- 8KB
2. CommandRing  <-- 1KB
3. EventRing    <-- 1KB
4. XferRings    <-- 1KB*MaxSlots, 1KB = 32EP per slot times 32 (padded size of TRB_RING)
4. N*sizeof(XHCI_DEVICE_CONTEXT) for device context segment <-- N KB or 2*N KB,
N is SlotNumber from CONFIG register

5. TransferRings <-- MaxSlots*32*1KB
Notes:
Scratchpad buffers are optional, they are allocated and initialized separately.


amiusbrtCCID.h

Description:
AMI Usb CCID driver definitions


AmiUsbSmmGlobalDataValidationLib.c

Description:
Source code for the AmiUsbSmmGlobalDataValidationLib library class.


AmiUsbSmmGlobalDataValidationLib.h

Description:
Defines the AmiUsbSmmGlobalDataValidationLib library functions.


AmiUsbSmmGlobalDataValidationLib.mak

Description:


componentname.c

Description:
AMI USB Component Name definitions

The following functions are used in the file: componentname.c.

Function | Description
AMIUSBComponentNameGetControllerName | Retrieves a Unicode string that is the user readable name of the controller that is being managed by an EFI Driver.
AMIUSBComponentNameGetDriverName | Retrieves a Unicode string that is the user readable name of the EFI Driver.
InitNamesProtocol | Component names protocol initializer
InitNamesStatic | USB device and controller names initializer.


AMIUSBComponentNameGetControllerName in the componentname.c

Function : AMIUSBComponentNameGetControllerName

File: componentname.c
Description:
Retrieves a Unicode string that is the user readable name of
the controller that is being managed by an EFI Driver.
Input:
This             - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
ControllerHandle - The handle of a controller that the driver specified by
        This is managing.  This handle specifies the controller
        whose name is to be returned.
ChildHandle      - The handle of the child controller to retrieve the name
        of.  This is an optional parameter that may be NULL.  It
        will be NULL for device drivers.  It will also be NULL
        for a bus drivers that wish to retrieve the name of the
        bus controller.  It will not be NULL for a bus driver
        that wishes to retrieve the name of a child controller.
Language         - A pointer to a three character ISO 639-2 language
        identifier.  This is the language of the controller name
        that that the caller is requesting, and it must match one
        of the languages specified in SupportedLanguages.  The
        number of languages supported by a driver is up to the
        driver writer.
ControllerName   - A pointer to the Unicode string to return.  This Unicode
        string is the name of the controller specified by
        ControllerHandle and ChildHandle in the language
        specified by Language from the point of view of the
        driver specified by This.
Output:
EFI_SUCCESS           - The Unicode string for the user readable name in the
             language specified by Language for the driver
             specified by This was returned in DriverName.
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
             EFI_HANDLE.
EFI_INVALID_PARAMETER - Language is NULL.
EFI_INVALID_PARAMETER - ControllerName is NULL.
EFI_UNSUPPORTED       - The driver specified by This is not currently
             managing the controller specified by
             ControllerHandle and ChildHandle.
EFI_UNSUPPORTED       - The driver specified by This does not support the
             language specified by Language.
Built on 16:12:00 10/28/16


AMIUSBComponentNameGetDriverName in the componentname.c

Function : AMIUSBComponentNameGetDriverName

File: componentname.c
Description:
Retrieves a Unicode string that is the user readable name of
the EFI Driver.
Input:
This       - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
Language   - A pointer to a three character ISO 639-2 language identifier.
  This is the language of the driver name that that the caller
  is requesting, and it must match one of the languages specified
  in SupportedLanguages.  The number of languages supported by a
  driver is up to the driver writer.
DriverName - A pointer to the Unicode string to return.  This Unicode string
  is the name of the driver specified by This in the language
  specified by Language.
Output:
EFI_SUCCES            - The Unicode string for the Driver specified by This
             and the language specified by Language was returned
             in DriverName.
EFI_INVALID_PARAMETER - Language is NULL.
EFI_INVALID_PARAMETER - DriverName is NULL.
EFI_UNSUPPORTED       - The driver specified by This does not support the
             language specified by Language.
Built on 16:12:00 10/28/16


InitNamesProtocol in the componentname.c

Function : InitNamesProtocol

File: componentname.c
Description:
Component names protocol initializer


InitNamesStatic in the componentname.c

Function : InitNamesStatic

File: componentname.c
Description:
USB device and controller names initializer.


componentname.h

Description:
AMI USB driver component name header file


debug.c

Description:
AMI USB Debug output implementation routnes

The following functions are used in the file: debug.c.

Function | Description
PrintDebugMessage | This routine prints the debug message Parameters: Variable


PrintDebugMessage in the debug.c

Function : PrintDebugMessage

File: debug.c
Description:
This routine prints the debug message

Parameters: Variable
Output:
Status: SUCCESS = Success
       FAILURE = Failure


efiusbccid.c

Description:
USB CCID EFI driver implementation

The following functions are used in the file: efiusbccid.c.

Function | Description
InstallUSBCCID | Install AMI_CCID_IO_PROTOCOL_GUID for each slot
UnInstallUSBCCID | Uninstall AMI_CCID_IO_PROTOCOL_GUID for each slot
USBCCIDAPISmartClassDescriptor | Generates a SW SMI to get the SMART Class Descriptor for the CCID device


InstallUSBCCID in the efiusbccid.c

Function : InstallUSBCCID

File: efiusbccid.c
Description:
Install AMI_CCID_IO_PROTOCOL_GUID for each slot
Input:
EFI_HANDLE      CCIDHandle
DEV_INFO        *fpCCIDDevice
ICC_DEVICE      *fpICCDevice
Output:
EFI_STATUS
Notes:


UnInstallUSBCCID in the efiusbccid.c

Function : UnInstallUSBCCID

File: efiusbccid.c
Description:
Uninstall AMI_CCID_IO_PROTOCOL_GUID for each slot
Input:
EFI_HANDLE    CCIDHandle - SmartCard Reader Handle
EFI_HANDLE    ChildHandle - Smart Card Handle

output:
Notes:


USBCCIDAPISmartClassDescriptor in the efiusbccid.c

Function : USBCCIDAPISmartClassDescriptor

File: efiusbccid.c
Description:
Generates a SW SMI to get the SMART Class Descriptor for the CCID device
Input:
IN AMI_CCID_IO_PROTOCOL *This
OUT UINT8                *ResponseBuffer
Output:
EFI_STATUS and returns SMART Class Descriptor in ResponseBuffer
Notes:


efiusbhid.c

Description:
EFI USB HID device Driver

The following functions are used in the file: efiusbhid.c.

Function | Description
InstallUSBHid | Installs SimpleTxtIn protocol on a given handle
SupportedUSBHid | Verifies if usb hid support can be installed on a device
UninstallHid | Uninstalls protocol on a given handle
UsbHidGetControllerName | USB EFI keyboard driver driver protocol function that returns the keyboard controller name.
UsbHidInit | HID EFI driver entry point


InstallUSBHid in the efiusbhid.c

Function : InstallUSBHid

File: efiusbhid.c
Description:
Installs SimpleTxtIn protocol on a given handle
Input:
Controller - controller handle to install protocol on.
Output:
None


SupportedUSBHid in the efiusbhid.c

Function : SupportedUSBHid

File: efiusbhid.c
Description:
Verifies if usb hid support can be installed on a device


UninstallHid in the efiusbhid.c

Function : UninstallHid

File: efiusbhid.c
Description:
Uninstalls protocol on a given handle
Input:
Controller - controller handle.
Output:
None


UsbHidGetControllerName in the efiusbhid.c

Function : UsbHidGetControllerName

File: efiusbhid.c
Description:
USB EFI keyboard driver driver protocol function that
returns the keyboard controller name.


UsbHidInit in the efiusbhid.c

Function : UsbHidInit

File: efiusbhid.c
Description:
HID EFI driver entry point


efiusbkb.c

Description:
USB Keyboard Efi driver implementation

The following functions are used in the file: efiusbkb.c.

Function | Description
CheckKeyNotify | Call the notification function based on the key pressed Paremeters: Key - Key pressed
ClearUsbKbBuffer | This function clear USB KB buffers
InitUSBKeyboard | Initialize USB Keyboard device and all private data structures.
InitUSBKeyBuffer | Initialize USB Keyboard Buffer.
InitUSBKeyCharBuffer | Initialize USB Keyboard Buffer for Keyboard ASCII data.
InsertKeyCode | Inserts a key code into keyboard buffer.
InstallUSBKeyboard | Installs SimpleTxtIn protocol on a given handle
IsUSBKeyboardBufferEmpty | Check whether USB Keyboard buffer is empty.
IsUSBKeyboardBufferFull | Check whether USB Keyboard buffer is full.
IsUSBKeyCharEmpty | Check whether USB Keyboard ASCII data buffer is empty.
KeypressCallback | This routine is called every time the keyboard data is updated
KeyrepeatCallback | This routine is called every time the key repeat is requested
ProcessMultiLanguage | It maps the current key to a Unicode character from the keyboard layout Paremeters: KeyData - Pointer to the AMI_EFI_KEY_DATA .
ReadAndProcessKey | It processes the key and sets its states. Paremeters: Key - VOID Pointer KeySize - Size of the structure.
RemoveKeyCode | Removes a key code from the keyboard buffer.
SetKeyLED | Sets USB Keyboard LED state.
StartPollingKey | Get the keys from the USB Keyboard buffer and process it Paremeters: IN EFI_EVENT Event event that has been signaled IN VOID *Context
SupportedUSBKeyboard | Verifies if usb keyboard support can be installed on a device
UninstallUSBKeyboard | Uninstalls SimpleTxtIn protocol on a given handle
UsbKbdGetControllerName | USB EFI keyboard driver driver protocol function that returns the keyboard controller name.
UsbKbdReadKeyStroke | Retrieves the key stroke from the keyboard buffer.
UsbKbdReadKeyStrokeEx | Retrieves the key stroke from the keyboard buffer.
UsbKbdRegisterKeyNotify | Installs a callback notification function on a key
UsbKbdReset | Reset USB keyboard
UsbKbdResetEx | Reset USB keyboard
UsbKbdSetState | Set certain state for the input device. Paremeters: This - A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL_EX instance. KeyToggleState - Pointer to the EFI_KEY_TOGGLE_STATE to set the state for the input device.
UsbKbdWaitForKey | Checks if a key is pending, if so - signals the event.
USBKeyCodeToEFIScanCode | Converts USB Keyboard code to EFI Scan Code
USBParseKey | Retrieves a key character after parsing the raw data in keyboard buffer.
ValidateKeyRecord | Check for Record is present or Not Paremeters: KEY_WAITING_RECORD - *UsbKeyIn


CheckKeyNotify in the efiusbkb.c

Function : CheckKeyNotify

File: efiusbkb.c
Description:
Call the notification function based on the key pressed

Paremeters:      Key - Key pressed
Output:
None
Built on 16:12:00 10/28/16


ClearUsbKbBuffer in the efiusbkb.c

Function : ClearUsbKbBuffer

File: efiusbkb.c
Description:
This function clear USB KB buffers
Input:
IN EFI_EVENT	Event - signalled event
IN VOID 		*Context - pointer to event context
Output:
VOID
Modified:
Notes:

Referrals:

Built on 16:12:00 10/28/16


InitUSBKeyboard in the efiusbkb.c

Function : InitUSBKeyboard

File: efiusbkb.c
Description:
Initialize USB Keyboard device and all private data structures.
Input:
None
Output:
EFI_SUCCESS or EFI_ERROR


InitUSBKeyBuffer in the efiusbkb.c

Function : InitUSBKeyBuffer

File: efiusbkb.c
Description:
Initialize USB Keyboard Buffer.
Input:
None
Output:
EFI_SUCCESS


InitUSBKeyCharBuffer in the efiusbkb.c

Function : InitUSBKeyCharBuffer

File: efiusbkb.c
Description:
Initialize USB Keyboard Buffer for Keyboard ASCII data.
Input:
None
Output:
EFI_SUCCESS


InsertKeyCode in the efiusbkb.c

Function : InsertKeyCode

File: efiusbkb.c
Description:
Inserts a key code into keyboard buffer.
Input:
KeyboardBuffer  - pointer to USB Keyboard Buffer.
Output:
EFI_SUCCESS


InstallUSBKeyboard in the efiusbkb.c

Function : InstallUSBKeyboard

File: efiusbkb.c
Description:
Installs SimpleTxtIn protocol on a given handle
Input:
Controller - controller handle to install protocol on.
Output:
None


IsUSBKeyboardBufferEmpty in the efiusbkb.c

Function : IsUSBKeyboardBufferEmpty

File: efiusbkb.c
Description:
Check whether USB Keyboard buffer is empty.
Input:
KeyboardBuffer  - pointer to USB Keyboard Buffer.
Output:
TRUE if buffer is empty, FALSE otherwise


IsUSBKeyboardBufferFull in the efiusbkb.c

Function : IsUSBKeyboardBufferFull

File: efiusbkb.c
Description:
Check whether USB Keyboard buffer is full.
Input:
KeyboardBuffer  - pointer to USB Keyboard Buffer.
Output:
TRUE if buffer is full, FALSE otherwise


IsUSBKeyCharEmpty in the efiusbkb.c

Function : IsUSBKeyCharEmpty

File: efiusbkb.c
Description:
Check whether USB Keyboard ASCII data buffer is empty.
Input:
None
Output:
TRUE if buffer is empty, FALSE otherwise


KeypressCallback in the efiusbkb.c

Function : KeypressCallback

File: efiusbkb.c
Description:
This routine is called every time the keyboard data is updated
Input:
HcStruc, DevInfo, fpBuf2 always NULL
Buf1  - Pointer to 8 bytes USB data array
Output:
USB_SUCCESS or USB_ERROR


KeyrepeatCallback in the efiusbkb.c

Function : KeyrepeatCallback

File: efiusbkb.c
Description:
This routine is called every time the key repeat is requested
Input:
All input pointers are NULL, need them for callback function
parameters list
Output:
USB_SUCCESS or USB_ERROR


ProcessMultiLanguage in the efiusbkb.c

Function : ProcessMultiLanguage

File: efiusbkb.c
Description:
It maps the current key to a Unicode character from
   the keyboard layout

Paremeters:      KeyData - Pointer to the AMI_EFI_KEY_DATA .
Output:
None


ReadAndProcessKey in the efiusbkb.c

Function : ReadAndProcessKey

File: efiusbkb.c
Description:
It processes the key and sets its states.

Paremeters:      Key - VOID Pointer
   KeySize - Size of the structure.
Output:
None


RemoveKeyCode in the efiusbkb.c

Function : RemoveKeyCode

File: efiusbkb.c
Description:
Removes a key code from the keyboard buffer.
Input:
KeyboardBuffer  - pointer to USB Keyboard Buffer.
UsbKey          - pointer to buffer that contains usb key code.
Output:
EFI_SUCCESS


SetKeyLED in the efiusbkb.c

Function : SetKeyLED

File: efiusbkb.c
Description:
Sets USB Keyboard LED state.
Input:
None
Output:
EFI_SUCCESS
Notes:
UsbKbd can be NULL; in this case LEDs on all keyboards will
be refreshed. This is useful when the new keyboard is connected


StartPollingKey in the efiusbkb.c

Function : StartPollingKey

File: efiusbkb.c
Description:
Get the keys from the USB Keyboard buffer and process it

Paremeters:      IN EFI_EVENT  Event      event that has been signaled
   IN VOID       *Context
Output:
None


SupportedUSBKeyboard in the efiusbkb.c

Function : SupportedUSBKeyboard

File: efiusbkb.c
Description:
Verifies if usb keyboard support can be installed on a device


UninstallUSBKeyboard in the efiusbkb.c

Function : UninstallUSBKeyboard

File: efiusbkb.c
Description:
Uninstalls SimpleTxtIn protocol on a given handle
Input:
Controller - controller handle.
Output:
None


UsbKbdGetControllerName in the efiusbkb.c

Function : UsbKbdGetControllerName

File: efiusbkb.c
Description:
USB EFI keyboard driver driver protocol function that
returns the keyboard controller name.


UsbKbdReadKeyStroke in the efiusbkb.c

Function : UsbKbdReadKeyStroke

File: efiusbkb.c
Description:
Retrieves the key stroke from the keyboard buffer.
Output:
EFI_SUCCESS or EFI_DEVICE_ERROR


UsbKbdReadKeyStrokeEx in the efiusbkb.c

Function : UsbKbdReadKeyStrokeEx

File: efiusbkb.c
Description:
Retrieves the key stroke from the keyboard buffer.
Output:
EFI_SUCCESS or EFI_DEVICE_ERROR


UsbKbdRegisterKeyNotify in the efiusbkb.c

Function : UsbKbdRegisterKeyNotify

File: efiusbkb.c
Description:
Installs a callback notification function on a key
Input:
This - A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL_EX
           instance.
   KeyData - Key value
   KeyNotificationFunction- Pointer to the Notification Function
   NotificationHandle - Handle to be unregisterd
Output:
None


UsbKbdReset in the efiusbkb.c

Function : UsbKbdReset

File: efiusbkb.c
Description:
Reset USB keyboard
Output:
EFI_SUCCESS or EFI_DEVICE_ERROR


UsbKbdResetEx in the efiusbkb.c

Function : UsbKbdResetEx

File: efiusbkb.c
Description:
Reset USB keyboard
Output:
EFI_SUCCESS or EFI_DEVICE_ERROR


UsbKbdSetState in the efiusbkb.c

Function : UsbKbdSetState

File: efiusbkb.c
Description:
Set certain state for the input device.

Paremeters:      This - A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL_EX
           instance.
   KeyToggleState - Pointer to the EFI_KEY_TOGGLE_STATE to
           set the state for the input device.
Output:
None


UsbKbdWaitForKey in the efiusbkb.c

Function : UsbKbdWaitForKey

File: efiusbkb.c
Description:
Checks if a key is pending, if so - signals the event.
Output:
None


USBKeyCodeToEFIScanCode in the efiusbkb.c

Function : USBKeyCodeToEFIScanCode

File: efiusbkb.c
Description:
Converts USB Keyboard code to EFI Scan Code
Input:
KeyChar - Indicates the key code that will be interpreted.
Key     - A pointer to a buffer that is filled in with
           the keystroke information for the key that
           was pressed.
Output:
EFI_SUCCESS, EFI_NOT_READY


USBParseKey in the efiusbkb.c

Function : USBParseKey

File: efiusbkb.c
Description:
Retrieves a key character after parsing the raw data
in keyboard buffer.
Input:
KeyChar - pointer to the key character after key parsing.
Output:
USB_SUCCESS or USB_ERROR


ValidateKeyRecord in the efiusbkb.c

Function : ValidateKeyRecord

File: efiusbkb.c
Description:
Check for Record is present or Not

Paremeters:      KEY_WAITING_RECORD - *UsbKeyIn
Output:
FALSE - If Record is deleted from list
   TRUE  - If Record is present in List


efiusbkb.h

Description:
AMI USB keyboard driver header file


efiusbmass.c

Description:
EFI USB Mass Storage Driver

The following functions are used in the file: efiusbmass.c.

Function | Description
AmiUsbBlkIoFlushBlocks | Flush USB Mass Storage Device
AmiUsbBlkIoReadBlocks | Read the requested number of blocks from the device
AmiUsbBlkIoReadWrite | This routine is invoked from AmiUsbBlkIoReadBlocks and AmiUsbBlkIoWriteBlocks. See these for parameters reference.
AmiUsbBlkIoReset | Reset the USB Logic Drive
AmiUsbBlkIoWriteBlocks | Write a specified number of blocks to the device
InstallUsbMass | Installs BlkIo protocol on a USB Mass Storage device
UninstallUSBMass | Removes BlkIo protocol from USB Mass Storage device
UsbMassInit | USB Mass storage driver entry point
UsbMassStart | Starts USB mass storage device
UsbMassStop | Stops USB mass storage device and removes BlkIo
UsbMassSupported | Verifies if usb mouse support can be installed on a device


AmiUsbBlkIoFlushBlocks in the efiusbmass.c

Function : AmiUsbBlkIoFlushBlocks

File: efiusbmass.c
Description:
Flush USB Mass Storage Device
Input:
This: A pointer to the Block I/O protocol interface
Output:
EFI_SUCCESS: The USB Logic Drive successfully flushed
Built on 16:12:00 10/28/16


AmiUsbBlkIoReadBlocks in the efiusbmass.c

Function : AmiUsbBlkIoReadBlocks

File: efiusbmass.c
Description:
Read the requested number of blocks from the device
Input:
This EFI_BLOCK_IO *: A pointer to the Block I/O protocol
                    interface
MediaId UINT32: The media id that the read request is for
LBA EFI_LBA:    The starting logic block address to read from
               on the device
BufferSize UINTN:   The size of the Buffer in bytes
Buffer VOID *:  A pointer to the destination buffer for the data
Output:
EFI_SUCCESS:     The data was read correctly from the device
EFI_DEVICE_ERROR:The device reported an error while attempting
                   to perform the read operation
EFI_NO_MEDIA:    There is no media in the device
EFI_MEDIA_CHANGED:   The MediaId is not for the current media
EFI_BAD_BUFFER_SIZE: The BufferSize parameter is not a multiple
               of the intrinsic block size of the device
EFI_INVALID_PARAMETER:The read request contains LBAs that are
           not valid, or the buffer is not on proper alignment
Built on 16:12:00 10/28/16


AmiUsbBlkIoReadWrite in the efiusbmass.c

Function : AmiUsbBlkIoReadWrite

File: efiusbmass.c
Description:
This routine is invoked from AmiUsbBlkIoReadBlocks and
AmiUsbBlkIoWriteBlocks. See these for parameters reference.
Built on 16:12:00 10/28/16


AmiUsbBlkIoReset in the efiusbmass.c

Function : AmiUsbBlkIoReset

File: efiusbmass.c
Description:
Reset the USB Logic Drive
Input:
This: A pointer to the Block I/O protocol interface

ExtendedVerification: Indicate that the driver may perform
an exhaustive verification operation of the device during
reset
Output:
EFI_SUCCESS: The USB Logic Drive is reset
EFI_DEVICE_ERROR: The Floppy Logic Drive is not functioning
correctly and can not be reset
Built on 16:12:00 10/28/16


AmiUsbBlkIoWriteBlocks in the efiusbmass.c

Function : AmiUsbBlkIoWriteBlocks

File: efiusbmass.c
Description:
Write a specified number of blocks to the device
Input:
This EFI_BLOCK_IO *: A pointer to the Block I/O protocol
interface
MediaId UINT32: The media id that the write request is for
LBA EFI_LBA:    The starting logic block address to written
BufferSize UINTN:   The size of the Buffer in bytes
Buffer VOID *:  A pointer to the destination buffer for the data
Output:
EFI_SUCCESS:     The data were written correctly to the device
EFI_WRITE_PROTECTED: The device can not be written to
EFI_NO_MEDIA:    There is no media in the device
EFI_MEDIA_CHANGED:   The MediaId is not for the current media
EFI_DEVICE_ERROR:  The device reported an error while attempting
                   to perform the write operation
EFI_BAD_BUFFER_SIZE: The BufferSize parameter is not a multiple
                   of the intrinsic block size of the device
EFI_INVALID_PARAMETER:The read request contains LBAs that are
           not valid, or the buffer is not on proper alignment
Built on 16:12:00 10/28/16


InstallUsbMass in the efiusbmass.c

Function : InstallUsbMass

File: efiusbmass.c
Description:
Installs BlkIo protocol on a USB Mass Storage device
Input:
DevInfo - pointer to a USB device structure to install the protocol.
Output:
None


UninstallUSBMass in the efiusbmass.c

Function : UninstallUSBMass

File: efiusbmass.c
Description:
Removes BlkIo protocol from USB Mass Storage device
Input:
DevInfo - pointer to a USB device structure
Output:
None


UsbMassInit in the efiusbmass.c

Function : UsbMassInit

File: efiusbmass.c
Description:
USB Mass storage driver entry point


UsbMassStart in the efiusbmass.c

Function : UsbMassStart

File: efiusbmass.c
Description:
Starts USB mass storage device


UsbMassStop in the efiusbmass.c

Function : UsbMassStop

File: efiusbmass.c
Description:
Stops USB mass storage device and removes BlkIo


UsbMassSupported in the efiusbmass.c

Function : UsbMassSupported

File: efiusbmass.c
Description:
Verifies if usb mouse support can be installed on a device


efiusbms.c

Description:
EFI USB Mouse Driver

The following functions are used in the file: efiusbms.c.

Function | Description
GetMouseState | This routine is a part of SimplePointerProtocol implementation; it retrieves the current state of a pointer device.
InitUSBMouse | Initialize USB mouse device and all private data structures.
InstallUSBMouse | Installs SimplePointerProtocol interface on a given controller.
UninstallUSBMouse | Stops USB mouse device
UpdateUsbMouseData | This routine updates current mouse data.
UsbMouseReset | This routine is a part of SimplePointerProtocol implementation; it resets USB mouse.
UsbMouseWaitForInput | Event notification function for SIMPLE_POINTER.WaitForInput event. Signal the event if there is input from mouse.
UsbMsInit | Initialize USB Mouse driver


GetMouseState in the efiusbms.c

Function : GetMouseState

File: efiusbms.c
Description:
This routine is a part of SimplePointerProtocol implementation;
it retrieves the current state of a pointer device.
Input:
This - A pointer to the EFI_SIMPLE_POINTER_PROTOCOL instance.
MouseState - A pointer to the state information on the pointer
device. Type EFI_SIMPLE_POINTER_STATE is defined as follows:
 typedef struct {
     INT32 RelativeMovementX;
     INT32 RelativeMovementY;
     INT32 RelativeMovementZ;
     BOOLEAN LeftButton;
     BOOLEAN RightButton;
 } EFI_SIMPLE_POINTER_STATE;
Output:
EFI_SUCCESS      - The state of the pointer device was returned
                  in MouseState.
EFI_NOT_READY    - The state of the pointer device has not changed
                  since the last call to GetMouseState().
EFI_DEVICE_ERROR - A device error occurred while attempting to
                  retrieve the pointer device’s current state.


InitUSBMouse in the efiusbms.c

Function : InitUSBMouse

File: efiusbms.c
Description:
Initialize USB mouse device and all private data structures.
Input:
None
Output:
EFI_SUCCESS or EFI_ERROR


InstallUSBMouse in the efiusbms.c

Function : InstallUSBMouse

File: efiusbms.c
Description:
Installs SimplePointerProtocol interface on a given controller.
Input:
Controller - controller handle to install interface on.
Output:
None


UninstallUSBMouse in the efiusbms.c

Function : UninstallUSBMouse

File: efiusbms.c
Description:
Stops USB mouse device


UpdateUsbMouseData in the efiusbms.c

Function : UpdateUsbMouseData

File: efiusbms.c
Description:
This routine updates current mouse data.
Input:
Data* - pointer to the data area to be updated.
Output:
EFI_SUCCESS


UsbMouseReset in the efiusbms.c

Function : UsbMouseReset

File: efiusbms.c
Description:
This routine is a part of SimplePointerProtocol implementation;
it resets USB mouse.
Input:
This - A pointer to the EFI_SIMPLE_POINTER_PROTOCOL instance.
ExtendedVerification - Indicates that the driver may perform
a more exhaustive verification operation of the device during
reset.
Output:
EFI_SUCCESS or EFI_DEVICE_ERROR


UsbMouseWaitForInput in the efiusbms.c

Function : UsbMouseWaitForInput

File: efiusbms.c
Description:
Event notification function for SIMPLE_POINTER.WaitForInput
event. Signal the event if there is input from mouse.
Input:
Event - event to signal in case of mouse activity
Context - data to pass along with the event.
Output:
None


UsbMsInit in the efiusbms.c

Function : UsbMsInit

File: efiusbms.c
Description:
Initialize USB Mouse driver


efiusbpoint.c

Description:
EFI USB Absolute pointer Driver

The following functions are used in the file: efiusbpoint.c.

Function | Description
GetAbsMouseState | This routine is a part of ABSOLUTEPointerProtocol implementation; it retrieves the current state of a pointer device.
InstallUSBAbsMouse | Installs ABSOLUTEPointerProtocol interface on a given controller.
UninstallUSBAbsMouse | Uninstalls ABSOLUTEPointerProtocol interface.
UpdateUsbAbsMouseData | This routine updates current AbsMouse data.
UsbAbsMouseReset | This routine is a part of ABSOLUTEPointerProtocol implementation; it resets USB ABS.
UsbAbsMouseWaitForInput | Event notification function for AbsMouseOLUTE_POINTER.WaitForInput event. Signal the event if there is input from AbsMouse.
UsbAbsMsStop | Stops USB ABS device


GetAbsMouseState in the efiusbpoint.c

Function : GetAbsMouseState

File: efiusbpoint.c
Description:
This routine is a part of ABSOLUTEPointerProtocol implementation;
it retrieves the current state of a pointer device.
Input:
This - A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL instance.
ABSState - A pointer to the state information on the pointer
device. Type EFI_ABSOLUTE_POINTER_STATE is defined as follows:
 typedef struct {
     INT32 RelativeMovementX;
     INT32 RelativeMovementY;
     INT32 RelativeMovementZ;
     BOOLEAN LeftButton;
     BOOLEAN RightButton;
 } EFI_ABSOLUTE_POINTER_STATE;
Output:
EFI_SUCCESS      - The state of the pointer device was returned
                  in ABSState.
EFI_NOT_READY    - The state of the pointer device has not changed
                  since the last call to GetABSState().
EFI_DEVICE_ERROR - A device error occurred while attempting to
                  retrieve the pointer device’s current state.
Built on 16:12:00 10/28/16


InstallUSBAbsMouse in the efiusbpoint.c

Function : InstallUSBAbsMouse

File: efiusbpoint.c
Description:
Installs ABSOLUTEPointerProtocol interface on a given controller.
Input:
Controller - controller handle to install interface on.
Output:
None


UninstallUSBAbsMouse in the efiusbpoint.c

Function : UninstallUSBAbsMouse

File: efiusbpoint.c
Description:
Uninstalls ABSOLUTEPointerProtocol interface.
Input:
Controller - controller handle.
Output:
None


UpdateUsbAbsMouseData in the efiusbpoint.c

Function : UpdateUsbAbsMouseData

File: efiusbpoint.c
Description:
This routine updates current AbsMouse data.
Input:
Data* - pointer to the data area to be updated.
Output:
EFI_SUCCESS


UsbAbsMouseReset in the efiusbpoint.c

Function : UsbAbsMouseReset

File: efiusbpoint.c
Description:
This routine is a part of ABSOLUTEPointerProtocol implementation;
it resets USB ABS.
Input:
This - A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL instance.
ExtendedVerification - Indicates that the driver may perform
a more exhaustive verification operation of the device during
reset.
Output:
EFI_SUCCESS or EFI_DEVICE_ERROR


UsbAbsMouseWaitForInput in the efiusbpoint.c

Function : UsbAbsMouseWaitForInput

File: efiusbpoint.c
Description:
Event notification function for AbsMouseOLUTE_POINTER.WaitForInput
event. Signal the event if there is input from AbsMouse.
Input:
Event - event to signal in case of AbsMouse activity
Context - data to pass along with the event.
Output:
None


UsbAbsMsStop in the efiusbpoint.c

Function : UsbAbsMsStop

File: efiusbpoint.c
Description:
Stops USB ABS device


ehci.c

Description:
AMI USB EHCI support

The following functions are used in the file: ehci.c.

Function | Description
ClearEECPstatus | This procedure clear EHCI legacy support status.
EHCI_ActivatePolling | This function activates the polling QH for the requested device. The device may be a USB keyboard or USB hub
EHCI_BulkTransfer | This function executes a bulk transaction on the USB. The transfer may be either DATA_IN or DATA_OUT packets containing data sent from the host to the device or vice-versa. This function wil not return until the request either completes successfully or completes with error (due to time out, etc.) NOTE: Make sure that amount of bytes to transfer should not exceed MAX_EHCI_DATA_SIZE Parameters: pHCStruc Pointer to HCStruc of the host controller pDevInfo DeviceInfo structure (if available else 0) bXferDir Transfer direction Bit 7: Data direction 0 Host sending data to device 1 Device sending data to host Bit 6-0 : Reserved fpBuffer Buffer containing data to be sent to the device or buffer to be used to receive data value in Segment:Offset format dwLength dwLength request parameter, number of bytes of data to be transferred in or out of the host controller
EHCI_ControlTransfer | This function executes a device request command transaction on the USB. One setup packet is generated containing the device request parameters supplied by the caller. The setup packet may be followed by data in or data out packets containing data sent from the host to the device or vice-versa. This function will not return until the request either completes successfully or completes in error (due to time out, etc.) Parameters: fpHCStruc Pointer to HCStruc of the host controller pDevInfo DeviceInfo structure (if available else 0) wRequest Request type (low byte) Bit 7 : Data direction 0 = Host sending data to device 1 = Device sending data to host Bit 6-5 : Type 00 = Standard USB request 01 = Class specific 10 = Vendor specific 11 = Reserved Bit 4-0 : Recipient 00000 = Device 00001 = Interface 00010 = Endpoint 00100 - 11111 = Reserved Request code, a one byte code describing the actual device request to be executed (ex: Get Configuration, Set Address etc) wIndex wIndex request parameter (meaning varies) wValue wValue request parameter (meaning varies) fpBuffer Buffer containing data to be sent to the device or buffer to be used to receive data wLength wLength request parameter, number of bytes of data to be transferred in or out of the host controller
EHCI_DeactivatePolling | This function de-activates the polling QH for the requested device. The device may be a USB keyboard or USB hub
EHCI_DisableInterrupts | This function disables the HC interrupts
EHCI_EnableInterrupts | This function enables the HC interrupts
EHCI_EnableKeyRepeat | This function disables the keyboard repeat rate logic by enabling the repeat TD Parameters: fpHCStruc Pointer to the HCStruc structure
EHCI_EnumeratePorts | This function enumerates the HC ports for devices
EHCI_FillHCDEntries | This function fills the host controller driver routine pointers Parameters: fpHCDHeader Ptr to the host controller header structure
EHCI_GetHiSpeedHubPortNumber | This function gets the hi-speed hub's device and port number to which this low speed device is connected. It parses through its parents until it finds the correct device. This information is used for split transaction
EHCI_GlobalSuspend | This function suspend the EHCI HC.
EHCI_InterruptTransfer | This function executes an interrupt transaction on the USB. The data transfer direction is always DATA_IN. This function wil not return until the request either completes successfully or completes in error (due to time out, etc.) Parameters: fpHCStruc Pointer to HCStruc of the host controller fpDevInfo DeviceInfo structure (if available else 0) EndpointAddress The destination USB device endpoint to which the device request is being sent. MaxPktSize Indicates the maximum packet size the target endpoint is capable of sending or receiving. fpBuffer Buffer containing data to be sent to the device or buffer to be used to receive data wLength wLength request parameter, number of bytes of data to be transferred in
EHCI_ProcessInterrupt | This function is called when the USB interrupt bit is set. This function will parse through the TDs and QHs to find out completed TDs and call their respective call back functions Parameters: fpHCStruc Pointer to the HCStruc structure
EHCI_ReleasePortOwner
EHCI_ResetRootHub | This function resets the EHCI HC Root hub port.
EHCI_Start | This API function is called to start a EHCI host controller. The input to the routine is the pointer to the HC structure that defines this host controller Parameters: fpHCStruc Ptr to the host controller structure
EHCIAddPeriodicQH | This function adds a QH to the frame list
EHCICheckHCStatus | This function checks whether the host controller is still under BIOS
EHCIDisableKeyRepeat | This function disables the keyboard repeat rate logic by enabling the repeat TD
EHCIDisableRootHub | This function disables the EHCI HC Ruoot hub port.
EHCIEnableRootHub | This function enables the EHCI HC Root hub port.
EhciExexuteAsyncSchedule | This function insert the requested QH to asynchronous schedule and waits until the QH completes or the transaction time-out.
EHCIGetLegacySupportOffset | This function returns the PCI register offset for the legacy support in EHCI controller
EHCIGetRootHubStatus | This function returns the port connect status for the root hub port
EHCIInitializeQueueHead | This function initializes the queue head with default values
EHCIInitializesPeriodicSchedule | This function initializes the periodic schedules for the EHCI host controller
EhciIsHalted | This function check whether HC is halted.
EhciIsolateDebugPort | This routine locates EHCI debug port and determines whether or not the debug port is initialized and being used by other agents. If so, the global flag will be set to instruct the EHCI runtime routines about debug port presence and prevent any unwanted reset/reconfiguration of this port. Parameters: fpHCStruc Ptr to the host controller structure
EhciPollingTDCallback | This function is called when a polling TD from the TD pool completes an interrupt transaction to its assigned device. This routine should process any data in the TD's data buffer, handle any errors, and then copy the TD's CSReloadValue field into its control status field to put the TD back into service.
EHCIProcessPeriodicList | This function parses through the periodic list to find completed qTD. If a qTD is done it will call its associated call back function (in device info structure) and restarts the polling qTD
EHCIProcessQH | This function whether all the TD's in the QH is completed
EHCIProgramLegacyRegisters | This function programs the EHCI legacy registers as per the input. Also this routine returns the PCI register offset for the legacy support in EHCI controller
EhciRemovePeriodicQh | This function removes a QH from the frame list
EHCIRemoveQHFromAsyncList | This function stops the asynchronous transfer and sets the asynchronous pointer to null
EHCIRepeatTDCallback | This function is called when qTdRepeat completes a transaction. This qTD runs a dummy interrupt transaction to a non-existant device address for the purpose of generating a periodic timeout interrupt which in turn is used to generate keyboard repeat or update LED status.
EHCIResetHC | This function resets the EHCI controller
EHCISetQTDBufferPointers | This function will set the 5 buffer pointer in the qTD appropriately depending upon the input size
EHCIStartAsyncSchedule | This function starts the asynchronous schedule
EHCIStartPeriodicSchedule | This function starts the periodic schedule for the EHCI host controller
EHCIStop | This function stops the EHCI controller.
EHCIStopAsyncSchedule | This function stops the asynchronous transfer and sets the asynchronous pointer to null
EHCIStopPeriodicSchedule | This function stops the periodic schedule for the EHCI USB host controller
EhciTranslateInterval | This function calculates the polling rate in frames unit.
EHCIWaitForTransferComplete | This function waits until the requested QH completes or the transaction time-out
GetEhciUSBLEGSUP | This routine return USBLEGSUP register content. It could be used to check EHCI semaphore owened by BIOS or OS.
ProcessOwnerShipChangeSMI | This procedure process EHCI OwnerShipChange SMI.
ProcessRootHubChanges | Root hub change processing code Parameters: fpHCStruc Pointer to the HCStruc structure
ProcessSmiChangeToBIOS | This procedure process OwnerShipChange for EHCD -> BIOS.
ProcessSmiChangeToEHCD | This procedure process OwnerShipChange for BIOS -> EHCD.


ClearEECPstatus in the ehci.c

Function : ClearEECPstatus

File: ehci.c
Description:
This procedure clear EHCI legacy support status.
Input:
fpHCStruc   - HCStruc pointer
wSTatus     - Legacy status to clear
Output:
None
Built on 16:12:00 10/28/16


EHCI_ActivatePolling in the ehci.c

Function : EHCI_ActivatePolling

File: ehci.c
Description:
This function activates the polling QH for the requested
device. The device may be a USB keyboard or USB hub
Input:
fpHCStruc   - Pointer to the HC structure
fpDevInfo   - Pointer to the device information structure
Output:
USB_ERROR on error, USB_SUCCESS on success
Notes:
For the keyboard device this routine allocates TDRepeat
also, if it is not already allocated. This routine allocate
a polling TD and schedule it to 8ms schedule for keyboards
and to 1024ms schedule for hubs.
Built on 16:12:00 10/28/16


EHCI_BulkTransfer in the ehci.c

Function : EHCI_BulkTransfer

File: ehci.c
Description:
This function executes a bulk transaction on the USB. The
transfer may be either DATA_IN or DATA_OUT packets containing
data sent from the host to the device or vice-versa. This
function wil not return until the request either completes
successfully or completes with error (due to time out, etc.)
NOTE: Make sure that amount of bytes to transfer should not
exceed MAX_EHCI_DATA_SIZE

Parameters:  pHCStruc    Pointer to HCStruc of the host controller
pDevInfo    DeviceInfo structure (if available else 0)
bXferDir    Transfer direction
   Bit 7: Data direction
           0 Host sending data to device
           1 Device sending data to host
   Bit 6-0 : Reserved
fpBuffer    Buffer containing data to be sent to the
           device or buffer to be used to receive data
           value in Segment:Offset format
dwLength    dwLength request parameter, number of bytes
           of data to be transferred in or out
           of the host controller
Output:
Amount of data transferred
Built on 16:12:00 10/28/16


EHCI_ControlTransfer in the ehci.c

Function : EHCI_ControlTransfer

File: ehci.c
Description:
This function executes a device request command transaction
on the USB. One setup packet is generated containing the
device request parameters supplied by the caller.  The setup
packet may be followed by data in or data out packets
containing data sent from the host to the device
or vice-versa. This function will not return until the
request either completes successfully or completes in error
(due to time out, etc.)

Parameters:  fpHCStruc   Pointer to HCStruc of the host controller
pDevInfo    DeviceInfo structure (if available else 0)
wRequest    Request type (low byte)
Bit 7   : Data direction
   0 = Host sending data to device
   1 = Device sending data to host
Bit 6-5 : Type
   00 = Standard USB request
   01 = Class specific
   10 = Vendor specific
   11 = Reserved
Bit 4-0 : Recipient
   00000 = Device
   00001 = Interface
   00010 = Endpoint
   00100 - 11111 = Reserved
Request code, a one byte code describing
the actual device request to be executed
(ex: Get Configuration, Set Address etc)
wIndex      wIndex request parameter (meaning varies)
wValue      wValue request parameter (meaning varies)
fpBuffer    Buffer containing data to be sent to the
device or buffer to be used to receive data
wLength     wLength request parameter, number of bytes
of data to be transferred in or out
of the host controller
Output:
Number of bytes actually transferred
Built on 16:12:00 10/28/16


EHCI_DeactivatePolling in the ehci.c

Function : EHCI_DeactivatePolling

File: ehci.c
Description:
This function de-activates the polling QH for the requested
device. The device may be a USB keyboard or USB hub
Input:
fpHCStruc   - Pointer to the HC structure
fpDevInfo   - Pointer to the device information structure
Output:
USB_ERROR on error, USB_SUCCESS on success
Built on 16:12:00 10/28/16


EHCI_DisableInterrupts in the ehci.c

Function : EHCI_DisableInterrupts

File: ehci.c
Description:
This function disables the HC interrupts
Input:
fpHCStruc   Pointer to the HCStruc structure
Output:
USB_ERROR   On error
USB_SUCCESS On success
Built on 16:12:00 10/28/16


EHCI_EnableInterrupts in the ehci.c

Function : EHCI_EnableInterrupts

File: ehci.c
Description:
This function enables the HC interrupts
Input:
fpHCStruc   Pointer to the HCStruc structure
Output:
USB_ERROR   On error
USB_SUCCESS On success
Built on 16:12:00 10/28/16


EHCI_EnableKeyRepeat in the ehci.c

Function : EHCI_EnableKeyRepeat

File: ehci.c
Description:
This function disables the keyboard repeat rate logic by
enabling the repeat TD

Parameters:  fpHCStruc   Pointer to the HCStruc structure
Output:
USB_SUCCESS or USB_ERROR
Built on 16:12:00 10/28/16


EHCI_EnumeratePorts in the ehci.c

Function : EHCI_EnumeratePorts

File: ehci.c
Description:
This function enumerates the HC ports for devices
Input:
fpHCStruc   Host controller's HCStruc structure
Output:
None
Built on 16:12:00 10/28/16


EHCI_FillHCDEntries in the ehci.c

Function : EHCI_FillHCDEntries

File: ehci.c
Description:
This function fills the host controller driver
routine pointers

Parameters:  fpHCDHeader     Ptr to the host controller header structure
Output:
Status: USB_SUCCESS = Success
       USB_ERROR = Failure
Built on 16:12:00 10/28/16


EHCI_GetHiSpeedHubPortNumber in the ehci.c

Function : EHCI_GetHiSpeedHubPortNumber

File: ehci.c
Description:
This function gets the hi-speed hub's device and port number
to which this low speed device is connected.  It parses
through its parents until it finds the correct device. This
information is used for split transaction
Input:
fpDevInfo   - Device info pointer of the device
Output:
UINT16      - Device/port number of the hi-speed hub
Notes:
This low/full speed device may be behind different hubs as
shown below. In any case this routine will get the device
address of the hub number HISP_A :
Notations used:
MBPortX     Motherboard USB port
HISP_X      Hi-speed hub number X
FUSP_X      Full-speed hub number X
Device      Low/Full speed device
Config 1:
MBPortX --> HISP_A --> Device
Config 2:
MBPortX --> HISP_A --> FUSP_1 --> Device
Config 3:
MBPortX --> HISP_B --> HISP_A --> Device
Config 4:
MBPortX --> HISP_A --> FUSP_1 --> HISP_B --> Device
In the above configuration the HISP_B will be operated in
full speed rather than hi-speed since it is connected to a
full speed hub
Built on 16:12:00 10/28/16


EHCI_GlobalSuspend in the ehci.c

Function : EHCI_GlobalSuspend

File: ehci.c
Description:
This function suspend the EHCI HC.
Built on 16:12:00 10/28/16


EHCI_InterruptTransfer in the ehci.c

Function : EHCI_InterruptTransfer

File: ehci.c
Description:
This function executes an interrupt transaction on the USB.
The data transfer direction is always DATA_IN. This
function wil not return until the request either completes
successfully or completes in error (due to time out, etc.)

Parameters:  fpHCStruc   Pointer to HCStruc of the host controller
fpDevInfo   DeviceInfo structure (if available else 0)
EndpointAddress The destination USB device endpoint to which the device request
           is being sent.
MaxPktSize  Indicates the maximum packet size the target endpoint is capable
           of sending or receiving.
fpBuffer    Buffer containing data to be sent to the
           device or buffer to be used to receive data
wLength     wLength request parameter, number of bytes
           of data to be transferred in
Output:
Number of bytes transferred
Notes:
DO NOT TOUCH THE LINK POINTER OF THE TDInterruptData. It is
statically allocated and linked with other items in the
1ms schedule
Built on 16:12:00 10/28/16


EHCI_ProcessInterrupt in the ehci.c

Function : EHCI_ProcessInterrupt

File: ehci.c
Description:
This function is called when the USB interrupt bit is
set. This function will parse through the TDs and QHs to
find out completed TDs and call their respective call
back functions

Parameters:  fpHCStruc   Pointer to the HCStruc structure
Output:
USB_ERROR - Need more Interrupt processing
USB_SUCCESS - No interrupts pending
Built on 16:12:00 10/28/16


EHCI_ReleasePortOwner in the ehci.c

Function : EHCI_ReleasePortOwner

File: ehci.c
Description:
Input:
HcStruc   - Pointer to HCStruc of the host controller
PortNum   - Port in the HC whose status is requested
Output:

Built on 16:12:00 10/28/16


EHCI_ResetRootHub in the ehci.c

Function : EHCI_ResetRootHub

File: ehci.c
Description:
This function resets the EHCI HC Root hub port.
Input:
HcStruc   - Pointer to HCStruc of the host controller
PortNum    - Port in the HC to enable
Output:
USB_SUCCESS on success
USB_ERROR   on error
Built on 16:12:00 10/28/16


EHCI_Start in the ehci.c

Function : EHCI_Start

File: ehci.c
Description:
This API function is called to start a EHCI host controller.
The input to the routine is the pointer to the HC structure
that defines this host controller

Parameters:  fpHCStruc   Ptr to the host controller structure
Output:
Status: USB_SUCCESS = Success
       USB_ERROR = Failure
Built on 16:12:00 10/28/16


EHCIAddPeriodicQH in the ehci.c

Function : EHCIAddPeriodicQH

File: ehci.c
Description:
This function adds a QH to the frame list
Input:
Pointer to the QH to be added
Absolute pointer to the frame list
Output:
None
Built on 16:12:00 10/28/16


EHCICheckHCStatus in the ehci.c

Function : EHCICheckHCStatus

File: ehci.c
Description:
This function checks whether the host controller is still
under BIOS
Input:
fpHCStruc   - Host controller's HCStruc structure
Output:
USB_SUCCESS - If the control is with the BIOS
USB_ERROR   - If the control is not with the BIOS
Built on 16:12:00 10/28/16


EHCIDisableKeyRepeat in the ehci.c

Function : EHCIDisableKeyRepeat

File: ehci.c
Description:
This function disables the keyboard repeat rate logic by
enabling the repeat TD
Input:
fpHCStruc   - Pointer to the HCStruc structure
Output:
None
Built on 16:12:00 10/28/16


EHCIDisableRootHub in the ehci.c

Function : EHCIDisableRootHub

File: ehci.c
Description:
This function disables the EHCI HC Ruoot hub port.
Input:
fpHCStruc   - Pointer to HCStruc of the host controller
bPortNum    - Port in the HC to disable
Output:
USB_SUCCESS on success
USB_ERROR   on error
Built on 16:12:00 10/28/16


EHCIEnableRootHub in the ehci.c

Function : EHCIEnableRootHub

File: ehci.c
Description:
This function enables the EHCI HC Root hub port.
Input:
fpHCStruc   - Pointer to HCStruc of the host controller
bPortNum    - Port in the HC to enable
Output:
USB_SUCCESS on success
USB_ERROR   on error
Built on 16:12:00 10/28/16


EhciExexuteAsyncSchedule in the ehci.c

Function : EhciExexuteAsyncSchedule

File: ehci.c
Description:
This function insert the requested QH to asynchronous schedule
        and waits until the QH completes or the transaction time-out.
Input:
HcStruc   - Pointer to HCStruc of the host controller
XferQh    - Pointer to the QH which has to be completed
Output:
USB_ERROR   On error
USB_SUCCESS On success
Built on 16:12:00 10/28/16


EHCIGetLegacySupportOffset in the ehci.c

Function : EHCIGetLegacySupportOffset

File: ehci.c
Description:
This function returns the PCI register offset for the legacy
support in EHCI controller
Input:
fpHCStruc   - HCStruc pointer
wPciAddr    - PCI address of the EHCI host controller
Output:
0   If the feature is not present
<>0 Legacy support capability offset
Built on 16:12:00 10/28/16


EHCIGetRootHubStatus in the ehci.c

Function : EHCIGetRootHubStatus

File: ehci.c
Description:
This function returns the port connect status for the
root hub port
Input:
fpHCStruc   - Pointer to HCStruc of the host controller
bPortNum    - Port in the HC whose status is requested
Output:
Port status flags (see USB_PORT_STAT_XX equates)
Built on 16:12:00 10/28/16


EHCIInitializeQueueHead in the ehci.c

Function : EHCIInitializeQueueHead

File: ehci.c
Description:
This function initializes the queue head with default values
Input:
fpQH    Pointer to queue head
Output:
None
Built on 16:12:00 10/28/16


EHCIInitializesPeriodicSchedule in the ehci.c

Function : EHCIInitializesPeriodicSchedule

File: ehci.c
Description:
This function initializes the periodic schedules for the
EHCI host controller
Input:
fpHCStruc   - HCStruc for the controller
dMemAddr    - Membase address
Output:
USB_ERROR   On error
USB_SUCCESS On success
Notes:
This routine creates 8ms and 32ms schedules
Built on 16:12:00 10/28/16


EhciIsHalted in the ehci.c

Function : EhciIsHalted

File: ehci.c
Description:
This function check whether HC is halted.
Built on 16:12:00 10/28/16


EhciIsolateDebugPort in the ehci.c

Function : EhciIsolateDebugPort

File: ehci.c
Description:
This routine locates EHCI debug port and determines whether
or not the debug port is initialized and being used by other
agents. If so, the global flag will be set to instruct the
EHCI runtime routines about debug port presence and prevent
any unwanted reset/reconfiguration of this port.

Parameters:  fpHCStruc   Ptr to the host controller structure
Output:
fpHCStruc->DebugPort is updated if Debug Port is active on
this controller; otherwise it will remain 0.
Built on 16:12:00 10/28/16


EhciPollingTDCallback in the ehci.c

Function : EhciPollingTDCallback

File: ehci.c
Description:
This function is called when a polling TD from the TD pool
        completes an interrupt transaction to its assigned device.
    This routine should process any data in the TD's data buffer,
        handle any errors, and then copy the TD's CSReloadValue field
        into its control status field to put the TD back into service.
Input:
HcStruc   Pointer to the HCStruc structure
        DevInfo   NULL (pDevInfo is not valid)
QueueHead Pointer to the QH that completed
    Buffer    Not used
Output:
None
Built on 16:12:00 10/28/16


EHCIProcessPeriodicList in the ehci.c

Function : EHCIProcessPeriodicList

File: ehci.c
Description:
This function parses through the periodic list to find
completed qTD.  If a qTD is done it will call its associated
call back function (in device info structure) and restarts
the polling qTD
Input:
fpHCStruc   - Pointer to HCStruc of the host controller
Output:
None
Built on 16:12:00 10/28/16


EHCIProcessQH in the ehci.c

Function : EHCIProcessQH

File: ehci.c
Description:
This function whether all the TD's in the QH is completed
Input:
fpQH    - Pointer to the QH which has to be completed
Output:
USB_ERROR   On error
USB_SUCCESS On success
Built on 16:12:00 10/28/16


EHCIProgramLegacyRegisters in the ehci.c

Function : EHCIProgramLegacyRegisters

File: ehci.c
Description:
This function programs the EHCI legacy registers as per the
input. Also this routine returns the PCI register offset
for the legacy support in EHCI controller
Input:
fpHCStruc   HCStruc pointer
bSetReset:
0   Reset HC BIOS owned bit
1   Set HC BIOS owned bit
Output:
0   If the feature is not present
<>0 Legacy support capability offset
Built on 16:12:00 10/28/16


EhciRemovePeriodicQh in the ehci.c

Function : EhciRemovePeriodicQh

File: ehci.c
Description:
This function removes a QH from the frame list
Input:
Pointer to the QH to be added
Absolute pointer to the frame list
Output:
None
Built on 16:12:00 10/28/16


EHCIRemoveQHFromAsyncList in the ehci.c

Function : EHCIRemoveQHFromAsyncList

File: ehci.c
Description:
This function stops the asynchronous transfer and sets the
asynchronous pointer to null
Input:
Pointer to HCStruc
Pointer to the Queue head that has to be removed
from the asynchronous schedule
Output:
None
Built on 16:12:00 10/28/16


EHCIRepeatTDCallback in the ehci.c

Function : EHCIRepeatTDCallback

File: ehci.c
Description:
This function is called when qTdRepeat completes
a transaction.  This qTD runs a dummy interrupt transaction
to a non-existant device address for the purpose of
generating a periodic timeout interrupt which in turn
is used to generate keyboard repeat or update LED status.
Input:
HcStruc   Pointer to the HCStruc structure
        DevInfo   NULL (pDevInfo is not valid)
QueueHead Pointer to the QH that completed
    Buffer    Not used
Output:
None
Built on 16:12:00 10/28/16


EHCIResetHC in the ehci.c

Function : EHCIResetHC

File: ehci.c
Description:
This function resets the EHCI controller
Input:
Pointer to the HCStruc structure
Output:
USB_SUCCESS     HC successfully reset
USB_ERROR       Error, error log is updated
Built on 16:12:00 10/28/16


EHCISetQTDBufferPointers in the ehci.c

Function : EHCISetQTDBufferPointers

File: ehci.c
Description:
This function will set the 5 buffer pointer in the qTD
appropriately depending upon the input size
Input:
fpQtd   - Pointer to the qTD
fpBuf   - 32bit absolute buffer pointer
wSize   - Amount of data to be transferred
Output:
None
Built on 16:12:00 10/28/16


EHCIStartAsyncSchedule in the ehci.c

Function : EHCIStartAsyncSchedule

File: ehci.c
Description:
This function starts the asynchronous schedule
Input:
Pointer to HcStruc
Output:
USB_ERROR   On error
USB_SUCCESS On success
Built on 16:12:00 10/28/16


EHCIStartPeriodicSchedule in the ehci.c

Function : EHCIStartPeriodicSchedule

File: ehci.c
Description:
This function starts the periodic schedule for the
EHCI host controller
Input:
Pointer to HcStruc
Output:
USB_ERROR   On error
USB_SUCCESS On success
Built on 16:12:00 10/28/16


EHCIStop in the ehci.c

Function : EHCIStop

File: ehci.c
Description:
This function stops the EHCI controller.
Input:
fpHCStruc   Host controller's HCStruc structure
Output:
None
Built on 16:12:00 10/28/16


EHCIStopAsyncSchedule in the ehci.c

Function : EHCIStopAsyncSchedule

File: ehci.c
Description:
This function stops the asynchronous transfer and sets the
asynchronous pointer to null
Input:
Pointer to HcStruc
Output:
USB_ERROR   On error
USB_SUCCESS On success
Built on 16:12:00 10/28/16


EHCIStopPeriodicSchedule in the ehci.c

Function : EHCIStopPeriodicSchedule

File: ehci.c
Description:
This function stops the periodic schedule for the
EHCI USB host controller
Input:
HcStruc for the controller
Output:
USB_ERROR   On error
USB_SUCCESS On success
Built on 16:12:00 10/28/16


EhciTranslateInterval in the ehci.c

Function : EhciTranslateInterval

File: ehci.c
Description:
This function calculates the polling rate in frames unit.
Built on 16:12:00 10/28/16


EHCIWaitForTransferComplete in the ehci.c

Function : EHCIWaitForTransferComplete

File: ehci.c
Description:
This function waits until the requested QH completes or
the transaction time-out
Input:
fpHCStruc   - Pointer to HCStruc of the host controller
fpQH        - Pointer to the QH which has to be completed
Output:
USB_ERROR   On error
USB_SUCCESS On success
Built on 16:12:00 10/28/16


GetEhciUSBLEGSUP in the ehci.c

Function : GetEhciUSBLEGSUP

File: ehci.c
Description:
This routine return USBLEGSUP register content. It could be
used to check EHCI semaphore owened by BIOS or OS.
Input:
fpHCStruc   HCStruc pointer
Output:
UINT32  Legacy support extended capability register content.
   -1 if no extended capabilities are implemented.
Built on 16:12:00 10/28/16


ProcessOwnerShipChangeSMI in the ehci.c

Function : ProcessOwnerShipChangeSMI

File: ehci.c
Description:
This procedure process EHCI OwnerShipChange SMI.
Input:
fpHCStruc   HCStruc pointer
Output:
None


ProcessRootHubChanges in the ehci.c

Function : ProcessRootHubChanges

File: ehci.c
Description:
Root hub change processing code

Parameters:  fpHCStruc   Pointer to the HCStruc structure


ProcessSmiChangeToBIOS in the ehci.c

Function : ProcessSmiChangeToBIOS

File: ehci.c
Description:
This procedure process OwnerShipChange for EHCD -> BIOS.
Input:
SI  HCStruc pointer
Output:
None
Modified:
None


ProcessSmiChangeToEHCD in the ehci.c

Function : ProcessSmiChangeToEHCD

File: ehci.c
Description:
This procedure process OwnerShipChange for BIOS -> EHCD.
Input:
fpHCStruc   HCStruc pointer
Output:
None


ehci.h

Description:
AMI USB EHCI support header

The following data structures are used in the file: ehci.h.

Variable | Description
EHCI_QH | This is EHCI queue head data structure used to perform non-isochronous transaction in EHCI based HC
EHCI_QTD | This is EHCI queue TD data structure used to perform non-isochronous transaction in EHCI based HC


EHCI_QH in the ehci.h

Variable : EHCI_QH

File: ehci.h
Fields:

Name | Type | Description
dLinkPointer | DWORD | Pointer to the next queue head
dEndPntCharac | DWORD | Endpoint characteristics settings
dEndPntCap | DWORD | Endpoint capability settings
dCurqTDPtr | DWORD | Pointer to current qTD
dNextqTDPtr | DWORD | Pointer to next qTD
dAltNextqTDPtr | DWORD | Pointer to alternate next qTD
dToken | DWORD | Token double word
dBufferPtr0 | DWORD | Buffer pointer page 0
dBufferPtr1 | DWORD | Buffer pointer page 1
dBufferPtr2 | DWORD | Buffer pointer page 2
dBufferPtr3 | DWORD | Buffer pointer page 3
dBufferPtr4 | DWORD | Buffer pointer page 4

Description:
This is EHCI queue head data structure used to perform
non-isochronous transaction in EHCI based HC
Built on 16:12:00 10/28/16


EHCI_QTD in the ehci.h

Variable : EHCI_QTD

File: ehci.h
Fields:

Name | Type | Description
dNextqTDPtr | DWORD | Pointer to next qTD
dAltNextqTDPtr | DWORD | Pointer to alternate next qTD
dToken | DWORD | Token double word
dBufferPtr0 | DWORD | Buffer pointer page 0
dBufferPtr1 | DWORD | Buffer pointer page 1
dBufferPtr2 | DWORD | Buffer pointer page 2
dBufferPtr3 | DWORD | Buffer pointer page 3
dBufferPtr4 | DWORD | Buffer pointer page 4

Description:
This is EHCI queue TD data structure used to perform
non-isochronous transaction in EHCI based HC
Built on 16:12:00 10/28/16


elib.c

Description:
AMI USB MEM/IO/PCI access routines

The following functions are used in the file: elib.c.

Function | Description
ByteReadIO | This routine reads a Byte from the specified IO address
ByteWriteIO | This routine writes a byte to the specified IO address
ByteWritePCIConfig | This routine writes a byte value to the PCI configuration register space
DwordReadIO | This routine reads a dword from the specified IO address
DwordReadMem | This routine reads a DWORD from the specified Memory Address
DwordResetMem | This routine resets the specified bits at specified memory address
DwordSetMem | This routine sets the specified bits at specified memory address
DwordWriteIO | This routine writes a double word to the specified IO address
DwordWriteMem | This routine writes a DWORD to a specified Memory Address
DwordWritePCIConfig | This routine writes a Dword value to the PCI configuration register space
FixedDelay | This routine delays for specified number of micro seconds
ReadPCIConfig | This routine reads from the PCI configuration space register the value can be typecasted to 8bits - 32bits
SpeakerBeep | This routine produces a sound on the internal PC speaker
WordReadIO | This routine reads a Word from the specified IO address
WordWriteIO | This routine writes a word to the specified IO address
WordWritePCIConfig | This routine writes a byte value to the PCI configuration register space
WritePCIConfig | This function opens PCI configuration for a given register


ByteReadIO in the elib.c

Function : ByteReadIO

File: elib.c
Description:
This routine reads a Byte from the specified IO address
Input:
wIOAddr     I/O address to read
Output:
Value read
Built on 16:12:00 10/28/16


ByteWriteIO in the elib.c

Function : ByteWriteIO

File: elib.c
Description:
This routine writes a byte to the specified IO address
Input:
wIOAddr     I/O address to write
bValue      Byte value to write
Output:
None
Modified:
Nothing
Built on 16:12:00 10/28/16


ByteWritePCIConfig in the elib.c

Function : ByteWritePCIConfig

File: elib.c
Description:
This routine writes a byte value to the PCI configuration
register space
Input:
BusDevFunc - Bus, device & function number of the PCI device
Register   - Register offset to read
Value      - Value to write
Built on 16:12:00 10/28/16


DwordReadIO in the elib.c

Function : DwordReadIO

File: elib.c
Description:
This routine reads a dword from the specified IO address
Input:
wIOAddr     I/O address to read
Output:
Value read
Built on 16:12:00 10/28/16


DwordReadMem in the elib.c

Function : DwordReadMem

File: elib.c
Description:
This routine reads a DWORD from the specified Memory Address
Input:
dBaseAddr   - Memory address to read
bOffset     - Offset of dBaseAddr
Output:
Value read
Built on 16:12:00 10/28/16


DwordResetMem in the elib.c

Function : DwordResetMem

File: elib.c
Description:
This routine resets the specified bits at specified memory address
Input:
dBaseAddr   - Memory address to read
bOffset     - Offset of dBaseAddr
Output:
Value read
Built on 16:12:00 10/28/16


DwordSetMem in the elib.c

Function : DwordSetMem

File: elib.c
Description:
This routine sets the specified bits at specified memory address
Input:
dBaseAddr   - Memory address to read
bOffset     - Offset of dBaseAddr
Output:
Value read
Built on 16:12:00 10/28/16


DwordWriteIO in the elib.c

Function : DwordWriteIO

File: elib.c
Description:
This routine writes a double word to the specified IO address
Input:
wIOAddr     I/O address to write
dValue      Double word value to write
Output:
None
Built on 16:12:00 10/28/16


DwordWriteMem in the elib.c

Function : DwordWriteMem

File: elib.c
Description:
This routine writes a DWORD to a specified Memory Address
Input:
dBaseAddr   - Memory address to write
bOffset     - Offset of dBaseAddr
dValue      - Data to write
Built on 16:12:00 10/28/16


DwordWritePCIConfig in the elib.c

Function : DwordWritePCIConfig

File: elib.c
Description:
This routine writes a Dword value to the PCI configuration
register space
Input:
BusDevFunc - Bus, device & function number of the PCI device
Register   - Register offset to read
Value      - Value to write
Built on 16:12:00 10/28/16


FixedDelay in the elib.c

Function : FixedDelay

File: elib.c
Description:
This routine delays for specified number of micro seconds
Input:
wCount      Amount of delay (count in 1 microsec)
Output:
None
Built on 16:12:00 10/28/16


ReadPCIConfig in the elib.c

Function : ReadPCIConfig

File: elib.c
Description:
This routine reads from the PCI configuration space register
the value can be typecasted to 8bits - 32bits
Input:
BusDevFunc - Bus, device & function number of the PCI device
Register   - Register offset to read
Output:
Value read


SpeakerBeep in the elib.c

Function : SpeakerBeep

File: elib.c
Description:
This routine produces a sound on the internal PC speaker
Input:
bFreq -     Sound frequency
wDuration - Sound duration in 15 microsecond units
fpHCStruc - Pointer to HCStruc
Output:
None


WordReadIO in the elib.c

Function : WordReadIO

File: elib.c
Description:
This routine reads a Word from the specified IO address
Input:
wIOAddr     I/O address to read
Output:
Value read


WordWriteIO in the elib.c

Function : WordWriteIO

File: elib.c
Description:
This routine writes a word to the specified IO address
Input:
wIOAddr     I/O address to write
wValue      Word value to write
Output:
None


WordWritePCIConfig in the elib.c

Function : WordWritePCIConfig

File: elib.c
Description:
This routine writes a byte value to the PCI configuration
register space
Input:
BusDevFunc - Bus, device & function number of the PCI device
Register   - Register offset to read
Value      - Value to write


WritePCIConfig in the elib.c

Function : WritePCIConfig

File: elib.c
Description:
This function opens PCI configuration for a given register
Input:
wBDF  - Bus, device and function number
bReg  - Register number to read
Output:
IO register to write the value


Emul6064KbdInput.h

Description:
Protocol used for USB 6064 keyboard emulation


Emul6064MsInput.h

Description:
Protocol used for 6064 USB mouse emulation


Emul6064Trap.h

Description:
Protocol used for 6064 port trapping


guids.c

Description:
AMI USB guids library


ohci.c

Description:
AMI USB OHCI driver source file

The following functions are used in the file: ohci.c.

Function | Description
OHCI_GlobalSuspend | This function suspend the OHCI HC.
OhciIsHalted | This function check whether HC is halted.
OhciTranslateInterval | This function calculates the polling rate.


OHCI_GlobalSuspend in the ohci.c

Function : OHCI_GlobalSuspend

File: ohci.c
Description:
This function suspend the OHCI HC.


OhciIsHalted in the ohci.c

Function : OhciIsHalted

File: ohci.c
Description:
This function check whether HC is halted.


OhciTranslateInterval in the ohci.c

Function : OhciTranslateInterval

File: ohci.c
Description:
This function calculates the polling rate.


ohci.h

Description:
AMI USB OHCI driver header

The following data structures are used in the file: ohci.h.

Variable | Description
OHCI_ED | OHCI Endpoint descriptor structure. This structure is needed for all the USB transaction. This structure had the information regarding the transfer. Refer to OHCI specification for more information
OHCI_ED_CONTROL | Bit definition for OHCI_ED control field
OHCI_TD | OHCI general transfer descriptor structure. This structure is used for bulk, interrupt and control transfers. This structure holds the information needed for the transfer like buffer size, address etc. Refer to OHCI specification for more information. The last sixteen bytes in the structure (after BufferEnd) is AMIBIOS internal data structure.
OHCI_TD_CONTROL | Bit definition for OHCI_TD ControlStatus field
OHCIDescriptors | Descriptors structure is used to hold the host controller instance specific general transfer descriptor and endpoint descriptor pointers. The following structure defines such the descriptors for OHCI based host controller instances.
OHCIHCCA | OHCI host controller communications area is used by the host controller driver(BIOS) to communicate with the OHCI based host controller. This data area should be bus master capable. Refer OHCI data sheet for more information.


OHCI_ED in the ohci.h

Variable : OHCI_ED

File: ohci.h
Fields:

Name | Type | Description
dControl | DWORD | ED control fields (refer OHCI_ED_CONTROL)
fpTDTailPtr | DWORD | TD queue tail pointer
fpTDHeadPointer | DWORD | TD queue head pointer
fpEDLinkPointer | DWORD | Pointer to the next ED
aReserved | ARRAY | 16 bytes of reserved data

Description:
OHCI Endpoint descriptor structure. This structure is needed
for all the USB transaction. This structure had the
information regarding the transfer.  Refer to OHCI specification
for more information


OHCI_ED_CONTROL in the ohci.h

Variable : OHCI_ED_CONTROL

File: ohci.h
Fields:

Name | Type | Description
FuncAddress | BITS | :06-00 USB device address
EndpointNum | BITS | :10-07 Endpoint number
Direction | BITS | :12-11 Direction of data flow
Speed | BITS | :13 Endpoint speed
Skip | BITS | :14 If set ED will be skipped
Format | BITS | :15 Set for isochronous endpoint
MaxPacketSize | BITS | :26-16 Endpoint max packet size
Reserved | BITS | :31-27 Reserved bits

Description:
Bit definition for OHCI_ED control field


OHCI_TD in the ohci.h

Variable : OHCI_TD

File: ohci.h
Fields:

Name | Type | Description
dControlStatus | DWORD | Control & status (OHCI_TD_CONTROL)
fpCurrentBufferPointer | DWORD | Current buffer pointer
fpLinkPointer | DWORD | Pointer to the next GTD
fpBufferEnd | DWORD | Pointer to the end of the buffer
dCSReloadValue | DWORD | Copy of control status during scheduling
bCallBack | NEAR | Pointer to call back function
bActiveFlag | BYTE | Non-zero value indicates TD is active
bDeviceAddr | BYTE | USB device address
aSetupData | ARRAY | 8 byte setup data buffer

Description:
OHCI general transfer descriptor structure. This structure is
used for bulk, interrupt and control transfers. This structure
holds the information needed for the transfer like buffer
size, address etc.  Refer to OHCI specification for more
information.  The last sixteen bytes in the structure (after
BufferEnd) is AMIBIOS internal data structure.


OHCI_TD_CONTROL in the ohci.h

Variable : OHCI_TD_CONTROL

File: ohci.h
Fields:

Name | Type | Description
Reserved | BITS | :17-00 Reserved bits
BufferRounding | BITS | :18 Buffer rounding (1-Allow small packets)
DirectionPid | BITS | :20-19 Direction & PID (SETUP/IN/OUT etc)
DelayInt | BITS | :23-21 Num. frames to wait before interrupting
DataToggle | BITS | :25-24 Data toggle
ErrorCount | BITS | :27-26 Error count
ConditionCode | BITS | :31-28 Completion condition code

Description:
Bit definition for OHCI_TD ControlStatus field


OHCIDescriptors in the ohci.h

Variable : OHCIDescriptors

File: ohci.h
Fields:

Name | Type | Description
fpED1ms | OHCI_ED | ED scheduled in 1ms timeframe
fpED2ms | OHCI_ED | ED scheduled in 2ms timeframe
fpED8ms | OHCI_ED | ED scheduled in 8ms timeframe
fpED32ms | OHCI_ED | ED scheduled in 32ms timeframe
fpTD32ms | OHCI_TD | TD scheduled in 32ms timeframe
fpEDRepeat | OHCI_ED | ED scheduled for keyboard repeat rate generator
fpTDRepeat | OHCI_TD | TD scheduled for keybord repeat rate generator
TDRepeat | OHCI_TD | TD associated with generation of repeat data
fpEDControl | OHCI_ED | ED associated for control transfer
fpTDControlSetup | OHCI_TD | TD associated with control setup
fpTDControlData | OHCI_TD | TD associated with control data
fpTDControlStatus | OHCI_TD | TD associated with control status
fpEDInterrupt | OHCI_ED | ED associated for interrupt transfer
fpTDInterruptData | OHCI_TD | TD associated to transfer interrupt data
fpEDBulk | OHCI_ED | ED associated for bulk transfer
fpTDBulkData | OHCI_TD | TD associated to transfer bulk data

Description:
Descriptors structure is used to hold the host controller
instance specific general transfer descriptor and endpoint
descriptor pointers.  The following structure defines such
the descriptors for OHCI based host controller instances.


OHCIHCCA in the ohci.h

Variable : OHCIHCCA

File: ohci.h
Fields:

Name | Type | Description
INTERRUPTLIST | ARRAY | 32 entries of periodic transfer pointer
HCCAFRAMENUMBER | WORD | Current frame number
HCCAPAD1 | WORD | Reserved
HCCADONEHEAD | DWORD | Location where the done head pointers will be placed
RES_HCCA | ARRAY | 120 bytes of reserved data

Description:
OHCI host controller communications area is used by the
host controller driver(BIOS) to communicate with the
OHCI based host controller.  This data area should be
bus master capable.  Refer OHCI data sheet for more
information.


syskbc.c

Description:
AMI USB keyboard driver data conversion and presentation
   routines, KBC is present

The following functions are used in the file: syskbc.c.

Function | Description
KBC_ReadDataByte | This routine till the keyboard controller sends a data byte
KBC_ReadKeyboardControllerData | This routine sends a command and receives the response byte for that command
KBC_WaitForInputBufferToBeFree | This routine checks the input buffer free bit and waits till it is set by the keyboard controller
KBC_WaitForOutputBufferToBeFilled | This routine checks the output buffer full bit and waits till it is set by the keyboard controller
KBC_WriteCommandByte | This routine sends the command byte to the keyboard controller
KBC_WriteKeyboardControllerData | This routine writes a data byte to the keyboard controller by first sending a command byte first
KBC_WriteSubCommandByte | This routine sends the sub-command byte to the keyboard controller
SendMouseData | This routine sends the Mouse Data to Local Mouse Buffer
SYSKBC_GetTranslation | This routine Get the KBC SCAN code transalation value
SYSKBC_KbdInput_Send | This routine sends the Keyboard Data to Controller
SYSKBC_MouseInput_Send | This routine sends the Mouse Data to Controller
SYSKBC_SendKBCData | This routine is invoked periodically (every 8msec) to send USB keyboard and mouse data to the keyboard controller or to the keyboard controller emulation code
SYSKBC_UpdateLEDState | This routine updates LEDs on Legacy keyboard
USBKB_CheckForExtendedKey | Checks whether the key pressed is a extended key
USBKB_CheckForNumericKeyPadKey | Checks whether the key pressed is from numeric key pad
USBKB_CheckModifierKeyPress | This routine checks whether any of the modifier keys, like shift, control or alternate keys, are pressed
USBKB_ConvertScanCodeBetweenCodeSet | Converts the set 2 scan code to set 3/1 scan code
USBKB_ConvertSet2CodeToSet1Code | Converts the set 2 scan code to set 1 scan code
USBKB_ConvertUSBKeyCodeToScanCodeSet2 | This routine converts the USB keycode into scan code set 2 scan code. Conversion is accomplished using a static table.
USBKB_DiscardCharacter | This routine discards the top character in the scan code buffer, keyboard status flag buffer and device ID buffer
USBKB_GenerateScanCode | This routine generates the make/break code for th key pressed depending on the make/break flag
USBKB_GenerateType1BreakCode | This routine generates the type 1 break code for the byte in the variable bSet2ScanCode
USBKB_GenerateType1MakeCode | This routine generates the type 1 make code for the byte in the variable bSet2ScanCode
USBKB_GenerateType2BreakCode | This routine generates the type 2 break code for the byte in the variable bSet2ScanCode
USBKB_GenerateType2MakeCode | This routine generates the type 2 make code for the byte in the variable bSet2ScanCode
USBKB_LEDOn | This routine updates the keyboard LED status for all the USB keyboards present in the sytem
USBKB_Scanner | This routine converts the USB keyboard input data into IBM PC format scan code
USBKB_UpdateLEDState | This routine is used to update the LED state between the USB & PS/2 keyboard
USBKBC_CheckAutoRepeat | This routine will check the repeat counter and repeat rate and perform the auto repeat appropriately
USBKBC_CheckCharacterBufferFull | This routine checks whether the character buffer can hold 'N'+1 character
USBKBC_GetAndStoreCCB | This routine will read the CCB from the keyboard controller and store it in a local variable
USBKBC_GetFromCharacterBuffer | This routine gets a character from the character buffer. Character buffer pointers are also updated
USBKBC_SendToCharacterBuffer | This routine puts a character into the character buffer. Character buffer pointers are also updated
USBMouse_GetFromMouseBuffer | This routine retrieves a byte from the mouse input buffer. Mouse input buffer pointers are also updated
USBMouse_SendToMouseBuffer | This routine puts a byte into the mouse input buffer. Mouse input buffer pointers are also updated
USBMSSendMouseData | This routine is called to send the mouse data to the KB controller
USBMSUpdateMouseInterface | This routine is called to enable or disable the mouse interface
USBTrap_GetCurrentScanCodeSetNumber | Returns the current scan code set number
USBTrap_GetOverrunCode | Returns the overrun code depending on the current scan code set


KBC_ReadDataByte in the syskbc.c

Function : KBC_ReadDataByte

File: syskbc.c
Description:
This routine till the keyboard controller sends a data byte
Input:
Nothing
Output:
Status - USB_SUCCESS
      - USB_ERROR


KBC_ReadKeyboardControllerData in the syskbc.c

Function : KBC_ReadKeyboardControllerData

File: syskbc.c
Description:
This routine sends a command and receives the response byte
for that command
Input:
IN UINT8              bCmd - Command to be sent
In UINT8              *Data - Data to be Read
Output:
Status - USB_SUCCESS
      - USB_ERROR


KBC_WaitForInputBufferToBeFree in the syskbc.c

Function : KBC_WaitForInputBufferToBeFree

File: syskbc.c
Description:
This routine checks the input buffer free bit and waits till
it is set by the keyboard controller
Input:
Nothing
Output:
USB_SUCCESS - If Input buffer is Empty
USB_ERROR - If Input buffer is Full


KBC_WaitForOutputBufferToBeFilled in the syskbc.c

Function : KBC_WaitForOutputBufferToBeFilled

File: syskbc.c
Description:
This routine checks the output buffer full bit and waits till
it is set by the keyboard controller
Input:
Nothing
Output:
USB_SUCCESS - If OutPut buffer is Full
USB_ERROR - If Output buffer Empty


KBC_WriteCommandByte in the syskbc.c

Function : KBC_WriteCommandByte

File: syskbc.c
Description:
This routine sends the command byte to the keyboard
controller
Input:
IN UNIT8   bCmd - Command byte
Output:
Status - USB_SUCCESS
      - USB_ERROR


KBC_WriteKeyboardControllerData in the syskbc.c

Function : KBC_WriteKeyboardControllerData

File: syskbc.c
Description:
This routine writes a data byte to the keyboard controller
by first sending a command byte first
Input:
IN UINT8   bCmd  - Command to be sent
IN UINT8   bData - Data to be sent
Output:
Status - USB_SUCCESS
        USB_ERROR


KBC_WriteSubCommandByte in the syskbc.c

Function : KBC_WriteSubCommandByte

File: syskbc.c
Description:
This routine sends the sub-command byte to the keyboard
controller
Input:
bCmd    Sub-command byte
Output:
Nothing


SendMouseData in the syskbc.c

Function : SendMouseData

File: syskbc.c
Description:
This routine sends the Mouse Data to Local Mouse Buffer
Input:
IN PS2MouseData*                   Data
Output:
Nothing


SYSKBC_GetTranslation in the syskbc.c

Function : SYSKBC_GetTranslation

File: syskbc.c
Description:
This routine Get the KBC SCAN code transalation value
Input:
IN EFI_EMUL6064KBDINPUT_PROTOCOL* This,
OUT KBC_KBDTRANSLATION* OutTrans
Output:
Nothing


SYSKBC_KbdInput_Send in the syskbc.c

Function : SYSKBC_KbdInput_Send

File: syskbc.c
Description:
This routine sends the Keyboard Data to Controller
Input:
IN EFI_EMUL6064KBDINPUT_PROTOCOL* This,
IN UINT8* Data,
IN UINT32 Count
Output:
Nothing


SYSKBC_MouseInput_Send in the syskbc.c

Function : SYSKBC_MouseInput_Send

File: syskbc.c
Description:
This routine sends the Mouse Data to Controller
Input:
IN EFI_EMUL6064MSINPUT_PROTOCOL*   This,
IN PS2MouseData*                   Data
Output:
Nothing


SYSKBC_SendKBCData in the syskbc.c

Function : SYSKBC_SendKBCData

File: syskbc.c
Description:
This routine is invoked periodically (every 8msec) to send
USB keyboard and mouse data to the keyboard controller
or to the keyboard controller emulation code
Input:
Nothing
Output:
Nothing


SYSKBC_UpdateLEDState in the syskbc.c

Function : SYSKBC_UpdateLEDState

File: syskbc.c
Description:
This routine updates LEDs on Legacy keyboard
Input:
LED state data
Output:
Nothing


USBKB_CheckForExtendedKey in the syskbc.c

Function : USBKB_CheckForExtendedKey

File: syskbc.c
Description:
Checks whether the key pressed is a extended key
Input:
bScanCode   Set 2 scan code for the key pressed
Output:
0 Key pressed matches the numeric key pad key
<> 0 It is not a numeric key pad key
Set 3 scan code for the key pressed
(if set 3 is chosen)


USBKB_CheckForNumericKeyPadKey in the syskbc.c

Function : USBKB_CheckForNumericKeyPadKey

File: syskbc.c
Description:
Checks whether the key pressed is from numeric key pad
Input:
bScanCode   Set 2 scan code for the key pressed
Output:
0 Key pressed matches the numeric key pad key
<> 0 It is not a numeric key pad key
Set 3 scan code for the key pressed
(if set 3 is chosen)


USBKB_CheckModifierKeyPress in the syskbc.c

Function : USBKB_CheckModifierKeyPress

File: syskbc.c
Description:
This routine checks whether any of the modifier keys, like
shift, control or alternate keys, are pressed
Input:
bScanCode   Scan code set 2 scan code
Output:
0 None of the modifier keys are pressed
Modifier key is pressed
High Byte, Low Byte = Modifier key identifier


USBKB_ConvertScanCodeBetweenCodeSet in the syskbc.c

Function : USBKB_ConvertScanCodeBetweenCodeSet

File: syskbc.c
Description:
Converts the set 2 scan code to set 3/1 scan code
Input:
bScanCode  Set 2 scan code
bConvTable  Pointer to the code set conversion table
Output:
Set 1/3 scan code


USBKB_ConvertSet2CodeToSet1Code in the syskbc.c

Function : USBKB_ConvertSet2CodeToSet1Code

File: syskbc.c
Description:
Converts the set 2 scan code to set 1 scan code
Input:
bScanCode   Set 2 scan code
Output:
Set 1 scan code


USBKB_ConvertUSBKeyCodeToScanCodeSet2 in the syskbc.c

Function : USBKB_ConvertUSBKeyCodeToScanCodeSet2

File: syskbc.c
Description:
This routine converts the USB keycode into scan code set
2 scan code. Conversion is accomplished using a static table.
Input:
bKeyCode    USB Key code
Output:
Set 2 scan code for the key


USBKB_DiscardCharacter in the syskbc.c

Function : USBKB_DiscardCharacter

File: syskbc.c
Description:
This routine discards the top character in the scan
code buffer, keyboard status flag buffer and device ID
buffer
Input:
fPointer        Points to the keyboard status flag buffer
Output:
Nothing


USBKB_GenerateScanCode in the syskbc.c

Function : USBKB_GenerateScanCode

File: syskbc.c
Description:
This routine generates the make/break code for th key
pressed depending on the make/break flag
Input:
bCodeGenFlag    Flag indicating whether it is a make or
               break code sequence
bKeyCode        USB key code for the key pressed
wWorkOffset     Offset into the buffers which has the
               code we are processing
Output:
0xFFFF -on success , 0 on error


USBKB_GenerateType1BreakCode in the syskbc.c

Function : USBKB_GenerateType1BreakCode

File: syskbc.c
Description:
This routine generates the type 1 break code for the byte
in the variable bSet2ScanCode
Input:
bSet2ScanCode - Byte containing the scan code
Output:
Nothing


USBKB_GenerateType1MakeCode in the syskbc.c

Function : USBKB_GenerateType1MakeCode

File: syskbc.c
Description:
This routine generates the type 1 make code for the byte
in the variable bSet2ScanCode
Input:
bSet2ScanCode - Byte containing the scan code
Output:
Nothing


USBKB_GenerateType2BreakCode in the syskbc.c

Function : USBKB_GenerateType2BreakCode

File: syskbc.c
Description:
This routine generates the type 2 break code for the byte
in the variable bSet2ScanCode
Input:
bSet2ScanCode - Byte containing the scan code
Output:
Nothing


USBKB_GenerateType2MakeCode in the syskbc.c

Function : USBKB_GenerateType2MakeCode

File: syskbc.c
Description:
This routine generates the type 2 make code for the byte
in the variable bSet2ScanCode
Input:
bSet2ScanCode - Byte containing the scan code
Output:
Nothing


USBKB_LEDOn in the syskbc.c

Function : USBKB_LEDOn

File: syskbc.c
Description:
This routine updates the keyboard LED status for all the
USB keyboards present in the sytem
Input:
Nothing
Output:
Nothing


USBKB_Scanner in the syskbc.c

Function : USBKB_Scanner

File: syskbc.c
Description:
This routine converts the USB keyboard input data into
IBM PC format scan code
Input:
fpDevInfo   Pointer to the device info. structure
fpBuffer    Pointer to the 8byte USB keyboard data
Output:
Nothing
Notes:
The format of the 8byte USB keyboard data is as follows:
Byte                     Description
Byte 0      Contains modifier key bits like SHIFT, CTRL, ALT etc
Byte 1      Reserved
Byte 2 - 7      Keycode (1-6) of the keys pressed


USBKB_UpdateLEDState in the syskbc.c

Function : USBKB_UpdateLEDState

File: syskbc.c
Description:
This routine is used to update the LED state between the
USB & PS/2 keyboard
Input:
bFlag   Indicates how the LED local variables are adjusted
Output:
Nothing

NOTE:        This routine is not executed during EFI phase


USBKBC_CheckAutoRepeat in the syskbc.c

Function : USBKBC_CheckAutoRepeat

File: syskbc.c
Description:
This routine will check the repeat counter and repeat rate
and perform the auto repeat appropriately
Input:
Nothing
Output:
Nothing


USBKBC_CheckCharacterBufferFull in the syskbc.c

Function : USBKBC_CheckCharacterBufferFull

File: syskbc.c
Description:
This routine checks whether the character buffer can hold
'N'+1 character
Input:
bCount  Space needed in the buffer (in characters)
Output:
0 If buffer is full
<> 0 If buffer is not full


USBKBC_GetAndStoreCCB in the syskbc.c

Function : USBKBC_GetAndStoreCCB

File: syskbc.c
Description:
This routine will read the CCB from the keyboard controller
and store it in a local variable
Input:
Nothing
Output:
Nothing


USBKBC_GetFromCharacterBuffer in the syskbc.c

Function : USBKBC_GetFromCharacterBuffer

File: syskbc.c
Description:
This routine gets a character from the character buffer.
Character buffer pointers are also updated
Input:
Nothing
Output:
Character taken from the character buffer


USBKBC_SendToCharacterBuffer in the syskbc.c

Function : USBKBC_SendToCharacterBuffer

File: syskbc.c
Description:
This routine puts a character into the character buffer.
Character buffer pointers are also updated
Input:
Nothing
Output:
Nothing


USBMouse_GetFromMouseBuffer in the syskbc.c

Function : USBMouse_GetFromMouseBuffer

File: syskbc.c
Description:
This routine retrieves a byte from the mouse input buffer.
Mouse input buffer pointers are also updated
Input:
None
Output:
bData   - Byte to be taken from the mouse input buffer


USBMouse_SendToMouseBuffer in the syskbc.c

Function : USBMouse_SendToMouseBuffer

File: syskbc.c
Description:
This routine puts a byte into the mouse input buffer.
Mouse input buffer pointers are also updated
Input:
bData   - Byte to be put in the mouse input buffer
Output:
None


USBMSSendMouseData in the syskbc.c

Function : USBMSSendMouseData

File: syskbc.c
Description:
This routine is called to send the mouse data to the KB
controller
Input:
Nothing
Output:
0xFF data processed
0 data not processed


USBMSUpdateMouseInterface in the syskbc.c

Function : USBMSUpdateMouseInterface

File: syskbc.c
Description:
This routine is called to enable or disable the mouse
interface
Input:
None
Output:
None


USBTrap_GetCurrentScanCodeSetNumber in the syskbc.c

Function : USBTrap_GetCurrentScanCodeSetNumber

File: syskbc.c
Description:
Returns the current scan code set number
Input:
Nothing
Output:
Scan code set number (1, 2 or 3)


USBTrap_GetOverrunCode in the syskbc.c

Function : USBTrap_GetOverrunCode

File: syskbc.c
Description:
Returns the overrun code depending on the current
scan code set
Input:
Nothing
Output:
Overrun code


sysnokbc.c

Description:
AMI USB keyboard driver data conversion and presentation
   routines, KBC is not present

The following functions are used in the file: sysnokbc.c.

Function | Description
AdjustKeyBuffer | There is often the new key is pressed on a USB keyboard while the previous one is not quite released. In this case usbKeys buffer contains the old keys and the new ones. User, on the other hand, expects only the new ones to be processed. This requires the buffer data modification so that the "old" keys are removed. The only time we do not do this analysis is when the buffer is clear that indicates that all keys are released.
GetAsciiScan | Calls the service routine for the given keycode. Returns the scan/ascii code.
GetCode_64 | Returns the scan/ascii code for USB Key 0x64, a.k.a. Europe2 Europe2 is typically in AT-101 Key Position 45, between Left Shift and Z keys.
GetCode_BasicKey | Returns the scan/ascii code for "basic keys" - not letters, not numbers (Enter, Escape, '[', '/', etc.); USB code from 28 to 38.
GetCode_ExtKey | Returns the scan/ascii code for extended keys such as Home, End, arrows, PgUp/Dn; USB code from 49 to 52.
GetCode_F11F12Key | Returns the scan/ascii code for functional keys F11 and F12; USB code 44 and 45.
GetCode_F1_10Key | Returns the scan/ascii code for functional keys F1..F10; USB code from 3A to 43.
GetCode_Keypad1 | Returns the scan/ascii code for non-numeric part of the keypad, such as '/', '*', etc.; USB code from 54 to 58.
GetCode_Keypad2 | Returns the scan/ascii code for numeric part of the keypad; USB code from 59 to 63.
GetCode_Letter | Returns the scan/ascii code for letter charachters, USB code from 4 to 1D. Keys from 'A' to 'Z' are interpreted using the following logic: 1) first_keycode is 04 2) last_keycode is 1D 3) scan_code = letters[key-first_keycode].scancode 4) ascii_code (normal) = 0x61+(key-first_keycode) 5) ascii_code (shifted) = 0x41+(key-first_keycode) 6) ascii_code (w/Ctrl) = key-first_keycode+1
GetCode_Number | Returns the scan/ascii code for numbers, USB code from 1E to 27. Keys from '1' to '0' are interpreted using the following logic: 1) first_keycode is 1E 2) last_keycode is 27 3) scan_code = key-first_keycode + 2 4) ascii_code (normal) = aNumbers[key-first_keycode].NormalNumber 5) ascii_code (shifted) = aNumbers[key-first_keycode].ShiftedNumber 6) scan_code (w/Alt) = key-first_keycode + 0x78
InsertChar | Insert the given scan/ascii code in the BDA keyboard queue. Updates the necessary BDA pointers, head and tail.
ProcessCtrlAltShift | Updates mLegacyKeyboard.KeyModifierState according to the value of the 1st byte of the USB keyboard data.
ProcessKeyCode | This routine converts USB code into UINT16 with ASCII code in the lower byte and PS/2 scan code in the upper byte and inserts this UINT16 in the legacy keyboard queue in BDA.
ProcessLockKeys | Process the keys that alter NumLock/ScrollLock/CapsLock; updates mLegacyKeyboard.KeyModifierState and 0:417 accordingly.
SysNoKbcAutoRepeat | This function performs the key autorepeat
UpdateKeyMon | This function takes the keyboard scan code and checks if it is present in the Key Monitor table. If found, it updates the corresponding bit in the Key Monitor map. Key monitor data structure pointer is at 9FC0:10C Key monitor map (32 bit) updated by this routine is at 9FC0:108 Map element is {BYTE, DWORD}; BYTE - scan code, DWORD - attribute
UpdateLEDs | Updates USB keyboard(s) LEDs according to the value of mLegacyKeyboard.KeyModifierState.
USBKB_Int9 | This routine is called from when the new data from USB keyboard is transmitted and available for processing. The functionality is similar to legacy INT9 handler - data is converted into PS/2 ASCII/Scan codes and placed in BDA.

The following data structures are used in the file: sysnokbc.c.

Variable | Description
TKEYGROUP | This structure describes the range of the USB keys and the function that is called if the USB key is found within this range.


AdjustKeyBuffer in the sysnokbc.c

Function : AdjustKeyBuffer

File: sysnokbc.c
Description:
There is often the new key is pressed on a USB keyboard while
the previous one is not quite released. In this case usbKeys
buffer contains the old keys and the new ones. User, on the
other hand, expects only the new ones to be processed.
This requires the buffer data modification so that the "old"
keys are removed.
The only time we do not do this analysis is when the buffer
is clear that indicates that all keys are released.
Built on 16:12:00 10/28/16


GetAsciiScan in the sysnokbc.c

Function : GetAsciiScan

File: sysnokbc.c
Description:
Calls the service routine for the given keycode. Returns the
scan/ascii code.
Input:
Key code
Output:
scan code in upper byte, ascii code in lower byte
Referrals:
TKEYGROUP
Built on 16:12:00 10/28/16


GetCode_64 in the sysnokbc.c

Function : GetCode_64

File: sysnokbc.c
Description:
Returns the scan/ascii code for USB Key 0x64, a.k.a. Europe2
Europe2 is typically in AT-101 Key Position 45, between Left
Shift and Z keys.
Built on 16:12:00 10/28/16


GetCode_BasicKey in the sysnokbc.c

Function : GetCode_BasicKey

File: sysnokbc.c
Description:
Returns the scan/ascii code for "basic keys" - not letters, not
numbers (Enter, Escape, '[', '/', etc.); USB code from 28 to 38.
Input:
Key index (key code - 28)
Output:
scan code in upper byte, ascii code in lower byte
Built on 16:12:00 10/28/16


GetCode_ExtKey in the sysnokbc.c

Function : GetCode_ExtKey

File: sysnokbc.c
Description:
Returns the scan/ascii code for extended keys such as Home,
End, arrows, PgUp/Dn; USB code from 49 to 52.
Input:
Key index (key code - 49)
Output:
scan code in upper byte, ascii code in lower byte
Built on 16:12:00 10/28/16


GetCode_F11F12Key in the sysnokbc.c

Function : GetCode_F11F12Key

File: sysnokbc.c
Description:
Returns the scan/ascii code for functional keys F11 and F12;
USB code 44 and 45.
Input:
Key index (key code - 44)
Output:
scan code in upper byte, ascii code in lower byte
Built on 16:12:00 10/28/16


GetCode_F1_10Key in the sysnokbc.c

Function : GetCode_F1_10Key

File: sysnokbc.c
Description:
Returns the scan/ascii code for functional keys F1..F10;
USB code from 3A to 43.
Input:
Key index (key code - 3A)
Output:
scan code in upper byte, ascii code in lower byte
Built on 16:12:00 10/28/16


GetCode_Keypad1 in the sysnokbc.c

Function : GetCode_Keypad1

File: sysnokbc.c
Description:
Returns the scan/ascii code for non-numeric part of the keypad,
such as '/', '*', etc.; USB code from 54 to 58.
Input:
Key index (key code - 54)
Output:
scan code in upper byte, ascii code in lower byte
Built on 16:12:00 10/28/16


GetCode_Keypad2 in the sysnokbc.c

Function : GetCode_Keypad2

File: sysnokbc.c
Description:
Returns the scan/ascii code for numeric part of the keypad;
USB code from 59 to 63.
Input:
Key index (key code - 59)
Output:
scan code in upper byte, ascii code in lower byte
Notes:
The ascii_code is altered depending on the combination of
Shift and NumLock.
Built on 16:12:00 10/28/16


GetCode_Letter in the sysnokbc.c

Function : GetCode_Letter

File: sysnokbc.c
Description:
Returns the scan/ascii code for letter charachters, USB
code from 4 to 1D.
Keys from 'A' to 'Z' are interpreted using the following logic:
1) first_keycode is 04
2) last_keycode is 1D
3) scan_code = letters[key-first_keycode].scancode
4) ascii_code (normal) = 0x61+(key-first_keycode)
5) ascii_code (shifted) = 0x41+(key-first_keycode)
6) ascii_code (w/Ctrl) = key-first_keycode+1
Input:
Key index (key code - 4)
Output:
scan code in upper byte, ascii code in lower byte
Built on 16:12:00 10/28/16


GetCode_Number in the sysnokbc.c

Function : GetCode_Number

File: sysnokbc.c
Description:
Returns the scan/ascii code for numbers, USB code from 1E to 27.
Keys from '1' to '0' are interpreted using the following logic:
1) first_keycode is 1E
2) last_keycode is 27
3) scan_code = key-first_keycode + 2
4) ascii_code (normal) = aNumbers[key-first_keycode].NormalNumber
5) ascii_code (shifted) = aNumbers[key-first_keycode].ShiftedNumber
6) scan_code (w/Alt) = key-first_keycode + 0x78
Input:
Key index (key code - 1E)
Output:
scan code in upper byte, ascii code in lower byte
Built on 16:12:00 10/28/16


InsertChar in the sysnokbc.c

Function : InsertChar

File: sysnokbc.c
Description:
Insert the given scan/ascii code in the BDA keyboard queue.
Updates the necessary BDA pointers, head and tail.
Input:
Key code, scan code in upper byte, ascii code in lower byte


ProcessCtrlAltShift in the sysnokbc.c

Function : ProcessCtrlAltShift

File: sysnokbc.c
Description:
Updates mLegacyKeyboard.KeyModifierState according to the value
of the 1st byte of the USB keyboard data.


ProcessKeyCode in the sysnokbc.c

Function : ProcessKeyCode

File: sysnokbc.c
Description:
This routine converts USB code into UINT16 with ASCII code in the
lower byte and PS/2 scan code in the upper byte and inserts this
UINT16 in the legacy keyboard queue in BDA.
Input:
USB key


ProcessLockKeys in the sysnokbc.c

Function : ProcessLockKeys

File: sysnokbc.c
Description:
Process the keys that alter NumLock/ScrollLock/CapsLock; updates
mLegacyKeyboard.KeyModifierState and 0:417 accordingly.
Input:
USB key buffer


SysNoKbcAutoRepeat in the sysnokbc.c

Function : SysNoKbcAutoRepeat

File: sysnokbc.c
Description:
This function performs the key autorepeat


TKEYGROUP in the sysnokbc.c

Variable : TKEYGROUP

File: sysnokbc.c
Fields:

Name | Type | Description
first_keycode | UINT8 | first key code in the range
last_keycode | UINT8 | last key code in the range
GetCode | GETCODE_FUNC | function to call if the code is in the range

Description:
This structure describes the range of the USB keys and the
function that is called if the USB key is found within this
range.


UpdateKeyMon in the sysnokbc.c

Function : UpdateKeyMon

File: sysnokbc.c
Description:
This function takes the keyboard scan code and checks if it is present
in the Key Monitor table. If found, it updates the corresponding bit in
the Key Monitor map.
        Key monitor data structure pointer is at 9FC0:10C
    Key monitor map (32 bit) updated by this routine is at 9FC0:108
        Map element is {BYTE, DWORD}; BYTE - scan code, DWORD - attribute
Input:
Key code

Output        Key monitor map is updated accordingly


UpdateLEDs in the sysnokbc.c

Function : UpdateLEDs

File: sysnokbc.c
Description:
Updates USB keyboard(s) LEDs according to the value of
mLegacyKeyboard.KeyModifierState.


USBKB_Int9 in the sysnokbc.c

Function : USBKB_Int9

File: sysnokbc.c
Description:
This routine is called from when the new data from USB keyboard
is transmitted and available for processing. The functionality is
similar to legacy INT9 handler - data is converted into PS/2
ASCII/Scan codes and placed in BDA.
Input:
Buffer with USB keys


tree.c

Description:
USB tree manipulation routines

The following functions are used in the file: tree.c.

Function | Description
QueueGet | retrieves data stored at the tail of the queue and removes the tail item
QueuePut | add a new item in front of the head of the queue
QueuePutMsg | add a variable size item to the queue
QueueRemoveMsg | retrieves a variable size item from the queue
QueueSize | retrieves number of items stored in the queue
TreeAddChild | add a child node to the TREENODE_T structure
TreeCreate | initializes TREENODE_T structure
TreeForEachSibling | Enumerates nodes of the tree which are direct children of the same parent; In contrust to TreeSearchSibling this function ignores the result returned from call-back routine and always enumerates all sibling nodes
TreeRemove | removes a node from the tree
TreeSearchDeep | Enumerates nodes of the tree which are direct and indirect children of the same parent
TreeSearchSibling | Enumerates nodes of the tree which are direct children of the same parent


QueueGet in the tree.c

Function : QueueGet

File: tree.c
Description:
retrieves data stored at the tail of the queue and
removes the tail item
Input:
q - pointer to QUEUE_T structure


QueuePut in the tree.c

Function : QueuePut

File: tree.c
Description:
add a new item in front of the head of the queue
Input:
q - pointer to QUEUE_T structure


QueuePutMsg in the tree.c

Function : QueuePutMsg

File: tree.c
Description:
add a variable size item to the queue
Input:
q - pointer to QUEUE_T structure
sz - number of dwords to add to the queue


QueueRemoveMsg in the tree.c

Function : QueueRemoveMsg

File: tree.c
Description:
retrieves a variable size item from the queue
Input:
q - pointer to QUEUE_T structure
sz - number of dwords to remove from the queue


QueueSize in the tree.c

Function : QueueSize

File: tree.c
Description:
retrieves number of items stored in the queue
Input:
q - pointer to QUEUE_T structure


TreeAddChild in the tree.c

Function : TreeAddChild

File: tree.c
Description:
add a child node to the TREENODE_T structure
Input:
p - pointer to parent TREENODE_T structure
c - pointer to child TREENODE_T structure


TreeCreate in the tree.c

Function : TreeCreate

File: tree.c
Description:
initializes TREENODE_T structure
Input:
n - pointer to TREENODE_T structure
d - pointer to data structure specific to
the type of tree node
Output:
Pointer to TREENODE_T structure that was passed in as parrameter


TreeForEachSibling in the tree.c

Function : TreeForEachSibling

File: tree.c
Description:
Enumerates nodes of the tree which are direct children of
the same parent; In contrust to TreeSearchSibling this
function ignores the result returned from call-back routine
and always enumerates all sibling nodes
Input:
n - pointer to TREENODE_T structure
pr  - call-back function that is called for each node
data - pointer that is passed to call-back to maintain
 the context of the enumeration


TreeRemove in the tree.c

Function : TreeRemove

File: tree.c
Description:
removes a node from the tree
Input:
n - pointer to TREENODE_T structure


TreeSearchDeep in the tree.c

Function : TreeSearchDeep

File: tree.c
Description:
Enumerates nodes of the tree which are direct and indirect
children of the same parent
Input:
n   - pointer to TREENODE_T structure
pr  - predicate function that is called for each node;
 controlls whether enumeration should continue
 once predicate returns TRUE the enumeration will
data - pointer that is passed to predicate to maintain
 the context of the enumeration
Output:
the node that cause enumeration to stop


TreeSearchSibling in the tree.c

Function : TreeSearchSibling

File: tree.c
Description:
Enumerates nodes of the tree which are direct children of
the same parent
Input:
n   - pointer to TREENODE_T structure
pr  - predicate function that is called for each node
 and controll whether enumeration should continue
 once predicate returns TRUE the enumeration will
data - pointer that is passed to predicate to maintain
 the context of the enumeration
Output:
the node that cause enumeration to stop


tree.h

Description:
Tree routines header


uhcd.c

Description:
AMI USB Host Controller Driver

The following functions are used in the file: uhcd.c.

Function | Description
AddHC | This function checks the type of controller and its PCI info against gHcPciInfo data table; if HC is found appropriate, then it allocates the frame list for this HC and adds the new HCStruc entry.
AmiUsbDriverBindingStart | Binding protocol function to start the AMI USB driver
AmiUsbDriverBindingStop | Stop this driver on ControllerHandle. Support stoping any child handles created by this driver.
AmiUsbDriverBindingSupported | Test to see if this driver supports ControllerHandle.
AmiUsbDriverEntryPoint | Entry point for AMI USB EFI driver
AmiUsbDriverGetControllerName | This function is a part of binding protocol, it returns the string "USB Host Controller".
CalculateMemorySize | This function returns the total amount of memory used by all supported USB controllers.
CheckDeviceReady | This function invokes USB Mass Storage API handler to check whether device is ready. If called for the first time, this function retrieves the mass storage device geometry and fills the corresponding fpDevInfo fields.
ClearLegacyUsbKbdBuffer |
Dummy1 | This function is a legacy mass storage support API stub, replaced by the API producer.
Dummy2 | This function is a legacy mass storage support API stub, replaced by the API producer.
DummyHcFunc | This function is dummy HC memory allocation routine.
GetNextMassDevice | This is the interface function that executes USBMassAPIGetDeviceInformation function and returns the information about mass storage device.
GetNextMassDeviceName | This function returns a name string of connected mass storage device.
GetRuntimeRegion | This function returns the beginning and the end of USB runtime memory region.
HotplugIsEnabled | This function returns TRUE if there is a need for extra USB devices that might be inserted/enumerated after legacy boot
IsControllerWithRmh | This function checks if the controller has integrated USB 2.0 Rate Matching Hubs (RMH).
IsExternalController | This function check whether the controller is behind bridge
IsSupportedInterfaceType | This function check whether the Interface Type is supported.
LocateEhciController | Visit all companions as different PCI functions of the same PCI device as Controller (enumerate HCPCIInfo ). For each companion function locate corresponding PCI_IO handle, execute ConnectController if necessary; add them to aHCStrucTable.
OnExitBootServices | EXIT_BOOT_SERVICES notification callback function.
OnLegacyBoot | This function is invoked when on Legacy Boot
ReadyToBootNotify | This function is invoked when on ReadyToBoot
ReportDevices | This is the interface function that reports the number of devices currently controlled by the driver.
UhcdPciIoNotifyCallback | PciIo notification callback. It calls UpdateHcPciInfo porting function to update the PCI information in the HC device table.
UsbChangeEfiToLegacy | This is the interface function that reports switches between EFI and Legacy USB operation.
UsbIntTimerCallback |
UsbRtStopController | This function stops the USB host controllers of a given Bus Dev Function


AddHC in the uhcd.c

Function : AddHC

File: uhcd.c
Description:
This function checks the type of controller and its PCI info
against gHcPciInfo data table; if HC is found appropriate, then
it allocates the frame list for this HC and adds the new HCStruc
entry.
Input:
This              - Binding Protocol instance pointer
PciBus/Dev/Func   - PCI location of the HC
Controller        - Host Controller handle
Irq               - HW Interrupt number
Output:
TRUE  - the new controller has been added
FALSE - controller was not added (see notes)
Built on 16:12:00 10/28/16


AmiUsbDriverBindingStart in the uhcd.c

Function : AmiUsbDriverBindingStart

File: uhcd.c
Description:
Binding protocol function to start the AMI USB driver
Input:
This                - Protocol instance pointer.
ControllerHandle    - Handle of device to test
Output:
EFI_SUCCESS         - This driver supports this device.
EFI_UNSUPPORTED     - This driver does not support this device.
EFI_DEVICE_ERROR    - This driver cannot be started due to device
                   Error
EFI_OUT_OF_RESOURCES
Built on 16:12:00 10/28/16


AmiUsbDriverBindingStop in the uhcd.c

Function : AmiUsbDriverBindingStop

File: uhcd.c
Description:
Stop this driver on ControllerHandle. Support stoping any
child handles created by this driver.
Input:
This        - Protocol instance pointer.
DeviceHandle      - Handle of device to stop driver on
NumberOfChildren  - Number of Children in the ChildHandleBuffer
ChildHandleBuffer - List of handles for the children we
                   need to stop.
Output:
EFI_SUCCESS on success, EFI_ERROR on error
Built on 16:12:00 10/28/16


AmiUsbDriverBindingSupported in the uhcd.c

Function : AmiUsbDriverBindingSupported

File: uhcd.c
Description:
Test to see if this driver supports ControllerHandle.
Input:
This                - Protocol instance pointer
ControllerHandle    - Handle of device to test
Output:
EFI_SUCCESS         - This driver supports this device.
EFI_UNSUPPORTED     - This driver does not support this device.
Built on 16:12:00 10/28/16


AmiUsbDriverEntryPoint in the uhcd.c

Function : AmiUsbDriverEntryPoint

File: uhcd.c
Description:
Entry point for AMI USB EFI driver
Built on 16:12:00 10/28/16


AmiUsbDriverGetControllerName in the uhcd.c

Function : AmiUsbDriverGetControllerName

File: uhcd.c
Description:
This function is a part of binding protocol, it returns
the string "USB Host Controller".
Built on 16:12:00 10/28/16


CalculateMemorySize in the uhcd.c

Function : CalculateMemorySize

File: uhcd.c
Description:
This function returns the total amount of memory used by
all supported USB controllers.
Built on 16:12:00 10/28/16


CheckDeviceReady in the uhcd.c

Function : CheckDeviceReady

File: uhcd.c
Description:
This function invokes USB Mass Storage API handler to
check whether device is ready. If called for the first time,
this function retrieves the mass storage device geometry
and fills the corresponding fpDevInfo fields.
Input:
Pointer to device which needs to be checked
Built on 16:12:00 10/28/16


ClearLegacyUsbKbdBuffer in the uhcd.c

Function : ClearLegacyUsbKbdBuffer

File: uhcd.c
Description:

Built on 16:12:00 10/28/16


Dummy1 in the uhcd.c

Function : Dummy1

File: uhcd.c
Description:
This function is a legacy mass storage support API stub,
replaced by the API producer.
Built on 16:12:00 10/28/16


Dummy2 in the uhcd.c

Function : Dummy2

File: uhcd.c
Description:
This function is a legacy mass storage support API stub,
replaced by the API producer.
Built on 16:12:00 10/28/16


DummyHcFunc in the uhcd.c

Function : DummyHcFunc

File: uhcd.c
Description:
This function is dummy HC memory allocation routine.
Built on 16:12:00 10/28/16


GetNextMassDevice in the uhcd.c

Function : GetNextMassDevice

File: uhcd.c
Description:
This is the interface function that executes
USBMassAPIGetDeviceInformation function and returns the
information about mass storage device.


GetNextMassDeviceName in the uhcd.c

Function : GetNextMassDeviceName

File: uhcd.c
Description:
This function returns a name string of connected mass storage
device.
Input:
Data - Pointer to a string buffer to be filled
DataSize - Size of the data to copy to a buffer
DevIndex - Device index
Output:
The updated device index, see below.
Notes:
Initially DevIndex should be set to 0. This function returns
the name of the first mass storage device (if no device found
it returns DevIndex as 0FFh) and also updates DevIndex to the
device address of the current mass storage device. If no other
mass storage device is found then the routine sets the bit7 to 1
indicating current information is valid but no more mass device
found in the system. The caller can get the next device info if
DevIndex is not 0FFh and bit7 is not set.


GetRuntimeRegion in the uhcd.c

Function : GetRuntimeRegion

File: uhcd.c
Description:
This function returns the beginning and the end of USB
runtime memory region.


HotplugIsEnabled in the uhcd.c

Function : HotplugIsEnabled

File: uhcd.c
Description:
This function returns TRUE if there is a need for extra USB
devices that might be inserted/enumerated after legacy boot


IsControllerWithRmh in the uhcd.c

Function : IsControllerWithRmh

File: uhcd.c
Description:
This function checks if the controller has integrated
USB 2.0 Rate Matching Hubs (RMH).


IsExternalController in the uhcd.c

Function : IsExternalController

File: uhcd.c
Description:
This function check whether the controller is behind bridge


IsSupportedInterfaceType in the uhcd.c

Function : IsSupportedInterfaceType

File: uhcd.c
Description:
This function check whether the Interface Type is supported.


LocateEhciController in the uhcd.c

Function : LocateEhciController

File: uhcd.c
Description:
Visit all companions as different PCI functions of the same
        PCI device as Controller (enumerate HCPCIInfo ). For each
        companion function locate corresponding PCI_IO handle, execute
        ConnectController if necessary; add them to aHCStrucTable.


OnExitBootServices in the uhcd.c

Function : OnExitBootServices

File: uhcd.c
Description:
EXIT_BOOT_SERVICES notification callback function.


OnLegacyBoot in the uhcd.c

Function : OnLegacyBoot

File: uhcd.c
Description:
This function is invoked when on Legacy Boot
Input:
Event       - Efi event occurred upon legacyboot
Context     - Not used


ReadyToBootNotify in the uhcd.c

Function : ReadyToBootNotify

File: uhcd.c
Description:
This function is invoked when on ReadyToBoot
Input:
Event       - Efi event occurred upon legacyboot
Context     - Not used


ReportDevices in the uhcd.c

Function : ReportDevices

File: uhcd.c
Description:
This is the interface function that reports the number of devices
currently controlled by the driver.
Input:
Pointer to a structure that indicates the number of connected devices.
Output:
Input structure is updated.


UhcdPciIoNotifyCallback in the uhcd.c

Function : UhcdPciIoNotifyCallback

File: uhcd.c
Description:
PciIo notification callback. It calls UpdateHcPciInfo porting function
to update the PCI information in the HC device table.
Input:
Event - event signaled by the DXE Core upon PciIo installation
Context - event context


UsbChangeEfiToLegacy in the uhcd.c

Function : UsbChangeEfiToLegacy

File: uhcd.c
Description:
This is the interface function that reports switches between EFI and
Legacy USB operation.
Input:
Switch that indicates where the switch should be turned:
   1 - from EFI to Legacy
   0 - from Legacy to EFI
Output:
None


UsbIntTimerCallback in the uhcd.c

Function : UsbIntTimerCallback

File: uhcd.c
Description:


UsbRtStopController in the uhcd.c

Function : UsbRtStopController

File: uhcd.c
Description:
This function stops the USB host controllers of a given
        Bus Dev Function


uhcd.h

Description:
AMI USB Host Controller Driver header file


uhcd.mak

Description:
Make file for the UHCD component


uhci.c

Description:
AMI USB UHCI driver

The following functions are used in the file: uhci.c.

Function | Description
UHCI_ActivatePolling | This function activates the polling TD for the requested device. The device may be a USB keyboard or USB hub
UHCI_BulkTransfer | This function executes a bulk transaction on the USB. The transfer may be either DATA_IN or DATA_OUT packets containing data sent from the host to the device or vice-versa. This function wil not return until the request either completes successfully or completes with error (due to time out, etc.)
UHCI_ControlTransfer | This function executes a device request command transaction on the USB. One setup packet is generated containing the device request parameters supplied by the caller. The setup packet may be followed by data in or data out packets containing data sent from the host to the device or vice-versa. This function will not return until the request either completes successfully or completes in error (due to time out, etc.)
UHCI_DeactivatePolling | This function de-activates the polling TD for the requested device. The device may be a USB keyboard or USB hub
UHCI_DisableHCPorts | This routine disables the UHCI HC root hub ports
UHCI_DisableInterrupts | This API function is called to disable the interrupts generated by the UHCI host controller. The input to the routine is the pointer to the HC structure that defines this host controller.
UHCI_DisableKeyRepeat | This function disables the keyboard repeat rate logic
UHCI_DisableRootHub | This function disables the root hub of the UHCI controller.
UHCI_EnableInterrupts | This function enables the HC interrupts
UHCI_EnableKeyRepeat | This function enables the keyboard repeat rate logic
UHCI_EnableRootHub | This function enables the root hub port specified
UHCI_EnumeratePorts | This API function is called to enumerate the root hub ports in the UHCI controller. The input to the routine is the pointer to the HC structure that defines this host controller
UHCI_FillHCDEntries | This function fills the host controller driver routine pointers
UHCI_GetRootHubStatus | This function returns the port connect status for the root hub port
UHCI_GlobalSuspend | This function suspend the UHCI HC.
UHCI_InitBulkDataTds | This function initializes the fields in bulk data TD list that remain after UHCI_InitBulkTdCommon: - Data buffer pointer - Data length - Data toggle (DAT0/DAT1)
UHCI_InitBulkTdCommon | This function creates a chain of two TDs for bulk data transfer. It fills in the following fields in TD: pLinkPtr - NextTd address dToken - All bits except length and data toggle
UHCI_InterruptTransfer | This function executes an interrupt transaction on the USB. The data transfer direction is always DATA_IN. This function wil not return until the request either completes successfully or completes in error (due to time out, etc.)
UHCI_PollingTDCallback | This function is called when a polling TD from the TD pool completes an interrupt transaction to its assigned device. This routine should process any data in the TD's data buffer, handle any errors, and then copy the TD's CSReloadValue field into its control status field to put the TD back into service.
UHCI_ProcessInterrupt | This function is called when the USB interrupt bit is set. This function will parse through the TDs and QHs to find out completed TDs and call their respective callback functions.
UHCI_RepeatTDCallback | This function is called when TdRepeat completes a transaction. This TD runs a dummy interrupt transaction to a non-existant device address for the purpose of generating a periodic timeout interrupt which in turn is used to generate keyboard repeat.
UHCI_ResetRootHub | This function resets the UHCI HC root hub port
UHCI_RootHubTDCallBack | This function is called when TD256ms completes a transaction. This TD runs a dummy interrupt transaction to a non-existant device address for the purpose of generating a periodic timeout interrupt. This periodic interrupt may be used to check for new devices on the root hub etc.
UHCI_Start | This API function is called to start a UHCI host controller. The input to the routine is the pointer to the HC structure that defines this host controller
UHCI_StartTDSchedule | This routine will start the TD schedule for the UHCI controller. After this routine TD's can be scheduled for execution.
UHCI_Stop | This API function is called to stop the UHCI controller. The input to the routine is the pointer to the HC structure that defines this host controller.
UHCI_StopTDSchedule | This routine will stop the TD schedules and frees the data structures
UhciActivateTds |
UhciAddQhToFrameList | This routine will add the particular QH into the frame list
UhciAllocGeneralTds |
UhciExecuteTransfer | This function execites a transfer and waits for the completion of the transfer, and returns the transfer results.
UhciFreeTds |
UhciInitQh | This function check whether HC is halted.
UhciIsHalted | This function check whether HC is halted.
UhciProcessFrameList | This function will parse through frame list to find completed QH/TD and invoke corresponding call back routine
UhciProcessQh | This function will check whether the QH is completed if so, it will call the call back routine associated with the TDs present in the QH
UhciProcessTd | This function will check whether the TD is completed if so, it will call the call back routine associated with this TD
UhciRemoveQhFromFrameList | This routine will remove a QH from the the frame list
UhciTranslateInterval | This function calculates the polling rate.

Built on 16:12:02 10/28/16


UHCI_ActivatePolling in the uhci.c

Function : UHCI_ActivatePolling

File: uhci.c
Description:
This function activates the polling TD for the requested device. The device
may be a USB keyboard or USB hub
Input:
fpHCStruc   Pointer to the HC structure
fpDevInfo   Pointer to the device information structure
Output:
USB_SUCCESS or USB_ERROR
Notes:
For the keyboard device this routine allocates TDRepeat also, if it is not
already allocated. This routine allocate a polling TD and schedule it to 8ms
schedule for keyboards and to 1024ms schedule for hubs.


UHCI_BulkTransfer in the uhci.c

Function : UHCI_BulkTransfer

File: uhci.c
Description:
This function executes a bulk transaction on the USB. The transfer may be
either DATA_IN or DATA_OUT packets containing data sent from the host to
the device or vice-versa. This function wil not return until the request
either completes successfully or completes with error (due to time out, etc.)
Input:
HcStruc     Pointer to HCStruc of the host controller
DevInfo     DeviceInfo structure (if available else 0)
XferDir     Transfer direction
   Bit 7: Data direction
           0 Host sending data to device
           1 Device sending data to host
   Bit 6-0 : Reserved
Buffer      Buffer containing data to be sent to the device or buffer to be
used to receive data value in Segment:Offset format
Length      Length request parameter, number of bytes of data to be transferred
in or out of the host controller
Output:
Amount of data transferred


UHCI_ControlTransfer in the uhci.c

Function : UHCI_ControlTransfer

File: uhci.c
Description:
This function executes a device request command transaction on the USB. One
setup packet is generated containing the device request parameters supplied
by the caller.  The setup packet may be followed by data in or data out packets
containing data sent from the host to the device or vice-versa. This function
will not return until the request either completes successfully or completes in
error (due to time out, etc.)
Input:
fpHCStruc   Pointer to HCStruc of the host controller
pDevInfo    DeviceInfo structure (if available else 0)
wRequest    Request type (low byte)
Bit 7   : Data direction
   0 = Host sending data to device
   1 = Device sending data to host
Bit 6-5 : Type
   00 = Standard USB request
   01 = Class specific
   10 = Vendor specific
   11 = Reserved
Bit 4-0 : Recipient
   00000 = Device
   00001 = Interface
   00010 = Endpoint
   00100 - 11111 = Reserved
Request code, a one byte code describing
the actual device request to be executed
(ex: Get Configuration, Set Address etc)
wIndex      wIndex request parameter (meaning varies)
wValue      wValue request parameter (meaning varies)
fpBuffer    Buffer containing data to be sent to the
device or buffer to be used to receive data
wLength     wLength request parameter, number of bytes
of data to be transferred in or out
of the host controller
Output:
Number of bytes transferred: 0 - Failure, <>0 - Success
Notes:
Do not use USB_SUCCESS or USB_ERROR as returned values


UHCI_DeactivatePolling in the uhci.c

Function : UHCI_DeactivatePolling

File: uhci.c
Description:
This function de-activates the polling TD for the requested device. The
device may be a USB keyboard or USB hub
Input:
fpHCStruc   Pointer to the HC structure
fpDevInfo   Pointer to the device information structure
Output:
USB_SUCCESS or USB_ERROR


UHCI_DisableHCPorts in the uhci.c

Function : UHCI_DisableHCPorts

File: uhci.c
Description:
This routine disables the UHCI HC root hub ports
Input:
fpHCStruc   Ptr to the host controller structure
Output:
Status: USB_SUCCESS = Success, USB_ERROR = Failure


UHCI_DisableInterrupts in the uhci.c

Function : UHCI_DisableInterrupts

File: uhci.c
Description:
This API function is called to disable the interrupts generated by the UHCI
host controller. The input to the routine is the pointer to the HC structure
that defines this host controller.
Input:
fpHCStruc   Ptr to the host controller structure
Output:
Status: USB_SUCCESS = Success, USB_ERROR = Failure


UHCI_DisableKeyRepeat in the uhci.c

Function : UHCI_DisableKeyRepeat

File: uhci.c
Description:
This function disables the keyboard repeat rate logic
Input:
fpHCStruc   Pointer to the HCStruc structure
Output:
USB_SUCCESS or USB_ERROR


UHCI_DisableRootHub in the uhci.c

Function : UHCI_DisableRootHub

File: uhci.c
Description:
This function disables the root hub of the UHCI controller.
Input:
fpHCStruc   Pointer to HCStruc of the host controller
bPortNum    Root port to be disabled
Output:
USB_SUCCESS or USB_ERROR


UHCI_EnableInterrupts in the uhci.c

Function : UHCI_EnableInterrupts

File: uhci.c
Description:
This function enables the HC interrupts
Input:
fpHCStruc   Pointer to the HCStruc structure
Output:
USB_SUCCESS of USB_ERROR


UHCI_EnableKeyRepeat in the uhci.c

Function : UHCI_EnableKeyRepeat

File: uhci.c
Description:
This function enables the keyboard repeat rate logic
Input:
fpHCStruc   Pointer to the HCStruc structure
Output:
USB_SUCCESS or USB_ERROR


UHCI_EnableRootHub in the uhci.c

Function : UHCI_EnableRootHub

File: uhci.c
Description:
This function enables the root hub port specified
Input:
fpHCStruc   Pointer to HCStruc of the host controller
bPortNum    Root port to be enabled
Output:
USB_SUCCESS or USB_ERROR


UHCI_EnumeratePorts in the uhci.c

Function : UHCI_EnumeratePorts

File: uhci.c
Description:
This API function is called to enumerate the root hub ports in the UHCI
controller. The input to the routine is the pointer to the HC structure
that defines this host controller
Input:
fpHCStruc   Ptr to the host controller structure
Output:
Status: USB_SUCCESS = Success, USB_ERROR = Failure


UHCI_FillHCDEntries in the uhci.c

Function : UHCI_FillHCDEntries

File: uhci.c
Description:
This function fills the host controller driver routine pointers
Input:
fpHCDHeader     Ptr to the host controller header structure
Output:
USB_SUCCESS = Success, USB_ERROR = Failure


UHCI_GetRootHubStatus in the uhci.c

Function : UHCI_GetRootHubStatus

File: uhci.c
Description:
This function returns the port connect status for the root hub port
Input:
pHCStruc    Pointer to HCStruc of the host controller
bPortNum    Port in the HC whose status is requested
Output:
NewPortNum  Port in the HC that can possibly replace bPortNum


UHCI_GlobalSuspend in the uhci.c

Function : UHCI_GlobalSuspend

File: uhci.c
Description:
This function suspend the UHCI HC.


UHCI_InitBulkDataTds in the uhci.c

Function : UHCI_InitBulkDataTds

File: uhci.c
Description:
This function initializes the fields in bulk data TD list that remain after
UHCI_InitBulkTdCommon:
   - Data buffer pointer
   - Data length
   - Data toggle (DAT0/DAT1)
Output:
Pointer to the last TD in the chain


UHCI_InitBulkTdCommon in the uhci.c

Function : UHCI_InitBulkTdCommon

File: uhci.c
Description:
This function creates a chain of two TDs for bulk data transfer. It fills
in the following fields in TD:
   pLinkPtr - NextTd address
   dToken   - All bits except length and data toggle
Input:
BulkDataTd0     1st TD in the chain
BulkDataTd1     2nd TD in the chain
TokenData       Data for dToken
NumBulkTds      # of bulk TDs


UHCI_InterruptTransfer in the uhci.c

Function : UHCI_InterruptTransfer

File: uhci.c
Description:
This function executes an interrupt transaction on the USB. The data transfer
direction is always DATA_IN. This function wil not return until the request
either completes successfully or completes in error (due to time out, etc.)
Input:
fpHCStruc   Pointer to HCStruc of the host controller
fpDevInfo   DeviceInfo structure (if available else 0)
EndpointAddress The destination USB device endpoint to which the device request
is being sent.
MaxPktSize  Indicates the maximum packet size the target endpoint is capable
of sending or receiving.
fpBuffer    Buffer containing data to be sent to the device or buffer to be
used to receive data
wLength     wLength request parameter, number of bytes of data to be transferred
Output:
Number of bytes transferred
Notes:
DO NOT TOUCH THE LINK POINTER OF THE TDInterruptData. It is statically allocated
and linked with other items in the 1ms schedule


UHCI_PollingTDCallback in the uhci.c

Function : UHCI_PollingTDCallback

File: uhci.c
Description:
This function is called when a polling TD from the TD pool completes an
interrupt transaction to its assigned device.
This routine should process any data in the TD's data buffer, handle any
errors, and then copy the TD's CSReloadValue field into its control status
field to put the TD back into service.
Input:
fpHCStruc   Pointer to the HCStruc structure
fpDevInfo   NULL (pDevInfo is not valid)
fpTD        Pointer to the TD that completed
Output:
USB_SUCCESS or USB_ERROR


UHCI_ProcessInterrupt in the uhci.c

Function : UHCI_ProcessInterrupt

File: uhci.c
Description:
This function is called when the USB interrupt bit is set. This function
will parse through the TDs and QHs to find out completed TDs and call
their respective callback functions.
Input:
fpHCStruc   Pointer to the HCStruc structure
Output:
USB_ERROR - Need more Interrupt processing
USB_SUCCESS - No interrupts pending


UHCI_RepeatTDCallback in the uhci.c

Function : UHCI_RepeatTDCallback

File: uhci.c
Description:
This function is called when TdRepeat completes a transaction.  This TD
runs a dummy interrupt transaction to a non-existant device address for
the purpose of generating a periodic timeout interrupt which in turn is
used to generate keyboard repeat.
Input:
fpHCStruc   Pointer to the HCStruc structure
fpDevInfo   NULL (pDevInfo is not valid)
fpTD        Pointer to the TD that completed
fpBuffer    Not used
Output:
USB_SUCCESS or USB_ERROR


UHCI_ResetRootHub in the uhci.c

Function : UHCI_ResetRootHub

File: uhci.c
Description:
This function resets the UHCI HC root hub port
Input:
HcStruc   Pointer to HCStruc of the host controller
PortNum    Root port to be enabled
Output:
USB_SUCCESS or USB_ERROR


UHCI_RootHubTDCallBack in the uhci.c

Function : UHCI_RootHubTDCallBack

File: uhci.c
Description:
This function is called when TD256ms completes a transaction. This TD runs
a dummy interrupt transaction to a non-existant device address for the
purpose of generating a periodic timeout interrupt.  This periodic interrupt
may be used to check for new devices on the root hub etc.
Input:
fpHCStruc   Pointer to the HCStruc structure
fpDevInfo   NULL (pDevInfo is not valid)
fpTD        Pointer to the TD that completed
fpBuffer    Not used
Output:
USB_SUCCESS or USB_ERROR


UHCI_Start in the uhci.c

Function : UHCI_Start

File: uhci.c
Description:
This API function is called to start a UHCI host controller. The input to the
routine is the pointer to the HC structure that defines this host controller
Input:
fpHCStruc   Ptr to the host controller structure
Output:
Status: USB_SUCCESS = Success, USB_ERROR = Failure


UHCI_StartTDSchedule in the uhci.c

Function : UHCI_StartTDSchedule

File: uhci.c
Description:
This routine will start the TD schedule for the UHCI controller. After this
routine TD's can be scheduled for execution.
Input:
fpHCStruc   Pointer to the HC information structure
Output:
USB_SUCCESS/USB_ERROR


UHCI_Stop in the uhci.c

Function : UHCI_Stop

File: uhci.c
Description:
This API function is called to stop the UHCI controller. The input to the
routine is the pointer to the HC structure that defines this host controller.
Input:
fpHCStruc   Ptr to the host controller structure
Output:
Status: USB_SUCCESS = Success, USB_ERROR = Failure


UHCI_StopTDSchedule in the uhci.c

Function : UHCI_StopTDSchedule

File: uhci.c
Description:
This routine will stop the TD schedules and frees the data structures
Input:
fpHCStruc   Pointer to the HC information structure
Output:
USB_SUCCESS/USB_ERROR


UhciActivateTds in the uhci.c

Function : UhciActivateTds

File: uhci.c
Description:


UhciAddQhToFrameList in the uhci.c

Function : UhciAddQhToFrameList

File: uhci.c
Description:
This routine will add the particular QH into the frame list
Input:
HcStruc     Pointerr to the host controller structure
NewQh       Address of the QH to be linked
Output:
USB_SUCCESS/USB_ERROR


UhciAllocGeneralTds in the uhci.c

Function : UhciAllocGeneralTds

File: uhci.c
Description:


UhciExecuteTransfer in the uhci.c

Function : UhciExecuteTransfer

File: uhci.c
Description:
This function execites a transfer and waits for the completion of
the transfer, and returns the transfer results.
Input:
Pointers to the first data TD and last data TD in the TD list
Output:
Return value is the size of transferred data, Bytes


UhciFreeTds in the uhci.c

Function : UhciFreeTds

File: uhci.c
Description:


UhciInitQh in the uhci.c

Function : UhciInitQh

File: uhci.c
Description:
This function check whether HC is halted.


UhciIsHalted in the uhci.c

Function : UhciIsHalted

File: uhci.c
Description:
This function check whether HC is halted.


UhciProcessFrameList in the uhci.c

Function : UhciProcessFrameList

File: uhci.c
Description:
This function will parse through frame list to find completed QH/TD
and invoke corresponding call back routine
Input:
HcStruc     HCStruc structure
Output:
USB_SUCCESS or USB_ERROR
Notes:
For any TD whose ActiveFlag is TRUE and its ControlStatus bit 23 is clear
(completed), process the TD by calling its call back routine, if one is present.


UhciProcessQh in the uhci.c

Function : UhciProcessQh

File: uhci.c
Description:
This function will check whether the QH is completed if so, it will call
the call back routine associated with the TDs present in the QH
Input:
HcStruc     HCStruc structure
Qh          Pointer to the QH
Output:
USB_SUCCESS or USB_ERROR


UhciProcessTd in the uhci.c

Function : UhciProcessTd

File: uhci.c
Description:
This function will check whether the TD is completed if so, it will call
the call back routine associated with this TD
Input:
HcStruc     HCStruc structure
Td          Pointer to the TD
Output:
USB_SUCCESS or USB_ERROR
Notes:
For any TD whose ActiveFlag is TRUE and its ControlStatus bit 23 is clear
(completed), process the TD by calling its callback routine, if one is present.


UhciRemoveQhFromFrameList in the uhci.c

Function : UhciRemoveQhFromFrameList

File: uhci.c
Description:
This routine will remove a QH from the the frame list
Input:
HcStruc     Pointerr to the host controller structure
RetiredQh   Address of the QH to be removed
Output:
USB_SUCCESS/USB_ERROR


UhciTranslateInterval in the uhci.c

Function : UhciTranslateInterval

File: uhci.c
Description:
This function calculates the polling rate.


uhci.h

Description:
AMI USB UHCI header file
Built on 16:12:02 10/28/16


usb.c

Description:
AMI USB main wrapper

The following functions are used in the file: usb.c.

Function | Description
BusFillDriverEntries | Install drivers that redirects ...????
CheckDeviceLimit | Verifies whether the number of initialized devices of a given class has reached the limit.
EnablePciBridge | This function scaned PciBridge
hcnum2hcstruc | Search for the HC_STRUC with specified bHCNumber
LocatePwrCapOffset | This function locate power management capability offset
prepareForLegacyOS | Changes global state of USBSMI module to function properly in non-EFI OS - without support from EFI drivers Before call USB BUS is a driver that handles all devices ( except hub) and rest of the drivers are delayed. Number of devices are supported by SUBBUS driver and custom EFI driver After call returns, USBBUS driver is removed and all drivers that where delayed became active. All USBBUS devices are reconfigured. Devices that are not supported by now active drivers are decon- figured.
QueuePutMsg | Add a variable size item to the queue
ResumePciBridge | This function resumed PciBridge
StopControllerBdf | This function stops the USB host controllers of a given Bus Dev Function
StopPciBridge | This function stopped PciBridge
USB_AbortConnectDev | Mark DEV_INFO not valid and release its device address
USB_AbortConnectHubChildren | Mark DEV_INFO not valid for all the devices connected to a given hub.
USB_DevDriverDisconnect |
USB_EnableEndpointsDummy | Dummy HC API function used by the HC drivers that do not need to implement enable endpoint function.
USB_FreeDeviceAddress | This routine releases the given device's address by updating gUsbData->dDeviceAddressMap.
USB_ReConfigDevice | EFI code will call this function to give a chance for SMI dev driver to complete the configuration of device Before call, USB device is connected, address is assigned and configuration is set. DEV_INFO structure is initalized from information parsed from descriptors and linked to USBBUS dev driver. Device driver specific to the type of USB device wasn't called on this device After the call returns, a specific device driver initialization was performed by calling pfnCheckDeviceType and pfnConfigureDevice functions of device driver. Parameters to those functions are taken from descriptors downloaded from the device. Device preserve old address and active configuration
USB_ResetAndReconfigDev | This routine resets and reconfigures the device.
USB_SmiQueuePut | Puts the pointer pointer into the queue for processing, updates queue head and tail.
USBCheckNonCompliantDevice | This function checks for non-compliant USB devices by by comparing the device's vendor and device id with the non-compliant device table list and updates the data structures appropriately to support the device.
USBCheckPortChange | This routine processes the port status change (like connect, disconnect, etc.) for the root hub and external hubs.
UsbControlTransfer |
USBGetProperDeviceInfoStructure | This routine searches for a device info structure that matches the vendor and device id, and LUN of the device found. If such a device info structure not found, then it will return a free device info structure
UsbInterruptTransfer | This function executes an interrupt transaction on the USB.
USBKeyRepeat | This function handles different key repeat related functions depending on the input
UsbSuspend | This function suspend USB
UsbSuspendDevices | This function suspends usb devices.
VALID_DEVINFO | Checks if DEV_INFO is a valid connected device info Due to hot-plug a DEV_INFO can become invalid in the midle of configuration

Built on 16:12:02 10/28/16


BusFillDriverEntries in the usb.c

Function : BusFillDriverEntries

File: usb.c
Description:
Install drivers that redirects ...????
Input:
fpDevDriver - record that the routine can use to install the drive
Output:
None
Built on 16:12:00 10/28/16


CheckDeviceLimit in the usb.c

Function : CheckDeviceLimit

File: usb.c
Description:
Verifies whether the number of initialized devices of a given
class has reached the limit.
Built on 16:12:00 10/28/16


EnablePciBridge in the usb.c

Function : EnablePciBridge

File: usb.c
Description:
This function scaned PciBridge
Built on 16:12:00 10/28/16


hcnum2hcstruc in the usb.c

Function : hcnum2hcstruc

File: usb.c
Description:
Search for the HC_STRUC with specified bHCNumber


LocatePwrCapOffset in the usb.c

Function : LocatePwrCapOffset

File: usb.c
Description:
This function locate power management capability offset


prepareForLegacyOS in the usb.c

Function : prepareForLegacyOS

File: usb.c
Description:
Changes global state of USBSMI module to function properly
in non-EFI OS - without support from EFI drivers

Before call USB BUS is a driver that handles all devices (
except hub) and rest of the drivers are delayed. Number of
devices are supported by SUBBUS driver and custom EFI driver

After call returns, USBBUS driver is removed and all drivers
that where
delayed became active. All USBBUS devices are reconfigured.
Devices that are not supported by now active drivers are decon-
figured.


QueuePutMsg in the usb.c

Function : QueuePutMsg

File: usb.c
Description:
Add a variable size item to the queue


ResumePciBridge in the usb.c

Function : ResumePciBridge

File: usb.c
Description:
This function resumed PciBridge


StopControllerBdf in the usb.c

Function : StopControllerBdf

File: usb.c
Description:
This function stops the USB host controllers of a given Bus Dev Function
Input:
BusDevFuncNum
Output:
None


StopPciBridge in the usb.c

Function : StopPciBridge

File: usb.c
Description:
This function stopped PciBridge


USB_AbortConnectDev in the usb.c

Function : USB_AbortConnectDev

File: usb.c
Description:
Mark DEV_INFO not valid and release its device address


USB_AbortConnectHubChildren in the usb.c

Function : USB_AbortConnectHubChildren

File: usb.c
Description:
Mark DEV_INFO not valid for all the devices connected to a
given hub.


USB_DevDriverDisconnect in the usb.c

Function : USB_DevDriverDisconnect

File: usb.c
Description:


USB_EnableEndpointsDummy in the usb.c

Function : USB_EnableEndpointsDummy

File: usb.c
Description:
Dummy HC API function used by the HC drivers that do not need
to implement enable endpoint function.


USB_FreeDeviceAddress in the usb.c

Function : USB_FreeDeviceAddress

File: usb.c
Description:
This routine releases the given device's address by
updating gUsbData->dDeviceAddressMap.


USB_ReConfigDevice in the usb.c

Function : USB_ReConfigDevice

File: usb.c
Description:
EFI code will call this function to give a chance for
SMI dev driver to complete the configuration of device

Before call, USB device is connected, address is assigned
and configuration is set. DEV_INFO structure is initalized
from information parsed from descriptors and linked
to USBBUS dev driver. Device driver specific to the type
of USB device wasn't called on this device

After the call returns, a specific device driver
initialization was  performed by calling pfnCheckDeviceType
and pfnConfigureDevice functions of device driver. Parameters
to those functions are taken from descriptors downloaded from
the device. Device preserve old address and active configuration


USB_ResetAndReconfigDev in the usb.c

Function : USB_ResetAndReconfigDev

File: usb.c
Description:
This routine resets and reconfigures the device.


USB_SmiQueuePut in the usb.c

Function : USB_SmiQueuePut

File: usb.c
Description:
Puts the pointer pointer into the queue for processing,
updates queue head and tail.


USBCheckNonCompliantDevice in the usb.c

Function : USBCheckNonCompliantDevice

File: usb.c
Description:
This function checks for non-compliant USB devices by
by comparing the device's vendor and device id with
the non-compliant device table list and updates the
data structures appropriately to support the device.
Input:
fpHCStruc - HCStruc pointer
fpDevInfo - Device information structure pointer
fpDesc    - Pointer to the descriptor structure
wDescLength - End offset of the device descriptor
Output:
Updated fpDevInfo->wIncompatFlags field


USBCheckPortChange in the usb.c

Function : USBCheckPortChange

File: usb.c
Description:
This routine processes the port status change (like connect,
disconnect, etc.) for the root hub and external hubs.
Output:
HcStruc   Pointer to Host Controller structure
HubAddr     Device address of the hub whose status
           has changed:
                 bit 7	: 1 - Root hub, 0 for other hubs
                 bit 6-0	: Device address of the hub
PortNum     Hub port number


UsbControlTransfer in the usb.c

Function : UsbControlTransfer

File: usb.c
Description:
Input:
Output:


USBGetProperDeviceInfoStructure in the usb.c

Function : USBGetProperDeviceInfoStructure

File: usb.c
Description:
This routine searches for a device info structure that
matches the vendor and device id, and LUN of the device
found. If such a device info structure not found, then it
will return a free device info structure
Input:
Vendor, Device ID, Current LUN
Output:
Pointer to new device info. struc. NULL on error


UsbInterruptTransfer in the usb.c

Function : UsbInterruptTransfer

File: usb.c
Description:
This function executes an interrupt transaction on the USB.
Input:
HcStruc     Pointer to HCStruc of the host controller.
DevInfo     DeviceInfo structure (if available else 0).
EndpointAddress The destination USB device endpoint to which the device request
     is being sent.
MaxPktSize  Indicates the maximum packet size the target endpoint is capable
of sending or receiving.
Buffer      Buffer containing data to be sent to the device or buffer to be
used to receive data.
Length      Length request parameter, number of bytes of data to be transferred.
Timeout     Indicates the maximum time, in milliseconds, which the transfer
is allowed to complete.
Output:
USB_SUCCESS or USB_ERROR


USBKeyRepeat in the usb.c

Function : USBKeyRepeat

File: usb.c
Description:
This function handles different key repeat related functions
depending on the input
Input:
fpHCStruc - pointer for the HC that implements the key repeat function
bAction   - sub-function index:
0  Install key repeat HCStruc
1  Disable key repeat
2  Enable key repeat
        3  Uninstall key repeat HCStruc
Output:
None

Note:    fpHCStruc is only relevant for sub-function 0.


UsbSuspend in the usb.c

Function : UsbSuspend

File: usb.c
Description:
This function suspend USB


UsbSuspendDevices in the usb.c

Function : UsbSuspendDevices

File: usb.c
Description:
This function suspends usb devices.


VALID_DEVINFO in the usb.c

Function : VALID_DEVINFO

File: usb.c
Description:
Checks if DEV_INFO is a valid connected device info
Due to hot-plug a DEV_INFO can become invalid in the
midle of configuration


usb.sd

Description:
This is the setup page 'USB Configuration.'
The link to the page is in the setup 'Advanced' tab.
Built on 16:12:02 10/28/16


UsbBbs.c

Description:
The following functions are used in the file: UsbBbs.c.

Function | Description
CollectUsbBbsDevices | Create BBS table for each USB mass storage device.
Built on 16:12:02 10/28/16


CollectUsbBbsDevices in the UsbBbs.c

Function : CollectUsbBbsDevices

File: UsbBbs.c
Description:
Create BBS table for each USB mass storage device.
Built on 16:12:00 10/28/16


usbbus.c

Description:
USB Bus driver implementation

The following functions are used in the file: usbbus.c.

Function | Description
DevByAdrIf | Predicate for searching device node in the tree by USB address and interface number of the device
DevByIndex | Predicate for searching device node in the tree by index of the DEV_INFO structure in the aDevInfoTable array of USB data
DevByInfo | Predicate for searching device node in the tree by comparing pointers to the DEV_INFO structure
DevGrpByAddr | Predicate for searching device node in the tree by USB address of the device
DevGrpByPortIf | Predicate for searching device node in the tree by parent hub port of the device, interface and LUN
DpAddLun | Builds a new path appending a LUN node
DpAddUsbSegment | Builds a new path appending a USB segment
eUninstallDevice | Enumeration call-back function that is usded uninstall all enumerated device nodes Stops enumeration as soon as error was recieved
FreeConfigDesc | Delocates memory that was used by the descriptor
GetEndpointDesc | Retrieves information about a max packet size for the specified endpoint of the device
GetMaxPacket | Retrieves information about a max packet size for the specified endpoint of the device
GetUsbDescriptor | Allocates memory necessary to hold complete descriptor and returns the descriptor there
HcByHandle | Predicate for searching host controller node in the tree by EFI controller handle
HcByIndex | Predicate for searching host controller node in the tree by bHcNumber
InstallDevice | Adds a device to the tree; creates an EFI handle for the usb device; installs USB_IO and DEVICEPATH protocols on a new device handle; connects a new device to EFI device drivers
LoadName | loads STRING descriptor that corresponds to the name of the USB device
NextDescriptor | Returns pointer to the next descriptor for the pack of USB descriptors located in continues memory segment - result of reading CONFIG_DESCRIPTOR
PopulateTree | Enumerate all DEV_INFO structures in the aDevInfoTable array and install all currently connected device
ReadUsbDescriptor | This function executes a get descriptor command to the given USB device and endpoint
RemoveDevInfo | Removes device node from the USB bus tree. Device node corresponds to the DEV_INFO. Device gets removed in response to the pending removal event sheduled from SMM when disconnect was detected on USB
RemoveDevInfoEcho | Finds the USB device node that sits on the same path (seq. of (hub ports,if) ) but have different USB address or DEV_INFO node. This could be the result of lost disconnect event or previous error to uninstall USB_IO
RemoveHubEcho | Finds the USB hub node that sits on the same path (seq. of (hub ports,if) ) but have different USB address or DEV_INFO node. This could be the result of lost disconnect event or previous error to uninstall USB_IO
UninstallDevice | Disconnects device; uninstalls USB_IO and DEVICEPATH protocols delocates all memory used USB Bus driver to support the device removes device node from the tree; if device has children, all UninstallDevice procedure is repeated for each child. In case if disconnect or protocol uninstall fails, it reports error stauts returned from Boot service procedure.
UsbBusGetControllerName | This function is a part of binding protocol, it returns the string with the controller name.
UsbBusInit | Install driver binding and controller name protocols for the USB bus driver.
UsbBusStart | This function is part of binding protocol installed on USB controller. It starts the USB bus for a given controller.
UsbBusStop | This function is part of binding protocol installed on USB controller. It stops the controller and removes all the children.
UsbBusSupported | This is a binding protocol function that returns EFI_SUCCESS for USB controller and EFI_UNSUPPORTED for any other kind of controller.
UsbDevConfigDesc | Returns a pointer to the memory containing CONFIG_DESCRIPTOR reported by the USB device
UsbDevGetGroup | Retrieve DEVGROUP_T that is parent of the specified USB device in the USB Bus tree
UsbDevLoadAllDescritors | Reads DEVICE and CONFIG descriptors for each configuration available in the device. Marks the index of the buffer containing CONFIG descriptor for active configurations currently selected in USB device
UsbDevLoadEndpoints | Locates information about each endpoint inside the descriptors pack loaded with CONFIG descriptor
UsbHcOnTimer | Timer call-back routine that is is used to monitor changes on USB Bus It monitors the state of queueCnnct and queueDiscnct queues which get populated by UsbSmiNotify call-back routine When this routine finds a new device connected to usb it will install a device node for that device by calling InstallDevice When this routine finds a disconneced device it uninstalls the device node by calling UninstallDevice
UsbIo2Dev | This function returns a pointer to USB device from UsbIo.
UsbIoAsyncIsochronousTransfer |
UsbIoBulkTransfer |
UsbIoControlTransfer |
UsbIoGetConfigDescriptor |
UsbIoGetDeviceDescriptor | Retrieves the USB Device Descriptor.
UsbIoGetEndpointDescriptor |
UsbIoGetInterfaceDescriptor |
UsbIoGetStringDescriptor |
UsbIoGetSupportedLanguages |
UsbIoIsochronousTransfer |
UsbIoPortReset |
UsbIoSyncInterruptTransfer |

Built on 16:12:02 10/28/16


DevByAdrIf in the usbbus.c

Function : DevByAdrIf

File: usbbus.c
Description:
Predicate for searching device node in the tree
by USB address and interface number of the device
Built on 16:12:00 10/28/16


DevByIndex in the usbbus.c

Function : DevByIndex

File: usbbus.c
Description:
Predicate for searching device node in the tree
by index of the DEV_INFO structure in the aDevInfoTable
array of USB data
Built on 16:12:00 10/28/16


DevByInfo in the usbbus.c

Function : DevByInfo

File: usbbus.c
Description:
Predicate for searching device node in the tree
by comparing pointers to the DEV_INFO structure
Built on 16:12:00 10/28/16


DevGrpByAddr in the usbbus.c

Function : DevGrpByAddr

File: usbbus.c
Description:
Predicate for searching device node in the tree
by USB address of the device
Built on 16:12:00 10/28/16


DevGrpByPortIf in the usbbus.c

Function : DevGrpByPortIf

File: usbbus.c
Description:
Predicate for searching device node in the tree
by parent hub port of the device, interface and LUN
Built on 16:12:00 10/28/16


DpAddLun in the usbbus.c

Function : DpAddLun

File: usbbus.c
Description:
Builds a new path appending a LUN node
Output:
Pointer to a callee allocated memory buffer
Built on 16:12:00 10/28/16


DpAddUsbSegment in the usbbus.c

Function : DpAddUsbSegment

File: usbbus.c
Description:
Builds a new path appending a USB segment
Output:
Pointer to a callee allocated memory buffer
Built on 16:12:00 10/28/16


eUninstallDevice in the usbbus.c

Function : eUninstallDevice

File: usbbus.c
Description:
Enumeration call-back function that is usded
uninstall all enumerated device nodes
Stops enumeration as soon as error was recieved
Input:
Node - tree node of the USB device or group
Contex - pointer to the EFI_STATUS variable that
       recieves status information if error
       was recieved
Output:
TRUE  on error found; this will stop enumeration
FALSE on succesfull uninstall operation
Built on 16:12:00 10/28/16


FreeConfigDesc in the usbbus.c

Function : FreeConfigDesc

File: usbbus.c
Description:
Delocates memory that was used by the descriptor
Built on 16:12:00 10/28/16


GetEndpointDesc in the usbbus.c

Function : GetEndpointDesc

File: usbbus.c
Description:
Retrieves information about a max packet size
for the specified endpoint of the device
Built on 16:12:00 10/28/16


GetMaxPacket in the usbbus.c

Function : GetMaxPacket

File: usbbus.c
Description:
Retrieves information about a max packet size
for the specified endpoint of the device
Built on 16:12:00 10/28/16


GetUsbDescriptor in the usbbus.c

Function : GetUsbDescriptor

File: usbbus.c
Description:
Allocates memory necessary to hold complete descriptor
and returns the descriptor there
Input:
dev         a pointer to USBDEV_T corresponding to the device
type        Requested descriptor type
index       Descriptor index
langindex   LangIndex
Output:
Pointer to memory buffer containing the descriptor
NULL on error


HcByHandle in the usbbus.c

Function : HcByHandle

File: usbbus.c
Description:
Predicate for searching host controller node in the tree
by EFI controller handle


HcByIndex in the usbbus.c

Function : HcByIndex

File: usbbus.c
Description:
Predicate for searching host controller node in the tree
by bHcNumber


InstallDevice in the usbbus.c

Function : InstallDevice

File: usbbus.c
Description:
Adds a device to the tree; creates an EFI handle for the
usb device; installs USB_IO and DEVICEPATH protocols
on a new device handle; connects a new device to
EFI device drivers


LoadName in the usbbus.c

Function : LoadName

File: usbbus.c
Description:
loads STRING descriptor that corresponds to
the name of the USB device


NextDescriptor in the usbbus.c

Function : NextDescriptor

File: usbbus.c
Description:
Returns pointer to the next descriptor for the pack of
USB descriptors located in continues memory segment
- result of reading CONFIG_DESCRIPTOR
Notes:
Uses TotalLength of the CONFIG_DESCRIPTOR and Length
field of each USB descriptor found inside the pack


PopulateTree in the usbbus.c

Function : PopulateTree

File: usbbus.c
Description:
Enumerate all DEV_INFO structures in the aDevInfoTable array
and install all currently connected device


ReadUsbDescriptor in the usbbus.c

Function : ReadUsbDescriptor

File: usbbus.c
Description:
This function executes a get descriptor command to the
given USB device and endpoint
Input:
dev         a pointer to USBDEV_T corresponding to the device
fpBuffer    Buffer to be used for the transfer
wLength     Size of the requested descriptor
bDescType   Requested descriptor type
bDescIndex  Descriptor index
wLangIndex  LangIndex
Output:
Pointer to memory buffer containing the descriptor
NULL on error


RemoveDevInfo in the usbbus.c

Function : RemoveDevInfo

File: usbbus.c
Description:
Removes device node from the USB bus tree. Device node
corresponds to the DEV_INFO. Device gets removed in response to
the pending removal event sheduled from SMM when disconnect
was detected on USB
Input:
DevInfo - DEV_INFO structure that was disconnect
Output:
EFI_SUCCESS - echo wasn't found or was succesfully removed
otherwise return status resulted from attemp to remove the node


RemoveDevInfoEcho in the usbbus.c

Function : RemoveDevInfoEcho

File: usbbus.c
Description:
Finds the USB device node that sits on the same
path (seq. of (hub ports,if) ) but have different
USB address or DEV_INFO node. This could be the result
of lost disconnect event or previous error to uninstall
USB_IO
Input:
DevInfo - DEV_INFO structure that is checked for
       echoes in the bus
Output:
EFI_SUCCESS - echo wasn't found or was succesfully removed
otherwise return status resulted from attemp to remove the node


RemoveHubEcho in the usbbus.c

Function : RemoveHubEcho

File: usbbus.c
Description:
Finds the USB hub node that sits on the same
path (seq. of (hub ports,if) ) but have different
USB address or DEV_INFO node. This could be the result
of lost disconnect event or previous error to uninstall
USB_IO
Input:
pDevInfo - DEV_INFO structure that is checked for
       echoes in the bus
Output:
EFI_SUCCESS - echo wasn't found or was succesfully removed
otherwise return status resulted from attemp to remove the node


UninstallDevice in the usbbus.c

Function : UninstallDevice

File: usbbus.c
Description:
Disconnects device; uninstalls USB_IO and DEVICEPATH protocols
delocates all memory used USB Bus driver to support the device
removes device node from the tree; if device has children, all
UninstallDevice procedure is repeated for each child.

In case if disconnect or protocol uninstall fails, it reports
error stauts returned from Boot service procedure.


UsbBusGetControllerName in the usbbus.c

Function : UsbBusGetControllerName

File: usbbus.c
Description:
This function is a part of binding protocol, it returns
the string with the controller name.


UsbBusInit in the usbbus.c

Function : UsbBusInit

File: usbbus.c
Description:
Install driver binding and controller name protocols
for the USB bus driver.


UsbBusStart in the usbbus.c

Function : UsbBusStart

File: usbbus.c
Description:
This function is part of binding protocol installed on USB
controller. It starts the USB bus for a given controller.


UsbBusStop in the usbbus.c

Function : UsbBusStop

File: usbbus.c
Description:
This function is part of binding protocol installed on USB
controller. It stops the controller and removes all the
children.


UsbBusSupported in the usbbus.c

Function : UsbBusSupported

File: usbbus.c
Description:
This is a binding protocol function that returns EFI_SUCCESS
for USB controller and EFI_UNSUPPORTED for any other kind of
controller.


UsbDevConfigDesc in the usbbus.c

Function : UsbDevConfigDesc

File: usbbus.c
Description:
Returns a pointer to the memory containing CONFIG_DESCRIPTOR
reported by the USB device


UsbDevGetGroup in the usbbus.c

Function : UsbDevGetGroup

File: usbbus.c
Description:
Retrieve DEVGROUP_T that is parent of
the specified USB device in the USB Bus tree
Input:
Device for which the parent is requested


UsbDevLoadAllDescritors in the usbbus.c

Function : UsbDevLoadAllDescritors

File: usbbus.c
Description:
Reads DEVICE and CONFIG descriptors for each
configuration available in the device. Marks
the index of the buffer containing CONFIG descriptor
for active configurations currently selected in
USB device


UsbDevLoadEndpoints in the usbbus.c

Function : UsbDevLoadEndpoints

File: usbbus.c
Description:
Locates information about each endpoint inside the
descriptors pack loaded with CONFIG descriptor


UsbHcOnTimer in the usbbus.c

Function : UsbHcOnTimer

File: usbbus.c
Description:
Timer call-back routine that is
is used to monitor changes on USB Bus
It monitors the state of queueCnnct and queueDiscnct queues
which get populated by UsbSmiNotify call-back routine

When this routine finds a new device connected to usb it
will install a device node for that device by calling
InstallDevice

When this routine finds a disconneced device it uninstalls the
device node by calling UninstallDevice


UsbIo2Dev in the usbbus.c

Function : UsbIo2Dev

File: usbbus.c
Description:
This function returns a pointer to USB device from UsbIo.


UsbIoAsyncIsochronousTransfer in the usbbus.c

Function : UsbIoAsyncIsochronousTransfer

File: usbbus.c


UsbIoBulkTransfer in the usbbus.c

Function : UsbIoBulkTransfer

File: usbbus.c


UsbIoControlTransfer in the usbbus.c

Function : UsbIoControlTransfer

File: usbbus.c


UsbIoGetConfigDescriptor in the usbbus.c

Function : UsbIoGetConfigDescriptor

File: usbbus.c


UsbIoGetDeviceDescriptor in the usbbus.c

Function : UsbIoGetDeviceDescriptor

File: usbbus.c
Description:
Retrieves the USB Device Descriptor.
Input:
UsbIo       A pointer to the EFI_USB_IO_PROTOCOL instance. Type
   EFI_USB_IO_PROTOCOL is defined in Section 14.2.5.
Desc        A pointer to the caller allocated USB Device Descriptor.


UsbIoGetEndpointDescriptor in the usbbus.c

Function : UsbIoGetEndpointDescriptor

File: usbbus.c


UsbIoGetInterfaceDescriptor in the usbbus.c

Function : UsbIoGetInterfaceDescriptor

File: usbbus.c


UsbIoGetStringDescriptor in the usbbus.c

Function : UsbIoGetStringDescriptor

File: usbbus.c


UsbIoGetSupportedLanguages in the usbbus.c

Function : UsbIoGetSupportedLanguages

File: usbbus.c


UsbIoIsochronousTransfer in the usbbus.c

Function : UsbIoIsochronousTransfer

File: usbbus.c


UsbIoPortReset in the usbbus.c

Function : UsbIoPortReset

File: usbbus.c


UsbIoSyncInterruptTransfer in the usbbus.c

Function : UsbIoSyncInterruptTransfer

File: usbbus.c


usbbus.h

Description:
AMI USB bus driver header file
Built on 16:12:02 10/28/16


usbCCID.c

Description:
AMI USB CCID Device class support driver

The following functions are used in the file: usbCCID.c.

Function | Description
CalculateLRCChecksum | Calculates LRC checksum
CalculateTimingValues | Based on the agreed upon TA1 value and Transmission protocol calculate the timing values
ConfigureCCID | This function powers up, sets the clock/rate etc (configure CCID based on device capability)
ConstructBlockFrame | Construct the Block Frame for the CCID
DoDevInfoInitialization | Do some USB device info data initialization
FindBestTA1Value | CCID which doesn't perform "Automatic parameter config. based on ATR
FindNumberOfTs | Returns the # of Ts present in TDx
GetDefaultProtocol | Find the First offerred Transmission protocol.
GetICCDevice | Search the linked list to find the ICC_DEVICE for the given slot #.
HandleReceivedBlock | Process the Recevied data from CCID device
ICC_SmiQueuePut | Puts the pointer into the queue for processing. updates queue head and tail. This data is read from EfiUSBCCID.C which installs AMI_CCID_IO_PROTOCOL
ICCInsertEvent | In response to Device Insertion, Interrupt-in message is received. Icc Device is added to the linked list and configured.
ICCRemovalEvent | In response to Device removal, Interrupt-in message is received. Icc Device is removed from the linked list.
IssuePPSCmd | Issue PPS cmd to select T0/T1
PCToRDRGetParameters | PC_TO_RDR_GETPARAMETERS cmd is issued to CCID
PCToRDRGetSlotStatus | PC_TO_RDR_GETSLOTSTATUS cmd is issued to CCID
PCtoRDRIccPowerOff | PC_TO_RDR_ICCPOWEROFF cmd is issued to the CCID Input : IN DEV_INFO *fpDevInfo, IN ICC_DEVICE *fpICCDevice Output : EFI_STATUS
PCtoRDRIccPowerOn | PC_TO_RDR_XFRBLOCK cmd is issued to the device Input IN DEV_INFO *fpDevInfo, IN ICC_DEVICE *fpICCDevice, IN UINT32 CmdLength, IN UINT8 *CmdBuffer, IN UINT8 BlockWaitingTime, IN UINT16 LevelParameter Output : EFI_STATUS
PCToRDRSetDataRateAndClockFrequency | PC_TO_RDR_SETDATARATEANDCLOCK cmd is issued. Response for this cmd is from RDR_TO_PC_DATARATEANDCLOCK
PCToRDRSetParameters | PC_TO_RDR_SETPARAMETERS cmd is issued to CCID Input : IN DEV_INFO *fpDevInfo IN ICC_DEVICE *fpICCDevice IN UINT8 ProtocolNum - 0 : T=0, 1 : T=1 IN VOID *Data - Points to data from abProtocolDataStructure in PC_TO_RDR_SETPARAMETERS
PrintATRData | This function Prints the RAW ATR Data
PrintDescriptorInformation | Prints SMART class Descriptor data
PrintPCParameters | This function prints the information gathered from GetPCParameters
PrintTimingInfo | This function prints the information gathered from ATR data
RateAndProtocolManagement | Based on the ATR data and the dwFeature register contend do the Rate and Protocol programming
RDRToPCDataBlock | RDR_TO_PC_DATABLOCK cmd is issued to the CCID. This is on response to PCI_to_RDR_XfrBlock
RDRToPCDataRateAndClockFrequency | RDR_TO_PC_DATARATEANDCLOCK cmd is issued.
RDRToPCParameters | RDR_TO_PC_SLOTSTATUS cmd is issued
RDRToPCSlotStatus | RDR_TO_PC_SLOTSTATUS cmd is issued to CCID.
TxRxT1Adpu | Transmit/Receive T1 ADPU
TxRxT1TDPUChar | Transmit/Receive T1 TDPU/Character
UpdateATRDataInfo | The routine update the Transmision protocol supported and other timing related data
USBAPI_CCIDRequest | This routine services the USB API function number 30h. It handles all the CCID related calls from the higher layer. Different sub-functions are invoked depending on the sub-function number
USBCCID_ProcessInterruptData | This routine is called when InterruptIN messages is generated
USBCCIDAPIAtrSMM | This function is part of the USB BIOS MASS API inside SMM
USBCCIDAPIGetParametersSMM | This function is part of the USB BIOS MASS API.
USBCCIDAPIGetSlotStatusSMM | This function is part of the USB BIOS MASS API inside SMM
USBCCIDAPIPowerDownSlotSMM | This function is part of the USB BIOS MASS API inside SMM
USBCCIDAPIPowerupSlotSMM | This function is part of the USB BIOS MASS API inside SMM
USBCCIDAPISmartClassDescriptorSMM | This function is part of the USB BIOS MASS API inside SMM
USBCCIDAPIXfrBlockSMM | This function is part of the USB BIOS MASS API.
USBCCIDCheckForDevice | This routine checks for CCID type device from the interface data provided
USBCCIDConfigureDevice | This function checks an interface descriptor of a device to see if it describes a USB CCID device. If the device is a CCID device, then it is configured and initialized.
USBCCIDDisconnectDevice | This function disconnects the CCID device.
USBCCIDFillDriverEntries | This function fills DEV_DRIVER structure
USBCCIDInitialize | This function initializes CCID device related data
USBCCIDIssueBulkTransfer | This function executes a bulk transaction on the USB. The transfer may be either DATA_IN or DATA_OUT packets containing data sent from the host to the device or vice-versa. This function wil not return until the request either completes successfully or completes with error (due to time out, etc.) Size of data can be upto 64K
USBCCIDIssueControlTransfer | Issues Control Pipe request to default pipe Parameters: pDevInfo DeviceInfo structure (if available else 0) wRequest Request type (low byte) Bit 7 : Data direction 0 = Host sending data to device 1 = Device sending data to host Bit 6-5 : Type 00 = Standard USB request 01 = Class specific 10 = Vendor specific 11 = Reserved Bit 4-0 : Recipient 00000 = Device 00001 = Interface 00010 = Endpoint 00100 - 11111 = Reserved Request code, a one byte code describing the actual device request to be executed (ex: 1 : ABORT, 2 : GET_CLOCK_FREQUENCIES, 3: GET_DATA_RATES) wIndex wIndex request parameter (meaning varies) wValue wValue request parameter (meaning varies) fpBuffer Buffer containing data to be sent to the device or buffer to be used to receive data wLength wLength request parameter, number of bytes of data to be transferred in or out of the host controller
VoltageSelection | Based on the dwFeatures register setting, power up CCID/ICC

The following tables are used in the file: usbCCID.c.

Table | Description
USBCCIDAPITable | This is the table of functions used by USB CCID API

Built on 16:12:02 10/28/16


CalculateLRCChecksum in the usbCCID.c

Function : CalculateLRCChecksum

File: usbCCID.c
Description:
Calculates LRC checksum
Input:
UINT8            *BlockFrame
UINT32            BlockFrameLength
Output:
ICC_DEVICE* or NULL
Notes:

Built on 16:12:00 10/28/16


CalculateTimingValues in the usbCCID.c

Function : CalculateTimingValues

File: usbCCID.c
Description:
Based on the agreed upon TA1 value and Transmission protocol
calculate the timing values
Input:
DEV_INFO           *fpDevInfo
ICC_DEVICE        *fpICCDevice
Output:
None
Notes:

Built on 16:12:00 10/28/16


ConfigureCCID in the usbCCID.c

Function : ConfigureCCID

File: usbCCID.c
Description:
This function powers up, sets the clock/rate etc
(configure CCID based on device capability)
Input:
DEV_INFO           *fpDevInfo,
ICC_DEVICE        *fpICCDevice
Output:
EFI_STATUS
Notes:
VoltageSelection, RateAndProtocolManagement
Built on 16:12:00 10/28/16


ConstructBlockFrame in the usbCCID.c

Function : ConstructBlockFrame

File: usbCCID.c
Description:
Construct the Block Frame for the CCID
Input:
IN DEV_INFO         *fpDevInfo,
IN ICC_DEVICE       *fpICCDevice,
IN UINT8            Nad,
IN UINT8            PCB,
IN UINT32           InfLength,
IN UINT8            *InfBuffer,
OUT UINT8           *wLevelParameter,
OUT UINT32          *BlockFrameLength,
OUT UINT8           **BlockFrame
Output:
EFI_STATUS      EFI Status
Notes:

Built on 16:12:00 10/28/16


DoDevInfoInitialization in the usbCCID.c

Function : DoDevInfoInitialization

File: usbCCID.c
Description:
Do some USB device info data initialization
Input:
DEV_INFO    *fpDevInfo
UINT8       *fpDesc
UINT16      wStart
UINT16      wEnd
Output:
EFI_STATUS
Notes:

Built on 16:12:00 10/28/16


FindBestTA1Value in the usbCCID.c

Function : FindBestTA1Value

File: usbCCID.c
Description:
CCID which doesn't perform "Automatic parameter config. based on ATR
Input:
DEV_INFO           *fpDevInfo
ICC_DEVICE        *fpICCDevice
Output:
UINT8       Best TA1 value
Notes:
1. Calculate the Baud rate using TA1 value

2. If in CCID bNumDataRatesSupported = 0 then any value between dwDatRate
and dwMaxDataRate is supported

3. Check if ICC baud rate is less tha dwMaxDataRate. If yes use that.

4. If  bNumDataRatesSupported is not zero get all possible values and try to
match it and use that value.
Built on 16:12:00 10/28/16


FindNumberOfTs in the usbCCID.c

Function : FindNumberOfTs

File: usbCCID.c
Description:
Returns the # of Ts present in TDx
Input:
UINT8    Data
Output:
UINT8 - Returns number of TDx present in ATR data
Built on 16:12:00 10/28/16


GetDefaultProtocol in the usbCCID.c

Function : GetDefaultProtocol

File: usbCCID.c
Description:
Find the First offerred Transmission protocol.
Input:
ICC_DEVICE        *fpICCDevice
Output:
TRANSMISSION_PROTOCOL
Notes:
Section 8.2.3 ISO 7816-3 2006-11-01: TD1 encodes first offered protocol.
If TD1 not present assume T0.
Built on 16:12:00 10/28/16


GetICCDevice in the usbCCID.c

Function : GetICCDevice

File: usbCCID.c
Description:
Search the linked list to find the ICC_DEVICE for the given slot #.
Input:
DEV_INFO        *fpDevInfo
UINT8            Slot
Output:
ICC_DEVICE* or NULL
Notes:

Built on 16:12:00 10/28/16


HandleReceivedBlock in the usbCCID.c

Function : HandleReceivedBlock

File: usbCCID.c
Description:
Process the Recevied data from CCID device
Input:
IN DEV_INFO         *fpDevInfo,
IN ICC_DEVICE       *fpICCDevice,
IN UINT32           OriginalBlockFrameLength,
IN UINT8            *OriginalBlockFrame,
IN UINT32           SentBlockFrameLength,
IN UINT8            *SentBlockFrame,
IN UINT8            *ReceivedBlockFrame
Output:

Notes:

For Character exchange control will come twice for S(Response), I-Block with M bit set. So while counting
number of exchnages this needs to be taken care of.
Refer to ISO/IEC 7816-1 First edition 1998-10-15 for different scenarios mentioned in this function.


ICC_SmiQueuePut in the usbCCID.c

Function : ICC_SmiQueuePut

File: usbCCID.c
Description:
Puts the pointer  into the queue for processing.
updates queue head and tail. This data is read from EfiUSBCCID.C
which installs AMI_CCID_IO_PROTOCOL
Input:
(void *)fpICCDevice
Output:
None


ICCInsertEvent in the usbCCID.c

Function : ICCInsertEvent

File: usbCCID.c
Description:
In response to Device Insertion, Interrupt-in message is received.
Icc Device is added to the linked list and configured.
Input:
DEV_INFO    *fpDevInfo,
UINT8        Slot
Output:
EFI_STATUS
Notes:
ConfigureCCID, GetICCDevice


ICCRemovalEvent in the usbCCID.c

Function : ICCRemovalEvent

File: usbCCID.c
Description:
In response to Device removal, Interrupt-in message is received.
Icc Device is removed from the linked list.
Input:
DEV_INFO    *fpDevInfo,
UINT8        Slot
Output:
EFI_STATUS
Notes:


IssuePPSCmd in the usbCCID.c

Function : IssuePPSCmd

File: usbCCID.c
Description:
Issue PPS cmd to select T0/T1
Input:
DEV_INFO        *fpDevInfo
ICC_DEVICE      *fpICCDevice
UINT8           *Data : Points to the buffer which is sent to CCID.
                       Refer Section 9.2 of 7816-3 spec for the format
Output:
EFI_STATUS
Notes:
This command is issued to CCID which doesn't support AUTO_PARAMETER_CONFIG
or when default values or not acceptable


PCToRDRGetParameters in the usbCCID.c

Function : PCToRDRGetParameters

File: usbCCID.c
Description:
PC_TO_RDR_GETPARAMETERS cmd is issued to CCID
Input:
IN DEV_INFO           *fpDevInfo,
IN ICC_DEVICE        *fpICCDevice
Output:
EFI_STATUS
Notes:
See section 6.1.5 of CCID spec Rev 1.1 for more details


PCToRDRGetSlotStatus in the usbCCID.c

Function : PCToRDRGetSlotStatus

File: usbCCID.c
Description:
PC_TO_RDR_GETSLOTSTATUS cmd is issued to CCID
Input:
IN DEV_INFO           *fpDevInfo,
IN ICC_DEVICE        *fpICCDevice
Output:
EFI_STATUS
Notes:
See section 6.1.3 of CCID spec Rev 1.1 for more details


PCtoRDRIccPowerOff in the usbCCID.c

Function : PCtoRDRIccPowerOff

File: usbCCID.c
Description:
PC_TO_RDR_ICCPOWEROFF cmd is issued to the CCID

Input :
IN DEV_INFO           *fpDevInfo,
IN ICC_DEVICE        *fpICCDevice

Output :
EFI_STATUS
Notes:
See section 6.1.2 of CCID spec Rev 1.1 for more details


PCtoRDRIccPowerOn in the usbCCID.c

Function : PCtoRDRIccPowerOn

File: usbCCID.c
Description:
PC_TO_RDR_XFRBLOCK cmd is issued to the device

Input
IN DEV_INFO             *fpDevInfo,
IN ICC_DEVICE           *fpICCDevice,
IN UINT32               CmdLength,
IN UINT8                *CmdBuffer,
IN UINT8                BlockWaitingTime,
IN UINT16               LevelParameter

Output :
EFI_STATUS
Notes:
This function sends PC_TO_RDR_XFRBLOCK to the device.
See section 6.1.4 of CCID spec 1.1 for the details.
CmdBuffer points to abData.


PCToRDRSetDataRateAndClockFrequency in the usbCCID.c

Function : PCToRDRSetDataRateAndClockFrequency

File: usbCCID.c
Description:
PC_TO_RDR_SETDATARATEANDCLOCK cmd is issued.
Response for this cmd is from RDR_TO_PC_DATARATEANDCLOCK
Input:
IN DEV_INFO         *fpDevInfo
IN ICC_DEVICE       *fpICCDevice
IN UINT32           ClockFrequency  - ICC Clock Frequency in KHz
IN UINT32           DataRate - ICC data rate in bpd
Output:
EFI_STATUS
Notes:
See section 6.1.14 of CCID spec Rev 1.1 for more details


PCToRDRSetParameters in the usbCCID.c

Function : PCToRDRSetParameters

File: usbCCID.c
Description:
PC_TO_RDR_SETPARAMETERS cmd is issued to CCID

Input :
IN DEV_INFO     *fpDevInfo
IN ICC_DEVICE   *fpICCDevice
IN UINT8        ProtocolNum -  0 : T=0, 1 : T=1
IN VOID         *Data - Points to data from abProtocolDataStructure
                       in PC_TO_RDR_SETPARAMETERS
Output:
EFI_STATUS
Notes:
See section 6.1.7 of CCID spec Rev 1.1 for more details


PrintATRData in the usbCCID.c

Function : PrintATRData

File: usbCCID.c
Description:
This function Prints the RAW ATR Data
Input:
UINT8       *ATRData
Output:
None


PrintDescriptorInformation in the usbCCID.c

Function : PrintDescriptorInformation

File: usbCCID.c
Description:
Prints SMART class Descriptor data
Input:
SMARTCLASS_DESC *fpCCIDDesc
Output:
None


PrintPCParameters in the usbCCID.c

Function : PrintPCParameters

File: usbCCID.c
Description:
This function prints the information gathered from GetPCParameters
Input:
UINT8 * Data

OutPut:
None


PrintTimingInfo in the usbCCID.c

Function : PrintTimingInfo

File: usbCCID.c
Description:
This function prints the information gathered from ATR data
Input:
ICC_DEVICE    *fpICCDevice
Output:
None


RateAndProtocolManagement in the usbCCID.c

Function : RateAndProtocolManagement

File: usbCCID.c
Description:
Based on the ATR data and the dwFeature register contend
do the Rate and Protocol programming
Input:
DEV_INFO           *fpDevInfo
ICC_DEVICE        *fpICCDevice
Output:
EFI_STATUS
Notes:
Based on data received from Power-on sequence (ATR data) and dwFetaures value,
Speed of communicatin is established.


RDRToPCDataBlock in the usbCCID.c

Function : RDRToPCDataBlock

File: usbCCID.c
Description:
RDR_TO_PC_DATABLOCK cmd is issued to the CCID.
This is on response to PCI_to_RDR_XfrBlock
Input:
IN DEV_INFO        *fpDevInfo
IN ICC_DEVICE      *fpICCDevice
IN OUT UINT32      *dwLength - # of bytes in Buffer
OUT UINT8          *Buffer - Points to abData in RDR_TO_PC_DATABLOCK
Output:
EFI_STATUS
Notes:
See section 6.2.1 of CCID spec Rev 1.1 for more details


RDRToPCDataRateAndClockFrequency in the usbCCID.c

Function : RDRToPCDataRateAndClockFrequency

File: usbCCID.c
Description:
RDR_TO_PC_DATARATEANDCLOCK cmd is issued.
Input:
IN DEV_INFO          *fpDevInfo,
IN ICC_DEVICE        *fpICCDevice
Output:
EFI_STATUS
Notes:
Returns dwClockFrequency and dwDataRate.
See section 6.2.5 of CCID spec Rev 1.1 for more details.


RDRToPCParameters in the usbCCID.c

Function : RDRToPCParameters

File: usbCCID.c
Description:
RDR_TO_PC_SLOTSTATUS cmd is issued
Input:
IN DEV_INFO         *fpDevInfo,
IN ICC_DEVICE       *fpICCDevice
Output:
EFI_STATUS
abProtocolDataStructure is copied
Notes:
bStatus, BErroris updated.  See section 6.2.3 of CCID spec
Rev 1.1 for more details.
bProtocolNum and abProtocolDatStructure is captured.


RDRToPCSlotStatus in the usbCCID.c

Function : RDRToPCSlotStatus

File: usbCCID.c
Description:
RDR_TO_PC_SLOTSTATUS cmd is issued to CCID.
Input:
IN DEV_INFO         *fpDevInfo,
IN ICC_DEVICE       *fpICCDevice
Output:
EFI_STATUS
Notes:
bStatus, BError and bClockStatus is updated.
See section 6.2.2 of CCID spec Rev 1.1 for more details.


TxRxT1Adpu in the usbCCID.c

Function : TxRxT1Adpu

File: usbCCID.c
Description:
Transmit/Receive T1 ADPU
Input:
IN DEV_INFO         *fpDevInfo,
IN ICC_DEVICE       *fpICCDevice,
IN UINT32           CmdLength,
IN UINT8            *CmdBuffer,
IN UINT8            BlockWaitingTime,
IN UINT16           LevelParameter
Output:

Notes:


TxRxT1TDPUChar in the usbCCID.c

Function : TxRxT1TDPUChar

File: usbCCID.c
Description:
Transmit/Receive T1 TDPU/Character
Input:
IN DEV_INFO         *fpDevInfo,
IN ICC_DEVICE       *fpICCDevice,
IN UINT32           CmdLength,
IN UINT8            *CmdBuffer,
IN UINT8            ISBlock,
OUT UINT32          *ResponseLength,
OUT UINT8           *ResponseBuffer
Output:

Notes:


UpdateATRDataInfo in the usbCCID.c

Function : UpdateATRDataInfo

File: usbCCID.c
Description:
The routine update the Transmision protocol supported and other
timing related data
Input:
DEV_INFO           *fpDevInfo
ICC_DEVICE        *fpICCDevice
Output:
None
Notes:
This function looks into ATR data and updates CLASS A/B/C information,
calculates ETU, WaitTime etc


USBAPI_CCIDRequest in the usbCCID.c

Function : USBAPI_CCIDRequest

File: usbCCID.c
Description:
This routine services the USB API function number 30h.  It
handles all the CCID related calls from the higher
layer. Different sub-functions are invoked depending on
the sub-function number
Input:
fpURPPointer    Pointer to the URP structure
fpURPPointer.bSubFunc   Subfunction number
Output:
URP structure is updated with the relevant information


USBCCID_ProcessInterruptData in the usbCCID.c

Function : USBCCID_ProcessInterruptData

File: usbCCID.c
Description:
This routine is called when InterruptIN messages is generated
Input:
pHCStruc    Pointer to HCStruc
pDevInfo    Pointer to device information structure
pTD         Pointer to the polling TD
pBuffer     Pointer to the data buffer
Output:
UEB_ERROR/USB_SUCCESS
Notes:
When an ICC card is inserted or removed Interrupt message is generated.


USBCCIDAPIAtrSMM in the usbCCID.c

Function : USBCCIDAPIAtrSMM

File: usbCCID.c
Description:
This function is part of the USB BIOS MASS API inside SMM
Input:
fpURPPointer    Pointer to the URP structure, it contains the following:
Output:
fpURPPointer Pointer to the URP structure
fpURP->bRetValue : USB_SUCESS if data is returned
Notes:
This API returns ATR data if present


USBCCIDAPIGetParametersSMM in the usbCCID.c

Function : USBCCIDAPIGetParametersSMM

File: usbCCID.c
Description:
This function is part of the USB BIOS MASS API.
Input:
fpURPPointer    Pointer to the URP structure, it contains the following:
OUT UINT8       bStatus;
OUT UINT8       bError;
IN OUT UINTN    ResponseLength;
OUT UINTN       fpResponseBuffer;
IN  UINT8       Slot;
OUT UINTN       fpDevInfo;
Output:
fpURPPointer    Pointer to the URP structure
bRetValue       Return value
Notes:
This API returns the response to RDR_to_PCParameters cmd


USBCCIDAPIGetSlotStatusSMM in the usbCCID.c

Function : USBCCIDAPIGetSlotStatusSMM

File: usbCCID.c
Description:
This function is part of the USB BIOS MASS API inside SMM
Input:
fpURPPointer    Pointer to the URP structure, it contains the following:
UINT8           *bStatus;
UINT8           *bError;
Output:
fpURPPointer    Pointer to the URP structure
bRetValue       Return value
bClockStatus    Return Value
Notes:
This API returns information from RDR_to_PC_SlotStatus.
Caller is USBCCIDAPIGetSlotStatus in EfiUsbCCID.C


USBCCIDAPIPowerDownSlotSMM in the usbCCID.c

Function : USBCCIDAPIPowerDownSlotSMM

File: usbCCID.c
Description:
This function is part of the USB BIOS MASS API inside SMM
Input:
fpURPPointer    Pointer to the URP structure, it contains the following:
Output:
fpURPPointer Pointer to the URP structure
fpURP->bRetValue : USB_SUCESS if data is returned
Notes:
This API powers down the particular slot.


USBCCIDAPIPowerupSlotSMM in the usbCCID.c

Function : USBCCIDAPIPowerupSlotSMM

File: usbCCID.c
Description:
This function is part of the USB BIOS MASS API inside SMM
Input:
fpURPPointer    Pointer to the URP structure
Output:
fpURPPointer Pointer to the URP structure
fpURP->bRetValue : USB_SUCESS if data is returned
Notes:
This API powers up the particular slot in CCID and returns ATR data if successful


USBCCIDAPISmartClassDescriptorSMM in the usbCCID.c

Function : USBCCIDAPISmartClassDescriptorSMM

File: usbCCID.c
Description:
This function is part of the USB BIOS MASS API inside SMM
Input:
fpURPPointer    Pointer to the URP structure
Output:
fpURPPointer    Pointer to the URP structure
fpURP->bRetValue USB_SUCESS if data is returned
Notes:
This API returns 36h bytes of SMART Class Descriptor to the caller.
Input Buffer of 36h bytes long is provided by the caller. Caller is
USBCCIDAPISmartClassDescriptor in EfiUsbCCID.C


USBCCIDAPITable in the usbCCID.c

Table : USBCCIDAPITable

File: usbCCID.c
Description:
This is the table of functions used by USB CCID API


USBCCIDAPIXfrBlockSMM in the usbCCID.c

Function : USBCCIDAPIXfrBlockSMM

File: usbCCID.c
Description:
This function is part of the USB BIOS MASS API.
Input:
fpURPPointer    Pointer to the URP structure, it contains the following:
IN UINTN        CmdLength
IN UINTN        fpCmdBuffer
OUT UINT8       bStatus
OUT UINT8       bError
IN OUT UINTN    ResponseLength - Points to the buffer length of fpResponseBuffer
OUT UINTN       fpResponseBuffer
Output:
fpURPPointer    Pointer to the URP structure
OUT UINT8       bStatus
OUT UINT8       bError
IN OUT UINTN    ResponseLength - Points to the actual response bytes in fpResponseBuffer on return
OUT UINTN       fpResponseBuffer

Note:        This API excutes PC_to_RDR_XfrBlock cmd and returns the response from
RDR_to_PC_DataBlock to the caller.


USBCCIDCheckForDevice in the usbCCID.c

Function : USBCCIDCheckForDevice

File: usbCCID.c
Description:
This routine checks for CCID type device from the
interface data provided
Input:
DEV_INFO    *fpDevInfo
UINT8       bBaseClass
UINT8       bSubClass
UINT8       bProtocol
Output:
BIOS_DEV_TYPE_STORAGE type on success or 0FFH on error


USBCCIDConfigureDevice in the usbCCID.c

Function : USBCCIDConfigureDevice

File: usbCCID.c
Description:
This function checks an interface descriptor of a device
to see if it describes a USB CCID device.  If the device
is a CCID device,  then it is configured
and initialized.
Input:
pHCStruc    HCStruc pointer
pDevInfo    Device information structure pointer
pDesc       Pointer to the descriptor structure
wEnd        End offset of the device descriptor
Output:
New device info structure, NULL on error
Notes:
DoDevInfoInitialization


USBCCIDDisconnectDevice in the usbCCID.c

Function : USBCCIDDisconnectDevice

File: usbCCID.c
Description:
This function disconnects the CCID device.
Input:
pDevInfo    Device info structure pointer
Output:
None
Notes:
Free up all memory allocated to the device.
Remove ICC device from the device list.


USBCCIDFillDriverEntries in the usbCCID.c

Function : USBCCIDFillDriverEntries

File: usbCCID.c
Description:
This function fills DEV_DRIVER structure
Input:
fpDevDriver    Pointer to the DEV driver
Output:
None


USBCCIDInitialize in the usbCCID.c

Function : USBCCIDInitialize

File: usbCCID.c
Description:
This function initializes CCID device related data
Input:
None
Output:
None


USBCCIDIssueBulkTransfer in the usbCCID.c

Function : USBCCIDIssueBulkTransfer

File: usbCCID.c
Description:
This function executes a bulk transaction on the USB. The
transfer may be either DATA_IN or DATA_OUT packets containing
data sent from the host to the device or vice-versa. This
function wil not return until the request either completes
successfully or completes with error (due to time out, etc.)
Size of data can be upto 64K
Input:
- DeviceInfo structure (if available else 0)
- Transfer direction
Bit 7   : Data direction
           0 Host sending data to device
           1 Device sending data to host
Bit 6-0 : Reserved
- Buffer containing data to be sent to the device or
buffer to be used to receive data. Value in
- Length request parameter, number of bytes of data
to be transferred in or out of the host controller
Output:
Amount of data transferred


USBCCIDIssueControlTransfer in the usbCCID.c

Function : USBCCIDIssueControlTransfer

File: usbCCID.c
Description:
Issues Control Pipe request to default pipe

Parameters:     pDevInfo    DeviceInfo structure (if available else 0)
wRequest    Request type (low byte)
Bit 7   : Data direction
   0 = Host sending data to device
   1 = Device sending data to host
Bit 6-5 : Type
   00 = Standard USB request
   01 = Class specific
   10 = Vendor specific
   11 = Reserved
Bit 4-0 : Recipient
   00000 = Device
   00001 = Interface
   00010 = Endpoint
   00100 - 11111 = Reserved
Request code, a one byte code describing
the actual device request to be executed
(ex: 1 : ABORT, 2 : GET_CLOCK_FREQUENCIES, 3: GET_DATA_RATES)
wIndex      wIndex request parameter (meaning varies)
wValue      wValue request parameter (meaning varies)
fpBuffer    Buffer containing data to be sent to the
device or buffer to be used to receive data
wLength     wLength request parameter, number of bytes
of data to be transferred in or out
of the host controller
Output:
Number of bytes actually transferred


VoltageSelection in the usbCCID.c

Function : VoltageSelection

File: usbCCID.c
Description:
Based on the dwFeatures register setting, power up CCID/ICC
Input:
DEV_INFO           *fpDevInfo,
ICC_DEVICE        *fpICCDevice
Output:
EFI_STATUS
Notes:
Based on dwFeatures value from SMART Class Descriptor either
do an automatic Power-on or go through a manual
power up sequence and then callect the ATR data.


usbdef.h

Description:
AMI USB driver definitions

The following data structures are used in the file: usbdef.h.

Variable | Description
HCD_HEADER | USB Host Controller Driver function list structure.
HcDxeRecord | state information for USB_HC_PROTOCOL implementation
MASS_HOTPLUG | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call USBMass_HotPlugDeviceSupport (API #27h, SubFunc 09h)
MASS_XACT_STRUC | This structure holds the information needed for the mass transaction (for CBI or BULK)
USB_BADDEV_STRUC | This structure is used to define a non-compliant USB device
USB_GLOBAL_DATA | USB Global Data Area structure

The following descriptions are used in the file: usbdef.h.

Header | Description
INCMPT_FLAGS | This equates are used to describe the incompatible USB mass storage devices. The bits defined are: BIT Description ============================================================= 0 1, indicates this device does not support mode sense command 1 1, indicates that this is a single LUN device (even though it is reporting as multiple LUN) 2 1, indicates that this device should be disabled 3 1, indicates this device does not support test unit ready command 4 1, indicates this device responds with wrong BOT status value 5 1, indicates that this device does not support start unit command 6 1, indicates that this device does not support read format capacity command 7 1, indicates that this hispeed device has to be in full speed always 8 1, indicates that this hispeed device has to be in hispeed always

Built on 16:12:02 10/28/16


HCD_HEADER in the usbdef.h

Variable : HCD_HEADER

File: usbdef.h
Fields:

Name | Type | Description
bFlag | UINT8 | Driver Header Status
pfnHCDStart | UINT8 | Driver Start
pfnHCDStop | UINT8 | Driver Stop
pfnHCDEnumeratePorts | UINT8 | Enumerate Root Ports
pfnHCDDisableInterrupts | UINT8 | Disable Interrupts
pfnHCDEnableInterrupts | UINT8 | Enable Interrupts
pfnHCDProcessInterrupt | UINT8 | Process Interrupt
pfnHCDGetRootHubStatus | UINT8 | Get Root Hub Ports Status
pfnHCDDisableRootHub | UINT8 | Disable Root Hub
pfnHCDEnableRootHub | UINT8 | Enable Root Hub
pfnHCDControlTransfer | UINT16 | Perform Control Transfer
pfnHCDBulkTransfer | UINT32 | Perform Bulk Transfer
pfnHCDInterruptTransfer | UINT8 | Perform Interrupt Transfer
pfnHCDDeactivatePolling | UINT8 | Deactivate Polling
pfnHCDActivatePolling | UINT8 | Activate Polling
pfnHCDDisableKeyRepeat | UINT8 | Disable Key Repead
pfnHCDEnableKeyRepeat | UINT8 | Enable Key Repeat

Description:
USB Host Controller Driver function list structure.


HcDxeRecord in the usbdef.h

Variable : HcDxeRecord

File: usbdef.h
Description:
state information for USB_HC_PROTOCOL implementation


INCMPT_FLAGS in the usbdef.h

General : INCMPT_FLAGS

File: usbdef.h
Description:
This equates are used to describe the incompatible USB mass
storage devices. The bits defined are:
BIT     Description
=============================================================
0       1, indicates this device does not support mode sense command
1       1, indicates that this is a single LUN device (even though it is reporting as multiple LUN)
2       1, indicates that this device should be disabled
3       1, indicates this device does not support test unit ready command
4       1, indicates this device responds with wrong BOT status value
5       1, indicates that this device does not support start unit command
6       1, indicates that this device does not support read format capacity command
7       1, indicates that this hispeed device has to be in full speed always
8       1, indicates that this hispeed device has to be in hispeed always
Notes:
The device is identified by the vendor id and device id
associated with the flags above
Referrals:
USB_BADDEV_STRUC


MASS_HOTPLUG in the usbdef.h

Variable : MASS_HOTPLUG

File: usbdef.h
Fields:

Name | Type | Description
bDevAddr | BYTE | USB device address of the device
bNumUSBFDD | BYTE | Number of USB FDD's installed
bNumUSBCDROM | BYTE | Number of USB CDROM's installed
bDeviceFlag | BYTE | Flag indicating what hot plug devices to be added

Description:
This is a Mass URP (Mass USB Request Packet) structure for
the BIOS API call USBMass_HotPlugDeviceSupport
(API #27h, SubFunc 09h)


MASS_XACT_STRUC in the usbdef.h

Variable : MASS_XACT_STRUC

File: usbdef.h
Fields:

Name | Type | Description
pCmdBuffer | UINT16 | Pointer to the mass transaction command buffer
bCmdSize | UINT8 | Size of the command buffer
bXferDir | UINT8 | Transfer direction (BIT7)
fpBuffer | UINT32 | Far pointer of the data buffer (IN/OUT)
dwLength | UINT32 | Length of the data buffer
wPreSkip | UINT16 | Number of bytes to skip before getting actual data
wPostSkip | UINT16 | Number of bytes to skip after getting actual data
wMiscFlag | UINT16 | Flag for special cases refer USBM_XACT_FLAG_XXX

Description:
This structure holds the information needed for the mass
transaction (for CBI or BULK)


USB_BADDEV_STRUC in the usbdef.h

Variable : USB_BADDEV_STRUC

File: usbdef.h
Fields:

Name | Type | Description
wVID | WORD | Vendor ID of the device
wDID | WORD | Device ID of the device
bBaseClass | BYTE | Base class of the device
bSubClass | BYTE | Sub class of the device
bProtocol | BYTE | Protocol used by the device
wFlags | INCMPT_FLAGS | Incompatibility flags

Description:
This structure is used to define a non-compliant USB device


USB_GLOBAL_DATA in the usbdef.h

Variable : USB_GLOBAL_DATA

File: usbdef.h
Description:
USB Global Data Area structure


usbhid.c

Description:
USB HID class device driver

The following functions are used in the file: usbhid.c.

Function | Description
USBHIDConfigureKeyboard | This routine checks an interface descriptor of the USB device detected to see if it describes a HID/Boot/Keyboard device. If the device matches the above criteria, then the device is configured and initialized
USBHIDDisconnectDevice | This routine disconnects the keyboard by freeing the USB keyboard device table entry
USBHIDInitialize | This function returns fills the host controller driver routine pointers in the structure provided
USBMSCheckForMouse | This routine checks for mouse type device from the interface data provided

Built on 16:12:02 10/28/16


USBHIDConfigureKeyboard in the usbhid.c

Function : USBHIDConfigureKeyboard

File: usbhid.c
Description:
This routine checks an interface descriptor of the USB device
detected to see if it describes a HID/Boot/Keyboard device.
If the device matches the above criteria, then the device is
configured and initialized
Input:
fpHCStruc   HCStruc pointer
fpDevInfo   Device information structure pointer
fpDesc      Pointer to the descriptor structure
wStart      Offset within interface descriptor
       supported by the device
wEnd        End offset of the device descriptor
Output:
FPDEV_INFO  New device info structure, 0 on error


USBHIDDisconnectDevice in the usbhid.c

Function : USBHIDDisconnectDevice

File: usbhid.c
Description:
This routine disconnects the keyboard by freeing
the USB keyboard device table entry
Input:
fpDevInfo   Pointer to DeviceInfo structure
Output:
USB_SUCCESS/USB_ERROR


USBHIDInitialize in the usbhid.c

Function : USBHIDInitialize

File: usbhid.c
Description:
This function returns fills the host controller driver
routine pointers in the structure provided
Input:
Nothing
Output:
Nothing


USBMSCheckForMouse in the usbhid.c

Function : USBMSCheckForMouse

File: usbhid.c
Description:
This routine checks for mouse type device from the
interface data provided
Input:
bBaseClass  USB base class code
bSubClass   USB sub-class code
bProtocol   USB protocol code
Output:
BIOS_DEV_TYPE_MOUSE type on success or 0FFH on error


usbhub.c

Description:
AMI USB Hub support implementation

The following functions are used in the file: usbhub.c.

Function | Description
USBHub_DisablePort | This routine disables the hub port
USBHub_EnablePort | This routine enables the hub port
USBHub_GetPortStatus | This routine returns the hub port status
USBHub_ProcessHubData | This routine is called with USB hub status change report data
USBHub_ResetPort | This routine resets the hub port
UsbHubCearHubFeature |
USBHubCheckDeviceType | This routine checks for hub type device from the interface data provided
UsbHubClearPortFeature |
USBHUBConfigureDevice | This function checks an interface descriptor of a device to see if it describes a USB hub. If the device is a hub, then it is configured and initialized.
USBHubDisconnect | This routine disconnects the hub by disconnecting all the devices behind it
UsbHubGetErrorCount |
UsbHubGetHubDescriptor |
UsbHubGetHubStatus |
UsbHubGetPortStatus |
UsbHubResetPort |
UsbHubSetHubDepth |
UsbHubSetHubDescriptor |
UsbHubSetHubFeature |
UsbHubSetPortFeature |

Built on 16:12:02 10/28/16


USBHub_DisablePort in the usbhub.c

Function : USBHub_DisablePort

File: usbhub.c
Description:
This routine disables the hub port
Input:
bHubAddr    USB device address of the hub whose status
has changed
bit 7   : 1 - Root hub, 0 for other hubs
bit 6-0 : Device address of the hub
bPortNum    Port number
pHCStruc    HCStruc of the host controller
Output:
USB_ERROR on error, USB_SUCCESS on success


USBHub_EnablePort in the usbhub.c

Function : USBHub_EnablePort

File: usbhub.c
Description:
This routine enables the hub port
Input:
bHubAddr    USB device address of the hub whose status
has changed
bit 7   : 1 - Root hub, 0 for other hubs
bit 6-0 : Device address of the hub
bPortNum    Port number
pHCStruc    HCStruc of the host controller
Output:
USB_SUCCESS if the hub port is enabled. USB_ERROR otherwise
Modified:
Nothing
Referrals:


USBHub_GetPortStatus in the usbhub.c

Function : USBHub_GetPortStatus

File: usbhub.c
Description:
This routine returns the hub port status
Input:
fpDevInfo   USB device - the hub whose status has changed
bit 7   : 1 - Root hub, 0 for other hubs
bit 6-0 : Device address of the hub
bPortNum    Port number
pHCStruc    HCStruc of the host controller
Output:
Port status flags (Refer USB_PORT_STAT_XX equates)


USBHub_ProcessHubData in the usbhub.c

Function : USBHub_ProcessHubData

File: usbhub.c
Description:
This routine is called with USB hub status change
report data
Input:
pHCStruc    Pointer to HCStruc
pDevInfo    Pointer to device information structure
pTD         Pointer to the polling TD
pBuffer     Pointer to the data buffer
Notes:
The status change data is an array of bit flags:
Bit     Description
0   Indicate connect change status for all ports
1   Indicate connect change status for port 1
2   Indicate connect change status for port 2
n   Indicate connect change status for port n


USBHub_ResetPort in the usbhub.c

Function : USBHub_ResetPort

File: usbhub.c
Description:
This routine resets the hub port
Input:
HCStruc    HCStruc of the host controller
    HubAddr    USB device address of the hub whose status
    has changed
bit 7   : 1 - Root hub, 0 for other hubs
bit 6-0 : Device address of the hub
PortNum    Port number
Output:
USB_SUCCESS if the hub port is enabled. USB_ERROR otherwise
Modified:
Nothing
Referrals:


UsbHubCearHubFeature in the usbhub.c

Function : UsbHubCearHubFeature

File: usbhub.c
Description:
Input:
Output:
USB_ERROR on error, USB_SUCCESS on success


USBHubCheckDeviceType in the usbhub.c

Function : USBHubCheckDeviceType

File: usbhub.c
Description:
This routine checks for hub type device from the
interface data provided
Input:
bBaseClass  USB base class code
bSubClass   USB sub-class code
bProtocol   USB protocol code
Output:
BIOS_DEV_TYPE_HUB type on success or 0FFH on error


UsbHubClearPortFeature in the usbhub.c

Function : UsbHubClearPortFeature

File: usbhub.c
Description:
Input:
Output:
USB_ERROR on error, USB_SUCCESS on success


USBHUBConfigureDevice in the usbhub.c

Function : USBHUBConfigureDevice

File: usbhub.c
Description:
This function checks an interface descriptor of a device
to see if it describes a USB hub.  If the device is a hub,
then it is configured and initialized.
Input:
pHCStruc    HCStruc pointer
pDevInfo    Device information structure pointer
pDesc       Pointer to the descriptor structure
       supported by the device
wStart      Start offset of the device descriptor
wEnd        End offset of the device descriptor
Output:
New device info structure, 0 on error


USBHubDisconnect in the usbhub.c

Function : USBHubDisconnect

File: usbhub.c
Description:
This routine disconnects the hub by disconnecting all the
devices behind it
Input:
pDevInfo    Device info structure pointer
Output:
Nothing


UsbHubGetErrorCount in the usbhub.c

Function : UsbHubGetErrorCount

File: usbhub.c
Description:
Input:
Output:
USB_ERROR on error, USB_SUCCESS on success


UsbHubGetHubDescriptor in the usbhub.c

Function : UsbHubGetHubDescriptor

File: usbhub.c
Description:
Input:
Output:
USB_ERROR on error, USB_SUCCESS on success


UsbHubGetHubStatus in the usbhub.c

Function : UsbHubGetHubStatus

File: usbhub.c
Description:
Input:
Output:
USB_ERROR on error, USB_SUCCESS on success


UsbHubGetPortStatus in the usbhub.c

Function : UsbHubGetPortStatus

File: usbhub.c
Description:
Input:
Output:
USB_ERROR on error, USB_SUCCESS on success


UsbHubResetPort in the usbhub.c

Function : UsbHubResetPort

File: usbhub.c
Description:
Input:
Output:
USB_ERROR on error, USB_SUCCESS on success


UsbHubSetHubDepth in the usbhub.c

Function : UsbHubSetHubDepth

File: usbhub.c
Description:
Input:
Output:
USB_ERROR on error, USB_SUCCESS on success


UsbHubSetHubDescriptor in the usbhub.c

Function : UsbHubSetHubDescriptor

File: usbhub.c
Description:
Input:
Output:
USB_ERROR on error, USB_SUCCESS on success


UsbHubSetHubFeature in the usbhub.c

Function : UsbHubSetHubFeature

File: usbhub.c
Description:
Input:
Output:
USB_ERROR on error, USB_SUCCESS on success


UsbHubSetPortFeature in the usbhub.c

Function : UsbHubSetPortFeature

File: usbhub.c
Description:
Input:
Output:
USB_ERROR on error, USB_SUCCESS on success


UsbInt13.c

Description:
USB Int13 driver

The following functions are used in the file: UsbInt13.c.

Function | Description
CreateBbsEntry | This function takes the device index within USBMASS_INT13_DEV list and prepares BBS entry for this device.
CreateDeviceName | This function retrieves USB device name, copies it into lower memory and returns a pointer to the string.
InitInt13RuntimeImage | Initialization of data structures and placement of runtime code of USB INT13
InstallUsbLegacyBootDevices | This function installs USB INT13 devices
ReadyToBootNotify | READY_TO_BOOT event notification callback. It locates BBS table and changes the priority of device located at index gBootOverrideDeviceIndx to 0 (highest). It also verifies the hotplug devices are properly installed.
UsbInstallLegacyDevice | This function installs USB INT13 device
UsbInt13EntryPoint | USB INT13 driver entry point. Installs callback notification on gEfiUSBProtocolGuid installation.
UsbUninstallLegacyDevice | This function uninstalls USB INT13 device

Built on 16:12:02 10/28/16


CreateBbsEntry in the UsbInt13.c

Function : CreateBbsEntry

File: UsbInt13.c
Description:
This function takes the device index within USBMASS_INT13_DEV
list and prepares BBS entry for this device.
Built on 16:12:00 10/28/16


CreateDeviceName in the UsbInt13.c

Function : CreateDeviceName

File: UsbInt13.c
Description:
This function retrieves USB device name, copies it into
lower memory and returns a pointer to the string.
Built on 16:12:00 10/28/16


InitInt13RuntimeImage in the UsbInt13.c

Function : InitInt13RuntimeImage

File: UsbInt13.c
Description:
Initialization of data structures and placement of runtime
   code of USB INT13


InstallUsbLegacyBootDevices in the UsbInt13.c

Function : InstallUsbLegacyBootDevices

File: UsbInt13.c
Description:
This function installs USB INT13 devices


ReadyToBootNotify in the UsbInt13.c

Function : ReadyToBootNotify

File: UsbInt13.c
Description:
READY_TO_BOOT event notification callback. It locates BBS
table and changes the priority of device located at index
gBootOverrideDeviceIndx to 0 (highest). It also verifies
the hotplug devices are properly installed.
Input:
Event - event signaled by the DXE Core upon installation
Context - event context
Output:
Nothing


UsbInstallLegacyDevice in the UsbInt13.c

Function : UsbInstallLegacyDevice

File: UsbInt13.c
Description:
This function installs USB INT13 device


UsbInt13EntryPoint in the UsbInt13.c

Function : UsbInt13EntryPoint

File: UsbInt13.c
Description:
USB INT13 driver entry point. Installs callback notification
on gEfiUSBProtocolGuid installation.
Input:
IN EFI_HANDLE        ImageHandle,
        IN EFI_SYSTEM_TABLE  *SystemTable
Output:
EFI_STATUS


UsbUninstallLegacyDevice in the UsbInt13.c

Function : UsbUninstallLegacyDevice

File: UsbInt13.c
Description:
This function uninstalls USB INT13 device


UsbInt13.h

Description:
Definitions and structures for USB INT13
Built on 16:12:02 10/28/16


UsbInt13ComponentName.c

Description:
Component Name Protocol Member Functions for USB Int13.

The following functions are used in the file: UsbInt13ComponentName.c.

Function | Description
UsbInt13CtlDriverName | Retrieves a Unicode string that is the user readable name of the EFI Driver. Parameters: This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. Language - A pointer to a three character ISO 639-2 language identifier. This is the language of the driver name that that the caller is requesting, and it must match one of the languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. DriverName - A pointer to the Unicode string to return. This Unicode string is the name of the driver specified by This in the language specified by Language.
UsbInt13CtlGetControllerName | Retrieves a Unicode string that is the user readable name of the controller that is being managed by an EFI Driver. Parameters: This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. ControllerHandle - The handle of a controller that the driver specified by This is managing. This handle specifies the controller whose name is to be returned. ChildHandle - The handle of the child controller to retrieve the name of. This is an optional parameter that may be NULL. It will be NULL for device drivers. It will also be NULL for a bus drivers that wish to retrieve the name of the bus controller. It will not be NULL for a bus driver that wishes to retrieve the name of a child controller. Language - A pointer to a three character ISO 639-2 language identifier. This is the language of the controller name that that the caller is requesting, and it must match one of the languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. ControllerName - A pointer to the Unicode string to return. This Unicode string is the name of the controller specified by ControllerHandle and ChildHandle in the language specified by Language from the point of view of the driver specified by This.

Built on 16:12:02 10/28/16


UsbInt13CtlDriverName in the UsbInt13ComponentName.c

Function : UsbInt13CtlDriverName

File: UsbInt13ComponentName.c
Description:
Retrieves a Unicode string that is the user readable name of
the EFI Driver.
Parameters:
This       - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
Language   - A pointer to a three character ISO 639-2 language identifier.
  This is the language of the driver name that that the caller
  is requesting, and it must match one of the languages specified
  in SupportedLanguages.  The number of languages supported by a
  driver is up to the driver writer.
DriverName - A pointer to the Unicode string to return.  This Unicode string
  is the name of the driver specified by This in the language
  specified by Language.
Output:
EFI_SUCCES            - The Unicode string for the Driver specified by This
             and the language specified by Language was returned
             in DriverName.
EFI_INVALID_PARAMETER - Language is NULL.
EFI_INVALID_PARAMETER - DriverName is NULL.
EFI_UNSUPPORTED       - The driver specified by This does not support the
             language specified by Language.


UsbInt13CtlGetControllerName in the UsbInt13ComponentName.c

Function : UsbInt13CtlGetControllerName

File: UsbInt13ComponentName.c
Description:
Retrieves a Unicode string that is the user readable name of
the controller that is being managed by an EFI Driver.

Parameters:
This             - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
ControllerHandle - The handle of a controller that the driver specified by
        This is managing.  This handle specifies the controller
        whose name is to be returned.
ChildHandle      - The handle of the child controller to retrieve the name
        of.  This is an optional parameter that may be NULL.  It
        will be NULL for device drivers.  It will also be NULL
        for a bus drivers that wish to retrieve the name of the
        bus controller.  It will not be NULL for a bus driver
        that wishes to retrieve the name of a child controller.
Language         - A pointer to a three character ISO 639-2 language
        identifier.  This is the language of the controller name
        that that the caller is requesting, and it must match one
        of the languages specified in SupportedLanguages.  The
        number of languages supported by a driver is up to the
        driver writer.
ControllerName   - A pointer to the Unicode string to return.  This Unicode
        string is the name of the controller specified by
        ControllerHandle and ChildHandle in the language
        specified by Language from the point of view of the
        driver specified by This.
Output:
EFI_SUCCESS           - The Unicode string for the user readable name in the
             language specified by Language for the driver
             specified by This was returned in DriverName.
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
             EFI_HANDLE.
EFI_INVALID_PARAMETER - Language is NULL.
EFI_INVALID_PARAMETER - ControllerName is NULL.
EFI_UNSUPPORTED       - The driver specified by This is not currently
             managing the controller specified by
             ControllerHandle and ChildHandle.
EFI_UNSUPPORTED       - The driver specified by This does not support the
             language specified by Language.


UsbIo.h

Description:
AMI USB IO interface header file
Built on 16:12:02 10/28/16


usbkbd.c

Description:
USB keyboard driver SMI routines

The following functions are used in the file: usbkbd.c.

Function | Description
LegacyAutoRepeat | This routine is called periodically based on 8ms TD and used to implement the key repeat.
USBKBC_CheckCharacterBufferFull | This routine checks whether the character buffer can hold 'N'+1 character
USBKBC_SendToCharacterBuffer | This routine puts a character into the character buffer. Character buffer pointers are also updated
USBKBDConfigureKeyboard | This routine checks an interface descriptor of the USB device detected to see if it describes a HID/Boot/Keyboard device. If the device matches the above criteria, then the device is configured and initialized
USBKBDDisconnectDevice | This routine disconnects the keyboard by freeing the USB keyboard device table entry
USBKBDFindUSBKBDeviceTableEntry | This routine searches for the HID table entry which matches the provided device info structure
USBKBDInitialize | This function returns fills the host controller driver routine pointers in the structure provided
USBKBDPeriodicInterruptHandler | This routine is called every 16ms and is used to send the characters read from USB keyboard to the keyboard controller for legacy operation. Also this function updates the keyboard LED status
USBKBDProcessKeyboardData | This routine is called with USB keyboard report data. This routine handles the translation of USB keyboard data into PS/2 keyboard data, and makes the PS/2 data available to software using ports 60/64h by communicating with PS/2 keyboard controller.
UsbKbdSetLed | This routine set the USB keyboard LED status.
USBKBKeyrepeatCallback | This routine is called every time the key repeat is requested
UsbScanner | This routine is executed to convert USB scan codes into PS/2 make/bread codes.

Built on 16:12:02 10/28/16


LegacyAutoRepeat in the usbkbd.c

Function : LegacyAutoRepeat

File: usbkbd.c
Description:
This routine is called periodically based on 8ms TD and used
to implement the key repeat.
Input:
Hc   Pointer to the HCStruc structure
Output:
Nothing


USBKBC_CheckCharacterBufferFull in the usbkbd.c

Function : USBKBC_CheckCharacterBufferFull

File: usbkbd.c
Description:
This routine checks whether the character buffer can hold
'N'+1 character
Input:
bCount  Space needed in the buffer (in characters)
Output:
0 If buffer is full
<> 0 If buffer is not full


USBKBC_SendToCharacterBuffer in the usbkbd.c

Function : USBKBC_SendToCharacterBuffer

File: usbkbd.c
Description:
This routine puts a character into the character buffer.
Character buffer pointers are also updated
Input:
Nothing
Output:
Nothing


USBKBDConfigureKeyboard in the usbkbd.c

Function : USBKBDConfigureKeyboard

File: usbkbd.c
Description:
This routine checks an interface descriptor of the USB device
detected to see if it describes a HID/Boot/Keyboard device.
If the device matches the above criteria, then the device is
configured and initialized
Input:
fpHCStruc   HCStruc pointer
fpDevInfo   Device information structure pointer
fpDesc      Pointer to the descriptor structure
wStart      Offset within interface descriptor
       supported by the device
wEnd        End offset of the device descriptor
Output:
FPDEV_INFO  New device info structure, 0 on error


USBKBDDisconnectDevice in the usbkbd.c

Function : USBKBDDisconnectDevice

File: usbkbd.c
Description:
This routine disconnects the keyboard by freeing
the USB keyboard device table entry
Input:
fpDevInfo   Pointer to DeviceInfo structure
Output:
USB_SUCCESS/USB_ERROR


USBKBDFindUSBKBDeviceTableEntry in the usbkbd.c

Function : USBKBDFindUSBKBDeviceTableEntry

File: usbkbd.c
Description:
This routine searches for the HID table entry which matches
the provided device info structure
Input:
fpDevInfo   Pointer to DeviceInfo structure
Output:
offset of the HID table for the requested fpDevinfo
0xFFFF -on error


USBKBDInitialize in the usbkbd.c

Function : USBKBDInitialize

File: usbkbd.c
Description:
This function returns fills the host controller driver
routine pointers in the structure provided
Input:
Nothing
Output:
Nothing


USBKBDPeriodicInterruptHandler in the usbkbd.c

Function : USBKBDPeriodicInterruptHandler

File: usbkbd.c
Description:
This routine is called every 16ms and is used to send
the characters read from USB keyboard to the keyboard
controller for legacy operation. Also this function updates
the keyboard LED status
Input:
fpHCStruc   Pointer to the HCStruc structure
Output:
Nothing


USBKBDProcessKeyboardData in the usbkbd.c

Function : USBKBDProcessKeyboardData

File: usbkbd.c
Description:
This routine is called with USB keyboard report data.  This
routine handles the translation of  USB keyboard data
into PS/2 keyboard data, and makes the PS/2 data available
to software using ports 60/64h by communicating with
PS/2 keyboard controller.
Input:
fpHCStruc   Pointer to HCStruc
fpDevInfo   Pointer to device information structure
fpTD        Pointer to the polling TD
fpBuffer    Pointer to the data buffer
Output:
Nothing
Notes:
TD's control status field has the packet length (0 based).
It could be one of three values 0,1 or 7 indicating packet
lengths of 1, 2 & 8 repectively.
The format of 8 byte data packet is as follow:
Byte              Description
0   Modifier key (like shift, cntr & LED status)
1   Reserved
2   Keycode of 1st key pressed
3   Keycode of 2nd key pressed
4   Keycode of 3rd key pressed
5   Keycode of 4th key pressed
6   Keycode of 5th key pressed
7   Keycode of 6th key pressed


UsbKbdSetLed in the usbkbd.c

Function : UsbKbdSetLed

File: usbkbd.c
Description:
This routine set the USB keyboard LED status.
Input:
DevInfo		Pointer to device information structure
        LedStatus	LED status
Output:
USB_SUCCESS or USB_ERROR


USBKBKeyrepeatCallback in the usbkbd.c

Function : USBKBKeyrepeatCallback

File: usbkbd.c
Description:
This routine is called every time the key repeat is requested


UsbScanner in the usbkbd.c

Function : UsbScanner

File: usbkbd.c
Description:
This routine is executed to convert USB scan codes into PS/2
make/bread codes.
Input:
fpDevInfo   - USB keyboard device
fpBuffer    - USB scan codes data buffer
Output:
Nothing


usbkbd.h

Description:
AMI USB keyboard support header
Built on 16:12:02 10/28/16


usbmass.c

Description:
AMI USB Mass Storage support implementation

The following functions are used in the file: usbmass.c.

Function | Description
dabc_to_abcd | This function swaps the bytes in dword: 0-3,1-2,2-1,3-0. Can be used for example in little endian->big endian conversions.
iPodShufflePatch | This check whether iPod shuffle attached to system and move iPod shuffle to first initial device.
USBBOTGetStatus | This function gets the BOT status sequence using bulk IN transfer
USBMassBOTGetMaxLUN | This function gets the maximum logical unit number(LUN) supported by the device. It is zero based value.
USBMassCBIGetStatus | This function gets the status of the mass transaction through an interrupt transfer
USBMassCheckDeviceReady | This function makes sure the device is ready for next command
USBMassClearBulkEndpointStall | This function clears the bulk endpoint stall by sending CLEAR_FEATURE command to bulk endpoints
USBMassClearMassXactStruc | This function clears the mass transaction structure
USBMassCmdPassThru | This function issues the command/data sequence provided as input. This function can be used to send raw data to the USB mass storage device
USBMassCreateLogicalUnits | This function verifies the presence of logical units (LUN) in the USB mass device and creates appropriate device info structures for them
USBMassFindFreeMassDeviceInfo | This function finds a free mass device info structure and copies the current mass device info structure into it
USBMassGetConfiguration | This function sends get configuration command to the USB mass storage device
USBMassGetDeviceGeometry | This function fills and returns the mass get device geometry structure
USBMassGetDeviceInfo | This function fills and returns the mass get device info structure
USBMassGetDeviceParameters | This function gets the USB mass device parameters such as max cylinder, head, sector, block size and
USBMassGetDeviceStatus | Get USB MassStorage device status. Include Media Informarion. Refer to USB_MASS_MEDIA_XXX in USBDEF.H
USBMassGetFormatType | This function reads the first sector from the mass storage device and identifies the formatted type.
USBMassGetFreeMassDeviceInfoStruc | This function finds a free mass device info structure and returns the pointer to it
USBMassGetPhysicalDeviceType | This procedure classify USB mass storage devices according to inquiry command return data.
USBMassIdentifyDeviceType | This function identifies the type of the USB mass storage device attached from the INQUIRY data obtained from the drive
USBMassIssueBOTTransaction | This function performs a mass storage transaction using bulk only transport (BOT) protocol.
USBMassIssueMassTransaction | This function performs a mass storage transaction by invoking proper transaction protocol.
USBMassReadCapacity | This function issues read capacity command to the mass device and returns the value obtained
USBMassReadCapacity10Command | This function issues read capacity of the mass storage
USBMassReadCapacity16Command | This function issues read capacity of the mass storage
USBMassReadFormatCapacity | This function sends read format capacity command to the USB mass storage device
USBMassReadSector | This function a sector at the LBA specified
USBMassRWVCommand | This function reads/writes/verifies blocks of data from the USB mass device specified by its device address
USBMassSetDefaultGeometry | This procedure set default geometry for mass storage devices.
USBMassSetDefaultType | This procedure set device type depend on device class.
USBMassUpdateCHSFromBootRecord | This function parses the boot record and extract the CHS information of the formatted media from the boot record. This routine checks for DOS & NTFS formats only
USBMassUpdateCylinderInfo | This procedure update cylinder parameter for device geometry. head and sector paramaters are required before invoke this function.
USBMassUpdateDeviceGeometry | This function updates the device geometry information
USBMassUpdateParamUsingModeSense | This function obtains the device geometry from the device using mode sense command and updates the global variables
USBMassUpdateParamUsingReadCapacity | This function obtains the device geometry from the device using read capacity command and updates the global variables
USBMassValidatePartitionTable | This procedure check whether partition table valid.
USBMiscIssueBulkTransfer | This function executes a bulk transaction on the USB. The transfer may be either DATA_IN or DATA_OUT packets containing data sent from the host to the device or vice-versa. This function wil not return until the request either completes successfully or completes with error (due to time out, etc.) Size of data can be upto 64K
ValidateDeviceName | This procedure check whether device return valid device name if no valid device name returned, assign default name for it

Built on 16:12:02 10/28/16


dabc_to_abcd in the usbmass.c

Function : dabc_to_abcd

File: usbmass.c
Description:
This function swaps the bytes in dword: 0-3,1-2,2-1,3-0. Can be
used for example in little endian->big endian conversions.
Input:
DWORD to swap
Output:
Input value with the swapped bytes in it.
Built on 16:12:00 10/28/16


iPodShufflePatch in the usbmass.c

Function : iPodShufflePatch

File: usbmass.c
Description:
This check whether iPod shuffle attached to system and move
iPod shuffle to first initial device.
Input:
Pointer to the mass get info struc
Output:
None
Notes:
Attaching iPod shuffle and iPod mini to system causes BIOS POST
stop. iPod shuffle must be initialized as early as possible.
iPod mini cosumes about 2 seconds to complete initialization,
init iPod shuffle first to fix problem.


USBBOTGetStatus in the usbmass.c

Function : USBBOTGetStatus

File: usbmass.c
Description:
This function gets the BOT status sequence using
bulk IN transfer
Input:
fpDevInfo   Pointer to DeviceInfo structure
Output:
Nothing


USBMassBOTGetMaxLUN in the usbmass.c

Function : USBMassBOTGetMaxLUN

File: usbmass.c
Description:
This function gets the maximum logical unit number(LUN)
supported by the device.  It is zero based value.
Input:
Pointer to DeviceInfo structure
Output:
Max LUN supported


USBMassCBIGetStatus in the usbmass.c

Function : USBMassCBIGetStatus

File: usbmass.c
Description:
This function gets the status of the mass transaction
through an interrupt transfer
Input:
pDevInfo    Pointer to DeviceInfo structure
Output:
Return value from the interrupt transfer


USBMassCheckDeviceReady in the usbmass.c

Function : USBMassCheckDeviceReady

File: usbmass.c
Description:
This function makes sure the device is ready for next
command
Input:
fpDevInfo   Pointer to DeviceInfo structure
Output:
Sense code


USBMassClearBulkEndpointStall in the usbmass.c

Function : USBMassClearBulkEndpointStall

File: usbmass.c
Description:
This function clears the bulk endpoint stall by sending
CLEAR_FEATURE command to bulk endpoints
Input:
fpDevInfo   Pointer to DeviceInfo structure
bDirec      Endpoint direction
Output:
Nothing


USBMassClearMassXactStruc in the usbmass.c

Function : USBMassClearMassXactStruc

File: usbmass.c
Description:
This function clears the mass transaction structure


USBMassCmdPassThru in the usbmass.c

Function : USBMassCmdPassThru

File: usbmass.c
Description:
This function issues the command/data sequence provided
as input.  This function can be used to send raw data
to the USB mass storage device
Input:
fpDevInfo   Pointer to Device Info structure
fpMassCmdPassThru   Pointer to the mass command pass
   through structure
bDevAddr        USB device address of the device
dSenseData      Sense data of the last command
fpCmdBuffer     Far pointer to the command buffer
wCmdLength      Command length
fpDataBuffer    Far pointer for data buffer
wDataLength     Data length
bXferDir        Data transfer direction
Output:
USB_SUCCESS or USB_ERROR
dSenseData      Sense data of the last command
fpDataBuffer    Updated with returned data if the transfer
           is an IN transaction


USBMassCreateLogicalUnits in the usbmass.c

Function : USBMassCreateLogicalUnits

File: usbmass.c
Description:
This function verifies the presence of logical units (LUN)
in the USB mass device and creates appropriate device info
structures for them
Input:
fpDevInfo - Device information structure pointer
bMaxLun - Maximum number of logical units present (non-ZERO)
Output:
USB_ERROR   On error
USB_SUCCESS On successfull completion


USBMassFindFreeMassDeviceInfo in the usbmass.c

Function : USBMassFindFreeMassDeviceInfo

File: usbmass.c
Description:
This function finds a free mass device info structure and
copies the current mass device info structure into it
Input:
Current mass device info structure
Output:
New mass device info


USBMassGetConfiguration in the usbmass.c

Function : USBMassGetConfiguration

File: usbmass.c
Description:
This function sends get configuration command to the USB
mass storage device
Input:
Pointer to DeviceInfo structure
Output:
USB_ERROR or USB_SUCCESS


USBMassGetDeviceGeometry in the usbmass.c

Function : USBMassGetDeviceGeometry

File: usbmass.c
Description:
This function fills and returns the mass get device geometry
structure
Input:
fpMassGetDevGeo     Pointer to mass get geometry struc
Output:
Return value
fpMassGetDevGeo     Pointer to mass get geometry struc
dSenseData  Sense data of the last command
bNumHeads   Number of heads
wNumCylinders   Number of cylinders
bNumSectors Number of sectors
wBytesPerSector Number of bytes per sector
bMediaType  Media type


USBMassGetDeviceInfo in the usbmass.c

Function : USBMassGetDeviceInfo

File: usbmass.c
Description:
This function fills and returns the mass get device info
structure
Input:
fpMassGetDevInfo    Pointer to the mass get info struc
bDevAddr    USB device address of the device
Output:
USB_SUCCESS or USB_ERROR
fpMassGetDevInfo    Pointer to the mass get info struc
dSenseData  Sense data of the last command
bDevType    Device type byte (HDD, CD, Removable)
bEmuType    Emulation type used
fpDevId     Far pointer to the device ID
Notes:
Initially the bDevAddr should be set to 0 as input. This
function returns the information regarding the first mass
storage device (if no device found it returns bDevAddr as
0FFh) and also updates bDevAddr to the device address of
the current mass storage device. If no other mass storage
device is found then the routine sets the bit7 to 1
indicating current information is valid but no more mass
device found in the system. The caller can get the next
device info if bDevAddr is not 0FFh and bit7 is not set


USBMassGetDeviceParameters in the usbmass.c

Function : USBMassGetDeviceParameters

File: usbmass.c
Description:
This function gets the USB mass device parameters such as
max cylinder, head, sector, block size and
Input:
Pointer to DeviceInfo structure
Output:
Pointer to the temp buffer, NULL on error


USBMassGetDeviceStatus in the usbmass.c

Function : USBMassGetDeviceStatus

File: usbmass.c
Description:
Get USB MassStorage device status. Include Media Informarion.
Refer to USB_MASS_MEDIA_XXX in USBDEF.H
Input:
Pointer to DeviceInfo structure
Output:
USB_ERROR or USB_SUCCESS


USBMassGetFormatType in the usbmass.c

Function : USBMassGetFormatType

File: usbmass.c
Description:
This function reads the first sector from the mass storage
device and identifies the formatted type.
Input:
Pointer to DeviceInfo structure
Maximum LBA of the device
Output:
USB_ERROR   If could not identify the formatted type
USB_SUCCESS If formatted type is identified
MSB of emu - Emulation type
LSB of emu - Device type (Floppy, Harddisk or CDROM)


USBMassGetFreeMassDeviceInfoStruc in the usbmass.c

Function : USBMassGetFreeMassDeviceInfoStruc

File: usbmass.c
Description:
This function finds a free mass device info structure and
returns the pointer to it
Input:
None
Output:
Pointer to the Mass Device Info (0 on failure)
The number mass storage DeviceInfo structure (0-based)


USBMassGetPhysicalDeviceType in the usbmass.c

Function : USBMassGetPhysicalDeviceType

File: usbmass.c
Description:
This procedure classify USB mass storage devices according to
inquiry command return data.
Input:
Pointer to DeviceInfo structure
Pointer to the inquiry data (read from device)
Output:
Nothing


USBMassIdentifyDeviceType in the usbmass.c

Function : USBMassIdentifyDeviceType

File: usbmass.c
Description:
This function identifies the type of the USB mass storage
device attached from the INQUIRY data obtained from the drive
Input:
Pointer to DeviceInfo structure
Pointer to the inquiry data (read from device)
Output:
Nothing


USBMassIssueBOTTransaction in the usbmass.c

Function : USBMassIssueBOTTransaction

File: usbmass.c
Description:
This function performs a mass storage transaction using bulk
only transport (BOT) protocol.
Input:
Pointer to DeviceInfo structure
stMassXactStruc
pCmdBuffer  Pointer to command buffer
bCmdSize    Size of command block
bXferDir    Transfer direction
fpBuffer    Data buffer far pointer
dwLength    Amount of data to be transferred
wPreSkip    Number of bytes to skip before data
wPostSkip   Number of bytes to skip after data
Output:
Amount of data actually transferred


USBMassIssueMassTransaction in the usbmass.c

Function : USBMassIssueMassTransaction

File: usbmass.c
Description:
This function performs a mass storage transaction by
invoking proper transaction protocol.
Input:
Pointer to DeviceInfo structure
stMassXactStruc
pCmdBuffer  Pointer to command buffer
bCmdSize    Size of command block
bXferDir    Transfer direction
fpBuffer    Data buffer far pointer
dwLength    Amount of data to be transferred
wPreSkip    Number of bytes to skip before data
wPostSkip   Number of bytes to skip after data
Output:
Amount of data actually transferred


USBMassReadCapacity in the usbmass.c

Function : USBMassReadCapacity

File: usbmass.c
Description:
This function issues read capacity command to the mass
device and returns the value obtained
Input:
fpReadCapacity  Pointer to the read capacity structure
bDevAddr    USB device address of the device


USBMassReadCapacity10Command in the usbmass.c

Function : USBMassReadCapacity10Command

File: usbmass.c
Description:
This function issues read capacity of the mass storage
Input:
Pointer to DeviceInfo structure
Output:
USB_ERROR or USB_SUCCESS
Notes:
This routine will update the MassDeviceInfo structure
with the block size & last LBA values obtained from the
device


USBMassReadCapacity16Command in the usbmass.c

Function : USBMassReadCapacity16Command

File: usbmass.c
Description:
This function issues read capacity of the mass storage
Input:
Pointer to DeviceInfo structure
Output:
USB_ERROR or USB_SUCCESS
Notes:
This routine will update the MassDeviceInfo structure
with the block size & last LBA values obtained from the
device


USBMassReadFormatCapacity in the usbmass.c

Function : USBMassReadFormatCapacity

File: usbmass.c
Description:
This function sends read format capacity command to the USB
mass storage device
Input:
Pointer to DeviceInfo structure
Output:
USB_ERROR or USB_SUCCESS
Notes:
This routine will update the MassDeviceInfo structure
with the block size & last LBA values obtained from the
device


USBMassReadSector in the usbmass.c

Function : USBMassReadSector

File: usbmass.c
Description:
This function a sector at the LBA specified
Input:
Pointer to DeviceInfo structure
LBA to read
DS:DI   Data buffer pointer
Output:
USB_SUCCESS or USB_ERROR


USBMassRWVCommand in the usbmass.c

Function : USBMassRWVCommand

File: usbmass.c
Description:
This function reads/writes/verifies blocks of data from the
USB mass device specified by its device address
Input:
fpDevInfo   Pointer to DeviceInfo structure
bOpCode     Read/Write/Verify
fpReadData  Pointer to the read command structure
bDevAddr        USB device address of the device
dStartLBA       Starting LBA address
wNumBlks        Number of blocks to process
wPreSkipSize    Number of bytes to skip before
wPostSkipSize   Number of bytes to skip after
fpBufferPtr     Far buffer pointer
Output:
Return code (0 - Failure, <>0 - Size read)
fpReadData  Pointer to the mass read command structure
   dSenseData  Sense data of the last command
   fpBufferPtr Far buffer pointer


USBMassSetDefaultGeometry in the usbmass.c

Function : USBMassSetDefaultGeometry

File: usbmass.c
Description:
This procedure set default geometry for mass storage devices.
Input:
Pointer to DeviceInfo structure
Maximum LBA in the device
Output:
USB_ERROR   If could not identify the formatted type
USB_SUCCESS If formatted type is identified
Emulation type - bits 8..15
Device type (Floppy, Harddisk or CDROM) - bits 0..7


USBMassSetDefaultType in the usbmass.c

Function : USBMassSetDefaultType

File: usbmass.c
Description:
This procedure set device type depend on device class.
Input:
Pointer to DeviceInfo structure
Maximum LBA in the device (DWORD)
Output:
Device Type (WORD)


USBMassUpdateCHSFromBootRecord in the usbmass.c

Function : USBMassUpdateCHSFromBootRecord

File: usbmass.c
Description:
This function parses the boot record and extract the CHS
information of the formatted media from the boot record.
This routine checks for DOS & NTFS formats only
Input:
Pointer to DeviceInfo structure
Maximum LBA in the device
Boot record of the device
Output:
USB_ERROR   If the boot record is un-recognizable and CHS info
is not extracted
USB_SUCCESS If the boot record is recognizable and CHS info
is extracted. CHS information is updated in the
mass device info structure


USBMassUpdateCylinderInfo in the usbmass.c

Function : USBMassUpdateCylinderInfo

File: usbmass.c
Description:
This procedure update cylinder parameter for device geometry.
head and sector paramaters are required before invoke this
function.
Input:
Pointer to DeviceInfo structure
Maximum LBA in the device
dev->bHeads
dev->bSectors
Output:
None


USBMassUpdateDeviceGeometry in the usbmass.c

Function : USBMassUpdateDeviceGeometry

File: usbmass.c
Description:
This function updates the device geometry information
Input:
Pointer to device info structure
Output:
USB_SUCCESS or USB_ERROR


USBMassUpdateParamUsingModeSense in the usbmass.c

Function : USBMassUpdateParamUsingModeSense

File: usbmass.c
Description:
This function obtains the device geometry from the device
using mode sense command and updates the global variables
Input:
Pointer to DeviceInfo structure
Output:
USB_ERROR   On error
USB_SUCCESS On success


USBMassUpdateParamUsingReadCapacity in the usbmass.c

Function : USBMassUpdateParamUsingReadCapacity

File: usbmass.c
Description:
This function obtains the device geometry from the device
using read capacity command and updates the global variables
Input:
Pointer to DeviceInfo structure
Output:
USB_ERROR   On error
USB_SUCCESS On success


USBMassValidatePartitionTable in the usbmass.c

Function : USBMassValidatePartitionTable

File: usbmass.c
Description:
This procedure check whether partition table valid.
Input:
Partition table content
Maximum LBA in the device
Output:
USB_SUCCESS - partion table is valid:
Possible valid entry count(1-based)
Table entry counts(0-based, 4 means all entries scaned)
Activate entry offset(Absolute offset)
USB_ERROR - Invalid partition table


USBMiscIssueBulkTransfer in the usbmass.c

Function : USBMiscIssueBulkTransfer

File: usbmass.c
Description:
This function executes a bulk transaction on the USB. The
transfer may be either DATA_IN or DATA_OUT packets containing
data sent from the host to the device or vice-versa. This
function wil not return until the request either completes
successfully or completes with error (due to time out, etc.)
Size of data can be upto 64K
Input:
- DeviceInfo structure (if available else 0)
- Transfer direction
Bit 7   : Data direction
           0 Host sending data to device
           1 Device sending data to host
Bit 6-0 : Reserved
- Buffer containing data to be sent to the device or
buffer to be used to receive data. Value in
- Length request parameter, number of bytes of data
to be transferred in or out of the host controller
Output:
Amount of data transferred


ValidateDeviceName in the usbmass.c

Function : ValidateDeviceName

File: usbmass.c
Description:
This procedure check whether device return valid device name
if no valid device name returned, assign default name for it
Input:
Inquiry Data


UsbMass.h

Description:
AMI USB Mass Storage support header

The following data structures are used in the file: UsbMass.h.

Variable | Description
BOT_STATUS_BLOCK | USB mass device boot only protocol status block structure. Referred as CSW - Command status wrapper. Refer Bulk-Only transport specification for more detail.

Built on 16:12:02 10/28/16


BOT_STATUS_BLOCK in the UsbMass.h

Variable : BOT_STATUS_BLOCK

File: UsbMass.h
Fields:

Name | Type | Description
dCswSignature | DWORD | CBS signature "USBS"
dCswTag | DWORD | Tag used to link the command with status response
dCswDataResidue | DWORD | Size of remaining data that is not processed in this transfer
bmCswStatus | BYTE | CSW status byte

Description:
USB mass device boot only protocol status block structure.
Referred as CSW - Command status wrapper. Refer Bulk-Only
transport specification for more detail.
Built on 16:12:00 10/28/16


usbmisc.c

Description:
AMI USB driver miscellaneous routines

The following functions are used in the file: usbmisc.c.

Function | Description
AlignPhysicalAddress | Returns the aligned address.
AllocAlignedMemory | Allocates memory with the given alignment.
AllocateHcMemory | Allocates a number of pages with the given alignment. Note: The minimum alignment passed to this function is CPU page, 4K
FreeHcMemory | Free the memory allocated by AllocateHcMemory().
InvokeUsbApi |
MemFill | Fills the specified amount of memory with specified data starting from the specified address.
ReallocateMemory |
USBGenerateSWSMI | Generates SW SMI using global SmmCtl pointer.

Built on 16:12:02 10/28/16


AlignPhysicalAddress in the usbmisc.c

Function : AlignPhysicalAddress

File: usbmisc.c
Description:
Returns the aligned address.
Built on 16:12:00 10/28/16


AllocAlignedMemory in the usbmisc.c

Function : AllocAlignedMemory

File: usbmisc.c
Description:
Allocates memory with the given alignment.
Built on 16:12:00 10/28/16


AllocateHcMemory in the usbmisc.c

Function : AllocateHcMemory

File: usbmisc.c
Description:
Allocates a number of pages with the given alignment.

Note:        The minimum alignment passed to this function is CPU page, 4K
Built on 16:12:00 10/28/16


FreeHcMemory in the usbmisc.c

Function : FreeHcMemory

File: usbmisc.c
Description:
Free the memory allocated by AllocateHcMemory().
Built on 16:12:00 10/28/16


InvokeUsbApi in the usbmisc.c

Function : InvokeUsbApi

File: usbmisc.c
Description:


MemFill in the usbmisc.c

Function : MemFill

File: usbmisc.c
Description:
Fills the specified amount of memory with specified data
starting from the specified address.


ReallocateMemory in the usbmisc.c

Function : ReallocateMemory

File: usbmisc.c
Description:


USBGenerateSWSMI in the usbmisc.c

Function : USBGenerateSWSMI

File: usbmisc.c
Description:
Generates SW SMI using global SmmCtl pointer.


usbms.c

Description:
AMI USB mouse support implementation

The following functions are used in the file: usbms.c.

Function | Description
SetMouseData | This routine checks for mouse type device from the interface data provided
USBMSConfigureDevice | This routine checks an interface descriptor of the USB device detected to see if it describes a HID/Boot/Mouse device. If the device matches the above criteria, then the device is configured and initialized
USBMSInitialize | This routine is called once to initialize the USB mouse data area
USBMSProcessMouseData | This function is called at regular intervals with USB mouse report data. This function handles the translation of USB mouse data into PS/2 mouse data, and makes the PS/2 data available to software using ports 60/64 to communicate with a PS/2 mouse.

Built on 16:12:02 10/28/16


SetMouseData in the usbms.c

Function : SetMouseData

File: usbms.c
Description:
This routine checks for mouse type device from the
interface data provided
Input:
bBaseClass  USB base class code
bSubClass   USB sub-class code
bProtocol   USB protocol code
Output:
BIOS_DEV_TYPE_MOUSE type on success or 0FFH on error


USBMSConfigureDevice in the usbms.c

Function : USBMSConfigureDevice

File: usbms.c
Description:
This routine checks an interface descriptor of the USB device
detected to see if it describes a HID/Boot/Mouse device.
If the device matches the above criteria, then the device is
configured and initialized
Input:
HcStruc   HCStruc pointer
DevInfo   Device information structure pointer
Desc      Pointer to the descriptor structure
Start      Offset within interface descriptor
       supported by the device
End        End offset of the device descriptor
Output:
FPDEV_INFO  New device info structure, 0 on error


USBMSInitialize in the usbms.c

Function : USBMSInitialize

File: usbms.c
Description:
This routine is called once to initialize the USB mouse data
area
Input:
None
Output:
Nothing


USBMSProcessMouseData in the usbms.c

Function : USBMSProcessMouseData

File: usbms.c
Description:
This function is called at regular intervals with USB mouse
report data. This function handles the translation of USB
mouse data into PS/2 mouse data, and makes the PS/2 data
available to software using ports 60/64 to communicate with
a PS/2 mouse.
Input:
HcStruc   Pointer to HCStruc
DevInfo   Pointer to device information structure
Td        Pointer to the polling TD
Buffer    Pointer to the data buffer
Output:
Nothing
Notes:
The format of 3 byte data packet is as follow:
Byte              Description
0   Bit     Description
    0      If set, button 1 is pressed
    1      If set, button 2 is pressed
    2      If set, button 3 is pressed
    3-7        Reserved
1   X displacement value
2   Y displacement value


usbpoint.c

Description:
AMI USB Absolute Device support implementation

The following functions are used in the file: usbpoint.c.

Function | Description
SetABSData |
USBAbsConfigureDevice | This routine checks an interface descriptor of the USB device detected to see if it describes a HID/Boot/Mouse device. If the device matches the above criteria, then the device is configured and initialized
USBAbsProcessMouseData |

Built on 16:12:02 10/28/16


SetABSData in the usbpoint.c

Function : SetABSData

File: usbpoint.c
Description:


USBAbsConfigureDevice in the usbpoint.c

Function : USBAbsConfigureDevice

File: usbpoint.c
Description:
This routine checks an interface descriptor of the USB device
detected to see if it describes a HID/Boot/Mouse device.
If the device matches the above criteria, then the device is
configured and initialized
Input:
HcStruc   HCStruc pointer
DevInfo   Device information structure pointer
Desc      Pointer to the descriptor structure
Start     Offset within interface descriptor
       supported by the device
End       End offset of the device descriptor
Output:
FPDEV_INFO  New device info structure, 0 on error


USBAbsProcessMouseData in the usbpoint.c

Function : USBAbsProcessMouseData

File: usbpoint.c
Description:
Input:
HcStruc   Pointer to HCStruc
DevInfo   Pointer to device information structure
Td        Pointer to the polling TD
Buffer    Pointer to the data buffer
Output:
Nothing


UsbPolicy.h

Description:
Protocol used for USB policy definitions
Built on 16:12:02 10/28/16


usbport.c

Description:
AMI USB Porting file

The following functions are used in the file: usbport.c.

Function | Description
AddPortNumbertoDeviceString | This function will insert the USB device number into the devicename string. Format----> "U(DeviceNumber)-DevNameString"
InitUsbSetupVars | This is porting function that fills in USB related fields in gSetupData variable according to the setup settings and OEM policy.
OemGetAssignedUsbBootPort | This procedure return specific USB host controller index and port number for BIOS to give specific mass storage device have highest boot priority.
OEMSkipList | This function intends to skip port.
UpdateHcPciInfo | This function is called from the UHCD entry point, HcPciInfo can be updated here depending on the platform and/or chipset requirements.
UpdateMassDevicesForSetup | Updates "UsbMassDevNum" setup variable according to the number of installed mass storage devices.
Usb3OemGetMaxDeviceSlots | Returns maximum device slots to be enabled and programmed in MaxSlotsEn field of XHCI CONFIG register. Valid range is 1...HCPARAMS1.MaxSlots (see xhci.h for details)
UsbGetSkipList | This function returns a name string of connected mass storage device.
USBPort_InstallEventHandler | Purpose of this function is to install event handlers for different USB host controllers.
UsbSetupGetLegacySupport | Returns the status of "USB legacy support" question from Setup.
XHCI_InterruptHandler | Hardware interrupt handler

The following tables are used in the file: usbport.c.

Table | Description
USBBadDeviceTable | This table contains list of vendor & device IDs of USB devices that are non-compliant. This is currently used only for USB mass storage devices but can be extended to other type of non-compliant devices also.

Built on 16:12:02 10/28/16


AddPortNumbertoDeviceString in the usbport.c

Function : AddPortNumbertoDeviceString

File: usbport.c
Description:
This function will insert the USB device number into the devicename string.
Format----> "U(DeviceNumber)-DevNameString"
Input:
Pointer to a device data structure
Output:
VOID
Notes:

Built on 16:12:00 10/28/16


InitUsbSetupVars in the usbport.c

Function : InitUsbSetupVars

File: usbport.c
Description:
This is porting function that fills in USB related fields in
gSetupData variable according to the setup settings and OEM
policy.
Input:
Pointers to USB data, Boot Services and Runtime Services
Output:
The status of gSetupData initialization


OemGetAssignedUsbBootPort in the usbport.c

Function : OemGetAssignedUsbBootPort

File: usbport.c
Description:
This procedure return specific USB host controller index and
port number for BIOS to give specific mass storage device
have highest boot priority.
Input:
None
Output:
EFI_SUCCESS         USB boot device assigned
UsbHcIndx       USB host index (1-based)
UsbHubPortIndx  USB hub port index (1-based)
EFI_UNSUPPORTED     No USB boot device assigned
EFI_INVALID_PARAMETER   UsbHcIndx or UsbHubPortIndx are NULL


OEMSkipList in the usbport.c

Function : OEMSkipList

File: usbport.c
Description:
This function intends to skip port.
Notes:


UpdateHcPciInfo in the usbport.c

Function : UpdateHcPciInfo

File: usbport.c
Description:
This function is called from the UHCD entry point, HcPciInfo
can be updated here depending on the platform and/or chipset
requirements.
Input:
None
Output:
EFI_STATUS - Updating succeeded / failed


UpdateMassDevicesForSetup in the usbport.c

Function : UpdateMassDevicesForSetup

File: usbport.c
Description:
Updates "UsbMassDevNum" setup variable according to the number
of installed mass storage devices.


Usb3OemGetMaxDeviceSlots in the usbport.c

Function : Usb3OemGetMaxDeviceSlots

File: usbport.c
Description:
Returns maximum device slots to be enabled and programmed
in MaxSlotsEn field of XHCI CONFIG register. Valid range
is 1...HCPARAMS1.MaxSlots (see xhci.h for details)
Output:
EFI_SUCCESS         - Valid value is reported in MaxSlots
EFI_UNSUPPORTED     - Function is not ported; MaxSlots will
                     be used from HCPARAMS1 field.
Notes:
Porting is optional


USBBadDeviceTable in the usbport.c

Table : USBBadDeviceTable

File: usbport.c
Description:
This table contains list of vendor & device IDs of USB
devices that are non-compliant. This is currently used
only for USB mass storage devices but can be extended to
other type of non-compliant devices also.


UsbGetSkipList in the usbport.c

Function : UsbGetSkipList

File: usbport.c
Description:
This function returns a name string of connected mass storage
device.
Input:
SkipStruc - Pointer to a skip list to be filled
TotalStruc - Size of the data to copy to a buffer
Output:
None


USBPort_InstallEventHandler in the usbport.c

Function : USBPort_InstallEventHandler

File: usbport.c
Description:
Purpose of this function is to install event handlers for different
USB host controllers.
Input:
Pointer to a host controller data structure
Output:
EFI_SUCCESS on a successful handler installation, otherwise EFI_NOT_READY
Notes:
1. Currently implemented for XHCI only. UHCI, OHCI and EHCI currently have the
HW SMI registration routines in their HC Start functions.

2. This function is a part of UHCD, not a part of USBRT (SMI). It may only have
a code that installs a non-SMI event handler, e.h. timer callback function for
HC event polling, or HW interrupt handler. SMI handlers are installed in the
USBRT entry point (amiusb.c).


UsbSetupGetLegacySupport in the usbport.c

Function : UsbSetupGetLegacySupport

File: usbport.c
Description:
Returns the status of "USB legacy support" question from Setup.
Input:
None
Output:
0 - Enable, 1 - Disable, 2 - Auto


XHCI_InterruptHandler in the usbport.c

Function : XHCI_InterruptHandler

File: usbport.c
Description:
Hardware interrupt handler


usbrt.mak

Description:
Make file for the UsbRt component
Built on 16:12:02 10/28/16


usbsb.c

Description:
USB South Bridge Porting Hooks

The following functions are used in the file: usbsb.c.

Function | Description
AcpiEnableCallBack | This is ACPI mode enable callback function. It is a workaround for non XHCI/EHCI aware OSes.
RegisterAcpiEnableCallBack | This function registers ACPI enable callback function.
UsbAcpiEnableCallBack | This is ACPI mode enable callback function. It is a workaround for non XHCI/EHCI aware OSes.
UsbIntTimerCallBack |
USBSB_InstallSmiEventHandlers | This function is called from USBRT entry point inside SMM. Any SMI handlers registration related to USB driver can be done here.
USBSB_InstallUsbIntTimerHandler |
USBSB_InstallXhciHwSmiHandler | This function registers XHCI hardware SMI callback function. Note: Currently EHCI, UHCI and OHCI drivers install their SMI handlers in the corresponding Start functions. In the future all code related to SMI registration can be moved here.
USBSB_PeriodicTimerCallBack | This function is registers periodic timer callbacks.
USBSB_UninstallTimerHandlers | This function unregisters all the periodic timer handles.
UsbSbEnablePme | The funciton enable usb PME

Built on 16:12:02 10/28/16


AcpiEnableCallBack in the usbsb.c

Function : AcpiEnableCallBack

File: usbsb.c
Description:
This is ACPI mode enable callback function. It is a workaround for non
XHCI/EHCI aware OSes.
Built on 16:12:00 10/28/16


RegisterAcpiEnableCallBack in the usbsb.c

Function : RegisterAcpiEnableCallBack

File: usbsb.c
Description:
This function registers ACPI enable callback function.


UsbAcpiEnableCallBack in the usbsb.c

Function : UsbAcpiEnableCallBack

File: usbsb.c
Description:
This is ACPI mode enable callback function. It is a workaround for non
XHCI/EHCI aware OSes.


UsbIntTimerCallBack in the usbsb.c

Function : UsbIntTimerCallBack

File: usbsb.c
Description:


USBSB_InstallSmiEventHandlers in the usbsb.c

Function : USBSB_InstallSmiEventHandlers

File: usbsb.c
Description:
This function is called from USBRT entry point inside SMM. Any SMI handlers
registration related to USB driver can be done here.


USBSB_InstallUsbIntTimerHandler in the usbsb.c

Function : USBSB_InstallUsbIntTimerHandler

File: usbsb.c
Description:


USBSB_InstallXhciHwSmiHandler in the usbsb.c

Function : USBSB_InstallXhciHwSmiHandler

File: usbsb.c
Description:
This function registers XHCI hardware SMI callback function.

Note:
Currently EHCI, UHCI and OHCI drivers install their SMI handlers in the
corresponding Start functions. In the future all code related to SMI
registration can be moved here.


USBSB_PeriodicTimerCallBack in the usbsb.c

Function : USBSB_PeriodicTimerCallBack

File: usbsb.c
Description:
This function is registers periodic timer callbacks.
Input:
Pointer to the EFI System Table
Output:
- EFI_SUCCESS if timers are initialized or function is not implemented
- timer initialization error

Note:
If function is not implemented (timers are not needed for this chipset),
function must return EFI_SUCCESS


USBSB_UninstallTimerHandlers in the usbsb.c

Function : USBSB_UninstallTimerHandlers

File: usbsb.c
Description:
This function unregisters all the periodic timer handles.


UsbSbEnablePme in the usbsb.c

Function : UsbSbEnablePme

File: usbsb.c
Description:
The funciton enable usb PME


usbsetup.c

Description:
USB driver setup related functions implementation.

The following functions are used in the file: usbsetup.c.

Function | Description
GetConnectedDevices | This function retrieves the information about connected USB devices.
GetMassDeviceName | This function retrieves the USB mass storage device ASCII name.
InitUSBStrings | This function is eLink'ed with the chain executed right before the Setup. VOID InitUSBStrings( EFI_HII_HANDLE HiiHandle, UINT16 Class ) { CHAR16 DevNumStr[MAX_DEVS_LINE_LENGTH]; CHAR16 ControllerNumStr[MAX_DEVS_LINE_LENGTH]; CHAR8 MassStr[MAX_DEVS_LINE_LENGTH]; UINT8 NextDev; UINT16 MassDev[16] = { STRING_TOKEN(STR_USB_MASS_DEVICE1), STRING_TOKEN(STR_USB_MASS_DEVICE2), STRING_TOKEN(STR_USB_MASS_DEVICE3), STRING_TOKEN(STR_USB_MASS_DEVICE4), STRING_TOKEN(STR_USB_MASS_DEVICE5), STRING_TOKEN(STR_USB_MASS_DEVICE6), STRING_TOKEN(STR_USB_MASS_DEVICE7), STRING_TOKEN(STR_USB_MASS_DEVICE8), STRING_TOKEN(STR_USB_MASS_DEVICE9), STRING_TOKEN(STR_USB_MASS_DEVICE10), STRING_TOKEN(STR_USB_MASS_DEVICE11), STRING_TOKEN(STR_USB_MASS_DEVICE12), STRING_TOKEN(STR_USB_MASS_DEVICE13), STRING_TOKEN(STR_USB_MASS_DEVICE14), STRING_TOKEN(STR_USB_MASS_DEVICE15), STRING_TOKEN(STR_USB_MASS_DEVICE16) }; UINT8 MassDevValid[16]; UINT8 i; UINTN VariableSize; USB_MASS_DEV_NUM SetupData; EFI_STATUS Status; EFI_USB_PROTOCOL *UsbProtocol; EFI_GUID UsbProtocolGuid = EFI_USB_PROTOCOL_GUID; CONNECTED_USB_DEVICES_NUM DevNum; UINT32 VariableAttributes = EFI_VARIABLE_BOOTSERVICE_ACCESS; USB_CONTROLLER_NUM UsbControllerNum; if USB_SETUP_VARIABLE_RUNTIME_ACCESS VariableAttributes |= EFI_VARIABLE_RUNTIME_ACCESS; endif if (Class!=ADVANCED_FORM_SET_CLASS) { return; } //(EIP102493+)> InitString(HiiHandle, STRING_TOKEN(STR_USB_MODULE_VER), L"%d.%02d.%02d", USB_DRIVER_MAJOR_VER, USB_DRIVER_MINOR_VER, USB_DRIVER_BUILD_VER); //<(EIP102493+) Status = pBS->LocateProtocol(&UsbProtocolGuid, NULL, &UsbProtocol); #### ASSERT_EFI_ERROR(Status); if (EFI_ERROR(Status)) { return; } // Number of connected devices GetConnectedDevices(DevNumStr, ControllerNumStr, UsbProtocol, &DevNum); TRACE((-1, "Devices total: %d KBDs, %d HUBs, %d MICE, %d POINT %d MASS %d CCID", DevNum.NumUsbKbds, DevNum.NumUsbHubs, DevNum.NumUsbMice, DevNum.NumUsbPoint, DevNum.NumUsbMass, DevNum.NumUsbCcids)); InitString(HiiHandle, STRING_TOKEN(STR_USB_DEVICES_ENABLED_LIST), L"%s", DevNumStr); InitString(HiiHandle, STRING_TOKEN(STR_USB_CONTROLLERS_ENABLED_LIST), L"%s", ControllerNumStr); // Mass storage device names for (i = 0, NextDev = 0; i < 16; i++) { NextDev = GetMassDeviceName(MassStr, NextDev, UsbProtocol); if (NextDev == 0xFF) { break; // No more devices } InitString(HiiHandle, MassDev[i], L"%S", MassStr); if (NextDev & 0x80) { break; // Last device } } for (i = 0; i < 16; i++) { if (i < DevNum.NumUsbMass) { MassDevValid[i] = 1; } else { MassDevValid[i] = 0; } } VariableSize = sizeof(USB_MASS_DEV_VALID); Status = pRS->SetVariable(L"UsbMassDevValid", &gEfiSetupGuid, VariableAttributes, VariableSize, &MassDevValid); VariableSize = sizeof(SetupData); Status = pRS->GetVariable(L"UsbMassDevNum", &gEfiSetupGuid, NULL, &VariableSize, &SetupData); if (EFI_ERROR(Status)) { return; } SetupData.IsInteractionAllowed = 0; SetupData.UsbMassDevNum = DevNum.NumUsbMass; Status = pRS->SetVariable(L"UsbMassDevNum", &gEfiSetupGuid, VariableAttributes, VariableSize, &SetupData); VariableSize = sizeof(UsbControllerNum); Status = pRS->GetVariable(L"UsbControllerNum", &gEfiSetupGuid, NULL, &VariableSize, &UsbControllerNum); if (EFI_ERROR(Status)) { return; } UsbControllerNum.UhciNum = DevNum.NumUhcis; UsbControllerNum.OhciNum = DevNum.NumOhcis; UsbControllerNum.EhciNum = DevNum.NumEhcis; UsbControllerNum.XhciNum = DevNum.NumXhcis; Status = pRS->SetVariable(L"UsbControllerNum", &gEfiSetupGuid, VariableAttributes, VariableSize, &UsbControllerNum); }

Built on 16:12:02 10/28/16


GetConnectedDevices in the usbsetup.c

Function : GetConnectedDevices

File: usbsetup.c
Description:
This function retrieves the information about connected
USB devices.
Output:
returns TRUE if device connection status has changed since this
function is called last time; otherwise FALSE.
Notes:
When FALSE is returned, none of the output parameters are valid.
Built on 16:12:00 10/28/16


GetMassDeviceName in the usbsetup.c

Function : GetMassDeviceName

File: usbsetup.c
Description:
This function retrieves the USB mass storage device ASCII name.
Built on 16:12:00 10/28/16


InitUSBStrings in the usbsetup.c

Function : InitUSBStrings

File: usbsetup.c
Description:
This function is eLink'ed with the chain executed right before
the Setup.
VOID
InitUSBStrings(
EFI_HII_HANDLE HiiHandle,
UINT16          Class
)
{
CHAR16  DevNumStr[MAX_DEVS_LINE_LENGTH];
CHAR16  ControllerNumStr[MAX_DEVS_LINE_LENGTH];
CHAR8   MassStr[MAX_DEVS_LINE_LENGTH];
UINT8   NextDev;
UINT16  MassDev[16] = {
STRING_TOKEN(STR_USB_MASS_DEVICE1),
STRING_TOKEN(STR_USB_MASS_DEVICE2),
STRING_TOKEN(STR_USB_MASS_DEVICE3),
STRING_TOKEN(STR_USB_MASS_DEVICE4),
STRING_TOKEN(STR_USB_MASS_DEVICE5),
STRING_TOKEN(STR_USB_MASS_DEVICE6),
STRING_TOKEN(STR_USB_MASS_DEVICE7),
STRING_TOKEN(STR_USB_MASS_DEVICE8),
STRING_TOKEN(STR_USB_MASS_DEVICE9),
STRING_TOKEN(STR_USB_MASS_DEVICE10),
STRING_TOKEN(STR_USB_MASS_DEVICE11),
STRING_TOKEN(STR_USB_MASS_DEVICE12),
STRING_TOKEN(STR_USB_MASS_DEVICE13),
STRING_TOKEN(STR_USB_MASS_DEVICE14),
STRING_TOKEN(STR_USB_MASS_DEVICE15),
STRING_TOKEN(STR_USB_MASS_DEVICE16)
};
UINT8               MassDevValid[16];
UINT8               i;
UINTN               VariableSize;
USB_MASS_DEV_NUM    SetupData;
EFI_STATUS          Status;
EFI_USB_PROTOCOL    *UsbProtocol;
EFI_GUID            UsbProtocolGuid = EFI_USB_PROTOCOL_GUID;
CONNECTED_USB_DEVICES_NUM       DevNum;
UINT32              VariableAttributes = EFI_VARIABLE_BOOTSERVICE_ACCESS;
USB_CONTROLLER_NUM  UsbControllerNum;
if USB_SETUP_VARIABLE_RUNTIME_ACCESS
VariableAttributes |= EFI_VARIABLE_RUNTIME_ACCESS;
endif
if (Class!=ADVANCED_FORM_SET_CLASS) {
return;
}
                         //(EIP102493+)>
InitString(HiiHandle, STRING_TOKEN(STR_USB_MODULE_VER), L"%d.%02d.%02d",
USB_DRIVER_MAJOR_VER, USB_DRIVER_MINOR_VER, USB_DRIVER_BUILD_VER);
                         //<(EIP102493+)
Status = pBS->LocateProtocol(&UsbProtocolGuid, NULL, &UsbProtocol);
####  ASSERT_EFI_ERROR(Status);
if (EFI_ERROR(Status)) {
return;
}
// Number of connected devices
GetConnectedDevices(DevNumStr, ControllerNumStr, UsbProtocol, &DevNum);

TRACE((-1, "Devices total: %d KBDs, %d HUBs, %d MICE, %d POINT %d MASS %d CCID",
DevNum.NumUsbKbds, DevNum.NumUsbHubs, DevNum.NumUsbMice,
DevNum.NumUsbPoint, DevNum.NumUsbMass, DevNum.NumUsbCcids));

InitString(HiiHandle, STRING_TOKEN(STR_USB_DEVICES_ENABLED_LIST), L"%s", DevNumStr);
InitString(HiiHandle, STRING_TOKEN(STR_USB_CONTROLLERS_ENABLED_LIST), L"%s", ControllerNumStr);
// Mass storage device names
for (i = 0, NextDev = 0; i < 16; i++) {
NextDev = GetMassDeviceName(MassStr, NextDev, UsbProtocol);
if (NextDev == 0xFF) {
break;    // No more devices
}
InitString(HiiHandle, MassDev[i], L"%S", MassStr);
if (NextDev & 0x80) {
break;     // Last device
}
}
for (i = 0; i < 16; i++) {
if (i < DevNum.NumUsbMass) {
MassDevValid[i] = 1;
} else {
MassDevValid[i] = 0;
}
}
VariableSize = sizeof(USB_MASS_DEV_VALID);
Status = pRS->SetVariable(L"UsbMassDevValid",
&gEfiSetupGuid,
VariableAttributes,
VariableSize,
&MassDevValid);
VariableSize = sizeof(SetupData);
Status = pRS->GetVariable(L"UsbMassDevNum",
&gEfiSetupGuid,
NULL,
&VariableSize,
&SetupData);
if (EFI_ERROR(Status)) {
return;
}
SetupData.IsInteractionAllowed = 0;
SetupData.UsbMassDevNum = DevNum.NumUsbMass;
Status = pRS->SetVariable(L"UsbMassDevNum",
&gEfiSetupGuid,
VariableAttributes,
VariableSize,
&SetupData);
VariableSize = sizeof(UsbControllerNum);
Status = pRS->GetVariable(L"UsbControllerNum",
&gEfiSetupGuid,
NULL,
&VariableSize,
&UsbControllerNum);
if (EFI_ERROR(Status)) {
return;
}
UsbControllerNum.UhciNum = DevNum.NumUhcis;
UsbControllerNum.OhciNum = DevNum.NumOhcis;
UsbControllerNum.EhciNum = DevNum.NumEhcis;
UsbControllerNum.XhciNum = DevNum.NumXhcis;
Status = pRS->SetVariable(L"UsbControllerNum",
&gEfiSetupGuid,
VariableAttributes,
VariableSize,
&UsbControllerNum);
}


xhci.c

Description:
AMI XHCI driver.

The following functions are used in the file: xhci.c.

Function | Description
UpdatePortStatusSpeed | This function sets USB_PORT_STAT... fields that are related to device speed (LS/FS/HS/SS) in a given PortStatus variable.
XHCI_ActivatePolling | This function activates the polling QH for the requested device. The device may be a USB keyboard or USB hub.
XHCI_AdvanceEnqueuePtr | This function advances returns the pointer to the current TRB and anvances dequeue pointer. If the advance pointer is Link TRB, then it: 1) activates Link TRB by updating its cycle bit, 2) updates dequeue pointer to the value pointed by Link TRB.
XHCI_BulkTransfer | This function executes a bulk transaction on the USB
XHCI_ClearEndpointState |
XHCI_ClearStalledEp | This function is called to restart endpoint. After Endpoint STALLs, it transitions from Halted to Stopped state. It is restored back to Running state by moving the endpoint ring dequeue pointer past the failed control transfer with a Set TR Dequeue Pointer. Then it is restarted by ringing the doorbell. Alternatively endpint is restarted using Configure Endpoint command.
XHCI_ControlTransfer | This function executes a device request command transaction on the USB. One setup packet is generated containing the device request parameters supplied by the caller. The setup packet may be followed by data in or data out packets containing data sent from the host to the device or vice-versa. This function will not return until the request either completes successfully or completes in error (due to time out, etc.)
XHCI_DeactivatePolling | This function de-activates the polling QH for the requested device. The device may be a USB keyboard or USB hub.
XHCI_DeinitDeviceData | This is an API function for removing device related information from HC. For xHCI this means: - execute DisableSlot commnand - clear all endpoint's transfer rings
XHCI_DisableInterrupts | This function disables the HC interrupts
XHCI_DisableKeyRepeat | This function disables the keyboard repeat rate logic
XHCI_DisableRootHub | This function disables the XHCI HC Root hub port.
XHCI_EnableEndpoints | This function parses the device descriptor data and enables the endpoints by 1)assigning the Transfer TRB and 2)executing ConfigureEndpoint command for the slot. Section 4.3.5.
XHCI_EnableInterrupts | This function enables the HC interrupts
XHCI_EnableKeyRepeat | This function disables the keyboard repeat rate logic
XHCI_EnableRootHub | This function enables the XHCI HC Root hub port.
XHCI_EnumeratePorts | This function enumerates the HC ports for devices.
XHCI_ExecuteCommand | This function places a given command in the Command Ring, rings HC doorbell, and waits for the command completion.
XHCI_FillHCDEntries | This function fills the host controller driver routine pointers.
XHCI_GetContextEntry | This function calculates and returns the pointer to a context entry for a given index.
XHCI_GetDeviceContext | This function calculates and returns the pointer to a device context for a given Slot.
XHCI_GetDevInfo | This function searches for DEV_INFO data pointer that belongs to a given XHCI device context.
XHCI_GetRootHubPort | This function returns a root hub number for a given device. If device is connected to the root through hub(s), it searches the parent's chain up to the root.
XHCI_GetRootHubStatus | This function returns the port connect status for the root hub port
XHCI_GetSlotId | This function calculates the slot ID out of a given DEV_INFO data pointer.
XHCI_GetTheDoorbell | This function calculates and returns the pointer to a doorbell for a given Slot.
XHCI_GetXfrRing | This routine calculates the address of the address ring of a particular Slot/Endpoint.
XHCI_GlobalSuspend | This function suspend the XHCI HC.
XHCI_InitDeviceData | This is an API function for early device initialization.
XHCI_InitRing | Transfer ring initialization. There is an option to create a Link TRB in the end of the ring.
XHCI_InitXfrRing | This function initializes transfer ring of given endpoint
XHCI_InterruptTransfer | This function executes an interrupt transaction on the USB. The data transfer direction is always DATA_IN. This function wil not return until the request either completes successfully or completes in error (due to time out, etc.)
XHCI_IsUsb3Port |
XHCI_Mmio64Write | HC may or may not support 64-bit writes to MMIO area. If it does, write Data directly, otherwise split into two DWORDs.
XHCI_ProcessInterrupt | This is the XHCI controller event handler. It walks through the Event Ring and executes the event associated code if needed. Updates the Event Ring Data Pointer in the xHC to let it know which events are completed.
XHCI_ProcessPortChanges | This function process root hub port changes.
XHCI_ProcessPortStsChgEvt |
XHCI_ProcessXferEvt | This function processes a transfer event and gives control to the device specific routines.
XHCI_ResetEndpoint | This function is called to reset endpoint.
XHCI_ResetPort | This function resets the XHCI HC Root hub port.
XHCI_ResetRootHub | This function resets the XHCI HC Root hub port.
XHCI_Start | This API function is called to start a XHCI host controller. The input to the routine is the pointer to the HC structure that defines this host controller. The procedure flow is followed as it is described in 4.2 of XHCI specification.
XHCI_Stop | This function stops the XHCI controller.
Xhci_TranslateInterval | This routine calculates the Interval field to be used in device's endpoint context. Interval is calculated using the following rules (Section 6.2.3.6): For SuperSpeed bulk and control endpoints, the Interval field shall not be used by the xHC. For all other endpoint types and speeds, system software shall translate the bInterval field in the USB Endpoint Descriptor to the appropriate value for this field. For high-speed and SuperSpeed Interrupt and Isoch endpoints the bInterval field the Endpoint Descriptor is computed as 125æs * 2^(bInterval-1), where bInterval = 1 to 16, therefore Interval = bInterval - 1. For low-speed Interrupt and full-speed Interrupt and Isoch endpoints the bInterval field declared by a Full or Low-speed device is computed as bInterval * 1ms., where bInterval = 1 to 255. For Full- and Low-speed devices software shall round the value of Endpoint Context Interval field down to the nearest base 2 multiple of bInterval * 8.
XHCI_UpdateEp0MaxPacket | This function verifies the MaxPacket size of the control pipe. If it does not match the one received as a part of GET_DESCRIPTOR, then this function updates the MaxPacket data in DeviceContext and HC is notified via EvaluateContext command.
XHCI_WaitForEvent | This function walks through the active TRBs in the event ring and looks for the command TRB to be complete. If found, returns SlotId and CompletionCode from the completed event TRB. In the end it processes the event ring, adjusting its Dequeue Pointer.
XhciAddressDevice |
XhciExtCapParser |
XhciRingDoorbell |

Built on 16:12:02 10/28/16


UpdatePortStatusSpeed in the xhci.c

Function : UpdatePortStatusSpeed

File: xhci.c
Description:
This function sets USB_PORT_STAT... fields that are related to device
speed (LS/FS/HS/SS) in a given PortStatus variable.


XHCI_ActivatePolling in the xhci.c

Function : XHCI_ActivatePolling

File: xhci.c
Description:
This function activates the polling QH for the requested device. The device
may be a USB keyboard or USB hub.
Input:
HcStruc   - Pointer to the HC structure
DevInfo   - Pointer to the device information structure
Output:
USB_ERROR on error, USB_SUCCESS on success


XHCI_AdvanceEnqueuePtr in the xhci.c

Function : XHCI_AdvanceEnqueuePtr

File: xhci.c
Description:
This function advances returns the pointer to the current TRB and anvances
dequeue pointer. If the advance pointer is Link TRB, then it: 1) activates
Link TRB by updating its cycle bit, 2) updates dequeue pointer to the value
pointed by Link TRB.
Input:
Ring - TRB ring to be updated
Output:
TRB that can be used for command, transfer, etc.


XHCI_BulkTransfer in the xhci.c

Function : XHCI_BulkTransfer

File: xhci.c
Description:
This function executes a bulk transaction on the USB
Input:
HcStruc   Pointer to HCStruc of the host controller
DevInfo   DeviceInfo structure (if available else 0)
XferDir   Transfer direction
Bit 7: Data direction
0 Host sending data to device
1 Device sending data to host
Bit 6-0 : Reserved
Buffer    Buffer containing data to be sent to the device or buffer to
be used to receive data value
Length    Length request parameter, number of bytes of data to be
transferred in or out of the HC
Output:
Amount of data transferred


XHCI_ClearEndpointState in the xhci.c

Function : XHCI_ClearEndpointState

File: xhci.c
Description:


XHCI_ClearStalledEp in the xhci.c

Function : XHCI_ClearStalledEp

File: xhci.c
Description:
This function is called to restart endpoint. After Endpoint STALLs, it
transitions from Halted to Stopped state. It is restored back to Running
state by moving the endpoint ring dequeue pointer past the failed control
transfer with a Set TR Dequeue Pointer. Then it is restarted by ringing the
doorbell. Alternatively endpint is restarted using Configure Endpoint command.
Input:
Stalled EP data - SlotId and DCI


XHCI_ControlTransfer in the xhci.c

Function : XHCI_ControlTransfer

File: xhci.c
Description:
This function executes a device request command transaction on the USB.
One setup packet is generated containing the device request parameters
supplied by the caller.  The setup packet may be followed by data in or
data out packets containing data sent from the host to the device or
vice-versa. This function will not return until the request either completes
successfully or completes in error (due to time out, etc.)
Input:
HcStruc     Pointer to the HC structure
DevInfo     DeviceInfo structure (if available else 0)
Request     Request type (low byte)
Bit 7   : Data direction
   0 = Host sending data to device
   1 = Device sending data to host
Bit 6-5 : Type
   00 = Standard USB request
   01 = Class specific
   10 = Vendor specific
   11 = Reserved
Bit 4-0 : Recipient
   00000 = Device
   00001 = Interface
   00010 = Endpoint
   00100 - 11111 = Reserved
   Request code, a one byte code describing the actual
   device request to be executed (ex: Get Configuration,
   Set Address, etc.)
Index   wIndex request parameter (meaning varies)
Value   wValue request parameter (meaning varies)
Buffer  Buffer containing data to be sent to the device or buffer
to be used to receive data
Length  wLength request parameter, number of bytes of data to be
transferred in or out of the host controller
Output:
Number of bytes actually transferred
Notes:
DevInfo->DevMiscInfo points to the device context


XHCI_DeactivatePolling in the xhci.c

Function : XHCI_DeactivatePolling

File: xhci.c
Description:
This function de-activates the polling QH for the requested device. The
device may be a USB keyboard or USB hub.
Input:
HcStruc   - Pointer to the HC structure
DevInfo   - Pointer to the device information structure
Output:
USB_ERROR on error, USB_SUCCESS on success


XHCI_DeinitDeviceData in the xhci.c

Function : XHCI_DeinitDeviceData

File: xhci.c
Description:
This is an API function for removing device related information from HC.
For xHCI this means:
- execute DisableSlot commnand
- clear all endpoint's transfer rings


XHCI_DisableInterrupts in the xhci.c

Function : XHCI_DisableInterrupts

File: xhci.c
Description:
This function disables the HC interrupts
Input:
HcStruc  - Pointer to the HC structure
Output:
USB_ERROR on error, USB_SUCCESS on success


XHCI_DisableKeyRepeat in the xhci.c

Function : XHCI_DisableKeyRepeat

File: xhci.c
Description:
This function disables the keyboard repeat rate logic
Input:
HcStruc  - Pointer to the HC structure
Output:
USB_ERROR on error, USB_SUCCESS on success


XHCI_DisableRootHub in the xhci.c

Function : XHCI_DisableRootHub

File: xhci.c
Description:
This function disables the XHCI HC Root hub port.
Input:
HcStruc - Pointer to the HC structure
PortNum - Port in the HC to disable
Output:
USB_SUCCESS on success, USB_ERROR on error


XHCI_EnableEndpoints in the xhci.c

Function : XHCI_EnableEndpoints

File: xhci.c
Description:
This function parses the device descriptor data and enables the endpoints
by 1)assigning the Transfer TRB and 2)executing ConfigureEndpoint command
for the slot. Section 4.3.5.
Input:
DevInfo - A device for which the endpoins are being enabled
Desc    - Device Configuration Descriptor data pointer
Output:
USB_ERROR on error, USB_SUCCESS on success
Notes:
1) DevInfo->DevMiscInfo points to the device context
2) This call is executed before SET_CONFIGURATION control transfer
3) EP0 information is valid in the Device


XHCI_EnableInterrupts in the xhci.c

Function : XHCI_EnableInterrupts

File: xhci.c
Description:
This function enables the HC interrupts
Input:
HcStruc  - Pointer to the HC structure
Output:
USB_ERROR   On error, USB_SUCCESS On success


XHCI_EnableKeyRepeat in the xhci.c

Function : XHCI_EnableKeyRepeat

File: xhci.c
Description:
This function disables the keyboard repeat rate logic
Input:
HcStruc  - Pointer to the HC structure
Output:
USB_ERROR on error, USB_SUCCESS on success


XHCI_EnableRootHub in the xhci.c

Function : XHCI_EnableRootHub

File: xhci.c
Description:
This function enables the XHCI HC Root hub port.
Input:
HcStruc   - Pointer to the HC structure
PortNum   - Port in the HC to enable
Output:
USB_SUCCESS on success, USB_ERROR on error


XHCI_EnumeratePorts in the xhci.c

Function : XHCI_EnumeratePorts

File: xhci.c
Description:
This function enumerates the HC ports for devices.
Input:
HcStruc  - Pointer to the HC structure
Output:
USB_SUCCESS or USB_ERROR


XHCI_ExecuteCommand in the xhci.c

Function : XHCI_ExecuteCommand

File: xhci.c
Description:
This function places a given command in the Command Ring, rings HC doorbell,
and waits for the command completion.
Output:
USB_ERROR on execution failure, otherwise USB_SUCCESS
Params - pointer to the command specific data.
Notes:
Caller is responsible for a data placeholder.


XHCI_FillHCDEntries in the xhci.c

Function : XHCI_FillHCDEntries

File: xhci.c
Description:
This function fills the host controller driver routine pointers.
Input:
Ptr to the host controller header structure
Output:
Status: USB_SUCCESS = Success, USB_ERROR = Failure


XHCI_GetContextEntry in the xhci.c

Function : XHCI_GetContextEntry

File: xhci.c
Description:
This function calculates and returns the pointer to a context entry for
a given index.


XHCI_GetDeviceContext in the xhci.c

Function : XHCI_GetDeviceContext

File: xhci.c
Description:
This function calculates and returns the pointer to a device context for
a given Slot.


XHCI_GetDevInfo in the xhci.c

Function : XHCI_GetDevInfo

File: xhci.c
Description:
This function searches for DEV_INFO data pointer that belongs to a given XHCI
device context.


XHCI_GetRootHubPort in the xhci.c

Function : XHCI_GetRootHubPort

File: xhci.c
Description:
This function returns a root hub number for a given device. If device is
connected to the root through hub(s), it searches the parent's chain up
to the root.


XHCI_GetRootHubStatus in the xhci.c

Function : XHCI_GetRootHubStatus

File: xhci.c
Description:
This function returns the port connect status for the root hub port
Input:
HcStruc  - Pointer to the HC structure
PortNum  - Port in the HC whose status is requested
Output:
Port status flags (see USB_PORT_STAT_XX equates)


XHCI_GetSlotId in the xhci.c

Function : XHCI_GetSlotId

File: xhci.c
Description:
This function calculates the slot ID out of a given DEV_INFO data pointer.


XHCI_GetTheDoorbell in the xhci.c

Function : XHCI_GetTheDoorbell

File: xhci.c
Description:
This function calculates and returns the pointer to a doorbell for a
given Slot.


XHCI_GetXfrRing in the xhci.c

Function : XHCI_GetXfrRing

File: xhci.c
Description:
This routine calculates the address of the address ring of a particular
Slot/Endpoint.
Output:
Pointer to the transfer ring


XHCI_GlobalSuspend in the xhci.c

Function : XHCI_GlobalSuspend

File: xhci.c
Description:
This function suspend the XHCI HC.


XHCI_InitDeviceData in the xhci.c

Function : XHCI_InitDeviceData

File: xhci.c
Description:
This is an API function for early device initialization.


XHCI_InitRing in the xhci.c

Function : XHCI_InitRing

File: xhci.c
Description:
Transfer ring initialization. There is an option to create a Link TRB in
the end of the ring.


XHCI_InitXfrRing in the xhci.c

Function : XHCI_InitXfrRing

File: xhci.c
Description:
This function initializes transfer ring of given endpoint
Output:
Pointer to the transfer ring


XHCI_InterruptTransfer in the xhci.c

Function : XHCI_InterruptTransfer

File: xhci.c
Description:
This function executes an interrupt transaction on the USB. The data
transfer direction is always DATA_IN. This function wil not return until
the request either completes successfully or completes in error (due to
time out, etc.)
Input:
HcStruc   Pointer to HCStruc of the host controller
DevInfo   DeviceInfo structure (if available else 0)
EndpointAddress The destination USB device endpoint to which the device request
is being sent.
MaxPktSize  Indicates the maximum packet size the target endpoint is capable
of sending or receiving.
Buffer    Buffer containing data to be sent to the device or buffer to be
used to receive data
Length    Length request parameter, number of bytes of data to be transferred
Output:
Number of bytes transferred


XHCI_IsUsb3Port in the xhci.c

Function : XHCI_IsUsb3Port

File: xhci.c
Description:


XHCI_Mmio64Write in the xhci.c

Function : XHCI_Mmio64Write

File: xhci.c
Description:
HC may or may not support 64-bit writes to MMIO area. If it does, write
Data directly, otherwise split into two DWORDs.


XHCI_ProcessInterrupt in the xhci.c

Function : XHCI_ProcessInterrupt

File: xhci.c
Description:
This is the XHCI controller event handler. It walks through
the Event Ring and executes the event associated code if needed. Updates
the Event Ring Data Pointer in the xHC to let it know which events are
completed.
Input:
HcStruc  - Pointer to the HC structure
Output:
USB_ERROR   - Need more Interrupt processing
USB_SUCCESS - No interrupts pending


XHCI_ProcessPortChanges in the xhci.c

Function : XHCI_ProcessPortChanges

File: xhci.c
Description:
This function process root hub port changes.
Input:
HcStruc  - Pointer to the HC structure
Output:
USB_SUCCESS or USB_ERROR


XHCI_ProcessPortStsChgEvt in the xhci.c

Function : XHCI_ProcessPortStsChgEvt

File: xhci.c
Description:


XHCI_ProcessXferEvt in the xhci.c

Function : XHCI_ProcessXferEvt

File: xhci.c
Description:
This function processes a transfer event and gives control to the device
specific routines.


XHCI_ResetEndpoint in the xhci.c

Function : XHCI_ResetEndpoint

File: xhci.c
Description:
This function is called to reset endpoint.
Input:
Stalled EP data - SlotId and DCI


XHCI_ResetPort in the xhci.c

Function : XHCI_ResetPort

File: xhci.c
Description:
This function resets the XHCI HC Root hub port.
Input:
HcStruc - Pointer to the HC structure
PortNum - Port in the HC to disable
Output:
USB_SUCCESS on success, USB_ERROR on error


XHCI_ResetRootHub in the xhci.c

Function : XHCI_ResetRootHub

File: xhci.c
Description:
This function resets the XHCI HC Root hub port.
Input:
HcStruc - Pointer to the HC structure
PortNum - Port in the HC to disable
Output:
USB_SUCCESS on success, USB_ERROR on error


XHCI_Start in the xhci.c

Function : XHCI_Start

File: xhci.c
Description:
This API function is called to start a XHCI host controller. The input
to the routine is the pointer to the HC structure that defines this host
controller. The procedure flow is followed as it is described in 4.2 of
XHCI specification.
Input:
HcStruc  - Pointer to the HC structure
Output:
USB_SUCCESS = Success, USB_ERROR = Failure


XHCI_Stop in the xhci.c

Function : XHCI_Stop

File: xhci.c
Description:
This function stops the XHCI controller.
Input:
HcStruc  - Pointer to the HC structure
Output:
USB_SUCCESS or USB_ERROR


Xhci_TranslateInterval in the xhci.c

Function : Xhci_TranslateInterval

File: xhci.c
Description:
This routine calculates the Interval field to be used in device's endpoint
context. Interval is calculated using the following rules (Section 6.2.3.6):

For SuperSpeed bulk and control endpoints, the Interval field shall not be
used by the xHC. For all other endpoint types and speeds, system software
shall translate the bInterval field in the USB Endpoint Descriptor to the
appropriate value for this field.

For high-speed and SuperSpeed Interrupt and Isoch endpoints the bInterval
field the Endpoint Descriptor is computed as 125æs * 2^(bInterval-1), where
bInterval = 1 to 16, therefore Interval = bInterval - 1.

For low-speed Interrupt and full-speed Interrupt and Isoch endpoints the
bInterval field declared by a Full or Low-speed device is computed as
bInterval * 1ms., where bInterval = 1 to 255.

For Full- and Low-speed devices software shall round the value of Endpoint
Context Interval field down to the nearest base 2 multiple of bInterval * 8.
Input:
EpType      Endpoint type, see XHCI_EP_CONTEXT.DW1.EpType field definitions
Speed       Endpoint speed, 1..4 for XHCI_DEVSPEED_FULL, _LOW, _HIGH, _SUPER
Interval    Poll interval value from endpoint descriptor
Output:
Interval value to be written to the endpoint context


XHCI_UpdateEp0MaxPacket in the xhci.c

Function : XHCI_UpdateEp0MaxPacket

File: xhci.c
Description:
This function verifies the MaxPacket size of the control pipe. If it does
not match the one received as a part of GET_DESCRIPTOR, then this function
updates the MaxPacket data in DeviceContext and HC is notified via
EvaluateContext command.
Input:
HcStruc Pointer to the HC structure
Device  Evaluated device context pointer
SlotId  Device context index in DCBAA
Endp0MaxPacket  Max packet size obtained from the device


XHCI_WaitForEvent in the xhci.c

Function : XHCI_WaitForEvent

File: xhci.c
Description:
This function walks through the active TRBs in the event ring and looks for
the command TRB to be complete. If found, returns SlotId and CompletionCode
from the completed event TRB. In the end it processes the event ring,
adjusting its Dequeue Pointer.


XhciAddressDevice in the xhci.c

Function : XhciAddressDevice

File: xhci.c
Description:


XhciExtCapParser in the xhci.c

Function : XhciExtCapParser

File: xhci.c
Description:


XhciRingDoorbell in the xhci.c

Function : XhciRingDoorbell

File: xhci.c
Description:


xhci.h

Description:
XHCI equates and structure definitions
Built on 16:12:02 10/28/16


Functions in Alphabetical Order

In Alphabetical Order

The following topics provide a list in alphabetical order.
For a list by file name, see By File Name.

  • A
  • B
  • C
  • D
  • E
  • F
  • G
  • H
  • I
  • K
  • L
  • M
  • N
  • O
  • P
  • Q
  • R
  • S
  • T
  • U
  • V
  • W
  • X
Built on 16:12:00 10/28/16


Functions in Alphabetical Order

A

Function | Description
AcpiEnableCallBack | This is ACPI mode enable callback function. It is a workaround for non XHCI/EHCI aware OSes.
AddHC | This function checks the type of controller and its PCI info against gHcPciInfo data table; if HC is found appropriate, then it allocates the frame list for this HC and adds the new HCStruc entry.
AddPortNumbertoDeviceString | This function will insert the USB device number into the devicename string. Format----> "U(DeviceNumber)-DevNameString"
AdjustKeyBuffer | There is often the new key is pressed on a USB keyboard while the previous one is not quite released. In this case usbKeys buffer contains the old keys and the new ones. User, on the other hand, expects only the new ones to be processed. This requires the buffer data modification so that the "old" keys are removed. The only time we do not do this analysis is when the buffer is clear that indicates that all keys are released.
AlignPhysicalAddress | Returns the aligned address.
AllocAlignedMemory | Allocates memory with the given alignment.
AllocateHcMemory | Allocates a number of pages with the given alignment. Note: The minimum alignment passed to this function is CPU page, 4K
AllocDevInfo | Allocates temporary DEV_INFO structure in USB data area for use in USB transfer.
AmiUsb2HcAsyncInterruptTransfer | This function performs USB2 HC Async Interrupt Transfer
AmiUsb2HcAsyncIsochronousTransfer | This function performs USB2 HC Async Isochronous Transfer
AmiUsb2HcBulkTransfer | This function performs USB2 HC Bulk Transfer
AmiUsb2HcClearRootHubPortFeature | This function clears root hub port feature.
AmiUsb2HcGetCapability | This is USB2HC API to get the host controller capability.
AmiUsb2HcGetRootHubPortStatus | This function returns HC root port status.
AmiUsb2HcGetState | This is USB2HC API to get the host controller state.
AmiUsb2HcIsochronousTransfer | This function performs USB2 HC Isochronous Transfer
AmiUsb2HcReset | This is USB2HC API to perform host controller reset.
AmiUsb2HcSetRootHubPortFeature | This function set root hub port features.
AmiUsb2HcSetState | This is USB2HC API to set the host controller state.
AmiUsb2HcSyncInterruptTransfer | This function performs USB2 HC Sync Interrupt Transfer
AmiUsb2HcTransfer | This function performs USB2 HC Control Transfer
AmiUsbBlkIoFlushBlocks | Flush USB Mass Storage Device
AmiUsbBlkIoReadBlocks | Read the requested number of blocks from the device
AmiUsbBlkIoReadWrite | This routine is invoked from AmiUsbBlkIoReadBlocks and AmiUsbBlkIoWriteBlocks. See these for parameters reference.
AmiUsbBlkIoReset | Reset the USB Logic Drive
AmiUsbBlkIoWriteBlocks | Write a specified number of blocks to the device
AMIUSBComponentNameGetControllerName | Retrieves a Unicode string that is the user readable name of the controller that is being managed by an EFI Driver.
AMIUSBComponentNameGetDriverName | Retrieves a Unicode string that is the user readable name of the EFI Driver.
AmiUsbDriverBindingStart | Binding protocol function to start the AMI USB driver
AmiUsbDriverBindingStop | Stop this driver on ControllerHandle. Support stoping any child handles created by this driver.
AmiUsbDriverBindingSupported | Test to see if this driver supports ControllerHandle.
AmiUsbDriverEntryPoint | Entry point for AMI USB EFI driver
AmiUsbDriverGetControllerName | This function is a part of binding protocol, it returns the string "USB Host Controller".
AmiUsbHcAsyncInterruptTransfer | Protocol USB HC function that performs USB async interrupt transfer.
AmiUsbHcAsyncIsochronousTransfer | Protocol USB HC function that performs USB async isochronous transfer.
AmiUsbHcBulkTransfer | Protocol USB HC function that performs USB bulk transfer.
AmiUsbHcClearRootHubPortFeature | Protocol USB HC function clear root hub port feature
AmiUsbHcGetRootHubPortNumber | Protocol USB HC function that returns the number of ports of a root hub on a given controller.
AmiUsbHcGetRootHubPortStatus | Protocol USB HC function that returns the root port status
AmiUsbHcGetState | Protocol USB HC function that returns Host Controller state.
AmiUsbHcIsochronousTransfer | Protocol USB HC function that performs USB sync isochronous transfer.
AmiUsbHcReset | Provides software reset for the USB host controller.
AmiUsbHcSetRootHubPortFeature | Protocol USB HC function set root hub port feature
AmiUsbHcSetState | Protocol USB HC function that sets Host Controller state.
AmiUsbHcSyncInterruptTransfer | Protocol USB HC function that performs USB sync interrupt transfer.
AmiUsbHcTransfer | Protocol USB HC function that performs USB transfer.
AsyncInterruptOnTimer | This function checks if queue has a new transfer. If yes, calls a callback with data from transfer.

Table | Description
aUsbApiTable | This is the table of functions used by USB API

Data Structure | Description
API_DATA | This is a union data type of all the API related data

Built on 16:12:00 10/28/16


Functions in Alphabetical Order

B

Function | Description
BusFillDriverEntries | Install drivers that redirects ...????
ByteReadIO | This routine reads a Byte from the specified IO address
ByteWriteIO | This routine writes a byte to the specified IO address
ByteWritePCIConfig | This routine writes a byte value to the PCI configuration register space

Data Structure | Description
BOT_STATUS_BLOCK | USB mass device boot only protocol status block structure. Referred as CSW - Command status wrapper. Refer Bulk-Only transport specification for more detail.

Built on 16:12:00 10/28/16


Functions in Alphabetical Order

C

Function | Description
CalculateLRCChecksum | Calculates LRC checksum
CalculateMemorySize | This function returns the total amount of memory used by all supported USB controllers.
CalculateTimingValues | Based on the agreed upon TA1 value and Transmission protocol calculate the timing values
CheckDeviceLimit | Verifies whether the number of initialized devices of a given class has reached the limit.
CheckDeviceReady | This function invokes USB Mass Storage API handler to check whether device is ready. If called for the first time, this function retrieves the mass storage device geometry and fills the corresponding fpDevInfo fields.
CheckKeyNotify | Call the notification function based on the key pressed Paremeters: Key - Key pressed
ClearEECPstatus | This procedure clear EHCI legacy support status.
ClearLegacyUsbKbdBuffer |
ClearUsbKbBuffer | This function clear USB KB buffers
CollectUsbBbsDevices | Create BBS table for each USB mass storage device.
ConfigureCCID | This function powers up, sets the clock/rate etc (configure CCID based on device capability)
ConstructBlockFrame | Construct the Block Frame for the CCID
ConvertBitmaps | Converts one bit-strng to another using a convertion table
CreateBbsEntry | This function takes the device index within USBMASS_INT13_DEV list and prepares BBS entry for this device.
CreateDeviceName | This function retrieves USB device name, copies it into lower memory and returns a pointer to the string.

Data Structure | Description
CCID_ATR | This is a Core Procedure URP structure for the BIOS API call USB_API_CCID_DEVICE_REQUEST command (API #2Fh )
CCID_GET_PARAMS | This is a Core Procedure URP structure for the BIOS API call USB_API_CCID_DEVICE_REQUEST command (API #2Fh )
CCID_GETSLOT_STATUS | This is a Core Procedure URP structure for the BIOS API call USB_API_CCID_DEVICE_REQUEST command (API #2Fh )
CCID_GETSMARTCLASSDESCRIPTOR | This is a Core Procedure URP structure for the BIOS API call USB_API_CCID_DEVICE_REQUEST command (API #2Fh )
CCID_POWERDOWN_SLOT | This is a Core Procedure URP structure for the BIOS API call USB_API_CCID_DEVICE_REQUEST command (API #2Fh )
CCID_POWERUP_SLOT | This is a Core Procedure URP structure for the BIOS API call USB_API_CCID_DEVICE_REQUEST command (API #2Fh )
CCID_XFRBLOCK | This is a Core Procedure URP structure for the BIOS API call USB_API_CCID_DEVICE_REQUEST command (API #2Fh )
CHK_DEV_PRSNC | This is a URP (USB Request Packet) structure for the BIOS API call CheckDevicePresence (API #26)
CK_PRESENCE | This is a URP (USB Request Packet) structure for the BIOS API call CheckPresence (API #0)
COREPROC_PARAM | This is a Core Procedure URP structure for the BIOS API call core command (API #2eh )

Built on 16:12:00 10/28/16


Functions in Alphabetical Order

D

Function | Description
dabc_to_abcd | This function swaps the bytes in dword: 0-3,1-2,2-1,3-0. Can be used for example in little endian->big endian conversions.
DevAddr2Info | Returns a DEV_INFO that corresponds to a device that is connected to a specified host controller and has a specified address
DevByAdrIf | Predicate for searching device node in the tree by USB address and interface number of the device
DevByIndex | Predicate for searching device node in the tree by index of the DEV_INFO structure in the aDevInfoTable array of USB data
DevByInfo | Predicate for searching device node in the tree by comparing pointers to the DEV_INFO structure
DevGrpByAddr | Predicate for searching device node in the tree by USB address of the device
DevGrpByPortIf | Predicate for searching device node in the tree by parent hub port of the device, interface and LUN
DoDevInfoInitialization | Do some USB device info data initialization
DpAddLun | Builds a new path appending a LUN node
DpAddUsbSegment | Builds a new path appending a USB segment
Dummy1 | This function is a legacy mass storage support API stub, replaced by the API producer.
Dummy2 | This function is a legacy mass storage support API stub, replaced by the API producer.
DummyHcFunc | This function is dummy HC memory allocation routine.
DwordReadIO | This routine reads a dword from the specified IO address
DwordReadMem | This routine reads a DWORD from the specified Memory Address
DwordResetMem | This routine resets the specified bits at specified memory address
DwordSetMem | This routine sets the specified bits at specified memory address
DwordWriteIO | This routine writes a double word to the specified IO address
DwordWriteMem | This routine writes a DWORD to a specified Memory Address
DwordWritePCIConfig | This routine writes a Dword value to the PCI configuration register space

Data Structure | Description
DEV_DRIVER | USB Device Driver Structure
DEV_INFO | USB Device Information Structure

Built on 16:12:00 10/28/16


Functions in Alphabetical Order

E

Function | Description
EHCI_ActivatePolling | This function activates the polling QH for the requested device. The device may be a USB keyboard or USB hub
EHCI_BulkTransfer | This function executes a bulk transaction on the USB. The transfer may be either DATA_IN or DATA_OUT packets containing data sent from the host to the device or vice-versa. This function wil not return until the request either completes successfully or completes with error (due to time out, etc.) NOTE: Make sure that amount of bytes to transfer should not exceed MAX_EHCI_DATA_SIZE Parameters: pHCStruc Pointer to HCStruc of the host controller pDevInfo DeviceInfo structure (if available else 0) bXferDir Transfer direction Bit 7: Data direction 0 Host sending data to device 1 Device sending data to host Bit 6-0 : Reserved fpBuffer Buffer containing data to be sent to the device or buffer to be used to receive data value in Segment:Offset format dwLength dwLength request parameter, number of bytes of data to be transferred in or out of the host controller
EHCI_ControlTransfer | This function executes a device request command transaction on the USB. One setup packet is generated containing the device request parameters supplied by the caller. The setup packet may be followed by data in or data out packets containing data sent from the host to the device or vice-versa. This function will not return until the request either completes successfully or completes in error (due to time out, etc.) Parameters: fpHCStruc Pointer to HCStruc of the host controller pDevInfo DeviceInfo structure (if available else 0) wRequest Request type (low byte) Bit 7 : Data direction 0 = Host sending data to device 1 = Device sending data to host Bit 6-5 : Type 00 = Standard USB request 01 = Class specific 10 = Vendor specific 11 = Reserved Bit 4-0 : Recipient 00000 = Device 00001 = Interface 00010 = Endpoint 00100 - 11111 = Reserved Request code, a one byte code describing the actual device request to be executed (ex: Get Configuration, Set Address etc) wIndex wIndex request parameter (meaning varies) wValue wValue request parameter (meaning varies) fpBuffer Buffer containing data to be sent to the device or buffer to be used to receive data wLength wLength request parameter, number of bytes of data to be transferred in or out of the host controller
EHCI_DeactivatePolling | This function de-activates the polling QH for the requested device. The device may be a USB keyboard or USB hub
EHCI_DisableInterrupts | This function disables the HC interrupts
EHCI_EnableInterrupts | This function enables the HC interrupts
EHCI_EnableKeyRepeat | This function disables the keyboard repeat rate logic by enabling the repeat TD Parameters: fpHCStruc Pointer to the HCStruc structure
EHCI_EnumeratePorts | This function enumerates the HC ports for devices
EHCI_FillHCDEntries | This function fills the host controller driver routine pointers Parameters: fpHCDHeader Ptr to the host controller header structure
EHCI_GetHiSpeedHubPortNumber | This function gets the hi-speed hub's device and port number to which this low speed device is connected. It parses through its parents until it finds the correct device. This information is used for split transaction
EHCI_GlobalSuspend | This function suspend the EHCI HC.
EHCI_InterruptTransfer | This function executes an interrupt transaction on the USB. The data transfer direction is always DATA_IN. This function wil not return until the request either completes successfully or completes in error (due to time out, etc.) Parameters: fpHCStruc Pointer to HCStruc of the host controller fpDevInfo DeviceInfo structure (if available else 0) EndpointAddress The destination USB device endpoint to which the device request is being sent. MaxPktSize Indicates the maximum packet size the target endpoint is capable of sending or receiving. fpBuffer Buffer containing data to be sent to the device or buffer to be used to receive data wLength wLength request parameter, number of bytes of data to be transferred in
EHCI_ProcessInterrupt | This function is called when the USB interrupt bit is set. This function will parse through the TDs and QHs to find out completed TDs and call their respective call back functions Parameters: fpHCStruc Pointer to the HCStruc structure
EHCI_ReleasePortOwner
EHCI_ResetRootHub | This function resets the EHCI HC Root hub port.
EHCI_Start | This API function is called to start a EHCI host controller. The input to the routine is the pointer to the HC structure that defines this host controller Parameters: fpHCStruc Ptr to the host controller structure
EHCIAddPeriodicQH | This function adds a QH to the frame list
EHCICheckHCStatus | This function checks whether the host controller is still under BIOS
EHCIDisableKeyRepeat | This function disables the keyboard repeat rate logic by enabling the repeat TD
EHCIDisableRootHub | This function disables the EHCI HC Ruoot hub port.
EHCIEnableRootHub | This function enables the EHCI HC Root hub port.
EhciExexuteAsyncSchedule | This function insert the requested QH to asynchronous schedule and waits until the QH completes or the transaction time-out.
EHCIGetLegacySupportOffset | This function returns the PCI register offset for the legacy support in EHCI controller
EHCIGetRootHubStatus | This function returns the port connect status for the root hub port
EHCIInitializeQueueHead | This function initializes the queue head with default values
EHCIInitializesPeriodicSchedule | This function initializes the periodic schedules for the EHCI host controller
EhciIsHalted | This function check whether HC is halted.
EhciIsolateDebugPort | This routine locates EHCI debug port and determines whether or not the debug port is initialized and being used by other agents. If so, the global flag will be set to instruct the EHCI runtime routines about debug port presence and prevent any unwanted reset/reconfiguration of this port. Parameters: fpHCStruc Ptr to the host controller structure
EhciPollingTDCallback | This function is called when a polling TD from the TD pool completes an interrupt transaction to its assigned device. This routine should process any data in the TD's data buffer, handle any errors, and then copy the TD's CSReloadValue field into its control status field to put the TD back into service.
EHCIProcessPeriodicList | This function parses through the periodic list to find completed qTD. If a qTD is done it will call its associated call back function (in device info structure) and restarts the polling qTD
EHCIProcessQH | This function whether all the TD's in the QH is completed
EHCIProgramLegacyRegisters | This function programs the EHCI legacy registers as per the input. Also this routine returns the PCI register offset for the legacy support in EHCI controller
EhciRemovePeriodicQh | This function removes a QH from the frame list
EHCIRemoveQHFromAsyncList | This function stops the asynchronous transfer and sets the asynchronous pointer to null
EHCIRepeatTDCallback | This function is called when qTdRepeat completes a transaction. This qTD runs a dummy interrupt transaction to a non-existant device address for the purpose of generating a periodic timeout interrupt which in turn is used to generate keyboard repeat or update LED status.
EHCIResetHC | This function resets the EHCI controller
EHCISetQTDBufferPointers | This function will set the 5 buffer pointer in the qTD appropriately depending upon the input size
EHCIStartAsyncSchedule | This function starts the asynchronous schedule
EHCIStartPeriodicSchedule | This function starts the periodic schedule for the EHCI host controller
EHCIStop | This function stops the EHCI controller.
EHCIStopAsyncSchedule | This function stops the asynchronous transfer and sets the asynchronous pointer to null
EHCIStopPeriodicSchedule | This function stops the periodic schedule for the EHCI USB host controller
EhciTranslateInterval | This function calculates the polling rate in frames unit.
EHCIWaitForTransferComplete | This function waits until the requested QH completes or the transaction time-out
Emul6064TrapCallback | Update the KbcEmul feature when the Emul6064Trap Protocol becomes available.
EnablePciBridge | This function scaned PciBridge
eUninstallDevice | Enumeration call-back function that is usded uninstall all enumerated device nodes Stops enumeration as soon as error was recieved

Data Structure | Description
EHCI_QH | This is EHCI queue head data structure used to perform non-isochronous transaction in EHCI based HC
EHCI_QTD | This is EHCI queue TD data structure used to perform non-isochronous transaction in EHCI based HC

Built on 16:12:00 10/28/16


Functions in Alphabetical Order

F

Function | Description
FindBestTA1Value | CCID which doesn't perform "Automatic parameter config. based on ATR
FindHcStruc | Search gUsbData for information about HC linked to an EFI handle
FindNumberOfTs | Returns the # of Ts present in TDx
FindOldTransfer | Searches a DEV_INFO that was used as a temporary structure for the USB transfer.
FixedDelay | This routine delays for specified number of micro seconds
FreeConfigDesc | Delocates memory that was used by the descriptor
FreeDevInfo | Marks DEV_INFO structure that it is free for use in consequent operations.
FreeHcMemory | Free the memory allocated by AllocateHcMemory().

Built on 16:12:00 10/28/16


Functions in Alphabetical Order

G

Function | Description
GetAbsMouseState | This routine is a part of ABSOLUTEPointerProtocol implementation; it retrieves the current state of a pointer device.
GetAsciiScan | Calls the service routine for the given keycode. Returns the scan/ascii code.
GetCode_64 | Returns the scan/ascii code for USB Key 0x64, a.k.a. Europe2 Europe2 is typically in AT-101 Key Position 45, between Left Shift and Z keys.
GetCode_BasicKey | Returns the scan/ascii code for "basic keys" - not letters, not numbers (Enter, Escape, '[', '/', etc.); USB code from 28 to 38.
GetCode_ExtKey | Returns the scan/ascii code for extended keys such as Home, End, arrows, PgUp/Dn; USB code from 49 to 52.
GetCode_F11F12Key | Returns the scan/ascii code for functional keys F11 and F12; USB code 44 and 45.
GetCode_F1_10Key | Returns the scan/ascii code for functional keys F1..F10; USB code from 3A to 43.
GetCode_Keypad1 | Returns the scan/ascii code for non-numeric part of the keypad, such as '/', '*', etc.; USB code from 54 to 58.
GetCode_Keypad2 | Returns the scan/ascii code for numeric part of the keypad; USB code from 59 to 63.
GetCode_Letter | Returns the scan/ascii code for letter charachters, USB code from 4 to 1D. Keys from 'A' to 'Z' are interpreted using the following logic: 1) first_keycode is 04 2) last_keycode is 1D 3) scan_code = letters[key-first_keycode].scancode 4) ascii_code (normal) = 0x61+(key-first_keycode) 5) ascii_code (shifted) = 0x41+(key-first_keycode) 6) ascii_code (w/Ctrl) = key-first_keycode+1
GetCode_Number | Returns the scan/ascii code for numbers, USB code from 1E to 27. Keys from '1' to '0' are interpreted using the following logic: 1) first_keycode is 1E 2) last_keycode is 27 3) scan_code = key-first_keycode + 2 4) ascii_code (normal) = aNumbers[key-first_keycode].NormalNumber 5) ascii_code (shifted) = aNumbers[key-first_keycode].ShiftedNumber 6) scan_code (w/Alt) = key-first_keycode + 0x78
GetConnectedDevices | This function retrieves the information about connected USB devices.
GetDefaultProtocol | Find the First offerred Transmission protocol.
GetEhciUSBLEGSUP | This routine return USBLEGSUP register content. It could be used to check EHCI semaphore owened by BIOS or OS.
GetEndpointDesc | Retrieves information about a max packet size for the specified endpoint of the device
GetICCDevice | Search the linked list to find the ICC_DEVICE for the given slot #.
GetMassDeviceName | This function retrieves the USB mass storage device ASCII name.
GetMaxPacket | Retrieves information about a max packet size for the specified endpoint of the device
GetMouseState | This routine is a part of SimplePointerProtocol implementation; it retrieves the current state of a pointer device.
GetNextMassDevice | This is the interface function that executes USBMassAPIGetDeviceInformation function and returns the information about mass storage device.
GetNextMassDeviceName | This function returns a name string of connected mass storage device.
GetRuntimeRegion | This function returns the beginning and the end of USB runtime memory region.
GetThis | Function returns a pointer to HcProtocol2 record of a given protocol
GetThis1 | Function returns a pointer to HcProtocol record of a given protocol
GetTransferStatus | Function converts the bitmap of gUsbData->dLastCommandStatusExtended into a valid USB error.
GetUsbDescriptor | Allocates memory necessary to hold complete descriptor and returns the descriptor there

Data Structure | Description
GET_DEV_ADDR | This is a URP structure for the BIOS API(API #32h)
GET_DEV_INFO | This is a URP (USB Request Packet) structure for the BIOS API call GetDeviceInfo (API #25)

Built on 16:12:00 10/28/16


Functions in Alphabetical Order

H

Function | Description
HandleReceivedBlock | Process the Recevied data from CCID device
HcByHandle | Predicate for searching host controller node in the tree by EFI controller handle
HcByIndex | Predicate for searching host controller node in the tree by bHcNumber
hcnum2hcstruc | Search for the HC_STRUC with specified bHCNumber
HotplugIsEnabled | This function returns TRUE if there is a need for extra USB devices that might be inserted/enumerated after legacy boot

Data Structure | Description
HC_START_STOP | This is a URP structure for the BIOS API(API #36)
HC_STRUC | USB Host Controller structure
HCD_HEADER | USB Host Controller Driver function list structure.
HcDxeRecord | state information for USB_HC_PROTOCOL implementation
HCPROC_PARAM | N/A

Built on 16:12:00 10/28/16


Functions in Alphabetical Order

I

Function | Description
ICC_SmiQueuePut | Puts the pointer into the queue for processing. updates queue head and tail. This data is read from EfiUSBCCID.C which installs AMI_CCID_IO_PROTOCOL
ICCInsertEvent | In response to Device Insertion, Interrupt-in message is received. Icc Device is added to the linked list and configured.
ICCRemovalEvent | In response to Device removal, Interrupt-in message is received. Icc Device is removed from the linked list.
InitializeUsbGlobalData | This function initializes the USB global data.
InitInt13RuntimeImage | Initialization of data structures and placement of runtime code of USB INT13
InitNamesProtocol | Component names protocol initializer
InitNamesStatic | USB device and controller names initializer.
InitUSBKeyboard | Initialize USB Keyboard device and all private data structures.
InitUSBKeyBuffer | Initialize USB Keyboard Buffer.
InitUSBKeyCharBuffer | Initialize USB Keyboard Buffer for Keyboard ASCII data.
InitUSBMouse | Initialize USB mouse device and all private data structures.
InitUsbSetupVars | This is porting function that fills in USB related fields in gSetupData variable according to the setup settings and OEM policy.
InitUSBStrings | This function is eLink'ed with the chain executed right before the Setup. VOID InitUSBStrings( EFI_HII_HANDLE HiiHandle, UINT16 Class ) { CHAR16 DevNumStr[MAX_DEVS_LINE_LENGTH]; CHAR16 ControllerNumStr[MAX_DEVS_LINE_LENGTH]; CHAR8 MassStr[MAX_DEVS_LINE_LENGTH]; UINT8 NextDev; UINT16 MassDev[16] = { STRING_TOKEN(STR_USB_MASS_DEVICE1), STRING_TOKEN(STR_USB_MASS_DEVICE2), STRING_TOKEN(STR_USB_MASS_DEVICE3), STRING_TOKEN(STR_USB_MASS_DEVICE4), STRING_TOKEN(STR_USB_MASS_DEVICE5), STRING_TOKEN(STR_USB_MASS_DEVICE6), STRING_TOKEN(STR_USB_MASS_DEVICE7), STRING_TOKEN(STR_USB_MASS_DEVICE8), STRING_TOKEN(STR_USB_MASS_DEVICE9), STRING_TOKEN(STR_USB_MASS_DEVICE10), STRING_TOKEN(STR_USB_MASS_DEVICE11), STRING_TOKEN(STR_USB_MASS_DEVICE12), STRING_TOKEN(STR_USB_MASS_DEVICE13), STRING_TOKEN(STR_USB_MASS_DEVICE14), STRING_TOKEN(STR_USB_MASS_DEVICE15), STRING_TOKEN(STR_USB_MASS_DEVICE16) }; UINT8 MassDevValid[16]; UINT8 i; UINTN VariableSize; USB_MASS_DEV_NUM SetupData; EFI_STATUS Status; EFI_USB_PROTOCOL *UsbProtocol; EFI_GUID UsbProtocolGuid = EFI_USB_PROTOCOL_GUID; CONNECTED_USB_DEVICES_NUM DevNum; UINT32 VariableAttributes = EFI_VARIABLE_BOOTSERVICE_ACCESS; USB_CONTROLLER_NUM UsbControllerNum; if USB_SETUP_VARIABLE_RUNTIME_ACCESS VariableAttributes |= EFI_VARIABLE_RUNTIME_ACCESS; endif if (Class!=ADVANCED_FORM_SET_CLASS) { return; } //(EIP102493+)> InitString(HiiHandle, STRING_TOKEN(STR_USB_MODULE_VER), L"%d.%02d.%02d", USB_DRIVER_MAJOR_VER, USB_DRIVER_MINOR_VER, USB_DRIVER_BUILD_VER); //<(EIP102493+) Status = pBS->LocateProtocol(&UsbProtocolGuid, NULL, &UsbProtocol); #### ASSERT_EFI_ERROR(Status); if (EFI_ERROR(Status)) { return; } // Number of connected devices GetConnectedDevices(DevNumStr, ControllerNumStr, UsbProtocol, &DevNum); TRACE((-1, "Devices total: %d KBDs, %d HUBs, %d MICE, %d POINT %d MASS %d CCID", DevNum.NumUsbKbds, DevNum.NumUsbHubs, DevNum.NumUsbMice, DevNum.NumUsbPoint, DevNum.NumUsbMass, DevNum.NumUsbCcids)); InitString(HiiHandle, STRING_TOKEN(STR_USB_DEVICES_ENABLED_LIST), L"%s", DevNumStr); InitString(HiiHandle, STRING_TOKEN(STR_USB_CONTROLLERS_ENABLED_LIST), L"%s", ControllerNumStr); // Mass storage device names for (i = 0, NextDev = 0; i < 16; i++) { NextDev = GetMassDeviceName(MassStr, NextDev, UsbProtocol); if (NextDev == 0xFF) { break; // No more devices } InitString(HiiHandle, MassDev[i], L"%S", MassStr); if (NextDev & 0x80) { break; // Last device } } for (i = 0; i < 16; i++) { if (i < DevNum.NumUsbMass) { MassDevValid[i] = 1; } else { MassDevValid[i] = 0; } } VariableSize = sizeof(USB_MASS_DEV_VALID); Status = pRS->SetVariable(L"UsbMassDevValid", &gEfiSetupGuid, VariableAttributes, VariableSize, &MassDevValid); VariableSize = sizeof(SetupData); Status = pRS->GetVariable(L"UsbMassDevNum", &gEfiSetupGuid, NULL, &VariableSize, &SetupData); if (EFI_ERROR(Status)) { return; } SetupData.IsInteractionAllowed = 0; SetupData.UsbMassDevNum = DevNum.NumUsbMass; Status = pRS->SetVariable(L"UsbMassDevNum", &gEfiSetupGuid, VariableAttributes, VariableSize, &SetupData); VariableSize = sizeof(UsbControllerNum); Status = pRS->GetVariable(L"UsbControllerNum", &gEfiSetupGuid, NULL, &VariableSize, &UsbControllerNum); if (EFI_ERROR(Status)) { return; } UsbControllerNum.UhciNum = DevNum.NumUhcis; UsbControllerNum.OhciNum = DevNum.NumOhcis; UsbControllerNum.EhciNum = DevNum.NumEhcis; UsbControllerNum.XhciNum = DevNum.NumXhcis; Status = pRS->SetVariable(L"UsbControllerNum", &gEfiSetupGuid, VariableAttributes, VariableSize, &UsbControllerNum); }
InsertChar | Insert the given scan/ascii code in the BDA keyboard queue. Updates the necessary BDA pointers, head and tail.
InsertKeyCode | Inserts a key code into keyboard buffer.
InSmmFunction | SMM entry point of AMIUSB driver
InstallDevice | Adds a device to the tree; creates an EFI handle for the usb device; installs USB_IO and DEVICEPATH protocols on a new device handle; connects a new device to EFI device drivers
InstallHcProtocols | Start the AMI USB driver; Sets USB_FLAG_DRIVER_STARTED
InstallUSBAbsMouse | Installs ABSOLUTEPointerProtocol interface on a given controller.
InstallUSBCCID | Install AMI_CCID_IO_PROTOCOL_GUID for each slot
InstallUSBHid | Installs SimpleTxtIn protocol on a given handle
InstallUSBKeyboard | Installs SimpleTxtIn protocol on a given handle
InstallUsbLegacyBootDevices | This function installs USB INT13 devices
InstallUsbMass | Installs BlkIo protocol on a USB Mass Storage device
InstallUSBMouse | Installs SimplePointerProtocol interface on a given controller.
InstallUsbProtocols | This function initializes the USB global data.
InvokeUsbApi
iPodShufflePatch | This check whether iPod shuffle attached to system and move iPod shuffle to first initial device.
IsControllerWithRmh | This function checks if the controller has integrated USB 2.0 Rate Matching Hubs (RMH).
IsExternalController | This function check whether the controller is behind bridge
IssuePPSCmd | Issue PPS cmd to select T0/T1
IsSupportedInterfaceType | This function check whether the Interface Type is supported.
IsUSBKeyboardBufferEmpty | Check whether USB Keyboard buffer is empty.
IsUSBKeyboardBufferFull | Check whether USB Keyboard buffer is full.
IsUSBKeyCharEmpty | Check whether USB Keyboard ASCII data buffer is empty.

Built on 16:12:00 10/28/16


Functions in Alphabetical Order

K

Function | Description
KBC_ReadDataByte | This routine till the keyboard controller sends a data byte
KBC_ReadKeyboardControllerData | This routine sends a command and receives the response byte for that command
KBC_WaitForInputBufferToBeFree | This routine checks the input buffer free bit and waits till it is set by the keyboard controller
KBC_WaitForOutputBufferToBeFilled | This routine checks the output buffer full bit and waits till it is set by the keyboard controller
KBC_WriteCommandByte | This routine sends the command byte to the keyboard controller
KBC_WriteKeyboardControllerData | This routine writes a data byte to the keyboard controller by first sending a command byte first
KBC_WriteSubCommandByte | This routine sends the sub-command byte to the keyboard controller
KeypressCallback | This routine is called every time the keyboard data is updated
KeyrepeatCallback | This routine is called every time the key repeat is requested

Data Structure | Description
KB_LEDS_DATA | This is a URP (USB Request Packet) structure for the BIOS API call LightenKeyboardLeds(API #2B)

Built on 16:12:00 10/28/16


Functions in Alphabetical Order

L

Function | Description
LegacyAutoRepeat | This routine is called periodically based on 8ms TD and used to implement the key repeat.
LoadName | loads STRING descriptor that corresponds to the name of the USB device
LocateEhciController | Visit all companions as different PCI functions of the same PCI device as Controller (enumerate HCPCIInfo ). For each companion function locate corresponding PCI_IO handle, execute ConnectController if necessary; add them to aHCStrucTable.
LocatePwrCapOffset | This function locate power management capability offset

Built on 16:12:00 10/28/16


Functions in Alphabetical Order

M

Function | Description
MemCopy | This routine copies data from source to destination.
MemFill | This routine fills the given memory range with the given value.
MemFill | Fills the specified amount of memory with specified data starting from the specified address.

Data Structure | Description
MASS_ASSIGN_DRIVE_NUM | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call USBMass_AssignDriveNumber (API #27h, SubFunc 0Eh)
MASS_CMD_PASS_THRU | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassCmdPassThru command (API #27h, SubFunc 0Dh)
MASS_FORMAT | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassFormatDevice (API #27h, SubFunc 06h)
MASS_GET_DEV_GEO | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassGetDeviceGeometry (API #27h, SubFunc 01h)
MASS_GET_DEV_INFO | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassGetDeviceInfo (API #27h, SubFunc 00h)
MASS_GET_DEV_STATUS | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MASS_GET_DEV_STATUS (API #27h, SubFunc XXh)
MASS_HOTPLUG | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call USBMass_HotPlugDeviceSupport (API #27h, SubFunc 09h)
MASS_INQUIRY | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassInquiry (API #27h, SubFunc 0Ch)
MASS_MODE_SENSE | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassModeSense (API #27h, SubFunc 0Bh)
MASS_READ | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassReadDevice (API #27h, SubFunc 03h)
MASS_READ_CAPACITY | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassReadCapacity (API #27h, SubFunc 0Ah)
MASS_REQ_SENSE | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassRequestSense (API #27h, SubFunc 07h)
MASS_RESET | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassResetDevice (API #27h, SubFunc 02h)
MASS_START_STOP_UNIT | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassStartStopUnit (API #27h, SubFunc 09h)
MASS_TEST_UNIT_RDY | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassTestUnitReady (API #27h, SubFunc 08h)
MASS_VERIFY | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassVerifyDevice (API #27h, SubFunc 05h)
MASS_WRITE | This is a Mass URP (Mass USB Request Packet) structure for the BIOS API call MassWriteDevice (API #27h, SubFunc 04h)
MASS_XACT_STRUC | This structure holds the information needed for the mass transaction (for CBI or BULK)

Built on 16:12:00 10/28/16


Functions in Alphabetical Order

N

Function | Description
NextDescriptor | Returns pointer to the next descriptor for the pack of USB descriptors located in continues memory segment - result of reading CONFIG_DESCRIPTOR

Built on 16:12:00 10/28/16


Functions in Alphabetical Order

O

Function | Description
OemGetAssignedUsbBootPort | This procedure return specific USB host controller index and port number for BIOS to give specific mass storage device have highest boot priority.
OEMSkipList | This function intends to skip port.
OHCI_GlobalSuspend | This function suspend the OHCI HC.
OhciIsHalted | This function check whether HC is halted.
OhciTranslateInterval | This function calculates the polling rate.
OnExitBootServices | EXIT_BOOT_SERVICES notification callback function.
OnLegacyBoot | This function is invoked when on Legacy Boot

Data Structure | Description
OHCI_ED | OHCI Endpoint descriptor structure. This structure is needed for all the USB transaction. This structure had the information regarding the transfer. Refer to OHCI specification for more information
OHCI_ED_CONTROL | Bit definition for OHCI_ED control field
OHCI_TD | OHCI general transfer descriptor structure. This structure is used for bulk, interrupt and control transfers. This structure holds the information needed for the transfer like buffer size, address etc. Refer to OHCI specification for more information. The last sixteen bytes in the structure (after BufferEnd) is AMIBIOS internal data structure.
OHCI_TD_CONTROL | Bit definition for OHCI_TD ControlStatus field
OHCIDescriptors | Descriptors structure is used to hold the host controller instance specific general transfer descriptor and endpoint descriptor pointers. The following structure defines such the descriptors for OHCI based host controller instances.
OHCIHCCA | OHCI host controller communications area is used by the host controller driver(BIOS) to communicate with the OHCI based host controller. This data area should be bus master capable. Refer OHCI data sheet for more information.

Built on 16:12:00 10/28/16


Functions in Alphabetical Order

P

Function | Description
PCToRDRGetParameters | PC_TO_RDR_GETPARAMETERS cmd is issued to CCID
PCToRDRGetSlotStatus | PC_TO_RDR_GETSLOTSTATUS cmd is issued to CCID
PCtoRDRIccPowerOff | PC_TO_RDR_ICCPOWEROFF cmd is issued to the CCID Input : IN DEV_INFO *fpDevInfo, IN ICC_DEVICE *fpICCDevice Output : EFI_STATUS
PCtoRDRIccPowerOn | PC_TO_RDR_XFRBLOCK cmd is issued to the device Input IN DEV_INFO *fpDevInfo, IN ICC_DEVICE *fpICCDevice, IN UINT32 CmdLength, IN UINT8 *CmdBuffer, IN UINT8 BlockWaitingTime, IN UINT16 LevelParameter Output : EFI_STATUS
PCToRDRSetDataRateAndClockFrequency | PC_TO_RDR_SETDATARATEANDCLOCK cmd is issued. Response for this cmd is from RDR_TO_PC_DATARATEANDCLOCK
PCToRDRSetParameters | PC_TO_RDR_SETPARAMETERS cmd is issued to CCID Input : IN DEV_INFO *fpDevInfo IN ICC_DEVICE *fpICCDevice IN UINT8 ProtocolNum - 0 : T=0, 1 : T=1 IN VOID *Data - Points to data from abProtocolDataStructure in PC_TO_RDR_SETPARAMETERS
PopulateTree | Enumerate all DEV_INFO structures in the aDevInfoTable array and install all currently connected device
PostStopXhci | This function frees the HC memory and clears XHCI data structures.
PreInitXhci | This function initializes XHCI data structures, allocates HC memory and updates the relevant fields in HcStruc. At this point the controller's resources are assigned and accessible.
prepareForLegacyOS | Changes global state of USBSMI module to function properly in non-EFI OS - without support from EFI drivers Before call USB BUS is a driver that handles all devices ( except hub) and rest of the drivers are delayed. Number of devices are supported by SUBBUS driver and custom EFI driver After call returns, USBBUS driver is removed and all drivers that where delayed became active. All USBBUS devices are reconfigured. Devices that are not supported by now active drivers are decon- figured.
PrintATRData | This function Prints the RAW ATR Data
PrintDebugMessage | This routine prints the debug message Parameters: Variable
PrintDescriptorInformation | Prints SMART class Descriptor data
PrintPCParameters | This function prints the information gathered from GetPCParameters
PrintTimingInfo | This function prints the information gathered from ATR data
ProcessCtrlAltShift | Updates mLegacyKeyboard.KeyModifierState according to the value of the 1st byte of the USB keyboard data.
ProcessKeyCode | This routine converts USB code into UINT16 with ASCII code in the lower byte and PS/2 scan code in the upper byte and inserts this UINT16 in the legacy keyboard queue in BDA.
ProcessLockKeys | Process the keys that alter NumLock/ScrollLock/CapsLock; updates mLegacyKeyboard.KeyModifierState and 0:417 accordingly.
ProcessMultiLanguage | It maps the current key to a Unicode character from the keyboard layout Paremeters: KeyData - Pointer to the AMI_EFI_KEY_DATA .
ProcessOwnerShipChangeSMI | This procedure process EHCI OwnerShipChange SMI.
ProcessRootHubChanges | Root hub change processing code Parameters: fpHCStruc Pointer to the HCStruc structure
ProcessSmiChangeToBIOS | This procedure process OwnerShipChange for EHCD -> BIOS.
ProcessSmiChangeToEHCD | This procedure process OwnerShipChange for BIOS -> EHCD.

Built on 16:12:00 10/28/16


Functions in Alphabetical Order

Q

Function | Description
QueueGet | retrieves data stored at the tail of the queue and removes the tail item
QueuePut | add a new item in front of the head of the queue
QueuePutMsg | Add a variable size item to the queue
QueuePutMsg | add a variable size item to the queue
QueueRemoveMsg | retrieves a variable size item from the queue
QueueSize | retrieves number of items stored in the queue

Built on 16:12:00 10/28/16


Functions in Alphabetical Order

R

Function | Description
RateAndProtocolManagement | Based on the ATR data and the dwFeature register contend do the Rate and Protocol programming
RDRToPCDataBlock | RDR_TO_PC_DATABLOCK cmd is issued to the CCID. This is on response to PCI_to_RDR_XfrBlock
RDRToPCDataRateAndClockFrequency | RDR_TO_PC_DATARATEANDCLOCK cmd is issued.
RDRToPCParameters | RDR_TO_PC_SLOTSTATUS cmd is issued
RDRToPCSlotStatus | RDR_TO_PC_SLOTSTATUS cmd is issued to CCID.
ReadAndProcessKey | It processes the key and sets its states. Paremeters: Key - VOID Pointer KeySize - Size of the structure.
ReadPCIConfig | This routine reads from the PCI configuration space register the value can be typecasted to 8bits - 32bits
ReadUsbDescriptor | This function executes a get descriptor command to the given USB device and endpoint
ReadyToBootNotify | READY_TO_BOOT event notification callback. It locates BBS table and changes the priority of device located at index gBootOverrideDeviceIndx to 0 (highest). It also verifies the hotplug devices are properly installed.
ReadyToBootNotify | This function is invoked when on ReadyToBoot
ReallocateMemory |
RegisterAcpiEnableCallBack | This function registers ACPI enable callback function.
RemoveDevInfo | Removes device node from the USB bus tree. Device node corresponds to the DEV_INFO. Device gets removed in response to the pending removal event sheduled from SMM when disconnect was detected on USB
RemoveDevInfoEcho | Finds the USB device node that sits on the same path (seq. of (hub ports,if) ) but have different USB address or DEV_INFO node. This could be the result of lost disconnect event or previous error to uninstall USB_IO
RemoveHubEcho | Finds the USB hub node that sits on the same path (seq. of (hub ports,if) ) but have different USB address or DEV_INFO node. This could be the result of lost disconnect event or previous error to uninstall USB_IO
RemoveKeyCode | Removes a key code from the keyboard buffer.
ReportDevices | This is the interface function that reports the number of devices currently controlled by the driver.
ResumePciBridge | This function resumed PciBridge

Built on 16:12:00 10/28/16


Functions in Alphabetical Order

S

Function | Description
SearchDevinfoByAdr | Enumerates DEV_INFO structures in aDevInfoTable array of USB data to find one that matches the specified USB address and connects to a specified USB host controller.
SendMouseData | This routine sends the Mouse Data to Local Mouse Buffer
SetABSData |
SetKeyLED | Sets USB Keyboard LED state.
SetMouseData | This routine checks for mouse type device from the interface data provided
SpeakerBeep | This routine produces a sound on the internal PC speaker
StartPollingKey | Get the keys from the USB Keyboard buffer and process it Paremeters: IN EFI_EVENT Event event that has been signaled IN VOID *Context
StopControllerBdf | This function stops the USB host controllers of a given Bus Dev Function
StopPciBridge | This function stopped PciBridge
SupportedUSBHid | Verifies if usb hid support can be installed on a device
SupportedUSBKeyboard | Verifies if usb keyboard support can be installed on a device
SYSKBC_GetTranslation | This routine Get the KBC SCAN code transalation value
SYSKBC_KbdInput_Send | This routine sends the Keyboard Data to Controller
SYSKBC_MouseInput_Send | This routine sends the Mouse Data to Controller
SYSKBC_SendKBCData | This routine is invoked periodically (every 8msec) to send USB keyboard and mouse data to the keyboard controller or to the keyboard controller emulation code
SYSKBC_UpdateLEDState | This routine updates LEDs on Legacy keyboard
SysNoKbcAutoRepeat | This function performs the key autorepeat

Data Structure | Description
SECURITY_IF | This is a URP (USB Request Packet) structure for the BIOS API call SecurityInterface (API #2Ah)
START_HC | This is a URP (USB Request Packet) structure for the BIOS API call StartHC and MoveDataArea (API #20 & #24)

Built on 16:12:00 10/28/16


Functions in Alphabetical Order

T

Function | Description
TreeAddChild | add a child node to the TREENODE_T structure
TreeCreate | initializes TREENODE_T structure
TreeForEachSibling | Enumerates nodes of the tree which are direct children of the same parent; In contrust to TreeSearchSibling this function ignores the result returned from call-back routine and always enumerates all sibling nodes
TreeRemove | removes a node from the tree
TreeSearchDeep | Enumerates nodes of the tree which are direct and indirect children of the same parent
TreeSearchSibling | Enumerates nodes of the tree which are direct children of the same parent
TxRxT1Adpu | Transmit/Receive T1 ADPU
TxRxT1TDPUChar | Transmit/Receive T1 TDPU/Character

Data Structure | Description
TKEYGROUP | This structure describes the range of the USB keys and the function that is called if the USB key is found within this range.

Built on 16:12:00 10/28/16


Functions in Alphabetical Order

U

Function | Description
UhcdPciIoNotifyCallback | PciIo notification callback. It calls UpdateHcPciInfo porting function to update the PCI information in the HC device table.
UHCI_ActivatePolling | This function activates the polling TD for the requested device. The device may be a USB keyboard or USB hub
UHCI_BulkTransfer | This function executes a bulk transaction on the USB. The transfer may be either DATA_IN or DATA_OUT packets containing data sent from the host to the device or vice-versa. This function wil not return until the request either completes successfully or completes with error (due to time out, etc.)
UHCI_ControlTransfer | This function executes a device request command transaction on the USB. One setup packet is generated containing the device request parameters supplied by the caller. The setup packet may be followed by data in or data out packets containing data sent from the host to the device or vice-versa. This function will not return until the request either completes successfully or completes in error (due to time out, etc.)
UHCI_DeactivatePolling | This function de-activates the polling TD for the requested device. The device may be a USB keyboard or USB hub
UHCI_DisableHCPorts | This routine disables the UHCI HC root hub ports
UHCI_DisableInterrupts | This API function is called to disable the interrupts generated by the UHCI host controller. The input to the routine is the pointer to the HC structure that defines this host controller.
UHCI_DisableKeyRepeat | This function disables the keyboard repeat rate logic
UHCI_DisableRootHub | This function disables the root hub of the UHCI controller.
UHCI_EnableInterrupts | This function enables the HC interrupts
UHCI_EnableKeyRepeat | This function enables the keyboard repeat rate logic
UHCI_EnableRootHub | This function enables the root hub port specified
UHCI_EnumeratePorts | This API function is called to enumerate the root hub ports in the UHCI controller. The input to the routine is the pointer to the HC structure that defines this host controller
UHCI_FillHCDEntries | This function fills the host controller driver routine pointers
UHCI_GetRootHubStatus | This function returns the port connect status for the root hub port
UHCI_GlobalSuspend | This function suspend the UHCI HC.
UHCI_InitBulkDataTds | This function initializes the fields in bulk data TD list that remain after UHCI_InitBulkTdCommon: - Data buffer pointer - Data length - Data toggle (DAT0/DAT1)
UHCI_InitBulkTdCommon | This function creates a chain of two TDs for bulk data transfer. It fills in the following fields in TD: pLinkPtr - NextTd address dToken - All bits except length and data toggle
UHCI_InterruptTransfer | This function executes an interrupt transaction on the USB. The data transfer direction is always DATA_IN. This function wil not return until the request either completes successfully or completes in error (due to time out, etc.)
UHCI_PollingTDCallback | This function is called when a polling TD from the TD pool completes an interrupt transaction to its assigned device. This routine should process any data in the TD's data buffer, handle any errors, and then copy the TD's CSReloadValue field into its control status field to put the TD back into service.
UHCI_ProcessInterrupt | This function is called when the USB interrupt bit is set. This function will parse through the TDs and QHs to find out completed TDs and call their respective callback functions.
UHCI_RepeatTDCallback | This function is called when TdRepeat completes a transaction. This TD runs a dummy interrupt transaction to a non-existant device address for the purpose of generating a periodic timeout interrupt which in turn is used to generate keyboard repeat.
UHCI_ResetRootHub | This function resets the UHCI HC root hub port
UHCI_RootHubTDCallBack | This function is called when TD256ms completes a transaction. This TD runs a dummy interrupt transaction to a non-existant device address for the purpose of generating a periodic timeout interrupt. This periodic interrupt may be used to check for new devices on the root hub etc.
UHCI_Start | This API function is called to start a UHCI host controller. The input to the routine is the pointer to the HC structure that defines this host controller
UHCI_StartTDSchedule | This routine will start the TD schedule for the UHCI controller. After this routine TD's can be scheduled for execution.
UHCI_Stop | This API function is called to stop the UHCI controller. The input to the routine is the pointer to the HC structure that defines this host controller.
UHCI_StopTDSchedule | This routine will stop the TD schedules and frees the data structures
UhciActivateTds
UhciAddQhToFrameList | This routine will add the particular QH into the frame list
UhciAllocGeneralTds
UhciExecuteTransfer | This function execites a transfer and waits for the completion of the transfer, and returns the transfer results.
UhciFreeTds
UhciInitQh | This function check whether HC is halted.
UhciIsHalted | This function check whether HC is halted.
UhciProcessFrameList | This function will parse through frame list to find completed QH/TD and invoke corresponding call back routine
UhciProcessQh | This function will check whether the QH is completed if so, it will call the call back routine associated with the TDs present in the QH
UhciProcessTd | This function will check whether the TD is completed if so, it will call the call back routine associated with this TD
UhciRemoveQhFromFrameList | This routine will remove a QH from the the frame list
UhciTranslateInterval | This function calculates the polling rate.
UninstallDevice | Disconnects device; uninstalls USB_IO and DEVICEPATH protocols delocates all memory used USB Bus driver to support the device removes device node from the tree; if device has children, all UninstallDevice procedure is repeated for each child. In case if disconnect or protocol uninstall fails, it reports error stauts returned from Boot service procedure.
UninstallHid | Uninstalls protocol on a given handle
UninstallUSBAbsMouse | Uninstalls ABSOLUTEPointerProtocol interface.
UnInstallUSBCCID | Uninstall AMI_CCID_IO_PROTOCOL_GUID for each slot
UninstallUSBKeyboard | Uninstalls SimpleTxtIn protocol on a given handle
UninstallUSBMass | Removes BlkIo protocol from USB Mass Storage device
UninstallUSBMouse | Stops USB mouse device
UpdateATRDataInfo | The routine update the Transmision protocol supported and other timing related data
UpdateHcPciInfo | This function is called from the UHCD entry point, HcPciInfo can be updated here depending on the platform and/or chipset requirements.
UpdateKeyMon | This function takes the keyboard scan code and checks if it is present in the Key Monitor table. If found, it updates the corresponding bit in the Key Monitor map. Key monitor data structure pointer is at 9FC0:10C Key monitor map (32 bit) updated by this routine is at 9FC0:108 Map element is {BYTE, DWORD}; BYTE - scan code, DWORD - attribute
UpdateLEDs | Updates USB keyboard(s) LEDs according to the value of mLegacyKeyboard.KeyModifierState.
UpdateMassDevicesForSetup | Updates "UsbMassDevNum" setup variable according to the number of installed mass storage devices.
UpdatePortStatusSpeed | This function sets USB_PORT_STAT... fields that are related to device speed (LS/FS/HS/SS) in a given PortStatus variable.
UpdateUsbAbsMouseData | This routine updates current AbsMouse data.
UpdateUsbMouseData | This routine updates current mouse data.
Usb3OemGetMaxDeviceSlots | Returns maximum device slots to be enabled and programmed in MaxSlotsEn field of XHCI CONFIG register. Valid range is 1...HCPARAMS1.MaxSlots (see xhci.h for details)
USB_AbortConnectDev | Mark DEV_INFO not valid and release its device address
USB_AbortConnectHubChildren | Mark DEV_INFO not valid for all the devices connected to a given hub.
USB_DevDriverDisconnect
USB_EnableEndpointsDummy | Dummy HC API function used by the HC drivers that do not need to implement enable endpoint function.
USB_FreeDeviceAddress | This routine releases the given device's address by updating gUsbData->dDeviceAddressMap.
USB_ReConfigDevice | EFI code will call this function to give a chance for SMI dev driver to complete the configuration of device Before call, USB device is connected, address is assigned and configuration is set. DEV_INFO structure is initalized from information parsed from descriptors and linked to USBBUS dev driver. Device driver specific to the type of USB device wasn't called on this device After the call returns, a specific device driver initialization was performed by calling pfnCheckDeviceType and pfnConfigureDevice functions of device driver. Parameters to those functions are taken from descriptors downloaded from the device. Device preserve old address and active configuration
USB_ResetAndReconfigDev | This routine resets and reconfigures the device.
USB_SmiQueuePut | Puts the pointer pointer into the queue for processing, updates queue head and tail.
USB_StartLegacy | This function is part of the USB BIOS API. This function init USB legacy support.
USB_StopLegacy | This function is part of the USB BIOS API. This function init USB legacy support.
USB_StopUnsupportedHc | This routine is called, from host controllers that supports OS handover functionality, when OS wants the BIOS to hand-over the host controllers to the OS. This routine will stop HC that does not support this functionality.
USBAbsConfigureDevice | This routine checks an interface descriptor of the USB device detected to see if it describes a HID/Boot/Mouse device. If the device matches the above criteria, then the device is configured and initialized
UsbAbsMouseReset | This routine is a part of ABSOLUTEPointerProtocol implementation; it resets USB ABS.
UsbAbsMouseWaitForInput | Event notification function for AbsMouseOLUTE_POINTER.WaitForInput event. Signal the event if there is input from AbsMouse.
UsbAbsMsStop | Stops USB ABS device
USBAbsProcessMouseData
UsbAcpiEnableCallBack | This is ACPI mode enable callback function. It is a workaround for non XHCI/EHCI aware OSes.
UsbAllocDevInfo | Allocate the empty buffer for USB device
USBAPI_CCIDRequest | This routine services the USB API function number 30h. It handles all the CCID related calls from the higher layer. Different sub-functions are invoked depending on the sub-function number
USBAPI_ChangeOwner | This function is part of the USB BIOS API. This function updates the global variables according to the new owner
USBAPI_CheckDevicePresence | This routine checks whether a particular type of USB device is installed in the system or not.
USBAPI_CheckPresence | This routine services the USB API function number 0. It reports the USB BIOS presence, its version number and its current status information
USBAPI_Core_Proc | Bridge to a number of procedures supplied by Core proc table
USBAPI_DisableInterrupts | This routine stops the USB host controllers interrupts
USBAPI_EnableInterrupts | This routine re-enable the USB host controller interrupts
USBAPI_ExtDriverRequest
USBAPI_GetDeviceAddress
USBAPI_GetDeviceInfo | This routine returns the information regarding a USB device like keyboard, mouse, floppy drive etc
USBAPI_HC_Proc | Bridge to a number of procedures supplied by HC driver
USBAPI_HcStartStop | This function is part of the USB BIOS API. This function starts/stops the USB host controller.
USBAPI_invoke_in_frame | Invokes procedure passing parameters supplied in the buffer It replicates the stack frame so that target procedure can see the parameters passed to the stub.
USBAPI_KbcAccessControl | This function is part of the USB BIOS API. This function is used to control whether KBC access in USB module should be blocked or not.
USBAPI_LegacyControl | This function is part of the USB BIOS API. This function is used to shutdown/init USB legacy support.
USBAPI_LightenKeyboardLEDs | This function is part of the USB BIOS API. This function controls LED state on the connected USB keyboards
USBAPI_MassDeviceRequest | This routine services the USB API function number 27h. It handles all the mass storage related calls from the higher layer. Different sub-functions are invoked depending on the sub-function number
USBAPI_MoveDataArea | This routine stops the USB host controllers and moves the data area used by host controllers to a new area. The host controller is started from the new place.
USBAPI_PowerManageUSB | This routine suspends the USB host controllers
USBAPI_PrepareForOS | This routine updates data structures to reflect that POST is completed
USBAPI_SecureInterface | This routine handles the calls related to security device
USBAPI_Start | This API routine configures the USB host controllers and enumerate the devices
USBAPI_Stop | This routine stops the USB host controllers
USBAPI_UsbStopController | This function is part of the USB BIOS API. This function stops the USB host controller.
UsbApiHandler
USBBOTGetStatus | This function gets the BOT status sequence using bulk IN transfer
UsbBusGetControllerName | This function is a part of binding protocol, it returns the string with the controller name.
UsbBusInit | Install driver binding and controller name protocols for the USB bus driver.
UsbBusStart | This function is part of binding protocol installed on USB controller. It starts the USB bus for a given controller.
UsbBusStop | This function is part of binding protocol installed on USB controller. It stops the controller and removes all the children.
UsbBusSupported | This is a binding protocol function that returns EFI_SUCCESS for USB controller and EFI_UNSUPPORTED for any other kind of controller.
USBCCID_ProcessInterruptData | This routine is called when InterruptIN messages is generated
USBCCIDAPIAtrSMM | This function is part of the USB BIOS MASS API inside SMM
USBCCIDAPIGetParametersSMM | This function is part of the USB BIOS MASS API.
USBCCIDAPIGetSlotStatusSMM | This function is part of the USB BIOS MASS API inside SMM
USBCCIDAPIPowerDownSlotSMM | This function is part of the USB BIOS MASS API inside SMM
USBCCIDAPIPowerupSlotSMM | This function is part of the USB BIOS MASS API inside SMM
USBCCIDAPISmartClassDescriptor | Generates a SW SMI to get the SMART Class Descriptor for the CCID device
USBCCIDAPISmartClassDescriptorSMM | This function is part of the USB BIOS MASS API inside SMM
USBCCIDAPIXfrBlockSMM | This function is part of the USB BIOS MASS API.
USBCCIDCheckForDevice | This routine checks for CCID type device from the interface data provided
USBCCIDConfigureDevice | This function checks an interface descriptor of a device to see if it describes a USB CCID device. If the device is a CCID device, then it is configured and initialized.
USBCCIDDisconnectDevice | This function disconnects the CCID device.
USBCCIDFillDriverEntries | This function fills DEV_DRIVER structure
USBCCIDInitialize | This function initializes CCID device related data
USBCCIDIssueBulkTransfer | This function executes a bulk transaction on the USB. The transfer may be either DATA_IN or DATA_OUT packets containing data sent from the host to the device or vice-versa. This function wil not return until the request either completes successfully or completes with error (due to time out, etc.) Size of data can be upto 64K
USBCCIDIssueControlTransfer | Issues Control Pipe request to default pipe Parameters: pDevInfo DeviceInfo structure (if available else 0) wRequest Request type (low byte) Bit 7 : Data direction 0 = Host sending data to device 1 = Device sending data to host Bit 6-5 : Type 00 = Standard USB request 01 = Class specific 10 = Vendor specific 11 = Reserved Bit 4-0 : Recipient 00000 = Device 00001 = Interface 00010 = Endpoint 00100 - 11111 = Reserved Request code, a one byte code describing the actual device request to be executed (ex: 1 : ABORT, 2 : GET_CLOCK_FREQUENCIES, 3: GET_DATA_RATES) wIndex wIndex request parameter (meaning varies) wValue wValue request parameter (meaning varies) fpBuffer Buffer containing data to be sent to the device or buffer to be used to receive data wLength wLength request parameter, number of bytes of data to be transferred in or out of the host controller
UsbChangeEfiToLegacy | This is the interface function that reports switches between EFI and Legacy USB operation.
USBCheckNonCompliantDevice | This function checks for non-compliant USB devices by by comparing the device's vendor and device id with the non-compliant device table list and updates the data structures appropriately to support the device.
USBCheckPortChange | This routine processes the port status change (like connect, disconnect, etc.) for the root hub and external hubs.
UsbControlTransfer
UsbDevConfigDesc | Returns a pointer to the memory containing CONFIG_DESCRIPTOR reported by the USB device
UsbDevDriverDisconnect
UsbDevGetGroup | Retrieve DEVGROUP_T that is parent of the specified USB device in the USB Bus tree
UsbDevLoadAllDescritors | Reads DEVICE and CONFIG descriptors for each configuration available in the device. Marks the index of the buffer containing CONFIG descriptor for active configurations currently selected in USB device
UsbDevLoadEndpoints | Locates information about each endpoint inside the descriptors pack loaded with CONFIG descriptor
USBDriverEntryPoint | USB Driver entry point
USBGenerateSWSMI | Generates SW SMI using global SmmCtl pointer.
USBGetProperDeviceInfoStructure | This routine searches for a device info structure that matches the vendor and device id, and LUN of the device found. If such a device info structure not found, then it will return a free device info structure
UsbGetSkipList | This function returns a name string of connected mass storage device.
UsbHcOnTimer | Timer call-back routine that is is used to monitor changes on USB Bus It monitors the state of queueCnnct and queueDiscnct queues which get populated by UsbSmiNotify call-back routine When this routine finds a new device connected to usb it will install a device node for that device by calling InstallDevice When this routine finds a disconneced device it uninstalls the device node by calling UninstallDevice
UsbHcStop | This function is a part of Driver Binding Protocol interface.
UsbHcSupported | This function is a part of Driver Binding Protocol interface.
USBHIDConfigureKeyboard | This routine checks an interface descriptor of the USB device detected to see if it describes a HID/Boot/Keyboard device. If the device matches the above criteria, then the device is configured and initialized
USBHIDDisconnectDevice | This routine disconnects the keyboard by freeing the USB keyboard device table entry
UsbHidGetControllerName | USB EFI keyboard driver driver protocol function that returns the keyboard controller name.
UsbHidInit | HID EFI driver entry point
USBHIDInitialize | This function returns fills the host controller driver routine pointers in the structure provided
USBHub_DisablePort | This routine disables the hub port
USBHub_EnablePort | This routine enables the hub port
USBHub_GetPortStatus | This routine returns the hub port status
USBHub_ProcessHubData | This routine is called with USB hub status change report data
USBHub_ResetPort | This routine resets the hub port
UsbHubCearHubFeature
USBHubCheckDeviceType | This routine checks for hub type device from the interface data provided
UsbHubClearPortFeature
USBHUBConfigureDevice | This function checks an interface descriptor of a device to see if it describes a USB hub. If the device is a hub, then it is configured and initialized.
USBHubDisconnect | This routine disconnects the hub by disconnecting all the devices behind it
UsbHubGetErrorCount
UsbHubGetHubDescriptor
UsbHubGetHubStatus
UsbHubGetPortStatus
UsbHubResetPort
UsbHubSetHubDepth
UsbHubSetHubDescriptor
UsbHubSetHubFeature
UsbHubSetPortFeature
UsbHwSmiHandler | USB Hardware SMI handler.
USBInstallHwSmiHandler | This function registers USB hardware SMI callback function.
UsbInstallLegacyDevice | This function installs USB INT13 device
UsbInt13CtlDriverName | Retrieves a Unicode string that is the user readable name of the EFI Driver. Parameters: This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. Language - A pointer to a three character ISO 639-2 language identifier. This is the language of the driver name that that the caller is requesting, and it must match one of the languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. DriverName - A pointer to the Unicode string to return. This Unicode string is the name of the driver specified by This in the language specified by Language.
UsbInt13CtlGetControllerName | Retrieves a Unicode string that is the user readable name of the controller that is being managed by an EFI Driver. Parameters: This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. ControllerHandle - The handle of a controller that the driver specified by This is managing. This handle specifies the controller whose name is to be returned. ChildHandle - The handle of the child controller to retrieve the name of. This is an optional parameter that may be NULL. It will be NULL for device drivers. It will also be NULL for a bus drivers that wish to retrieve the name of the bus controller. It will not be NULL for a bus driver that wishes to retrieve the name of a child controller. Language - A pointer to a three character ISO 639-2 language identifier. This is the language of the controller name that that the caller is requesting, and it must match one of the languages specified in SupportedLanguages. The number of languages supported by a driver is up to the driver writer. ControllerName - A pointer to the Unicode string to return. This Unicode string is the name of the controller specified by ControllerHandle and ChildHandle in the language specified by Language from the point of view of the driver specified by This.
UsbInt13EntryPoint | USB INT13 driver entry point. Installs callback notification on gEfiUSBProtocolGuid installation.
UsbInterruptTransfer | This function executes an interrupt transaction on the USB.
UsbIntTimerCallBack
UsbIntTimerCallback
UsbIo2Dev | This function returns a pointer to USB device from UsbIo.
UsbIoAsyncIsochronousTransfer
UsbIoBulkTransfer
UsbIoControlTransfer
UsbIoGetConfigDescriptor
UsbIoGetDeviceDescriptor | Retrieves the USB Device Descriptor.
UsbIoGetEndpointDescriptor
UsbIoGetInterfaceDescriptor
UsbIoGetStringDescriptor
UsbIoGetSupportedLanguages
UsbIoIsochronousTransfer
UsbIoPortReset
UsbIoSyncInterruptTransfer
USBKB_CheckForExtendedKey | Checks whether the key pressed is a extended key
USBKB_CheckForNumericKeyPadKey | Checks whether the key pressed is from numeric key pad
USBKB_CheckModifierKeyPress | This routine checks whether any of the modifier keys, like shift, control or alternate keys, are pressed
USBKB_ConvertScanCodeBetweenCodeSet | Converts the set 2 scan code to set 3/1 scan code
USBKB_ConvertSet2CodeToSet1Code | Converts the set 2 scan code to set 1 scan code
USBKB_ConvertUSBKeyCodeToScanCodeSet2 | This routine converts the USB keycode into scan code set 2 scan code. Conversion is accomplished using a static table.
USBKB_DiscardCharacter | This routine discards the top character in the scan code buffer, keyboard status flag buffer and device ID buffer
USBKB_GenerateScanCode | This routine generates the make/break code for th key pressed depending on the make/break flag
USBKB_GenerateType1BreakCode | This routine generates the type 1 break code for the byte in the variable bSet2ScanCode
USBKB_GenerateType1MakeCode | This routine generates the type 1 make code for the byte in the variable bSet2ScanCode
USBKB_GenerateType2BreakCode | This routine generates the type 2 break code for the byte in the variable bSet2ScanCode
USBKB_GenerateType2MakeCode | This routine generates the type 2 make code for the byte in the variable bSet2ScanCode
USBKB_Int9 | This routine is called from when the new data from USB keyboard is transmitted and available for processing. The functionality is similar to legacy INT9 handler - data is converted into PS/2 ASCII/Scan codes and placed in BDA.
USBKB_LEDOn | This routine updates the keyboard LED status for all the USB keyboards present in the sytem
USBKB_Scanner | This routine converts the USB keyboard input data into IBM PC format scan code
USBKB_UpdateLEDState | This routine is used to update the LED state between the USB & PS/2 keyboard
USBKBC_CheckAutoRepeat | This routine will check the repeat counter and repeat rate and perform the auto repeat appropriately
USBKBC_CheckCharacterBufferFull | This routine checks whether the character buffer can hold 'N'+1 character
USBKBC_CheckCharacterBufferFull | This routine checks whether the character buffer can hold 'N'+1 character
USBKBC_GetAndStoreCCB | This routine will read the CCB from the keyboard controller and store it in a local variable
USBKBC_GetFromCharacterBuffer | This routine gets a character from the character buffer. Character buffer pointers are also updated
USBKBC_SendToCharacterBuffer | This routine puts a character into the character buffer. Character buffer pointers are also updated
USBKBC_SendToCharacterBuffer | This routine puts a character into the character buffer. Character buffer pointers are also updated
USBKBDConfigureKeyboard | This routine checks an interface descriptor of the USB device detected to see if it describes a HID/Boot/Keyboard device. If the device matches the above criteria, then the device is configured and initialized
USBKBDDisconnectDevice | This routine disconnects the keyboard by freeing the USB keyboard device table entry
USBKBDFindUSBKBDeviceTableEntry | This routine searches for the HID table entry which matches the provided device info structure
UsbKbdGetControllerName | USB EFI keyboard driver driver protocol function that returns the keyboard controller name.
USBKBDInitialize | This function returns fills the host controller driver routine pointers in the structure provided
USBKBDPeriodicInterruptHandler | This routine is called every 16ms and is used to send the characters read from USB keyboard to the keyboard controller for legacy operation. Also this function updates the keyboard LED status
USBKBDProcessKeyboardData | This routine is called with USB keyboard report data. This routine handles the translation of USB keyboard data into PS/2 keyboard data, and makes the PS/2 data available to software using ports 60/64h by communicating with PS/2 keyboard controller.
UsbKbdReadKeyStroke | Retrieves the key stroke from the keyboard buffer.
UsbKbdReadKeyStrokeEx | Retrieves the key stroke from the keyboard buffer.
UsbKbdRegisterKeyNotify | Installs a callback notification function on a key
UsbKbdReset | Reset USB keyboard
UsbKbdResetEx | Reset USB keyboard
UsbKbdSetLed | This routine set the USB keyboard LED status.
UsbKbdSetState | Set certain state for the input device. Paremeters: This - A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL_EX instance. KeyToggleState - Pointer to the EFI_KEY_TOGGLE_STATE to set the state for the input device.
UsbKbdWaitForKey | Checks if a key is pending, if so - signals the event.
USBKBKeyrepeatCallback | This routine is called every time the key repeat is requested
USBKeyCodeToEFIScanCode | Converts USB Keyboard code to EFI Scan Code
USBKeyRepeat | This function handles different key repeat related functions depending on the input
USBMassAPIAssignDriveNumber | This function is part of the USB BIOS MASS API. This function assigns the logical drive device according to the information of the mass storage device
USBMassAPICheckDevStatus | This function is part of the USB BIOS MASS API. This function invokes USB Mass Storage API handler to check whether device is ready. If called for the first time, this function retrieves the mass storage device geometry and fills the corresponding fpDevInfo fields.
USBMassAPICommandPassThru | This function is part of the USB BIOS MASS API. This function can be used to pass raw command/data sequence to the USB mass storage device
USBMassAPIFormatDevice | This function is part of the USB BIOS MASS API.
USBMassAPIGetDeviceGeometry | This function is part of the USB BIOS MASS API.
USBMassAPIGetDeviceInformation | This function is part of the USB BIOS MASS API. This function returns the device information of the mass storage device
USBMassAPIGetDevStatus | This function returns the drive status and media presence status
USBMassAPIReadDevice | This function is part of the USB BIOS MASS API.
USBMassAPIResetDevice | This function is part of the USB BIOS MASS API.
USBMassAPIVerifyDevice | This function is part of the USB BIOS MASS API.
USBMassAPIWriteDevice | This function is part of the USB BIOS MASS API.
USBMassBOTGetMaxLUN | This function gets the maximum logical unit number(LUN) supported by the device. It is zero based value.
USBMassCBIGetStatus | This function gets the status of the mass transaction through an interrupt transfer
USBMassCheckDeviceReady | This function makes sure the device is ready for next command
USBMassClearBulkEndpointStall | This function clears the bulk endpoint stall by sending CLEAR_FEATURE command to bulk endpoints
USBMassClearMassXactStruc | This function clears the mass transaction structure
USBMassCmdPassThru | This function issues the command/data sequence provided as input. This function can be used to send raw data to the USB mass storage device
USBMassCreateLogicalUnits | This function verifies the presence of logical units (LUN) in the USB mass device and creates appropriate device info structures for them
USBMassFindFreeMassDeviceInfo | This function finds a free mass device info structure and copies the current mass device info structure into it
USBMassGetConfiguration | This function sends get configuration command to the USB mass storage device
USBMassGetDeviceGeometry | This function fills and returns the mass get device geometry structure
USBMassGetDeviceInfo | This function fills and returns the mass get device info structure
USBMassGetDeviceParameters | This function gets the USB mass device parameters such as max cylinder, head, sector, block size and
USBMassGetDeviceStatus | Get USB MassStorage device status. Include Media Informarion. Refer to USB_MASS_MEDIA_XXX in USBDEF.H
USBMassGetFormatType | This function reads the first sector from the mass storage device and identifies the formatted type.
USBMassGetFreeMassDeviceInfoStruc | This function finds a free mass device info structure and returns the pointer to it
USBMassGetPhysicalDeviceType | This procedure classify USB mass storage devices according to inquiry command return data.
USBMassIdentifyDeviceType | This function identifies the type of the USB mass storage device attached from the INQUIRY data obtained from the drive
UsbMassInit | USB Mass storage driver entry point
USBMassIssueBOTTransaction | This function performs a mass storage transaction using bulk only transport (BOT) protocol.
USBMassIssueMassTransaction | This function performs a mass storage transaction by invoking proper transaction protocol.
USBMassReadCapacity | This function issues read capacity command to the mass device and returns the value obtained
USBMassReadCapacity10Command | This function issues read capacity of the mass storage
USBMassReadCapacity16Command | This function issues read capacity of the mass storage
USBMassReadFormatCapacity | This function sends read format capacity command to the USB mass storage device
USBMassReadSector | This function a sector at the LBA specified
USBMassRWVCommand | This function reads/writes/verifies blocks of data from the USB mass device specified by its device address
USBMassSetDefaultGeometry | This procedure set default geometry for mass storage devices.
USBMassSetDefaultType | This procedure set device type depend on device class.
UsbMassStart | Starts USB mass storage device
UsbMassStop | Stops USB mass storage device and removes BlkIo
UsbMassSupported | Verifies if usb mouse support can be installed on a device
USBMassUpdateCHSFromBootRecord | This function parses the boot record and extract the CHS information of the formatted media from the boot record. This routine checks for DOS & NTFS formats only
USBMassUpdateCylinderInfo | This procedure update cylinder parameter for device geometry. head and sector paramaters are required before invoke this function.
USBMassUpdateDeviceGeometry | This function updates the device geometry information
USBMassUpdateParamUsingModeSense | This function obtains the device geometry from the device using mode sense command and updates the global variables
USBMassUpdateParamUsingReadCapacity | This function obtains the device geometry from the device using read capacity command and updates the global variables
USBMassValidatePartitionTable | This procedure check whether partition table valid.
USBMiscIssueBulkTransfer | This function executes a bulk transaction on the USB. The transfer may be either DATA_IN or DATA_OUT packets containing data sent from the host to the device or vice-versa. This function wil not return until the request either completes successfully or completes with error (due to time out, etc.) Size of data can be upto 64K
USBMouse_GetFromMouseBuffer | This routine retrieves a byte from the mouse input buffer. Mouse input buffer pointers are also updated
USBMouse_SendToMouseBuffer | This routine puts a byte into the mouse input buffer. Mouse input buffer pointers are also updated
UsbMouseReset | This routine is a part of SimplePointerProtocol implementation; it resets USB mouse.
UsbMouseWaitForInput | Event notification function for SIMPLE_POINTER.WaitForInput event. Signal the event if there is input from mouse.
USBMSCheckForMouse | This routine checks for mouse type device from the interface data provided
USBMSConfigureDevice | This routine checks an interface descriptor of the USB device detected to see if it describes a HID/Boot/Mouse device. If the device matches the above criteria, then the device is configured and initialized
UsbMsInit | Initialize USB Mouse driver
USBMSInitialize | This routine is called once to initialize the USB mouse data area
USBMSProcessMouseData | This function is called at regular intervals with USB mouse report data. This function handles the translation of USB mouse data into PS/2 mouse data, and makes the PS/2 data available to software using ports 60/64 to communicate with a PS/2 mouse.
USBMSSendMouseData | This routine is called to send the mouse data to the KB controller
USBMSUpdateMouseInterface | This routine is called to enable or disable the mouse interface
USBParseKey | Retrieves a key character after parsing the raw data in keyboard buffer.
USBPort_InstallEventHandler | Purpose of this function is to install event handlers for different USB host controllers.
UsbPowerButtonSmiCallback | This function enter s5 callback if press power button.
UsbPrepareForLegacyOS | Callback on LEGACY_BOOT event
UsbResetAndReconfigDev
UsbRtStopController | This function stops the USB host controllers of a given Bus Dev Function
UsbS5SmiCallback | This function enter usb s5 callback.
USBSB_InstallSmiEventHandlers | This function is called from USBRT entry point inside SMM. Any SMI handlers registration related to USB driver can be done here.
USBSB_InstallUsbIntTimerHandler
USBSB_InstallXhciHwSmiHandler | This function registers XHCI hardware SMI callback function. Note: Currently EHCI, UHCI and OHCI drivers install their SMI handlers in the corresponding Start functions. In the future all code related to SMI registration can be moved here.
USBSB_PeriodicTimerCallBack | This function is registers periodic timer callbacks.
USBSB_UninstallTimerHandlers | This function unregisters all the periodic timer handles.
UsbSbEnablePme | The funciton enable usb PME
UsbScanner | This routine is executed to convert USB scan codes into PS/2 make/bread codes.
UsbSetupGetLegacySupport | Returns the status of "USB legacy support" question from Setup.
UsbSmiActivatePolling | Wrappers for calling USB HC driver USB polling functions
UsbSmiControlTransfer | Wrappers for calling USB HC driver USB transfer functions
UsbSmiCore | Bridge between DXE code and function in USB Core proc table which is inside our SMI code.
UsbSmiGetDescriptor | SW SMI to execute GetDescriptor transfer
UsbSmiGetRootHubStatus | Wrappers for calling USB HC driver functions in USBSMI service
UsbSmiHc | Bridge between DXE code and SMI function in USB HC driver.
UsbSmiReConfigDevice | Perform the device specific configuration
UsbSuspend | This function suspend USB
UsbSuspendDevices | This function suspends usb devices.
USBSWSMIHandler | Invoked on reads from SW SMI port with value USB_SWSMI. This function dispatches the USB Request Packets (URP) to the appropriate functions.
USBTrap_GetCurrentScanCodeSetNumber | Returns the current scan code set number
USBTrap_GetOverrunCode | Returns the overrun code depending on the current scan code set
UsbUninstallLegacyDevice | This function uninstalls USB INT13 device
USBWrap_GetDeviceCount | This routine searches through the device entry table and returns number of active USB devices configured by the BIOS.
USBWrap_GetnthDeviceInfoStructure | This routine finds the 'n'th device's DeviceInfo entry.
USBWrapGetATAError | This routine converts the sense data information into ATAPI error code

Table | Description
USBBadDeviceTable | This table contains list of vendor & device IDs of USB devices that are non-compliant. This is currently used only for USB mass storage devices but can be extended to other type of non-compliant devices also.
USBCCIDAPITable | This is the table of functions used by USB CCID API
USBMassAPITable | This is the table of functions used by USB Mass Storage API

Data Structure | Description
URP_STRUC | This structure is the URP structure
USB_BADDEV_STRUC | This structure is used to define a non-compliant USB device
USB_GLOBAL_DATA | USB Global Data Area structure
USB_SKIP_LIST | If your roothub port 4 insert a hub.You want to skip hub's port 2. Set bRootPort = 4, dRoutePath =2 If your roothub port 4 insert a hub1.And hub1 port 2 insert a hub2. You want to skip hub2's port 1. Set bRootPort = 4, dRoutePath =21

Built on 16:12:00 10/28/16


Functions in Alphabetical Order

V

Function | Description
VALID_DEVINFO | Checks if DEV_INFO is a valid connected device info Due to hot-plug a DEV_INFO can become invalid in the midle of configuration
ValidateDeviceName | This procedure check whether device return valid device name if no valid device name returned, assign default name for it
ValidateKeyRecord | Check for Record is present or Not Paremeters: KEY_WAITING_RECORD - *UsbKeyIn
VoltageSelection | Based on the dwFeatures register setting, power up CCID/ICC

Built on 16:12:00 10/28/16


Functions in Alphabetical Order

W

Function | Description
WordReadIO | This routine reads a Word from the specified IO address
WordWriteIO | This routine writes a word to the specified IO address
WordWritePCIConfig | This routine writes a byte value to the PCI configuration register space
WritePCIConfig | This function opens PCI configuration for a given register

Built on 16:12:00 10/28/16


Functions in Alphabetical Order

X

Function | Description
XHCI_ActivatePolling | This function activates the polling QH for the requested device. The device may be a USB keyboard or USB hub.
XHCI_AdvanceEnqueuePtr | This function advances returns the pointer to the current TRB and anvances dequeue pointer. If the advance pointer is Link TRB, then it: 1) activates Link TRB by updating its cycle bit, 2) updates dequeue pointer to the value pointed by Link TRB.
XHCI_BulkTransfer | This function executes a bulk transaction on the USB
XHCI_ClearEndpointState |
XHCI_ClearStalledEp | This function is called to restart endpoint. After Endpoint STALLs, it transitions from Halted to Stopped state. It is restored back to Running state by moving the endpoint ring dequeue pointer past the failed control transfer with a Set TR Dequeue Pointer. Then it is restarted by ringing the doorbell. Alternatively endpint is restarted using Configure Endpoint command.
XHCI_ControlTransfer | This function executes a device request command transaction on the USB. One setup packet is generated containing the device request parameters supplied by the caller. The setup packet may be followed by data in or data out packets containing data sent from the host to the device or vice-versa. This function will not return until the request either completes successfully or completes in error (due to time out, etc.)
XHCI_DeactivatePolling | This function de-activates the polling QH for the requested device. The device may be a USB keyboard or USB hub.
XHCI_DeinitDeviceData | This is an API function for removing device related information from HC. For xHCI this means: - execute DisableSlot commnand - clear all endpoint's transfer rings
XHCI_DisableInterrupts | This function disables the HC interrupts
XHCI_DisableKeyRepeat | This function disables the keyboard repeat rate logic
XHCI_DisableRootHub | This function disables the XHCI HC Root hub port.
XHCI_EnableEndpoints | This function parses the device descriptor data and enables the endpoints by 1)assigning the Transfer TRB and 2)executing ConfigureEndpoint command for the slot. Section 4.3.5.
XHCI_EnableInterrupts | This function enables the HC interrupts
XHCI_EnableKeyRepeat | This function disables the keyboard repeat rate logic
XHCI_EnableRootHub | This function enables the XHCI HC Root hub port.
XHCI_EnumeratePorts | This function enumerates the HC ports for devices.
XHCI_ExecuteCommand | This function places a given command in the Command Ring, rings HC doorbell, and waits for the command completion.
XHCI_FillHCDEntries | This function fills the host controller driver routine pointers.
XHCI_GetContextEntry | This function calculates and returns the pointer to a context entry for a given index.
XHCI_GetDeviceContext | This function calculates and returns the pointer to a device context for a given Slot.
XHCI_GetDevInfo | This function searches for DEV_INFO data pointer that belongs to a given XHCI device context.
XHCI_GetRootHubPort | This function returns a root hub number for a given device. If device is connected to the root through hub(s), it searches the parent's chain up to the root.
XHCI_GetRootHubStatus | This function returns the port connect status for the root hub port
XHCI_GetSlotId | This function calculates the slot ID out of a given DEV_INFO data pointer.
XHCI_GetTheDoorbell | This function calculates and returns the pointer to a doorbell for a given Slot.
XHCI_GetXfrRing | This routine calculates the address of the address ring of a particular Slot/Endpoint.
XHCI_GlobalSuspend | This function suspend the XHCI HC.
XHCI_InitDeviceData | This is an API function for early device initialization.
XHCI_InitRing | Transfer ring initialization. There is an option to create a Link TRB in the end of the ring.
XHCI_InitXfrRing | This function initializes transfer ring of given endpoint
XHCI_InterruptHandler | Hardware interrupt handler
XHCI_InterruptTransfer | This function executes an interrupt transaction on the USB. The data transfer direction is always DATA_IN. This function wil not return until the request either completes successfully or completes in error (due to time out, etc.)
XHCI_IsUsb3Port |
XHCI_Mmio64Write | HC may or may not support 64-bit writes to MMIO area. If it does, write Data directly, otherwise split into two DWORDs.
XHCI_ProcessInterrupt | This is the XHCI controller event handler. It walks through the Event Ring and executes the event associated code if needed. Updates the Event Ring Data Pointer in the xHC to let it know which events are completed.
XHCI_ProcessPortChanges | This function process root hub port changes.
XHCI_ProcessPortStsChgEvt |
XHCI_ProcessXferEvt | This function processes a transfer event and gives control to the device specific routines.
XHCI_ResetEndpoint | This function is called to reset endpoint.
XHCI_ResetPort | This function resets the XHCI HC Root hub port.
XHCI_ResetRootHub | This function resets the XHCI HC Root hub port.
XHCI_Start | This API function is called to start a XHCI host controller. The input to the routine is the pointer to the HC structure that defines this host controller. The procedure flow is followed as it is described in 4.2 of XHCI specification.
XHCI_Stop | This function stops the XHCI controller.
Xhci_TranslateInterval | This routine calculates the Interval field to be used in device's endpoint context. Interval is calculated using the following rules (Section 6.2.3.6): For SuperSpeed bulk and control endpoints, the Interval field shall not be used by the xHC. For all other endpoint types and speeds, system software shall translate the bInterval field in the USB Endpoint Descriptor to the appropriate value for this field. For high-speed and SuperSpeed Interrupt and Isoch endpoints the bInterval field the Endpoint Descriptor is computed as 125æs * 2^(bInterval-1), where bInterval = 1 to 16, therefore Interval = bInterval - 1. For low-speed Interrupt and full-speed Interrupt and Isoch endpoints the bInterval field declared by a Full or Low-speed device is computed as bInterval * 1ms., where bInterval = 1 to 255. For Full- and Low-speed devices software shall round the value of Endpoint Context Interval field down to the nearest base 2 multiple of bInterval * 8.
XHCI_UpdateEp0MaxPacket | This function verifies the MaxPacket size of the control pipe. If it does not match the one received as a part of GET_DESCRIPTOR, then this function updates the MaxPacket data in DeviceContext and HC is notified via EvaluateContext command.
XHCI_WaitForEvent | This function walks through the active TRBs in the event ring and looks for the command TRB to be complete. If found, returns SlotId and CompletionCode from the completed event TRB. In the end it processes the event ring, adjusting its Dequeue Pointer.
XhciAddressDevice |
XhciAllocateScratchpadBuffers | This function allocates XHCI scratchpad buffers. Data initialization will be done later, in SMI XhciStart function.
XhciExtCapParser |
XhciExtCapParser |
xhciHWSMIHandler | USB Hardware SMI handler.
XhciInitMemory | This function allocates XHCI memory buffers. Data initialization will be done later, in SMI XhciStart function. These are the memory blocks: 1. DCBAAP + ScrPadBuf pointers + InpCtx + ERST <-- 8KB 2. CommandRing <-- 1KB 3. EventRing <-- 1KB 4. XferRings <-- 1KB*MaxSlots, 1KB = 32EP per slot times 32 (padded size of TRB_RING) 4. N*sizeof(XHCI_DEVICE_CONTEXT) for device context segment <-- N KB or 2*N KB, N is SlotNumber from CONFIG register 5. TransferRings <-- MaxSlots*32*1KB
XhciRingDoorbell |

Built on 16:12:00 10/28/16


General Information

Header | Description
INCMPT_FLAGS | This equates are used to describe the incompatible USB mass storage devices. The bits defined are: BIT Description ============================================================= 0 1, indicates this device does not support mode sense command 1 1, indicates that this is a single LUN device (even though it is reporting as multiple LUN) 2 1, indicates that this device should be disabled 3 1, indicates this device does not support test unit ready command 4 1, indicates this device responds with wrong BOT status value 5 1, indicates that this device does not support start unit command 6 1, indicates that this device does not support read format capacity command 7 1, indicates that this hispeed device has to be in full speed always 8 1, indicates that this hispeed device has to be in hispeed always

Built on 16:12:02 10/28/16


AMIUSB – Unit Test Procedures

1. Platform Information

Test Date | 21041118
BIOS Core | 4.6.5.5
BIOS Project Name & ROMID | 1ARYX 0.16 X64
M/B | Intel SHB DT REFRESH CRB FAB2
CPU | Intel Core i7-4800MQ CPU 2.70GHz
Chipset | HaswellRefresh
USB eModule Version | 4.6.3_USB_08.10.32
KBC Emulation eModule Version | 4.6.3-KbcEmulation-018
AmiDebugRx eModule Version | 4.6.2_AMIDebugRx_2.04.0074
SCT Version | UEFI2.3.1C
USB Hosts (Include SB internal) USB Devices List | EHCI, XHCI
OS | MS-DOS, Windows 7, Windows 8.1, RHEL 7.0

2. Test USB Devices

Below are the USB device types and the test category. The categories of the USB devices not listed below are all optional. If the device you intend to test with not belonging to any one below, create it and list it in this section, Like USB Video.

Device Types | M/O | Comments (Vendor / MN)
USB 1.x Keyboard | M | Microsoft Wired Keyboard 200
USB 1.x Mouse | M | ASUS MOBTUO
USB 2.0 Flash Drive | M | Kingston DTI/2GB
USB 2.0 Hub | M | BELKIN
USB 3.0 Hub | M | Evolution, ET12U310-LQFP80-DEMO Board_EVB
USB 3.0 ODD Drive | M | Buffalo BR3D-12U3
USB 3.0 HDD | M | WD My Book Essential
USB 3.0 Flash Drive | M | 1. Buffalo 16GB, RUF3-S16GS-BK 2. DT Ultimate G2, 16GB
AmiDebugRx | M | AmiDebugRx

Table #1, USB devices

M/O: ‘M’ means the device must be tested, ‘O’ is optional.

3. Initialization

3.1 Identify the USB hosts and type

Check the available USB controllers and their types (UHCI, OHCI, EHCI or XHCI) onboard.

This information can be acquired through Windows device manager or UsbView.exe.

3.2 Identify available USB connectors

Find the available USB connectors for connecting USB devices. Some M/B have the HW pin headers which provide the extension of USB connectors. Suggest test all of them.

Attach the snapshot of USB connectors and tag them.

4. Test items

Describe the USB device topology whenever you perform below tests.

Test ID | Test Summary | Procedure | Result
USB-000001 | USB Device Function | Device is functional in BIOS setup | Pass
USB-000002 | USB Device Function | Device is functional in DOS | Pass
USB-000003 | USB Device Function | Device is functional in UEFI Win8.1 | Pass
USB-000004 | USB Device Function | Device is functional in EFI Shell | Pass
USB-000005 | USB Device Function | Device function with chained USB hubs (5 levels) | Pass
USB-000101 | USB Device Hotpluggability | Device hotplug functional in BIOS setup. | Pass
USB-000102 | USB Device Hotpluggability | Device hotplug functional in BIOS setup. | Pass
USB-000103 | USB Device Hotpluggability | Device hotplug functional in DOS | Pass
USB-000104 | USB Device Hotpluggability | Device hotplug functional in DOS | Pass
USB-000105 | USB Device Hotpluggability | Device hotplug functional in UEFI Win8.1 | Pass
USB-000106 | USB Device Hotpluggability | Device hotplug functional in UEFI Win8.1 | Pass
USB-000202 | OS Installation | Install Win7 with USB device attached. | Pass
USB-000203 | OS Installation | Install UEFI Win8.1 with USB device attached. | Pass
USB-000205 | OS Installation | Install RHEL 7.0 with USB device attached. | Pass
USB-000301 | System Stress Test | Periodical DOS rebooting. | Pass
USB-000302 | System Stress Test | Periodical DOS Power Cycle test. | Pass
USB-000303 | System Stress Test | Periodical UEFI Win8.1 rebooting. | Pass
USB-000304 | System Stress Test | Periodical UEFI Win8.1 Power Cycle test. | Pass
USB-000401 | UEFI SCT Test | USB2 Host Controller Protocol Test. | Pass
USB-000402 | UEFI SCT Test | USB IO Protocol Test. | Pass
USB-000501 | Relative Function Test | KbcEmulation function with Kbc | Pass
USB-000502 | Relative Function Test | AmiDebugRx function | Pass

Table #2, Test Result

Target Device | USB-000001 | USB-000002 | USB-000003 | USB-000004 | USB-000005 | USB-000101 | USB-000102 | USB-000103 | USB-000104 | USB-000105 | USB-000106
USB 1.x Keyboard | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass
USB 1.x Mouse | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass
USB 2.0 Flash Drive | Pass | Pass | Pass | Pass | Pass | Pass | Pass | N/A | Pass | Pass | Pass
USB 2.0 Hub | Pass | Pass | Pass | Pass | N/A | Pass | Pass | Pass | Pass | Pass | Pass
USB 3.0 Hub | Pass | Pass | Pass | Pass | N/A | Pass | Pass | Pass | Pass | Pass | Pass
USB 3.0 ODD Drive | Pass | N/A | Pass | Pass | N/A | Pass | Pass | N/A | N/A | Pass | Pass
USB 3.0 HDD | Pass | Pass | Pass | Pass | N/A | Pass | Pass | N/A | Pass | Pass | Pass
USB 3.0 Flash Drive | Pass | Pass | Pass | Pass | Pass | Pass | Pass | N/A | Pass | Pass | Pass

Table #3, Test Result for USB devices individually.


AMIUSB – Unit Test Procedures

1. Platform Information

Test Date | 2014/12/13
BIOS Core | 4.6.5.5
BIOS Project Name & ROMID | 1ARYX 0.16 x64
M/B | Intel SHB DT REFRESH CRB FAB2
CPU | Intel Core i7-4500 CPU 2.70GHz
Chipset | HaswellRefresh
USB eModule Version | 4.6.3_USB_08.10.33
KBC Emulation eModule Version | 4.6.3-KbcEmulation-018
AmiDebugRx eModule Version | 4.6.2_AMIDebugRx_2.04.0074
SCT Version | 2.3.1C
USB Hosts (Include SB internal) USB Devices List | EHCI, XHCI
OS | 1. Windows 7 Ultimate SP1 2. Windows 8.1 Enterprise Build 9600 3. RHEL 7.0

2. Test USB Devices

Below are the USB device types and the test category. The categories of the USB devices not listed below are all optional. If the device you intend to test with not belonging to any one below, create it and list it in this section, Like USB Video.

Device Types | M/O | Comments (Vendor / MN)
USB 1.x Keyboard | M | Microsoft Wired Keyboard 200
USB 1.x Mouse | M | ASUS MOBTUO
USB 2.0 Flash Drive | M | Kingston DTI/2GB
USB 2.0 Hub | M | BELKIN
USB 3.0 Hub | M | Evolution, ET12U310-LQFP80-DEMO Board_EVB
USB 3.0 ODD Drive | M | NU, EBC113
USB 3.0 HDD | M | WD My Book Essential
USB 3.0 Flash Drive | M | DT Ultimate G2, 16GB
AmiDebugRx | M | AmiDebugRx

Table #1, USB devices

M/O: ‘M’ means the device must be tested, ‘O’ is optional.

3. Initialization

3.1 Identify the USB hosts and type

Check the available USB controllers and their types (UHCI, OHCI, EHCI or XHCI) onboard.

This information can be acquired through Windows device manager or UsbView.exe.

3.2 Identify available USB connectors

Find the available USB connectors for connecting USB devices. Some M/B have the HW pin headers which provide the extension of USB connectors. Suggest test all of them.

Attach the snapshot of USB connectors and tag them.

4. Test items

Describe the USB device topology whenever you perform below tests.

Test ID | Test Summary | Procedure | Result
USB-000001 | USB Device Function | Device is functional in BIOS setup | Pass
USB-000002 | USB Device Function | Device is functional in DOS | Pass
USB-000003 | USB Device Function | Device is functional in UEFI Win8.1 | Pass
USB-000004 | USB Device Function | Device is functional in EFI Shell | Pass
USB-000005 | USB Device Function | Device function with chained USB hubs (5 levels) | Pass
USB-000101 | USB Device Hotpluggability | Device hotplug functional in BIOS setup. | Pass
USB-000102 | USB Device Hotpluggability | Device hotplug functional in BIOS setup. | Pass
USB-000103 | USB Device Hotpluggability | Device hotplug functional in DOS | Pass
USB-000104 | USB Device Hotpluggability | Device hotplug functional in DOS | Pass
USB-000105 | USB Device Hotpluggability | Device hotplug functional in UEFI Win8.1 | Pass
USB-000106 | USB Device Hotpluggability | Device hotplug functional in UEFI Win8.1 | Pass
USB-000202 | OS Installation | Install Win7 with USB device attached. | Pass
USB-000203 | OS Installation | Install UEFI Win8.1 with USB device attached. | Pass
USB-000205 | OS Installation | Install RHEL 7.0 with USB device attached. | Pass
USB-000301 | System Stress Test | Periodical DOS rebooting. | Pass
USB-000302 | System Stress Test | Periodical DOS Power Cycle test. | Pass
USB-000303 | System Stress Test | Periodical UEFI Win8.1 rebooting. | Pass
USB-000304 | System Stress Test | Periodical UEFI Win8.1 Power Cycle test. | Pass
USB-000401 | UEFI SCT Test | USB2 Host Controller Protocol Test. | Pass
USB-000402 | UEFI SCT Test | USB IO Protocol Test. | Pass
USB-000501 | Relative Function Test | KbcEmulation function with Kbc | Pass
USB-000502 | Relative Function Test | AmiDebugRx function | Pass

Table #2, Test Result

Target Device | USB-000001 | USB-000002 | USB-000003 | USB-000004 | USB-000005 | USB-000101 | USB-000102 | USB-000103 | USB-000104 | USB-000105 | USB-000106
USB 1.x Keyboard | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass
USB 1.x Mouse | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass
USB 2.0 Flash Drive | Pass | Pass | Pass | Pass | Pass | Pass | Pass | N/A | Pass | Pass | Pass
USB 2.0 Hub | Pass | Pass | Pass | Pass | N/A | Pass | Pass | Pass | Pass | Pass | Pass
USB 3.0 Hub | Pass | Pass | Pass | Pass | N/A | Pass | Pass | Pass | Pass | Pass | Pass
USB 3.0 ODD Drive | Pass | N/A | Pass | Pass | N/A | Pass | Pass | N/A | N/A | Pass | Pass
USB 3.0 HDD | Pass | Pass | Pass | Pass | N/A | Pass | Pass | N/A | Pass | Pass | Pass
USB 3.0 Flash Drive | Pass | Pass | Pass | Pass | Pass | Pass | Pass | N/A | Pass | Pass | Pass

Table #3, Test Result for USB devices individually.


AMIUSB – Unit Test Procedures

1. Platform Information

Test Date | 2015/09/16
BIOS Core | 4.6.5.5
BIOS Project Name & ROMID | 1ARYX 0.23 x64
M/B | Intel SHB DT REFRESH CRB FAB2
CPU | Intel Core i5-4690K CPU 3.50GHz
Chipset | HaswellRefresh
USB eModule Version | (INT)b_4.6.3_USB_08.10.34
KBC Emulation eModule Version | 4.6.3-KbcEmulation-020
AmiDebugRx eModule Version | 4.6.2_AMIDebugRx_2.04.0074
SCT Version | UEFI2.3.1C
USB Hosts (Include SB internal) USB Devices List | EHCI, XHCI
OS | 1. Windows 7 Ultimate SP1 2. Windows 8.1 Enterprise Build 9600 3. RHEL 7.0 4. MS-DOS

2. Test USB Devices

Below are the USB device types and the test category. The categories of the USB devices not listed below are all optional. If the device you intend to test with not belonging to any one below, create it and list it in this section, Like USB Video.

Device Types | M/O | Comments (Vendor / MN)
USB 1.x Keyboard | M | Microsoft Wired Keyboard 200
USB 1.x Mouse | M | ASUS MOBTUO
USB 2.0 Flash Drive | M | Sony Storage Media 011, 32GB
USB 2.0 Hub | M | i-rocks IR-4661
USB 3.0 Hub | M | J2C USB3.0 Ultra-Slim Hub
USB 3.0 ODD Drive | M | PIONEER, BDR-XS05T
USB 3.0 HDD | M | WD My Book Essential
USB 3.0 Flash Drive | M | Transcend, Jetflash, 16GB
AmiDebugRx | M | AmiDebugRx

Table #1, USB devices

M/O: ‘M’ means the device must be tested, ‘O’ is optional.

3. Initialization

3.1 Identify the USB hosts and type

Check the available USB controllers and their types (UHCI, OHCI, EHCI or XHCI) onboard.

This information can be acquired through Windows device manager or UsbView.exe.

3.2 Identify available USB connectors

Find the available USB connectors for connecting USB devices. Some M/B have the HW pin headers which provide the extension of USB connectors. Suggest test all of them.

Attach the snapshot of USB connectors and tag them.

4. Test items

Describe the USB device topology whenever you perform below tests.

Test ID | Test Summary | Procedure | Result
USB-000001 | USB Device Function | Device is functional in BIOS setup | Pass
USB-000002 | USB Device Function | Device is functional in DOS | Pass
USB-000003 | USB Device Function | Device is functional in UEFI Win8.1 | Pass
USB-000004 | USB Device Function | Device is functional in EFI Shell | Pass
USB-000005 | USB Device Function | Device function with chained USB hubs (5 levels) | Pass
USB-000101 | USB Device Hotpluggability | Device hotplug functional in BIOS setup. (without connecting USB device) | Pass Note1
USB-000102 | USB Device Hotpluggability | Device hotplug functional in BIOS setup. | Pass
USB-000103 | USB Device Hotpluggability | Device hotplug functional in DOS | Pass
USB-000104 | USB Device Hotpluggability | Device hotplug functional in DOS | Pass
USB-000105 | USB Device Hotpluggability | Device hotplug functional in UEFI Win8.1 | Pass
USB-000106 | USB Device Hotpluggability | Device hotplug functional in UEFI Win8.1 | Pass
USB-000202 | OS Installation | Install Win7 with USB device attached. | Pass
USB-000203 | OS Installation | Install UEFI Win8.1 with USB device attached. | Pass
USB-000205 | OS Installation | Install RHEL 7.0 with USB device attached. | Pass
USB-000301 | System Stress Test | Periodical DOS rebooting. | Pass
USB-000302 | System Stress Test | Periodical DOS Power Cycle test. | Pass
USB-000303 | System Stress Test | Periodical UEFI Win8.1 rebooting. | Pass
USB-000304 | System Stress Test | Periodical UEFI Win8.1 Power Cycle test. | Pass
USB-000401 | UEFI SCT Test | USB2 Host Controller Protocol Test. | Pass
USB-000402 | UEFI SCT Test | USB IO Protocol Test. | Pass
USB-000501 | Relative Function Test | KbcEmulation function with Kbc | Pass
USB-000502 | Relative Function Test | AmiDebugRx function | Pass

Table #2, Test Result

Target Device | USB-000001 | USB-000002 | USB-000003 | USB-000004 | USB-000005 | USB-000101 | USB-000102 | USB-000103 | USB-000104 | USB-000105 | USB-000106
USB 1.x Keyboard | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass
USB 1.x Mouse | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass | Pass
USB 2.0 Flash Drive | Pass | Pass | Pass | Pass | Pass | Pass | Pass | N/A | Pass | Pass | Pass
USB 2.0 Hub | Pass | Pass | Pass | Pass | N/A | Pass | Pass | Pass | Pass | Pass | Pass
USB 3.0 Hub | Pass | Pass | Pass | Pass | N/A | Pass | Pass | Pass | Pass | Pass | Pass
USB 3.0 ODD Drive | Pass | N/A | Pass | Pass | N/A | Pass | Pass | N/A | N/A | Pass | Pass
USB 3.0 HDD | Pass | Pass | Pass | Pass | N/A | Pass | Pass | N/A | Pass | Pass | Pass
USB 3.0 Flash Drive | Pass | Pass | Pass | Pass | Pass | Pass | Pass | N/A | Pass | Pass | Pass

Table #3, Test Result for USB devices individually.

5. Note:

01. The SUT hasn’t PS/2 connector,
So, Use USB keyboard enter SETUP.


Release History - NDA Required

Release History:
4.6.3_USB_08.10.20
New features added in this label:
FEATURE ITEM
-EIP83361 - Added "USB 2.0 Controller Mode" setup item.
-EIP74685 - Add a token "USB_BAD_DEVICES" that is used to list the bad devices for OEM.
-EIP82875 - Support start/stop individual USB host to avoid reconnect issues.
-EIP86793 - Add the SDL token "USB_MASS_EMULATION_FOR_NO_MEDIA" for determine the USB mass storage device emulation type without media.
-EIP83117 - Extend the Support to different smart card Readers and smart Cards.
General Bug Fixes:
-EIP90797 - Fix keyboard buffer transfer error.
-EIP89608 - Barcode reader does not scan line-word.
-EIP88049 - Keyboard LED status is synchronised when it is plugged out and in.
-EIP83888 - Can not catch F8 key event on Keyboard.
-EIP81057 - Stall after RAID BIOS.
-EIP88240 - Disconnect and Connect USB Mass Driver will cause system hang up.
-EIP86125 - Clear the flag "USB_MASS_MEDIA_CHANGED" when the sensekey is 0.
-EIP83295 - System will hang at B2 when do S3/S4 long run test or DOS reboot test.
-EIP84336 - When insert the touch board, it will block the function of rear USB ports.
-EIP86001 - Free the chunk of memory allocated using the USBMem_Alloc call when we didn't use it.
-EIP84264 - After updating usb module, system will hang at BIOS LOGO display.
-EIP81063 - System hangs at OS logo if setup item "xHCI Hand off" is disabled.
-EIP84215 - Update the DataSync in LUN0 DevInfo if it is a multi-lun device.
-EIP82772 - Usb Keyboard works even if the SimpleTextin uninstalled for the UsbKeyboard.
-EIP83895 - Null-pointer dereference if installation of USBINT13 Legacy BIN fails.
EIP addressed in this label:
-EIP90154 - Remove the USBSB_EnableSmmPeriodicSmi and USBSB_DisableSmmPeriodicSmi hooks.
-EIP90797 - Fix keyboard buffer transfer error.
-EIP89641 - USB Keyboard driver overwrites INT0 vector (address 0:0).
-EIP89608 - Barcode reader does not scan line-word.
-EIP88049 - Keyboard LED status is synchronised when it is plugged out and in.
-EIP83361 - Added "USB 2.0 Controller Mode" setup item.
-EIP74685 - Add a token "USB_BAD_DEVICES" that is used to list the bad devices for OEM.
-EIP87959 - Proper Error path in the USB driver, incase KBC Input buffer is full.
-EIP82875 - Support start/stop individual USB host to avoid reconnect issues.
-EIP86793 - Add the SDL token "USB_MASS_EMULATION_FOR_NO_MEDIA" for determine the USB mass storage device emulation type without media.
-EIP89307 - Modify incorrect #pragma pack directive.
-EIP84455 - Implement usb hid device gencric.
-EIP83888 - Can not catch F8 key event on Keyboard.
-EIP81057 - Stall after RAID BIOS.
-EIP81761 - Determine the limit of devices after checking whether this device is reconnected.
-EIP81612 - Add EFI_USB_SPEED_SUPER in EFI_USB2_HC_PROTOCOL according to UEFI 2.3.1 spec.
-EIP77526 - BBS is not correct to detect BMC's USB virtual device.
-EIP88240 - Disconnect and Connect USB Mass Driver will cause system hang up.
-EIP84684 - Access SD Card In Auto Mode Test Fail - 1APUY012 BQA (F1).
-EIP83321 - System hangs at checkpoint 0xBd with specific USB key.
-EIP86125 - Clear the flag ioUSB_MASS_MEDIA_CHANGED when the sensekey is 0.
-EIP83295 - System will hang at B2 when do S3/S4 long run test or DOS reboot test.
-EIP83117 - Extend the Support to different smart card Readers and smart Cards.
-EIP89279 - Add check totalcount condition.
-EIP84336 - When insert the touch board, it will block the function of rear USB ports.
-EIP86001 - Free the chunk of memory allocated using the USBMem_Alloc call when we didn't use it.
-EIP84264 - After updating usb module, system will hang at BIOS LOGO display.
-EIP81983 - Setup menu no response after update N-trig firmware.
-EIP88085 - Added 1 ms delay after port reset completed.
-EIP84790 - USB IO PROTOCOL under XHCI issue.
-EIP82307 - Port routing route to EHCI when EHCI initialization.
-EIP67630 - With the SCAN code matching , attribute also needs to be matched in AMIUSB driver for the Keymon support.
-EIP91153 - Added 5 ms after controller reset for AMD xHC.
-EIP84325 - Remove HCRST in XHCI_Stop.
-EIP85348 - Write the cycle bit of a TRB last to avoid race condition.
-EIP85254 - Stops the endpoint if transfer timeout occurred.
-EIP81063 - System hangs at OS logo if setup item "xHCI Hand off" is disabled.
-EIP73182 - Added Babble Error check in XHCI_ProcessXferEvt.
-EIP84215 - Update the DataSync in LUN0 DevInfo if it is a multi-lun device.
-EIP79221 - Add get serial number and product string descriptor.
-EIP85918 - Change the reset type of Ctrl+Alt+Del to EfiResetWarm.
-EIP85747 - USB-ReadKeyStrokeEx is returning EFI_SUCCESS with KEY_STATE_EXPOSED for Caps, Num and Scroll Lock Key's. KEY_STATE_EXPOSED only for the ShiftState Key's and not for togglestate key's.
-EIP87058 - Not able to recognise Pause Key Click using ReadKeyStroke.
-EIP81563 - Press SHIFT key will result in the ReadKeyStroke return unexpected ScanCode and UnicodeChar.
-EIP82772 - Usb Keyboard works even if the SimpleTextin uninstalled for the UsbKeyboard.
-EIP89212 - Build process stopped with EIP83614 change.
-EIP83614 - Manufacturing mode fixes.
-EIP83895 - Null-pointer dereference if installation of USBINT13 Legacy BIN fails.
Files changed for EIP fixes:
-usb.sdl
-usbport.c
-rt\amiusb.c
-rt\usbkbd.c
-rt\uhci.c
-rt\usb.c
-rt\usbhub.c
-rt\usbmass.c
-rt\usbCCID.c
-rt\usbms.c
-rt\usbhid.c
-rt\usbpoint.c
-rt\uhci.h
-rt\usbkbd.h
-rt\ehci.c
-rt\ehci.h
-rt\ohci.c
-rt\ohci.h
-rt\syskbc.c
-rt\sysnokbc.c
-rt\xhci.h
-rt\xhci.c
-uhcd.c
-amiusbhc.c
-usbbus.c
-efiusbkb.c
-efiusbkb.h
-usbsrc.sdl
-usbbus.h
-efiusbmass.c
-efiusbccid.c
-efiusbhid.c
-usbmisc.c
-uhcd.h
-rt\usbdef.h
-rt\amidef.h
-rt\amiusb.h
-rt\amiusbrtCCID.h
-include\Protocol\UsbIo.h
-include\Protocol\UsbPolicy.h
-include\Protocol\AmiUsbCCID.h
-setup\usb.uni
-setup\usb.sd
-int13\UsbInt13.c
-usbsb.c
Known issues and limitations in this label:
None
Remaining Issues:
None
Unit Testing:
The test report will provide upon request.
Validation Testing:
See the Unit Testing
4.6.3_USB_08.10.20
New features added in this label:
FEATURE ITEM
-EIP62737 - Added USB Device number into USB mass device name string based on SDL Token.
-EIP47348 - Support for USB Port Reset function.
-EIP80382 - Add the SDL token "USB_MASS_EMULATION_BY_SIZE" for determine the USB mass storage device emulation type by size only.
General Bug Fixes:
-EIP81132 - Add core version check for EIP80609 solution.
-EIP80609 - If to enable debug mode and set launch CSM is "Never" in setup, system will hang at 0xB1
-EIP81030 - System hangs randomly at POST.
-EIP71067 - SMI Timeout with USB FD and USB Flash Memory.
-EIP72505 - Clear the legacy USB keyboard buffer when switching between EFI and legacy.
-EIP78861 - Some device will be disconnected after port.
-EIP80173 - Cando touch screen cannot work.
-EIP79323 - Touch Screen cannot work smoothly.
-EIP75430 - USB3.0 Boot Disk can't boot from Fresco USB3.0 Port.
EIP addressed in this label:
-EIP74609 - Add check oemskiplist at check port change.
-EIP77936 - Chang set_idle command timeout to 1sec.
-EIP76208 - Added 20 ms after warm port reset for Etron EJ168A.
-EIP78477 - Increase the the time out value of Address Device Command to 2 sec, and wait the Command Aborted event when aborting the command.
Files changed for EIP fixes:
-Int13\UsbInt13.c (EIP62737)
-Int13\UsbInt13.h (EIP62737)
-RT\amiusb.c (EIP81132, EIP80609, EIP47348)
-RT\amiusb.h (EIP47348)
-RT\ehci.c (EIP81030, EIP71067)
-RT\syskbc.c (EIP72505)
-RT\usb.c (EIP47348, EIP78861, EIP74609)
-RT\usbdef.h (EIP80382)
-RT\usbkbd.c (EIP72505, EIP77936)
-RT\usbmass.c (EIP80382, EIP47348, EIP62737)
-RT\usbpoint.c (EIP80173, EIP79323)
-RT\usbrt.mak (EIP81132, EIP80609)
-RT\xhci.c (EIP75430, EIP76208, EIP78477)
-RT\xhci.h (EIP78477, EIP76208)
-AmiUsbHc.c (EIP47348)
-efiusbhid.c (EIP77537)
-efiusbkb.c (EIP77537)
-efiusbkb.h (EIP77537)
-efiusbmass.c (EIP73939)
-uhcd.c (EIP80382, EIP72505)
-usbbus.c (EIP47348, EIP62737)
-usbbus.h (EIP47348)
-usbsrc.sdl (EIP)
-Include\Protocol\AmiUsbController.h (EIP80609, EIP74609)
-usb.sdl (EIP62737)
-usbport.c (EIP80382, EIP62737, EIP74609)
-usbsb.c (EIP81132, EIP80609)
Known issues and limitations in this label:
For USB legacy shutdown in ACPI enable call workaround (required for non XHCI aware OSs), ACPI mode enable protocol is required. The projects which don’t have this protocol support may have issue in OS boot and the dependency in AMIUSB.DXS should be removed.
Remaining Issues:
None
Unit Testing:
The test report will provide upon request.
Validation Testing:
See the Unit Testing
4.6.3_USB_08.10.18
New features added in this label:
FEATURE ITEM
-EIP70214 - USB devices will be reported as BBS_USB devices if BBS_USB_DEVICE_TYPE_SUPPORT is enabled.
-EIP74876 - Add USB API for shutdown single USB controller.
-EIP70094 - Microsoft CSM Opt-out feature implementation.
-EIP64781 - Add SDL token, SKIP_CARD_READER_CONNECT_BEEP_IF_NO_MEDIA that skip the connect beep if no media present in USB card reader.
-EIP71750 - Support extra USB device driver hook by eLink.
-EIP63054 - Add warning to ReadKeyStrokeEx for partial key press.
General Bug Fixes:
-EIP77685 - USB mass storage can't work after unplug/plug under DOS.
-EIP66064 - System hangs when waiting for finger swipe.
-EIP67230 - Ntrig touch panel can not use on CedarTrail.
-EIP75266 - There aare garbage characters if press arrow key for a while.
-EIP65344 - Razer mouse will hang in POST.
-EIP69580 - NumLock is not working fine when pressed, while booting to WindowsXP in a KBC present patform.
-EIP75441 - System hang at 0xB4 after restart from Win7.
-EIP73803 - The mouse can't work under setup after hot-plug.
-EIP70933 - System hangs at checkpoint 0x90 when webcam plugged.
-EIP67832 - When ICC (SmartCard) is unplugged and inserted again, it is not detected.
-EIP71068 - ThermalTake mouse is not working.
-EIP67400 - Microsoft wireless media desktop 1000 can't work normal.
-EIP73685 - Ducky keyboard can not work.
-EIP71262 - Sanyo ICR-PS401RM cause system hang at checkpoint 0xB4.
-EIP77602 - In ChiefRiver platform, ViPower 3.0 hub can;t be detected on BIOS.
-EIP71962 - USB 3.0 HDD can't be dectected after warmreset.
-EIP69250 - USB driver doesn't pass SCT 2.3 ComponentName2 protocol.
-EIP71108 - The token of 'REMOVE_USB_STORAGE_IF_NO_MEDIA' can't work normal.
-EIP76140 - List of USB devices in setup is incorrect.
EIP addressed in this label:
-EIP73024 - Initial the variable value.
-EIP69136 - Remove the dependency of EBDA in USB module for CSM disabling.
-EIP73692 - Implement the ownership change mechanism for PCH.
-EIP66198 - Add Mouse wheel support in PS2 and USB drivers.
-EIP63706 - Filter out the character if it is invisble.
-EIP70814 - Read a block size each time to avoid out of memory.
-EIP75015 - Report button status directly.
-EIP73020 - Initialize the variable 'IsHub'.
-EIP71961 - Clear all status change bit in XHCI_GetRootHubStatus.
-EIP70315 - Removed slot number in the USB CCID API's.
-EIP77121 - Check added to skip PCI interface type 0xFE, it is not USB controller.
Files changed for EIP fixes:
-Int13\UsbInt13.c (EIP73024, EIP70214)
-PROTOCOL\AmiUsbController.h (EIP74876)
-RT\amidef.h (EIP63188)
-RT\amiusb.c (EIP77768, EIP74876, EIP63188, EIP70094, EIP69136, EIP66064)
-RT\amiusb.h (EIP74876)
-RT\ehci.c (EIP73692, EIP63188)
-RT\ohci.c (EIP63188, EIP67230)
-RT\syskbc.c (EIP75266, EIP65344)
-RT\sysnokbc.c (EIP69580)
-RT\uhci.c (EIP63188, EIP67230)
-RT\usb.c (EIP75441, EIP73803, EIP74876, EIP64781, EIP71750, EIP70933)
-RT\usbCCID.c (EIP67832)
-RT\usbdef.h (EIP73692, EIP74876, EIP63188, EIP64781, EIP70933, EIP65344, EIP66198)
-RT\usbhid.c (EIP71068, EIP67400, EIP65344, EIP67230)
-RT\usbkbd.c (EIP73685, EIP67400)
-RT\usbmass.c (EIP71262, EIP63706, EIP64781, EIP70814)
-RT\usbms.c (EIP67400, EIP66198)
-RT\usbpoint.c (EIP75015)
-RT\usbrt.mak (EIP71750)
-RT\xhci.c (EIP77602, EIP73020, EIP63188, EIP71962, EIP71961)
-AmiUsbHc.c (EIP66064)
-Componentname.c (EIP69250)
-efiusbccid.c (EIP69250, EIP70315)
-efiusbhid.c (EIP69250, EIP63054)
-efiusbkb.c (EIP63054)
-efiusbkb.h (EIP63054)
-efiusbmass.c (EIP71108)
-efiusbms.c (EIP66198)
-efiusbpoint.c (EIP74509)
-uhcd.c (EIP76140, EIP77121, EIP74876, EIP63188, EIP64781, EIP70094, EIP71750, EIP69136)
-uhcd.h (EIP77121, EIP74876, EIP63188)
-uhcd.mak (EIP71750)
-usb.sdl (EIP71750)
-usbmisc.c (EIP63188)
-usbport.c (EIP75441, EIP70094, EIP64781, EIP69136, EIP66064)
-usbsb.c (EIP63188, EIP69136)
-usbsrc.sdl (EIP73962, EIP64781)
Known issues and limitations in this label:
For USB legacy shutdown in ACPI enable call workaround (required for non XHCI aware OSs), ACPI mode enable protocol is required. The projects which don’t have this protocol support may have issue in OS boot and the dependency in AMIUSB.DXS should be removed.
Remaining Issues:
None
Unit Testing:
The test report will provide upon request.
Validation Testing:
See the Unit Testing
4.6.3_USB_08.10.16
New features added in this label:
FEATURE ITEM
-EIP66867 - Added a token "USBPEI_IN_S3_SUPPORT" to support USBPEI during S3 resume.
-EIP38434 - Added USB HID report protocol support.
-EIP56918 - Added CCID device support.
-EIP60561 - Add USB timing policy protocol for timing override.
-EIP54018 - Added USB S5 wake up support.
-EIP64498 - Implement EHCI key repeat function.
General Bug Fixes:
-EIP68971 - USBPEI building failed.
-EIP67320 - USB recovery will fail when plug-in USB touch panel on Oaktrail platform.
-EIP68865 - VIA plug in USB KB/MS cause system hang.
-EIP59707 - The wireless USB keyboard does not work after boot into windows loader.
-EIP60380 - USB keyboard can't repeat character under DOS.
-EIP61388 - FreeDOS will hang at USB storage device while selecting Force FDD.
-EIP63308 - POST hang with USB WiMAX Dongle plugged on USB3.0 port.
-EIP63752 - Left click status lost on USB Mouse.
-EIP65385 - USB mouse can not be detected.
EIP addressed in this label:
-EIP59332 - Modified the Stop function for UHCD and USBBUS to properly stop devices and uninstall the protocols.
-EIP57663 - Update EFI_USB_PORT_STATUS.PortStatus bit definition as described in UEFI specification v 2.3.1.
-EIP60706 - Move gUsbBadDeviceTable into SMRAM.
-EIP66448 - Clear connect status change and port enable status change.
-EIP60460 - Adds a flag when device disconnected during data transfer, BIOS will not issue a transfer to the devicce if this flag is set. This change is for Fresco USB 3.0 controller.
-EIP63973 - Change the order of Set Protocol command and Set Idle command.
-EIP60327 - Issue warm port reste to each port before start port enumeration.
-EIP55336 - Add optional code to clear keyboard buffer at ReadyToBoot in USB driver.
-EIP66231 - Remove token POINT_SUPPORT.Add token USB_DEV_POINT.Add check core version in point driver.Add check device descriptor to send get lang id command.Modify check button usage page.
Files changed for EIP fixes:
-Int13\UsbInt13.c (EIPEIP59332)
-PEI\HubPeim.c (EIP68971, EIP67320)
-PEI\UsbPei.c (EIP66867)
-PEI\UsbPei.h (EIP57663)
-PEI\UsbPei.sdl (EIP57663)
-PEI\UsbPeiPpi.h (EIP57663)
-PROTOCOL\AmiUsbController.h (EIP60706, EIP38434, EIP56918)
-PROTOCOL\UsbHc.h (EIP57663)
-PROTOCOL\UsbPolicy.h (EIP60561)
-RT\amiusb.c (EIP54018, EIP60706, EIP38434, EIP56918)
-RT\amiusb.h (EIP56918)
-RT\ehci.c (EIP68865, EIP54018, EIP60561, EIP64498, EIP38434, EIP56918)
-RT\ehci.h (EIP64498)
-RT\guids.c (EIP60561)
-RT\ohci.c (EIP66448, EIP54018, EIP60561, EIP38434, EIP56918, EIP59707)
-RT\syskbc.c (EIP60380)
-RT\uhci.c (EIP54018, EIP60561, EIP38434, EIP59332, EIP45918)
-RT\usb.c (EIP54018, EIP60561, EIP60706, EIP65385, EIP64498, EIP38434, EIP60460, EIP56918)
-RT\usbdef.h (EIP54018, EIP60561, EIP60706, EIP65385, EIP64498, EIP38434, EIP60460, EIP56918)
-RT\usbhub.c (EIP60561)
-RT\usbkbd.c (EIP38434, EIP63973)
-RT\usbkbd.h (EIP38434)
-RT\usbmass.c (EIP60561, EIP61388, EIP63308)
-RT\usbms.c (EIP38434, EIP63752)
-RT\xhci.c (EIP54018, EIP60327, EIP62376, EIP38434, EIP60460)
-RT\xhci.h (EIP60460, EIP60327)
-Setup\usbsetup.c (EIP38434, EIP56918)
-AmiUsbHc.c (EIP38434)
-efiusbkb.c (EIP55336)
-efiusbkb.h (EIP38434)
-efiusbms.c (EIP63752)
-uhcd.c (EIP60561, EIP60706, EIP38434, EIP59332, EIP56918)
-uhcd.h (EIP59332, EIP56918)
-usbbus.c (EIP66231, EIP59332)
-usbmisc.c (EIP59332)
-usbport.c (EIP60561, EIP60706)
-usbsb.c (EIP54018, EIP38434)
Known issues and limitations in this label:
For USB legacy shutdown in ACPI enable call workaround (required for non XHCI aware OSs), ACPI mode enable protocol is required. The projects which don’t have this protocol support may have issue in OS boot and the dependency in AMIUSB.DXS should be removed.
Remaining Issues:
None
Unit Testing:
The test report will provide upon request.
Validation Testing:
See the Unit Testing
4.6.3_USB_08.10.14
New features added in this label:
FEATURE ITEM
-EIP51653, EIP62695 - Add the capability of skip enumeration for specific device.
-EIP59738 - Support Block size other than 512 bytes USB HDD in UEFI mode.
-EIP53518 - Added chipset xHCI chip support.
-EIP59790 - launch BIOS recovery via USB keyboard in PEI phase.
General Bug Fixes:
-EIP61385 - USB device is not detectded after apply EIP59663.
-EIP60632 - Generic Usb Redirection caused system hung at checkpoint A2.
-EIP62708 - Unexpected USB SMI after USB Owner Ship Change.
-EIP59663 - Plug USB WLAN device may causes OHCI malfunction.
-EIP60640 - Logitec USB keyboard has no function in DOS.
-EIP59601 - USB devices can't be detected if webcam is connected.
-EIP59579 - USB device information structure should be reserved for the UsbIO to use even install driver fail.
-EIP51158 - Samsung i7500 mobile phone can't be recognized.
-EIP60588 - MS-DOS 7.1 boot by USB 2.0 Flash Drive will crash system at black screen.
-EIP43711 - USB-FDD will be recognized as USB-HDD in BIOS Setup.
-EIP53416 - Iomega Zip250 hang at StatusCode 0xB4.
-EIP60562 - F11/F12 efi scan code correction.
-EIP60745 - USB driver doesn't pass SCT 2.3 ComponentName2 protocol test.
-EIP55275 - EBDA location 108 is occupied.
-EIP58029 - System hangs when insert USB devices.
EIP addressed in this label:
-EIP41379 - Move the code that install xHCI hardware SMI handler in XHCI_Start function.
-EIP57521 - Enumerate root hub ports after start host controllers in USB StartLegacy.
-EIP61030 - PORTSC register should be read before write the register, and set the USB_PORT_STAT_DEV_CONNECT_CHANGED flag if bIgnoreConnectStsChng is set and connect status change bit is not set.
-EIP54283 - Follow XHCI spec ver 1.0 section 4.6.8 to recovery endpoint halt.
-EIP58108 - Disable port only if this port is enabled and remove the delay after port disable.
-EIP57802 - The variable dCount should not be increase, undo the EIP55960 change in elib.c.
-EIP56557 - Modified SendMouseData function.
-EIP60261 - Ultrasound keyboard fails the LED related transfer.
-EIP57745 - The token CHECK_MOUSE_FLAG is depend on CSM version,remove the token and check CSM verion to support this feature or not.
-EIP59272 - According Uefi 2.1 Aptio porting document, changes made to install the component name protocol.
-EIP58689 - Update implementation of EFI_BLOCK_IO_PROTOCOL as described in UEFI specification v 2.3.1, page 12.8
-EIP61644 - Uninstall USB bus driver only DEV_INFO_DEV_BUS is set.
-EIP61556 - Add both bitmapped and index based GPI number for better compatibility.
Files changed for EIP fixes:
-Int13\UI13.bin (EIP)
-PROTOCOL\AmiUsbController.h (EIP62695)
-RT\amiusb.c (EIP57521)
-RT\ehci.c (EIP61385, EIP69632, EIP62708, EIP59663, EIP61030, EIP54283, EIP58108)
-RT\elib.c (EIP57802)
-RT\ohci.c (EIP59663, EIP54283)
-RT\syskbc.c (EIP56557, EIP60261, EIP57745)
-RT\uhci.c (EIP61385, EIP59738, EIP54283)
-RT\usb.c (EIP60640, EIP59738, EIP59601)
-RT\usbdef.h (EIP59738, EIP54283)
-RT\usbhub.c (EIP59579)
-RT\usbkbd.c (EIP59579)
-RT\usbmass.c (EIP59738, EIP51158, EIP59579, EIP60588, EIP54283, EIP43711, EIP53416)
-RT\usbms.c (EIP57745)
-RT\xhci.c (EIP53518)
-RT\xhci.h (EIP53518)
-componentname.c (EIP59272)
-componentname.h (EIP59272)
-efiusbkb.c (EIP59272, EIP60562)
-efiusbmass.c (EIP59272, EIP59738, EIP58689)
-efiusbms.c (EIP59272)
-uhcd.c (EIP59272, EIP60745, EIP55275)
-uhcd.h (EIP59272)
-usb.sdl (EIP53518)
-usbbus.c (EIP59272, EIP61644, EIP60640, EIP60645)
-usbport.c (EIP62695, EIP58029, EIP53518, EIP51653)
-usbsb.c (EIP61556, EIP55275, EIP53518)
-usbsrc.sdl (EIP57745)
Known issues and limitations in this label:
For USB legacy shutdown in ACPI enable call workaround (required for non XHCI aware OSs), ACPI mode enable protocol is required. The projects which don’t have this protocol support may have issue in OS boot and the dependency in AMIUSB.DXS should be removed.
Remaining Issues:
None
Unit Testing:
The test report will provide upon request.
Validation Testing:
See the Unit Testing
4.6.3_USB_08.10.10
USB 3.0 Support Notes:
This release support USB 3.0 host (XHCI) specification up to v1.0.
Below XHCI host chips are supported and verified:
1. FrescoLogic (FL1000/FL1009)
2. VLI (800)
3. Asmedia (ASM1042)
4. EtronTech (EJ168A)
5. TI (TUSB7320/TUSB7340)
6. AMD
7. Renesas/NEC
New features added in this label:
FEATURE ITEM
-EIP44585 - Number of maximum supported USB Mass Storage device increased from 8 to 16.
-EIP44702 - Added USB 3.0 hub support.
-EIP44570 - Added multiple xHCI SMI pin support.
-EIP51653 - Add interface for skip specific port enumeration.
-EIP52339 - Add USB host safe disabling function.
-EIP53518 - Add chipset XHCI support.
-EIP40959 - Activate mouse polling depending on the project settings.
General Bug Fixes:
-EIP45643 - Fixed system hangs when hot plug USB mass storage quickly on USB 3.0 port.
-EIP42986 - Remove the retry loop in UsbHwSmiHandler.
-EIP45578 - USB 3.0 device can't be detected
-EIP45689 - Uncomment code in EHCI_GetRootHubStatus that wait 20ms for host controller could report accurate port status properly.
-EIP38221 - Added the code that properly initializes DEV_INFO.bIntEndpoint field, interrupt endpoint polling is using this endpoint number.
-EIP45121 - Added xHCI Supported Protocol Capability and fix the problem that USB 3.0 device can't be detected.
-EIP45828 - If the flag DEV_INFO_MASS_DEV_REGD is set, check if the controller type is difference between old DevInfo and new one.
-EIP44149 - Disable slot if the Address Device command was unsuccessful.
-EIP47638 - The command block of read command is invalid.
-EIP44239 - Delay for the device to get ready if sense key is 0x06.
-EIP46210 - Added FL1009 USB 3.0 connection linkup workaround.
-EIP45564 - System hang when resume from S3 with XHCI legacy support is enabled.
-EIP41379 - Move the code that install xHCI hardware SMI handler in XHCI_Start function.
-EIP42956 - KeyNotificationFunction gets control twice for every key press in USB keyboard.
-EIP47749 - Intermittently with Certain USB devices at PC B4h.
-EIP55025 - Finger print function fail.
-EIP45589 - USB3.0 controller did not show boot option when only one USB device connected.
-EIP45643 - Fixed system hangs when hot plug USB mass storage quickly on USB 3.0 port.
-EIP43999 - Correct the TT Port Number field in Slot Context.
-EIP55275 - Remove the usage of EBDA offset 0x108.
-EIP48323 - Reflush USB keyboard data buffer to avoid junk data sent after enable USB keyboard data throughput.
-EIP57534 - BIOS rom image build process may stopped with error.
-EIP46434 - The TimeOut variable should be declared as UINT32 to ensure the time out check loop is as expected.
-EIP46433 - TdSize variable should be declared as a 32bit integer instead of a 8bit one. WDK will prompt this error during BIOS build progress.
-EIP54126 - Sometimes system hangs at checkpoint 0xB4.
-EIP52299 - USB device can't detected after warm reset.
-EIP50361 - Hot plug USB 3.0 flash drive in setup will cause system hang.
-EIP44152 - XHCI spec Ver1.0 redefine the TD Size field of a TRB.
EIP addressed in this label:
-EIP41379 - Move the code that install xHCI hardware SMI handler in XHCI_Start function.
-EIP46865 - Comment out unnecessary ASSERT macro in XHCI.C.
-EIP51927 - Support for the interface path reporting in USB INT13 Function 48.
-EIP46693 - Clear xHCI BIOS owned semaphore bit and SMI enable bit in PreInitXhci.
-EIP46992 - USB module build failed with WDK after apply EIP44570.
-EIP47135 - XHCI adaptor with blank firmware may result in system hange during POST
-EIP41483 - Stop timer SMI after shutdown legacy.
-EIP57354 - Core 4.6.5.0 compliant. UEFI 2.3 and PI 1.x support.
-EIP46994 - Increase XHCI controller reset timeout value.
-EIP48064 - XHCI/EHCI hand-off implementation change.
-EIP55960 - The Host Controller must halt within 16 micro-frames after software clears the Run bit.
-EIP48184 - Update files according to the new Setup Customization guidelines.
-EIP54782 - Change polling data size of HID devices to max packet size of interrupt endpoint.
-EIP55401 - Improve the USB 3.0 device compatibility.
-EIP56841 - Remove IO port 0x61 dependency.
-EIP48592 - Add timeout check in EHCIStartPeriodicSchedule and EHCIStopPeriodicSchedule to avoid the endless loop.
-EIP53108 - Change the order of the request "Set Hub Depth".
-EIP47319 - System hangs at S3 resume if XHCI SMI pin is enabled.
Files changed for EIP fixes:
-Int13\UI13.bin (EIP44585)
-Int13\UsbInt13.c (EIP45643, EIP51927)
-Int13\UsbInt13.h (EIP44585, EIP51927)
-PROTOCOL\AmiUsbController.h (EIP48064, EIP55275, EIP51653, EIP41483, EIP52339)
-PROTOCOL\UsbIo.h (EIP)
-PROTOCOL\UsbPolicy.h (EIP44585, EIP48184)
-RT\amidef.h (EIP48064, EIP55275)
-RT\amiusb.c (EIP48064, EIP41483, EIP53518, EIP48323)
-RT\amiusb.dxs (EIP48064)
-RT\amiusb.h (EIP48064, EIP53518, EIP57354)
-RT\ehci.c (EIP45578, EIP53518, EIP55960, EIP54782, EIP55401, EIP48592)
-RT\ehci.h (EIP55401)
-RT\elib.c (EIP56841)
-RT\ohci.c (EIP45578, EIP41483, EIP53518, EIP54782, EIP55401, EIP55025)
-RT\uhci.c (EIP45578, EIP53518, EIP54782, EIP55401)
-RT\usb.c (EIP45578, EIP52339, EIP53518, EIP54782, EIP55401, EIP54126, EIP50361)
-RT\usbdef.h (EIP45578, EIP51653, EIP53518, EIP54782, EIP55401)
-RT\usbhub.c (EIP45578, EIP55401, EIP54126, EIP53108, EIP52299, EIP44702)
-RT\usbkbd.c (EIP38221, EIP54126)
-RT\usbmass.c (EIP47638, EIP54126)
-RT\usbms.c (EIP38221, EIP54126)
-RT\usbrt.mak(EIP48064)
-RT\xhci.c (EIP47319, EIP44578, EIP48009, EIP51478, EIP50361, EIP51503, EIP52020, EIP53518, EIP54782, EIP55401)
-RT\xhci.h (EIP44152, EIP44227, EIP45121, EIP46210, EIP48009, EIP50968, EIP50361)
-Setup\usb.sd (EIP44585, EIP48184)
-Setup\usb.uni (EIP44585)
-usbsetup.c (EIP44585)
-amiusbhc.c (EIP46210)
-efiusbkb.c (EIP42956)
-efiusbms.c (EIP38221)
-uhcd.c (EIP46693, EIP55275, EIP51653, EIP52339, EIP53518)
-uhcd.h (EIP46693, EIP51653, EIP52339)
-Emul6064Trap.h (EIP48064)
-usb.sdl (EIP48009, EIP44585, EIP53518)
-usbbus.c (EIP47749, EIP54126)
-usbport.c (EIP46693, EIP51653, EIP53518)
-usbsb.c (EIP48064, EIP55275, EIP53518)
-usbsrc.sdl (EIP48009, EIP44585)
Known issues and limitations in this label:
For USB legacy shutdown in ACPI enable call workaround (required for non XHCI aware OSs), ACPI mode enable protocol is required. The projects which don’t have this protocol support may have issue in OS boot and the dependency in AMIUSB.DXS should be removed.
Remaining Issues:
None
Unit Testing:
Link to Test Reports
Validation Testing:
See the Unit Testing

4.06.03_USB_08.10.01

Description:

This label mainly adds varies XHCI host controllers support and several bug fixes/improvements.

Below XHCI chips verified work:

1. FrescoLogic (FL1000/FL1009)

2. VLI (800)

3. Asmedia (ASM1042)

4. EtronTech (EJ168A) Note#1

5. TI (TUSB73x0) Note#1

6. Renesas/NEC

Notes: 1. Token ‘XHCI_64BYTE_CONTEXT_SIZE’ must be set to ‘On’ to support the XHCI of which context size is in 64 bytes

Know Issues:

For USB legacy shutdown in ACPI enable call workaround (required for non XHCI aware OSs), ACPI mode enable protocol is required. The projects which don’t have this protocol support may have issue in OS boot and the dependency in AMIUSB.DXS should be removed.

New features:

EIP41544 - Add EtronTech XHCI support.

Improvement:

s EIP40121 - Send mouse driver only when driver is active.

s EIP43021 - Added that code that would stop emulation code in case of USB support is disabled in Setup.

s EIP42061 - Don't enable USB Legacy Support Capability if HW SMI isn't available.

s EIP43503 - Add check XHCI 64bit access capability.

s EIP43653 - Add time out and error check for XHCI controller not ready case.

s EIP41421 - Two modifications.

1. Check CNR bit after reset controller.

2. The ERSTBA shall not be written ERST are programmed.

s USB INT1C support is disabled by default.

Bugfixes:

s EIP41442 - Bugfix in CheckDeviceLimit function.

s EIP42297 - Fixed boot to hot plug USB HDD fail.

s EIP41216 - Return correct error code when device isn't present.

s EIP41187 - Set CERR field as 3 in a qTD, and service all interrupts after transfer complete.

s EIP41547 - Fixed system hangs if hot plug USB device during initialization.

s EIP43380 - BIOS build failed with WDK 7600.16385.1.

s EIP41780 - The EHB bit is cleared to 0 when the Dequeue Pointer register is written.

s EIP43742 - Wrong 64bit-Addressing Capability bit acquired forreference.

s EIP37978 - Bug fix for Klockwork software static code analysis issue.

s Corrected the FreePool call in UnRegisterKeyNotify function.

s Update UI13.bin for below Bug fixes:.

s EIP35977 - Bugfix in UpdateDeviceGeometryUsingUsbData: media geometry was not reported correctly when media is not present while the device is being detected.

s EIP38127 - Aptio INT13 func48 fail. Updated the BufferSize and DevicePath length to EDD 3.0b.

s EIP 39276(EIP33312) - WinPE 2.0 Cannot boot when Partition Size >= 256GB on USB HDD.

Te st Reports:

H/W:

1. M/B: SandyBridge APAC CRB (GA-SB rev 0.3)

2. Chipset: SandyBridge+CourgarPoint

3. USB Hosts: 2 EHCIs, Renesas(NEC) XHCI (Onboard, w HW SMI)

4. USB Devices:

ATake USB Keyboard

Kingston Traveller USB 2.0 flash drive

DATATEC USB 3.0 HDD Enclousure (SAS350-U3) + WD 2TB HDD (WD2002FYPS-01U1B0

BIOS:

1. Core: 4.6.4.0

2. CRB Project Label: 4.6.4.0_VEB_1AOQI009

OS/Drivers:

DOS 7.0

Windows7 x64 Ultimate N

Renesas(NEC) XHCI Driver 2.0.4.0

Renesas(NEC) FW 3.0.2.1

Test Results:

1. All devices work in POST, DOS and Windows 7.

2. Windows restart success w/o problem.

3. USB device hotplug works properly

H/W:

1. M/B: nVIDIA MCP89 CRB

2. Chipset: MCP89

3. USB Hosts: OHCI+EHCI

4. USB Devices: Logitech Keyboard (Y-BP62a)

Kingston Traveller USB 2.0 flash drive

BIOS:

1. Core: 4.6.4.0

2. CRB Project Label: 4.6.4.0_VEB_1AOQB004

OS/Drivers:

DOS 98

Test Results:

1. All devices work in POST, DOS.

2. USB device hotplug works properly.

H/W:

1. M/B: Intel Calpella CRB

2. Chipset: Auburndale/Clarksfield+IbexPeak

3. USB Hosts: EHCI

4. USB Devices:

MS Keybaord KU-0459

Transcend USB 2.0 flash drive

Buffalo USB 3.0 HDD

HP mouse

BIOS:

1. Core: 4.6.3.7

2. CRB Project Label: 4.6.3.5_VEB_1ABPZ019

OS/Drivers:

DOS 7.0

Windows7 x64

NEC XHCI Driver 2.0.4.0

Test Results:

1. All devices work in POST, DOS and Windows 7.

2. Windows restart success w/o problem.

3. Usb device hotplug works properly.

H/W:

1. M/B: AMD Brazos CRB

2. Chipset: Ontario+SB800

3. USB Hosts: EHCI

4. USB Devices:

MS Keybaord KU-0459

Transcend USB 2.0 flash drive

Buffalo USB 3.0 HDD

HP mouse

BIOS:

1. Core: 4.6.4.0

2. CRB Project Label: 4.6.4.0_CRB_1AOVZ_004

OS/Drivers:

DOS 7.0

Windows7 x64

NEC XHCI Driver 2.0.4.0

Test Results:

1. All devices work in POST, DOS and Windows 7.

2. Windows restart success w/o problem.

3. Usb device hotplug works properly.

H/W:

1. M/B: Piketon APAC CRB

2. Chipset: Intel Havendale/Lynnfield+Intel IbexPeak

3. USB Hosts: 2 EHCIs

4. USB Devices: NEC Keyboard (1.1HUB)

Logitech mouse(plug to 1.1HUB of NEC keyboard)

BIOS:

1. Core: 4.6.4.0

2. CRB Project Label: 4.6.3.7_VEB_1AEIQ017

3. 4.6.3-KbcEmulation-011 (KBC emulation enable and system have KBC)

4. 4.6.3.1_CSM.7.62_71 + warm boot patch

5. Warm boot module + USB patch(EIP33476)

OS/Drivers:

DOS 7.0

Windows7 x64

Test Results:

1. Install Win7. - pass -

2. Win7 restart (warm boot). - pass –

3. Usb keyboard hotplug on SETUP. – pass -

4.06.03_USB_08.10.00

New features:

s EIP39712 - OHCI KBC emulation support added.

s EIP15489 - Add USB HandOff function for shurdown/init USB legacy through USB API function.

s EIP38546 - Implement xHCI USB Legacy Capability.

s EIP40732 - Implement xHCI periodic timer handler to replace the XHCI HW SMI functionality.

Improvement:

s EIP21649 - USB mass storage device still appear in BBS menu when USB legacy support is disabled.

s EIP38356 - Implement shutdown USB legacy support in ACPI enable call.

s EIP38648 - Enable USB Error SMI.

s EIP39708 - Added new incompatibility type for HIDs that ignore boot protocol.

s EIP39326 - Runtime data moved to runtime memory region.

s EIP39092 - Change the order of protocol installation in InstallUSBMass.

s EIP26277 - Added a callback notification on NonSmmEmul6064TrapProtocolGuid installation.

s EIP39708 - Added incompatible mouse "SANWA Supply MA-LS11DS USB Mouse".

Bugfixes:

s EIP38547 - Fixed system halt when installing FreeBSD.

s EIP39838 - Fixed configure USB hub fail.

s EIP39374 - Fixed USB mass storage hot plug issue.

s EIP36720 - Fixed USB keyboard hot plug in setup issue.

s EIP34492 - Corrected the transfer routines output values.

s EIP41269 - Yellow bang appeared with USB 3.0 driver in Windows 7.

4.06.03_USB_08.09.02

New features:

§ Timer interrupt implementation, new module part "USB Int1c" has been added. EIP#38737.

§ Added the setup control to manually define a delay used during Hub port enumeration. Some devices require longer delay than the one reported by PowerGoodDelay value of the Hub descriptor. EIP#36927.

Bugfixes:

§ The type of EFI_USB_PROTOCOL variable is EfiBootServicesData. This is wrong because this structure holds some pointers that can be used during run-time. This variable is moved to the global data area that should be protected. EIP#36641.

§ USB keyboard related fixes:

- Issue:UsbKeyboard Driver doesnt differentiate between Left Shift and Right Shift Key.
Solution: modified the driver to differentiate between Left Shift/Alt/Ctrl and Right Shift/Alt/Ctrl Key's.EIP#38256

- Added PrintScreen/SysRq key, Menu Key, Left Logo and Right Logo Key support in USB Keyboard driver. EIP#38214

- Issue:Usb Keyboard driver doesn't handle the Shift Key properly in RegsiterkeyNotify function
Solution: ShiftKeyState and KeyToggleState verified for RegisterKeyNotify callback function. EIP#38213

§ Added FreePool call in UnregisterKeyNotify function

§ LocateAllCompanions returns the status. EIP#38161

§ Corrected the mouse data report. EIP37798

§ Remove the assertion on not-successful return from SMI handler. Errors are legitimate, they are handled on the callers' level.

4.06.03_USB_08.09.01

New features:

§ xHCI driver support for FrescoLogic FL1000

§ In the previous label there was an attempt to use periodic SMI timer; as it turns out, if periodic SW SMI runs all the time, it creates various issues. The usage of this timer reverted back: it is only used for USB keyboard repeat when no other periodic SMI source is available (Intel IbexPeak). This timer is only active for the period of key repeat; after the key is released the timer is stopped

§ Added USB_XHCI_EXT_HW_SMI_PIN token to support GPI SMI registration

§ Added a new protocol function in AmiUSbProtocols: UsbKbcAccessControl. This will allow calling this from registered SMI handlers (e.g. from SMIFLASH)

§ DEBUG_SWITCH is turned off by default

Bugfixes:

§ UsbBusStart: Raise the tpl level more then EFI_TPL_CALLBACK to make it can be called in other callback function.EIP35956.

§ FL1000 XHCI controller testing conditions/results.

Test configuration:

§ Controller: FrescoLogic xHCI PCIe x1 add-on card

§ Card revision: 2.0 0939

§ VID/DID: 1C73/1000

§ Platform: Calpella CRB

§ BIOS: Calpella Label 18

§ OS: Windows7 driver version 2.14.0.74 (32-bit)

Devices:

§ USB3.0 Buffalo External HDD

-- MODEL: HD-HX1.0TU3

-- STRING: BUFFALO External HDD 0100

§ USB3.0 SyberSLIM

-- MODEL: S1-U3

-- STRING: USB 3.0 MassStorage 0100

§ Belkin USB Keyboard

§ Dell USB Keyboard, Model: L100

Test results:

§ Keyboards work fine in EFI/DOS - LEDs, key repeat

§ Controller is flaky. On any cold boot controller disappears from PCI, not decoded; only poweroff->poweron sequence brings it back

§ Mass storage support is limited: devices can be detected, shown in Setup, but neither EFI Shell, nor DOS can be loaded. Similar behaviour observed under Windows7, device is detected and shown in the device tree but shown as unformatted with the size 0. Same with SS and HS mass storage devices.

§ Verified Bulk transfer stall condition: Buffalo drive stalls some of our commands, we were able to successfully restart the stalled endpoint and continue.

§ SyberSLIM drive can only be used in HS mode. When connected using SS cable, device never shows the connect status (connect status change is set at the same time). The same result is under Windows - drive is not visible if connected using USB3.0 cable.

Note: once SS mass storage device is connected, for example, with USB3.0 cable, changing the cable to USB2.0 will not make it work as HS device until the device is powered down and power back up. The same applies to changing the cable from USB2.0 to USB3.0.

4.06.03_USB_08.09.00

New features:

§ xHCI driver supports SuperSpeed devices

§ xHCI Transaction Translator feature implemented and tested: full speed/low speed devices connected behind USB2.0 hub

§ xHCI device removal support added

§ xHCI related setup question has been added

§ xHCI recovery from STALL condition added

§ Implemented multiple bulk endpoint in UsbIoProtocol. EIP33381

§ Added DXE_USB_ENABLE progress code

Bugfixes:

§ Added page alignment restriction into memory allocation routine. EIP30533

§ UHCD: Bugfix in UhcdPciIrqPgmNotifyCallback function

§ Undone changes in EHCI_ControlTransfer for EIP32956

§ Bugfix in USBMassUpdateCHSFromBootRecord, EIP34794

§ Change in the arguments of pfnHCDInitDeviceData function

§ Added new HCD API function: pfnHCDDeinitDeviceData

§ Updated PS2ScanCodeIsValid field while returning AMI_KEYCODE from USB keyboard

§ Work around Klockwork issues. EIP34370

§ Changes in UHCIWaitForTransferComplete and transfer routines. EIP34448

§ Bugfix in prepareForLegacyOS. EIP34448

§ Added checking for the validity of KeyMon pointer. EIP32867

4.06.03_USB_08.09.00_ALPHA1

UHCD.C:

§ EIP30023: Access gSetupData only when GetVariable returns EFI_SUCCESS

§ UpdateHcPciInfo call moved to PciIo notification callback

§ UpdateHcPciInfo call is moved from entry point to the Start function; this will allow a porting code to use the PCI information that is not available in the entry point, for example the PCI bus numbers of the controllers

USB.C, AMIUSB.C:

§ EIP30079: Added UsbControlTimeout setup selection

§ EIP31535: RWV error code corrected

Device Drivers:

§ Keyboard handling

-- Added an USB API to Block KBC Access

-- EIP#27889. Modified the codes returned on Shift-NumLock-ExtKeys(Home, Ins,...) combination. For these combinations NumLock cancels Shift

§ Mass Storage

-- Added SDL token USB_START_UNIT_BEFORE_MSD_ENUMERATION that controls the execution of bugfix for EIP25229. Disable by default

-- EIP27635: Change in USBMassGetFreeMassDeviceInfoStruc, zero device info structure can not be returned

§ USB SB template

Added details to USBPort_ProgramHardwareInterrupt implementation

Host Controller drivers:

§ EHCI

--IP 26477: Corrected the USBkeyboard can't hotplug in DOS issue

-- Restored EHCIResetHC call in Start function that was removed for EIP23479

§ OHCI

-- EIP32387: Bugfix in OHCI_FreeAllStruc; memory was not released properly when USB_FORCE_64BIT_ALIGNMENT is se

-- EIP26693: fixed OHCI_DISABLE_32MS_POLLING implementation

§ UHCI

-- IP32048: Added timeout in UHCI_WaitForBulkTransferComplete

§ XHCI

1. What is working:

-- USB mass storage (BulkOnly devices, CBI have not been tested) tested High Speed and Full Speed keys connected to the root ports. Two keys were connected at the same time and enumerated properly, booted to DOS and verified in both EFI and DOS

-- USB keyboard, tested two different keyboards

-- USB hubs, 1.1 and 2.0. Full speed and Low speed; one of the keyboards has in-built hub, it is working also, tested in EFI and DOS

-- Device hot insertion

2. What is not working:

-- Full speed and Low speed devices connected behind High Speed hub do not work.
Technical details: this support requires TT (Transaction Translator) fields initialization, code is implemented but for some reason the updated data do not appear in the device's Slot Context after issuing ConfigureEndpoint command

-- Recovery from STALL condition for the Control Endpoint; this limits the number of supported devices greatly, only those that do not stall will work
Technical details: One of the hubs stalls one of the GetDescriptor commands, after that Control Endpoint remains in Halted state. I used the method described in XHCI spec to restart the endpoint, but it does not work

-- The second device behind the hub is not initialized
Technical details: looks like some memory corruption problem, probably more than two devices at the same time have co-existense issues

3. What is remaining for Beta release:

-- Fix for a number of not working items listed above

-- Hot removal

-- HW SMI handler installation if available from the HW (porting hook)

-- HW interrupt handler for EFI

-- HW interrupt handler for DOS

4.06.03_USB_08.09.00_ALPHA

Improvements and new features:

USB3.0 driver Alpha version release

§ Hotplug support in EFI only

§ Device eject is not supported

§ Support for BOT devices only - mass storage keys, HDDs, CDROMs

§ Tested with NEC XHCI controller

§ Tested with high-speed and full-speed devices only; super-speed devices will be tested as they become available

Note: Two extra files added to the RT component of the driver: XHCI.C and XHCI.H. Make sure to download these files before compiling the module

§ EIP#31023: key repeat rate of the USB keyboard is controlled through SDL tokens

4.06.03_USB_08.08.07

Bugfixes:

§ EIP#22808: Added changes that prevent collision of keyboard activity and mass storage access

§ EIP#25841: Added KEY_REPEAT_LOGIC functionality. It switches between the usage of SET_IDLE command and periodic schedule for the key repeat function

§ EIP#23335: Connect status change is not maintained properly when device is disconnected while connection is in progress

§ Fix for the problem: When the system is inside the Option rom, connect uSb keyboard and it doesn't work. The rootcause: In post only EFI driver configure the USB keyboard. So Once comes out from option rom Usbkeyboard works. Solution: When you are inside the option rom configure the newly connected USB keyboard and notify EFI driver

§ EIP#24326: Increased R/W command timeout delay from 10 to 20 seconds

§ EIP#24507: Bugfix in the controller version reporting

§ EIP#21757: When item "num-lock status" set off, Num-lock will be on until in DOS

§ EIP#25229 (Core8 EIP#23581): xUbuntu on USB fix. Start unit command before access it

§ EIP#25224: When set boot protocol for mouse, the interface number may not be 0. Some keyboard/mouse composite devices have one more interface

§ EIP#25760: change the sequence of periodic schedule and async schedule execution

§ EIP#23479: while processing EHCI change ownership request, we will not reset the HC. This change will preserve the state of EHCI_CONFIGURE register (MMIO reg 60h, bit0) so the controller switching will not occur

§ EIP#23498: Correction in EHCIInitializePeriodicSchedule();

§ EIP#24484: Install legacy mass storage device only when USB legacy support is enabled

§ EIP#14848: EFI_BLOCK_IO_PROTOCOL.EFI_BLOCK_IO_MEDIA->ReadOnly attribute is properly used during Write calls

Improvements and new features:

§ EIP#25360: Added "USB Support" setup question

§ Added USB_INCMPT_HID_DATA_OVERFLOW incompatibility type

§ General improvement: implemented a circular buffer in KeypressCallback; related (indirectly) to EIP#25841

§ Change in EhciProcessInterrupt: There may be a condition in which OS changes the base address before owning the semaphore and SMI may occur on USB complete or port change detect. This may cause SMI storm. Disabling SMI will not affect anything since we do not have control over it

§ EIP#26685: uncommented code in EHCI_Stop that disconnects all devices

4.06.03_USB_08.08.06

Bugfixes:

§ Fix for EIP#22046: while detecting the new device we get the configuration descriptor, assuming it is followed by the interface descriptor; if it is not an interface descriptor, we used to think it is not the first one, so we never send set address and configuration request.

§ Fix for EIP#21681: The problem is in the Read Format Capacities command (0x23), the DataTransferLength is 0x40 in the CBW, but the Allocation Length is 0x80 in the CDB. Thus, the driver return Status is "Phase Error".

§ Fix for EIP#15595 (iPod nano makes POST hang): do not enumerate device if it is not a CD-ROM and has the block size different from 512 Bytes.

§ Correction in EHCI_GetRootHubStatus function.

Improvements and new features:

§ Increased the default timeout value to 20 sec. It was found that ThermLake external HDD is not responding to the first READ_10 command for 14 seconds.

§ USB_ConfigureDevice: for the existing devices copy the information about the parent controller/hub/port# into the new device structure.

§ EIP21970: support for hotplug drives, re-inserting them to a different controller/port.

4.06.03_USB_08.08.05

Bugfixes:

§ Fixed "FDD Hotplug" and "CDROM Hutplug" functionality that was broken in label 4.06.03_USB_08.08.02, EIP#21970 .

§ Modifications in USBKBDProcessKeyboardData: keypress and key release are synchronized between the modes (EFI/Legacy). If key is pressed in one mode and released in the other, then keypress is discarded. This fixes the problem of accidental key repeat sequence due to the mode change. EIP #19563 .

§ Modification in USBKBDConnectKeyboard. Resolves the problem of device being reconnected using the SW DisconnectController/ConnectController sequence. EIP#21456 .

§ Increased the default USB mass storage timeout value from 5 sec to 10 sec. Several types of external USB HDDs require this change to be properly enumerated.

§ Failure of Transcend Card reader configuration fix.EIP#21179 .

§ Skip enabling PortPower for the EHCI ports that already have it enabled. Saves ~100ms per controller during EHCI initialization.

§ USB keyboard: numeric keypad scancode correction.

Improvements and new features:

§ Added a path to speed up the initialization of the in-built USB hubs: the delays are reduced to the values defined in USB specification.

§ Added "HDD Hotplug" feature.

§ All setup related code is moved to OEMPORT.C to maximize the porting capabilities.

§ Pause key support, EIP#19547 .

4.06.03_USB_08.08.04

Bugfixes:

§ Fix for the USB mouse right click issue; if the right mouse button is pressed, value of variable "RightButton" is not updated properly.EIP#16970

§ Bugfixes for EIP#19039 and EIP#18267

§ Bugfix in AllocateAlignedMemory, size of the block is made 4K aligned for VTD.EIP#14470.

Improvements and new features:

§ Added a feature that allows to skip mass storage device installation depending on physical media presence. EIP#19260. Related new SDL tokens are:

-- REMOVE_USB_STORAGE_FROM_BBS_IF_NO_MEDIA, default 0: This token control whether USB storage devices report to BBS depend on media present or not.

-- REMOVE_CHECK_FOR_USB_FLOPPY_DRIVE, default 0: This token control whether USB FLOPPY drives report to BBS depend on media present or not.

§ Extra CheckDeviceReady call added to mass storage read/write functions. EIP#15037

§ Optimization in BulkTransfer scheduling (OHCI, UHCI). Generally speeds up the bulk transfer, particularly important for continuous bulk transfer used for fingerprint sensors.

§ Added the check for device limit before device is configured.EIP#18850 .

§ Added the communication with KBC emulation module during switching to Legacy mode and back. EIP#18730

4.06.03_USB_08.08.03a

Bugfixes:

Variable gEfiSetupGuid made static.

Improvements and new features:

§ Compiler compliance improvement. EIP#17767:

-- The return value of USBHUBConfigureDevice.

-- The return value of FindHcstruc.

-- The return value of TreeSearchSibling, TreeSearchDeep.

-- The return value of UsbMassGetControllerName.

SDL modifications:

§ none

4.06.03_USB_08.08.03

Bugfixes:

§ Validated the input parameters for RegisterKeyNotify, SetState and UnregisterKeyNotify. EIP#17578

§ Added StartStopUnit command if TestUnitReady returns the value of 0x020402.EIP#17634. Note: Current fix is done only for the device VID 0x0DC4 DID 0x0207; in future we may want to extend this fix for other devices.

Improvements and new features:

§ Support for OEM USB Boot Override feature. EIP#17052.

SDL modifications:

§ none

4.06.03_USB_08.08.02

Note1: This release is intended to be used with CSM16 binary ver 7.55 or later. Even though the code is backward compatible, some of the new features will not be activated with the older versions of CSM16.

Note2: The new module part, USB Int13, has been added to the USB module. Current version of VeB do not handle module update if the module structure is changed. Please do the USB update by removing the existing module from the project and getting the module by label.

Bugfixes:

§ EHCI change ownership testing in DOS fix (EIP#14855).

§ Modified USBAPI_ChangeOwner so that it allows multiple calls to acquiring the ownership without releasing it.

§ Bugfix in USBKBDPeriodicInterruptHandler (EIP#16452) that takes care of the key release situation.

§ Bugfix in the memory allocation in OHCI_ActivatePolling.

§ QueueData1 declaration and initialization is moved from USBBUS.C to UHCD.C; this fixes the problem of possible memory corruption in IVT area.

§ gUsbData->dLastCommandStatusExtended is initialized before every transfer. This fixes the UsbIo transfer error reporting issue.

Improvements and new features:

§ Change in EHCI_EnumeratePorts that will avoid unnecessary delays during enabling the port power.

§ KeymonFilter support added.

§ kbc_support initialization moved from UHCD Start function to UHCD EntryPoint to work properly with KBC emulation module.

§ USB keyboard EFI driver: implemented the Register/Unregister key notofocation function in SimpletextinEx protocol.

§ USB Int13 module part has been enabled. With this change USB INT13 handler moved from CSM16 to this USB module part. Also, this change reduces the number of SMIs generated during USB INT13.

SDL modifications:

§ The following defaults have changed: USB_MASS_EMULATION_NATIVE from 0 to 1; USB_EHCI_HANDOFF_SUPPORT from 0 to 1; USB_HOTPLUG_FDD from 1 to 0.

§ Added MAX_BULK_DATA_SIZE token that was previously a #define.

§ Removed unused tokens.

4.06.03_USB_08.08.01

§ The calls from SMI to the routines located outside SMI have been removed.

§ Bugfix in reporting String Descriptors, EIP 15309

§ Change the method of checking for KBC presence, EIP 15259

§ Bugfix in USB_HC2_PROTOCOL.GetRootHubPortStatus, EIP 15003

§ Bugfix in change ownership: request was not processed properly in case of multiple controllers of the same type, EIP14855

4.06.03_USB_08.08.00

Description:

§ Compliance with AMI coding standard

§ USB Mass Storage NATIVE emulation option implemented, EIP 14317

§ AllocAlignedMemory allocates the 4K aligned block for global USB data area, EIP 14470

§ Removed version string from USB setup page

§ Added REQUEST_SENSE command in a sequence of failed MODE_SENSE, fixes Ultra-X mass storage device detection issue

§ USB INT13 is isolated into a separate binary that can be removed from CSM16 binary and added to USB module. Feature is disabled by default

§ Added a chipset component USBSB.C; currently checked in along with UHCD files

§ Bugfix in a name reporting routine for USB mass storage devices; now USB mass storage correctly appears among EFI 'devices'

4.06.03_USB_08.07.15a

§ Added progress code.

§ Added SDL token that enables EHCI hand-off

§ Bugfix in USBKBD that caused random hang

§ Added a PCI reset on Ctrl-Alt-Del response for legacy-free systems

© American Megatrends Inc.


Release Notes - NDA Required

Component Information:
Component Title: USB
Component Reference Name: USB
Component Type: eModule
Release Date: 2012-09-25
Source Control Label: 4.6.3_USB_08.10.24
Source Control Location: Path:$/Alaska/SOURCE/Modules/USB/Alaska

Dependencies
N0NE
Non-Compiled BIN and LIB File(s) within this Component:

UI13.BIN
Component Title:USB
Component Reference Name: USB
Component Source Control Label: CSM16_USB_03
Component Source Control Location: Path:$/Alaska/CSM16/USB
Project Source Control Label:CSM16_8.00.10.0x.65
Project Source Control Location: Path:$/Alaska/CSM16/Complete Project/Furball10.64K
Component Description:
This component, termed as "USB" is designed to provide support for:
UHCI, OHCI, EHCI, and XHCI controllers, and USB devices
Filename | Description
Main Component | Root\Board\em\usb
Usb.sdl | BIOS build parameters for USB component.
UsbPort.c | Porting Specific functions implementation.
Usb.chm | Contains module description and release note of USB component.
AmiUsb.cif | Component information file of main USB component.
ModulePart Component | Root\Core\em\usb\rt – Runtime functions.
UsbRt.cif | Component information file of USB runtime module part.
AmiUsb.c | AMI USB API Implementation functions.
Guids.c | AMI USB guids library.
Debug.c | AMI USB Debug output implementation routnes.
Elib.c | AMI USB MEM/IO/PCI access routines.
SysKbc.c | KBC related functions for platform with HW KBC.
SysNoKbc.c | KBC related functions for platform without HW KBC.
Usb.c | AMI USB main wrapper.
UsbHub.c | Runtime functions for USB hub support.
UsbMass.c | Runtime functions for USB mass storage device support.
UsbMs.c | Runtime functions for USB mice support.
UsbKbd.c | Runtime functions for USB keyboard support.
UsbKbd.h | Definitions for USB keyboard support.
Uhci.c | USB 1.1 host UHCI specific functions.
Uhci.h | Definitions for UHCI host functions.
Ohci.c | USB 1.1 host OHCI specific functions.
Ohci.h | Definitions for OHCI host functions.
Ehci.c | USB 2.0 host EHCI specific functions.
Ehci.h | Definitions for EHCI host functions.
Xhci.c | USB 3.0 host XHCI specific functions
Xhci.h | Definitions for XHCI host functions.
ModulePart Component | Root\Core\em\usb – USB functions in UEFI environment.
Uhcd.cif | Component information file of UHCD module part.
Uhcd.c | AMI USB host controller driver.
AmiUsbHc.c | AMI USB HC protocol wrapper.
UsbBus.c | Source code of USB bus driver.
UsbBus.h | Definitions of USB bus driver.
UsbMisc.c | Miscellaneous functions for USB component.
Tree.c | USB device tree manipulation functions.
Tree.h | Definitions of USB device tree function.
UsbSrc.sdl | BIOS build parameters and elinks for USB component.
EfiUsbKb.c | EFI driver for USB keyboard support.
EfiUsbKb.h | Definitions for EFI driver of USB keyboard.
EfiUsbMass.c | EFI Driver for USB mass storage devices support.
EfiUsbMs.c | EFI Driver for USB mice support.
ComponentName.c | Contains EFI component name for EFI standard.
ComponentName.h | Definitions for EFI component name.
ModulePart Component | Root\Core\em\usb\Framework.cif - UEFI Framework.
Framework.cif | Component information file of framework module part.
Uhcd.mak | Makefile for UHCD module part.
Uhcd.h | AMI USB host controller driver header file.
Usbdef.h | AMI USB driver definitions.
Amidef.h | AMI USB driver framework specific definitions.
Uhcd.dxs | Dependency file for UHCD driver.
AmiUsb.dxs | Dependency file for AMI USB wrapper driver.
Usbrt.mak | Makefile for USB runtime component.
AmiUsb.h | AMI USB driver definitions.
ModulePart Component | Root\Core\em\usb\AmiUsbProtocols.cif - USB Protocols definitions.
AmiUsbProtocols.cif | Component information file of AMI USB protocols module part.
AmiUsbController.h | Definitions of AMI specific USB protocol.
UsbIo.h | EFI USB IO protocol definitions.
UsbHc.h | ECHI USB HC protocol definitions.
UsbPolicy.h | USB policy definitions.
Emul6064Trap.h | Definitions of KBC emulation functions.
Emul6064KbdInput.h | Definitions of keyboard support of KBC emulation functions.
Emul6064MsInput.h | Definitions of mouse support of KBC emulation functions.
ModulePart Component | Root\Core\em\usb\UsbSetup.cif - Setup items and functions.
UsbSetup.cif | Component information file of USB Int13 component.
Usb.uni | Unicode strings of USB component.
Usb.sd | Setup definitions of USB component.
UsbSetup.c | Setup functions of USB component.
ModulePart Component | Root\Core\em\UsbLegacy.cif – Contains module parts for legacy support.
UsbLegacy.cif | Component information file of USB legacy module part.
ModulePart Component | Root\Core\em\usb\UsbInt13.cif – Usb Int13 driver.
UsbInt13.cif | Component information file of USB Int13 module part.
UsbInt13.sdl | BIOS build parameters of USB Int13 module part.
UsbInt13.mak | Makefile of Usb Int13 module part.
UsbInt13.inf | Description file for inject USB int13 binary to BIOS ROM image.
UsbInt13.c | Functions for USB Int13 functions installation.
UsbInt13.h | Definitions for USB Int13 functions installation.
UsbInt13ComponentName.c | Component Name Protocol Member Functions for USB Int13.
UsbInt13.dxs | Dependency file for USB int13
ModulePart Component | Root\Core\em\UsbLegacy.cif – USB Int13 service binary image.
UsbI13bin.cif | Component information file of USB Int13 binary module part.
Ui13.bin | Int13 functions for USB module.
ModulePart Component | Root\Core\em\usb\UsbInt1c.cif – Int1c functions for USB module.
UsbInt1c.cif | Component information file of UsbInt1c module part.
UsbInt1c.sdl | BIOS build parameters of USB Int1c module part.
UsbInt1c.mak | Makefile of USB Int1c module part.
UsbInt1c.asm | Int1c timer interrupt handler for USB module.
ModulePart Component | Root\Chipset\sb\usb – Template for SB specific changes.
UsbSb.cif | Component information file of SB component.
UsbSb.c | Contain South bridge specific changes for USB
ModulePart Name:
ModulePart Description:
Filename | Description
USBRT | Run-time SMI part of the driver. It implements the USB enumeration code as well as Host Controllers' transfer routines
UHCD | Usb Host Controller Driver, this is EFI driver that implements USB related protocols defined in EFI specification
Framework | MAK files and headers that would adjust the module source to certain build environment
AmiUSBProtocols | Interface of the AMI specific protocols installed by USB driver
UsbSetup | Implementation of USB driver System Setup functionality
USB SB | Chipset specific functions
USB Int13, USB Int1C | Legacy USB interrupt implementation
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_34, Dated: 2010-10-06
Visual eBios: RSS.5.70.0171, Dated: 2010-10-04
Compiler Tool(s): Microsoft’s Windows Driver Kit (WDK) Ver. 7600.16385.1

USB 3.0 Support Notes:
This release support USB 3.0 host (XHCI) specification up to v1.0.
Below XHCI host chips are supported and verified:
1. FrescoLogic (FL1000/FL1009)
2. VLI (800)
3. Asmedia (ASM1042)
4. EtronTech (EJ168A)
5. TI (TUSB7320/TUSB7340)
6. AMD
7. Renesas/NEC
8. Intel
New features added in this label:
FEATURE ITEM
-EIP96366 - Add the token "DEFAULT_USB_EMUL6064_OPTION" that control the default value of the I/O port 60h/64h emulation support option.
-EIP77262 - Remove SMM dependency of USB.
-EIP99882 - Add the usb setup item and usbpolicyprotocol to enable or disable the usb mass storage driver.
General Bug Fixes:
-EIP88307 - Key repeat cannot be stopped if the keyboard is connected to xHCI.
-EIP89825 - System get's hangs inside the SMI handler while flashing the Bios.
-EIP95349 - Roccat ISKU Keyboard can not work.
-EIP93637 - Keyboard operate incorrectly in BIOS.
-EIP90124 - Insert barcode when pxe option rom running.Barcode will not work under dos.
-EIP90503 - Plug USB card reader cause time too long to boot.
-EIP94060 - USB key can not boot to DOS after Ctrl+Alt+Del.
-EIP95351 - Usb mouse work unnormal.
-EIP91835 - Wireless mouse auto click" problem.
-EIP96010 - The KB can not work under bios.
-EIP98251 - RF KB NumLock/ScrollLock/CapsLock indicator is not available during post or BIOS setup menu.
-EIP93368 - BIOS was not able to detect the SuperSpeed device when a redriver is attached.
-EIP91889 - CSInSetState has no function when Bootup NumLock State is set to OFF.
EIP addressed in this label:
-EIP96366 - Add the token "DEFAULT_USB_EMUL6064_OPTION" that control the default value of the I/O port 60h/64h emulation support option.
-EIP77262 - Remove SMM dependency of USB.
-EIP88307 - Key repeat cannot be stopped if the keyboard is connected to xHCI.
-EIP88776 - Implement keep port function.
-EIP99882 - Add the usb setup item and usbpolicyprotocol to enable or disable the usb mass storage driver.
-EIP89825 - System get's hangs inside the SMI handler while flashing the Bios.
-EIP95349 - Roccat ISKU Keyboard can not work.
-EIP93637 - Keyboard operate incorrectly in BIOS.
-EIP90124 - Insert barcode when pxe option rom running.Barcode will not work under dos.
-EIP98230 - Set the default of the MaxPacket for endpoint 0 by the device speed.
-EIP98145 - Add skip function message.
-EIP91363 - Correct the initial value of variable "bRetValue" in USBMassReadSector.
-EIP90503 - Plug USB card reader cause time too long to boot.
-EIP93460 - Add token decide mass available under efi application when legacy support disabled.
-EIP94060 - USB key can not boot to DOS after Ctrl+Alt+Del.
-EIP95351 - Usb mouse work unnormal.
-EIP91835 - Wireless mouse auto click problem.
-EIP96010 - The KB can not work under bios.
-EIP98251 - RF KB NumLock/ScrollLock/CapsLock indicator is not available during post or BIOS setup menu.
-EIP95959 - Don't set INTERRUPT_ROUTING if the ohci is external usb pci controller card.
-EIP98857 - WriteBackDoneHead status bit shall be cleared even HccaDoneHead is zero.
-EIP98251 - RF KB NumLock/ScrollLock/CapsLock indicator is not available during post or BIOS setup menu.
-EIP92915 - Added 5 ms after controller reset for NEC/RENESAS uPD720200 xHC.
-EIP93368 - BIOS was not able to detect the SuperSpeed device when a redriver is attached.
-EIP94453 - For some misbehaving USB 3.0 devices, we add the workaround that check the port link before reset the host controller, then a hot port reset is issued for that port while the link is in the compliance mode.
-EIP82555 - Calculate the actual data length to transfer when short packet detected.
-EIP100754 - Add Interface Type check in AmiUsbDriverBindingSupported.
-EIP91840 - Initialize the variable Params.ApiData.CoreProc.retVal and Params.bRetValue.
-EIP93932 - Fix the SCT test failure in AsyncInterruptTransfer item.
-EIP97609 - Handle the set interface request in the UsbIoControlTransfer.
-EIP99123 - Roll back EIP79221 changes that has device compatibility issue.
-EIP100371 - Set the tpl to TPL_APPLICATION when we connect or disconnect controller for the usb device.
-EIP91889 - CSInSetState has no function when Bootup NumLock State is set to OFF.
Files changed for EIP fixes:
-usb.sdl (EIP88307) (EIP77262) (EIP96366)
-usbport.c (EIP99882) (EIP88776) (EIP77262)
-rt\amiusb.c (EIP77262) (EIP96366) (EIP89825)
-rt\usbkbd.c (EIP93637) (EIP95349)
-rt\elib.c (EIP77262)
-rt\uhci.c (EIP77262)
-rt\usb.c (EIP98145) (EIP88307) (EIP77262) (EIP98230) (EIP90124)
-rt\usbmass.c (EIP99882) (EIP94060) (EIP93460) (EIP90503) (EIP91363)
-rt\usbms.c (EIP91835) (EIP95351)
-rt\usbhid.c (EIP98251) (EIP96010)
-rt\usbpoint.c (EIP101018)
-rt\ehci.c (EIP88307) (EIP77262)
-rt\ohci.c (EIP77262) (EIP98857) (EIP95959)
-rt\syskbc.c (EIP98251)
-rt\xhci.h (EIP92915)
-rt\xhci.c (EIP82555) (EIP77262) (EIP94453) (EIP92915) (EIP93368)
-uhcd.c (EIP100754) (EIP99882) (EIP77262)
-amiusbhc.c (EIP77262) (EIP93932) (EIP91840)
-usbbus.c (EIP100371) (EIP99123) (EIP97609)
-efiusbkb.c (EIP77262) (EIP91889)
-usbsrc.sdl (EIP98145) (EIP94453) (EIP93460)
-usbbus.h (EIP99123)
-efiusbmass.c (EIP99882) (EIP77262)
-efiusbccid.c (EIP77262)
-efiusbhid.c (EIP77262)
-usbmisc.c (EIP77262)
-uhcd.h (EIP77262)
-rt/usbdef.h (EIP99882) (EIP77262) (EIP96010)
-uhcd.dxs (EIP77262)
-rt/amiusb.dxs (EIP77262)
-rt/usbrt.mak (EIP77262)
-rt/amiusb.h (EIP77262) (EIP96366)
-Include/Protocol/AmiUsbController.h (EIP88776) (EIP77262)
-Include/Protocol/UsbPolicy.h (EIP99882)
-usb.uni (EIP99882) (EIP93460)
-usb.sd (EIP99882) (EIP96366) (EIP93460)
Known issues and limitations in this label:
None
Remaining Issues:
None
Unit Testing:
The test report will provide upon request.
Validation Testing:
See the Unit Testing
Release History:
Link to old Release Notes.htm files

© American Megatrends Inc.


Release Notes - NDA Required

Component Information:
Component Title: USB
Component Reference Name: USB
Component Type: eModule
Release Date: 2013-03-29
Source Control Label: 4.6.3_USB_08.10.26
Source Control Location: SS: Alaska;$/Alaska:/Source/Modules/USB/Alaska;
Dependencies
Component Dependencies
N0NE

File Dependencies
N0NE

Protocol Dependencies
ONE
Dependent Protocol Name: SmmBaseProtocol
Dependent Protocol GUID: EFI_SMM_BASE_PROTOCOL_GUID
TWO
Dependent Protocol Name: LegacyBiosProtocol
Dependent Protocol GUID: EFI_LEGACY_BIOS_PROTOCOL_GUID
Non-Compiled BIN and LIB File(s) within this Component:

UI13.bin
Component Title: USB
Component Reference Name: USB
Component Source Control Label: CSM16_USB_03
Component Source Control Location: SS: ALASKA;$/Alaska/CSM16/USB;
Project Source Control Label: 8.00.10.00.0x.65
Project Source Control Location: SS: ALASKA;$/Alaska/CSM16/Complete Project/Furball10.64K/Furball10.veb;
Component Description:
This component, termed as "USB" is designed to provide support for:
UHCI, OHCI, EHCI, and XHCI controllers, and USB devices
Filename | Description
Main Component | Root\Board\em\usb
amiusb.cif | Component information file for the eModule.
Usb.sdl | BIOS build parameters for USB component.
UsbPort.c | Porting Specific functions implementation.
Usb.chm | Contains module description and release note of USB component.
UsbRt ModulePart | Root\Core\em\usb\rt – Runtime functions.
UsbRt.cif | Component information file of USB runtime module part
AmiUsb.c | AMI USB API Implementation functions.
Guids.c | AMI USB guids library.
Debug.c | AMI USB Debug output implementation routnes.
Elib.c | AMI USB MEM/IO/PCI access routines.
SysKbc.c | KBC related functions for platform with HW KBC.
SysNoKbc.c | KBC related functions for platform without HW KBC.
Usb.c | AMI USB main wrapper.
UsbHub.c | Runtime functions for USB hub support.
UsbMass.c | Runtime functions for USB mass storage device support.
UsbMass.h | Definitions for USB mass storage device support.
UsbHid.c | Runtime functions for USB HID device support.
UsbMs.c | Runtime functions for USB mice support.
UsbPoint.c | Runtime functions for USB pointer device support.
UsbKbd.c | Runtime functions for USB keyboard support.
UsbKbd.h | Definitions for USB keyboard support.
UsbCcid.c | Runtime functions for USB CCID device support.
Uhci.c | USB 1.1 host UHCI specific functions.
Uhci.h | Definitions for UHCI host functions.
Ohci.c | USB 1.1 host OHCI specific functions.
Ohci.h | Definitions for OHCI host functions.
Ehci.c | USB 2.0 host EHCI specific functions.
Ehci.h | Definitions for EHCI host functions.
Xhci.c | USB 3.0 host XHCI specific functions
Xhci.h | Definitions for XHCI host functions.
UHCD ModulePart | Root\Core\em\usb – USB functions in UEFI environment.
Uhcd.cif | Component information file of UHCD module part.
Uhcd.c | AMI USB host controller driver.
AmiUsbHc.c | AMI USB HC protocol wrapper.
UsbBus.c | Source code of USB bus driver.
UsbBus.h | Definitions of USB bus driver.
UsbMisc.c | Miscellaneous functions for USB component.
Tree.c | USB device tree manipulation functions.
Tree.h | Definitions of USB device tree function.
UsbSrc.sdl | BIOS build parameters and elinks for USB component.
EfiUsbHid.c | EFI driver for USB HID device support.
EfiUsbKb.c | EFI driver for USB keyboard support.
EfiUsbKb.h | Definitions for EFI driver of USB keyboard.
EfiUsbMass.c | EFI Driver for USB mass storage devices support.
EfiUsbMs.c | EFI Driver for USB mice support.
EfiUsbPoint.c | EFI Driver for USB pointer support.
EfiUsbCcid.c | EFI Driver for USB CCID device support.
ComponentName.c | Contains EFI component name for EFI standard.
ComponentName.h | Definitions for EFI component name.
Framework ModulePart | Root\Core\em\usb - UEFI Framework.
Framework.cif | Component information file of framework module part.
Uhcd.mak | Makefile for UHCD module part.
Uhcd.h | AMI USB host controller driver header file.
Usbdef.h | AMI USB driver definitions.
Amidef.h | AMI USB driver framework specific definitions.
Uhcd.dxs | Dependency file for UHCD driver.
AmiUsb.dxs | Dependency file for AMI USB wrapper driver.
Usbrt.mak | Makefile for USB runtime component.
AmiUsb.h | AMI USB driver definitions.
AmiUsbRtCcid.h | AMI USB CCID runtime driver definitions.
AmiUsbProtocols ModulePart | Root\Include\Protocol - USB Protocols definitions.
AmiUsbProtocols.cif | Component information file of AMI USB protocols module part.
AmiUsbController.h | Definitions of AMI specific USB protocol.
UsbIo.h | EFI USB IO protocol definitions.
UsbHc.h | USB HC protocol definitions.
UsbPolicy.h | USB policy definitions.
Emul6064Trap.h | Definitions of KBC emulation functions.
Emul6064KbdInput.h | Definitions of keyboard support of KBC emulation functions.
Emul6064MsInput.h | Definitions of mouse support of KBC emulation functions.
AmiUsbCcid.h | AMI USB CCID protocol definitions
UsbSetup ModulePart | Root\Core\em\usb\setup - Setup items and functions.
UsbSetup.cif | Component information file of USB setup module part.
Usb.uni | Unicode strings of USB component.
Usb.sd | Setup definitions of USB component.
UsbSetup.c | Setup functions of USB component.
UsbLegacy ModulePart | Root\Core\em\usb – Contains module parts for legacy support.
UsbLegacy.cif | Component information file of USB legacy module part.
Usb Int13 ModulePart | Root\Core\em\usb\int13 - Usb Int13 driver.
UsbInt13.cif | Component information file of USB Int13 module part.
UsbInt13.sdl | BIOS build parameters of USB Int13 module part.
UsbInt13.mak | Makefile of Usb Int13 module part.
UsbInt13.inf | Description file for inject USB int13 binary to BIOS ROM image.
UsbInt13.c | Functions for USB Int13 functions installation.
UsbInt13.h | Definitions for USB Int13 functions installation.
UsbInt13ComponentName.c | Component Name Protocol Member Functions for USB Int13.
UsbInt13.dxs | Dependency file for USB int13.
USB INT13 16-bit Binary ModulePart | Root\Addon - USB Int13 service binary image.
UsbI13bin.cif | Component information file of USB Int13 binary module part.
Ui13.bin | Int13 functions for USB module.
USB Int1C ModulePart | Root\Core\EM\usb\int1c - Int1c functions for USB module.
UsbInt1c.cif | Component information file of UsbInt1c module part.
UsbInt1c.sdl | BIOS build parameters of USB Int1c module part.
UsbInt1c.mak | Makefile of USB Int1c module part.
UsbInt1c.asm | Int1c timer interrupt handler for USB module.
SouthBridge - Template ModulePart | Root\Chipset\sb\usb – Template for SB specific changes.
UsbSb.cif | Component information file of SB component.
UsbSb.c | Contain South bridge specific changes for USB.
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_40, Dated: 2012/07/03
Visual eBios: RSS.5.73.0239, Dated: 2012/06/21
Compiler Tool(s): Microsoft Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
EIP #101229 - Added a token "EXTERNAL_USB_CONTROLLER_SUPPORT" to disable external USB controller support.
EIP #90887 - Add a hook to check keyboard buffer for speicial chars.
EIP #71730 - Added OHCI handoff support.
EIP #111280 - Add USB APIs for external driver.
EIP #106887 - Support usb S5 wake up function for UHCI.
EIP #82354 - Support usb S5 wake up function for OHCI.
EIP #82553 - Support usb S5 wake up function for XHCI.
EIP #101102 - Multi Language is supported in USB driver.
EIP #102493 - USB Module version is added to the setup page.
General Bug Fixes and EIP Addressed in this Label:

EIP Addressed
EIP #96616 - When Legacy to EFI, USB KB can't be used.
EIP #107189 - Usb skip table no function.
EIP #99431 - Cannot use the UsbIo's UsbAsyncInterruptTransfer for keyboard input.
EIP #102150 - Push key and unplug KB, character repeat can not stop.
EIP #105587 - Rapoo keyboard press key have some garbage key.
EIP #107262 - CHOC keyboard can not work.
EIP #111305 - It is failed at reloading the usb keyboard driver.
EIP #107586 - Unplug USB keyboard does not uninstall EFI USB keyboard driver properly.
EIP #101623 - Fingerprint reader causes system waiting a long period at PC B4.
EIP #107198 - Run gdisk.exe fail.
EIP #110635 - ReadOnly attribute is not properly updated for USB FDD.
EIP #103051 - With USB3.0 flash on USB3.0 port and set to USB mode2, system will hang at post code 0x92 during the first cold boot after connecting AC power.
EIP #102781 - After update usb module, DebugRx hang at UHCD.Start().
EIP #103031 - System hans when loading QNX 6.5.0.
EIP #111010 - Touch panel button not work.
EIP #104704 - ASEERT error happens if Audio box connected.
EIP #106811 - After S4 resume, USB30 device cannot be detected on Richland(Bolton).
EIP #101226 - Chief River fails to boot when Above 4G Decoding is enabled.
EIP #100370 - The root cause is that a timer event of UsbKeyEvent(KEY_POLLING_INTERVAL(500000)) would be created while the function of SimpleTextInEX->RegisterKeyNotify() being invoked, but if we disconnect the Simple text in controllers through pBS->DisconnectController (HandleBuffer[Index], NULL, NULL), this timer still alive.
EIP #106155 - Build error with lastest USB module and old core label.
EIP #104380 - USB mouse button are lost in Wave application.
EIP #103791 - WaitForInput function destroys the absolute device data.
EIP #113218 - USB keyboard cannot work after ownership change back to BIOS.
EIP #113541 - System hangs at checkpoint 0xA2 when Win8 resume from S4.
EIP #116044 - TEAC FDD is not recognized after hot plugging under DOS.
EIP #117211 - USB Memory Allocation Failure for Sizes Above 4k.
EIP #113379 - USB MBR data read with 125MB USB key will get wrong value.
EIP #114280 - vPro KVM Mouse can not work.
EIP #112379 - USB device information is incorrect in Setup.
EIP #102491 - Synchronized with Aptio V USB module.
EIP #110305 - Set the device address after we send the first get-device-descriptor command.
EIP #107429 - Process the make code even if there is no break code.
EIP #112938 - Create a header file for usb mass storage driver.
EIP #109538 - Fix the code check error result.
EIP #93154 - Change the unit of the FixedDelay from 15 us to 1 us.
EIP #103186 - Handle the error case "MEMIO was disabled" in USB driver.
EIP #108891 - For usb wakp up function, we need to add some delay to wait the usb devces connect.
EIP #103966 - Always issue set port power request to HiSpeed USB hub.
EIP #111239 - Handle the recovery state of the devces which are behind the USB3 hub.
EIP #101990 - Add check inpurt mode.
EIP #107513 - Stop periodic schedule before removing QH.
EIP #104910 - Raise the tpl to TPL_CALLBACK when we connect or disconnect controller for the usb device.
EIP #98377 - Optimize USB controller timing.
EIP #118177 - Dynamically allocate HCStrucTable at runtime.
EIP #114307 - Verified the record present in the linked list and if it's not present, start from the head node again.
EIP #119292 - For Intel Xhci controller, BIOS doesn't issue a transfer if the device is disconnecting.
EIP #119072 - The USB 3.0 Hub hotplug functional is failed in DOS.
EIP #118926 - Add the token "EFI_USB_HC_INTERRUPT_OUT_SUPPORT" to control whether support EFI_USB2_HC_PROTOCOL.AsyncInterruptTransfer and EFI_USB2_HC_PROTOCOL.SyncInterruptTransfer() on OUT endpoints.
Files Changed for General Bug Fixes and EIP Addressed in this Label:

EIP Addressed
Board\EM\usb\usb.sdl (EIP #118177) (EIP #98377) (EIP #71730) (EIP #96616) (EIP #90887) (EIP #101229)
Board\EM\usb\usbport.c (EIP #118177) (EIP #98377) (EIP #110305) (EIP #102491) (EIP #71730) (EIP #107189)
Core\EM\usb\rt\amiusb.c (EIP #118177) (EIP #111280) (EIP #112938) (EIP #71730) (EIP #107429) (EIP #102150) (EIP #99431)
Core\EM\usb\rt\usbkbd.c (EIP #113218) (EIP #109538) (EIP #102491) (EIP #111305) (EIP #107262) (EIP #102150) (EIP #90887) (EIP #105587) (EIP #99431)
Core\EM\usb\rt\elib.c (EIP #98377) (EIP #93154)
Core\EM\usb\rt\uhci.c (EIP #118177) (EIP #98377) (EIP #113541) (EIP #103186) (EIP #106887) (EIP #99431) (EIP #93154)
Core\EM\usb\rt\usb.c (EIP #118177) (EIP #117211) (EIP #116044) (EIP #113218) (EIP #108891) (EIP #110305) (EIP #102491) (EIP #96616) (EIP #107586) (EIP #106887) (EIP #82553) (EIP #99431) (EIP #82354) (EIP #93154)
Core\EM\usb\rt\usbhub.c (EIP #118177) (EIP #98377) (EIP #111239) (EIP #102491) (EIP #103966) (EIP #99431) (EIP #93154)
Core\EM\usb\rt\usbmass.c (EIP #118177) (EIP #113379) (EIP #110635) (EIP #112938) (EIP #110305) (EIP #102491) (EIP #107198) (EIP #99431) (EIP #101623) (EIP #93154)
Core\EM\usb\rt\usbCCID.c (EIP #118177) (EIP #109538) (EIP #99431) (EIP #93154)
Core\EM\usb\rt\usbms.c (EIP #102491) (EIP #99431)
Core\EM\usb\rt\usbhid.c (EIP #118177) (EIP #113218) (EIP #102491) (EIP #107586) (EIP #99431) (EIP #101990)
Core\EM\usb\rt\usbpoint.c (EIP #114280) (EIP #102491) (EIP #99431) (EIP #101990)
Core\EM\usb\rt\uhci.h (EIP #102491) (EIP #106887)
Core\EM\usb\rt\usbkbd.h (EIP #102491)
Core\EM\usb\rt\ehci.c (EIP #118177) (EIP #98377) (EIP #113541) (EIP #111010) (EIP #102491) (EIP #103031) (EIP #103186) (EIP #107513) (EIP #82553) (EIP #99431) (EIP #102781) (EIP #103051) (EIP #82354) (EIP #93154)
Core\EM\usb\rt\ehci.h (EIP #102491)
Core\EM\usb\rt\ohci.c (EIP #118177) (EIP #98377) (EIP #113541) (EIP #102491) (EIP #103031) (EIP #103186) (EIP #82553) (EIP #99431) (EIP #82354) (EIP #93154)
Core\EM\usb\rt\ohci.h (EIP #102491)
Core\EM\usb\rt\syskbc.c (EIP #118177) (EIP #102150)
Core\EM\usb\rt\sysnokbc.c (EIP #118177)
Core\EM\usb\rt\xhci.h (EIP #119292) (EIP #102491) (EIP #82553)
Core\EM\usb\rt\xhci.c (EIP #119072) (EIP #119292) (EIP #98377) (EIP #103186) (EIP #106811) (EIP #82553) (EIP #104704) (EIP #99431) (EIP #93154)
Core\EM\usb\uhcd.c (EIP #118177) (EIP #98377) (EIP #110305) (EIP #102491) (EIP #96616) (EIP #102150) (EIP #101229)
Core\EM\usb\amiusbhc.c (EIP #118926) (EIP #118177) (EIP #102491) (EIP #99431) (EIP #101226)
Core\EM\usb\usbbus.c (EIP #109538) (EIP #110305) (EIP #102491) (EIP #111305) (EIP #99431) (EIP #104910)
Core\EM\usb\efiusbkb.c (EIP #114307) (EIP #114307) (EIP #102491) (EIP #107429) (EIP #100370) (EIP #99431) (EIP #101102) (EIP #100370)
Core\EM\usb\efiusbkb.h (EIP #106155) (EIP #99431) (EIP #101102)
Core\EM\usb\usbsrc.sdl (EIP #118926) (EIP #118177)
Core\EM\usb\usbbus.h (EIP #102491) (EIP #99431)
Core\EM\usb\efiusbmass.c (EIP #118177) (EIP #112938) (EIP #110305) (EIP #102491)
Core\EM\usb\efiusbms.c (EIP #118177) (EIP #104380)
Core\EM\usb\efiusbccid.c (EIP #118177) (EIP #109538)
Core\EM\usb\efiusbpoint.c (EIP #103791)
Core\EM\usb\efiusbhid.c (EIP #118177) (EIP #107586) (EIP #99431)
Core\EM\usb\componentname.c (EIP #102491)
Core\EM\usb\usbmisc.c (EIP #118177) (EIP #102491)
Core\EM\usb\uhcd.mak (EIP #118177)
Core\EM\usb\uhcd.h (EIP #118177) (EIP #102491)
Core\EM\usb\rt\usbdef.h (EIP #118177) (EIP #98377) (EIP #111280) (EIP #112938) (EIP #110305) (EIP #102491) (EIP #71730) (EIP #99431)
Core\EM\usb\rt\usbrt.mak (EIP #118177) (EIP #90887)
Core\EM\usb\rt\amiusb.h (EIP #111280) (EIP #99431) (EIP#93154)
Include\Protocol\UsbPolicy.h (EIP #71730)
Core\EM\usb\setup\usb.uni (EIP #71730) (EIP #102493)
Core\EM\usb\setup\usb.sd (EIP #118177) (EIP #102491) (EIP #71730) (EIP #102493)
Core\EM\usb\setup\usbsetup.c (EIP #112379) (EIP #102493)
Chipset\SB\usb\usbsb.c (EIP #118177) (EIP #102491)
Known Limitations and Erratas in this label:
NONE
Remaining Issues:
NONE
Unit Testing:
The test report will provide upon request.
Validation Testing:
NONE
Release History:
4.6.3_USB_08.10.24 Release Notes

© American Megatrends Inc.


Release Notes - NDA Required

Component Information:
Component Title: USB
Component Reference Name: USB
Component Type: eModule
Release Date: 2013-04-19
Source Control Label: 4.6.3_USB_08.10.27
Source Control Location: SS: Alaska;$/Alaska:/Source/Modules/USB/Alaska;
Dependencies
Component Dependencies
N0NE

File Dependencies
N0NE

Protocol Dependencies
ONE
Dependent Protocol Name: SmmBaseProtocol
Dependent Protocol GUID: EFI_SMM_BASE_PROTOCOL_GUID
TWO
Dependent Protocol Name: LegacyBiosProtocol
Dependent Protocol GUID: EFI_LEGACY_BIOS_PROTOCOL_GUID
Non-Compiled BIN and LIB File(s) within this Component:

UI13.bin
Component Title: USB
Component Reference Name: USB
Component Source Control Label: CSM16_USB_03
Component Source Control Location: SS: ALASKA;$/Alaska/CSM16/USB;
Project Source Control Label: 8.00.10.00.0x.65
Project Source Control Location: SS: ALASKA;$/Alaska/CSM16/Complete Project/Furball10.64K/Furball10.veb;
Component Description:
This component, termed as "USB" is designed to provide support for:
UHCI, OHCI, EHCI, and XHCI controllers, and USB devices
Filename | Description
Main Component | Root\Board\em\usb
amiusb.cif | Component information file for the eModule.
Usb.sdl | BIOS build parameters for USB component.
UsbPort.c | Porting Specific functions implementation.
Usb.chm | Contains module description and release note of USB component.
UsbRt ModulePart | Root\Core\em\usb\rt – Runtime functions.
UsbRt.cif | Component information file of USB runtime module part
AmiUsb.c | AMI USB API Implementation functions.
Guids.c | AMI USB guids library.
Debug.c | AMI USB Debug output implementation routnes.
Elib.c | AMI USB MEM/IO/PCI access routines.
SysKbc.c | KBC related functions for platform with HW KBC.
SysNoKbc.c | KBC related functions for platform without HW KBC.
Usb.c | AMI USB main wrapper.
UsbHub.c | Runtime functions for USB hub support.
UsbMass.c | Runtime functions for USB mass storage device support.
UsbMass.h | Definitions for USB mass storage device support.
UsbHid.c | Runtime functions for USB HID device support.
UsbMs.c | Runtime functions for USB mice support.
UsbPoint.c | Runtime functions for USB pointer device support.
UsbKbd.c | Runtime functions for USB keyboard support.
UsbKbd.h | Definitions for USB keyboard support.
UsbCcid.c | Runtime functions for USB CCID device support.
Uhci.c | USB 1.1 host UHCI specific functions.
Uhci.h | Definitions for UHCI host functions.
Ohci.c | USB 1.1 host OHCI specific functions.
Ohci.h | Definitions for OHCI host functions.
Ehci.c | USB 2.0 host EHCI specific functions.
Ehci.h | Definitions for EHCI host functions.
Xhci.c | USB 3.0 host XHCI specific functions
Xhci.h | Definitions for XHCI host functions.
UHCD ModulePart | Root\Core\em\usb – USB functions in UEFI environment.
Uhcd.cif | Component information file of UHCD module part.
Uhcd.c | AMI USB host controller driver.
AmiUsbHc.c | AMI USB HC protocol wrapper.
UsbBus.c | Source code of USB bus driver.
UsbBus.h | Definitions of USB bus driver.
UsbMisc.c | Miscellaneous functions for USB component.
Tree.c | USB device tree manipulation functions.
Tree.h | Definitions of USB device tree function.
UsbSrc.sdl | BIOS build parameters and elinks for USB component.
EfiUsbHid.c | EFI driver for USB HID device support.
EfiUsbKb.c | EFI driver for USB keyboard support.
EfiUsbKb.h | Definitions for EFI driver of USB keyboard.
EfiUsbMass.c | EFI Driver for USB mass storage devices support.
EfiUsbMs.c | EFI Driver for USB mice support.
EfiUsbPoint.c | EFI Driver for USB pointer support.
EfiUsbCcid.c | EFI Driver for USB CCID device support.
ComponentName.c | Contains EFI component name for EFI standard.
ComponentName.h | Definitions for EFI component name.
Framework ModulePart | Root\Core\em\usb - UEFI Framework.
Framework.cif | Component information file of framework module part.
Uhcd.mak | Makefile for UHCD module part.
Uhcd.h | AMI USB host controller driver header file.
Usbdef.h | AMI USB driver definitions.
Amidef.h | AMI USB driver framework specific definitions.
Uhcd.dxs | Dependency file for UHCD driver.
AmiUsb.dxs | Dependency file for AMI USB wrapper driver.
Usbrt.mak | Makefile for USB runtime component.
AmiUsb.h | AMI USB driver definitions.
AmiUsbRtCcid.h | AMI USB CCID runtime driver definitions.
AmiUsbProtocols ModulePart | Root\Include\Protocol - USB Protocols definitions.
AmiUsbProtocols.cif | Component information file of AMI USB protocols module part.
AmiUsbController.h | Definitions of AMI specific USB protocol.
UsbIo.h | EFI USB IO protocol definitions.
UsbHc.h | USB HC protocol definitions.
UsbPolicy.h | USB policy definitions.
Emul6064Trap.h | Definitions of KBC emulation functions.
Emul6064KbdInput.h | Definitions of keyboard support of KBC emulation functions.
Emul6064MsInput.h | Definitions of mouse support of KBC emulation functions.
AmiUsbCcid.h | AMI USB CCID protocol definitions
UsbSetup ModulePart | Root\Core\em\usb\setup - Setup items and functions.
UsbSetup.cif | Component information file of USB setup module part.
Usb.uni | Unicode strings of USB component.
Usb.sd | Setup definitions of USB component.
UsbSetup.c | Setup functions of USB component.
UsbLegacy ModulePart | Root\Core\em\usb – Contains module parts for legacy support.
UsbLegacy.cif | Component information file of USB legacy module part.
Usb Int13 ModulePart | Root\Core\em\usb\int13 - Usb Int13 driver.
UsbInt13.cif | Component information file of USB Int13 module part.
UsbInt13.sdl | BIOS build parameters of USB Int13 module part.
UsbInt13.mak | Makefile of Usb Int13 module part.
UsbInt13.inf | Description file for inject USB int13 binary to BIOS ROM image.
UsbInt13.c | Functions for USB Int13 functions installation.
UsbInt13.h | Definitions for USB Int13 functions installation.
UsbInt13ComponentName.c | Component Name Protocol Member Functions for USB Int13.
UsbInt13.dxs | Dependency file for USB int13.
USB INT13 16-bit Binary ModulePart | Root\Addon - USB Int13 service binary image.
UsbI13bin.cif | Component information file of USB Int13 binary module part.
Ui13.bin | Int13 functions for USB module.
USB Int1C ModulePart | Root\Core\EM\usb\int1c - Int1c functions for USB module.
UsbInt1c.cif | Component information file of UsbInt1c module part.
UsbInt1c.sdl | BIOS build parameters of USB Int1c module part.
UsbInt1c.mak | Makefile of USB Int1c module part.
UsbInt1c.asm | Int1c timer interrupt handler for USB module.
SouthBridge - Template ModulePart | Root\Chipset\sb\usb – Template for SB specific changes.
UsbSb.cif | Component information file of SB component.
UsbSb.c | Contain South bridge specific changes for USB.
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_40, Dated: 2012/07/03
Visual eBios: RSS.5.73.0239, Dated: 2012/06/21
Compiler Tool(s): Microsoft Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
Add VIA VT6212 EHCI controller support.
Add Teradici USB controller support.
General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
Fix compile error if toke EFI_SPECIFICATION_VERSION greater than 0x2000.
Fix build error if token x64_BUILD is 0.
Fix build error if token USB_RUNTIME_DRIVER_IN_SMM is disabled.
Fix build error if token USB_S5_WAKEUP_SUPPORT is enabled.

EIP Addressed
EIP #120573 - Afuwinx64/Safuwinx64 hang up issue.
EIP #118912 - Add VIA VT6212 EHCI controller support.
EIP #119028 - Insert smart card incorrectly (backwards), system will hang 0xA0.
EIP #111483 - Increase the delay when OHCI port reset complete.
EIP #118383 - Stop all USB controllers in ExitBootService event.
EIP #120345 - EFI_USB_IO_PROTOCOL.UsbGetStringDescriptor() returns EFI_SUCCESS if String is NULL.
Files Changed for General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
Core\EM\usb\rt\usb.c
Core\EM\usb\uhcd.c
Core\EM\usb\setup\usb.sd

EIP Addressed
Core\EM\usb\rt\amiusb.c (EIP #120573)
Core\EM\usb\rt\uhci.c (EIP #118912)
Core\EM\usb\rt\usbCCID.c (EIP #119028)
Core\EM\usb\rt\ehci.c (EIP #118912)
Core\EM\usb\rt\ohci.c (EIP #111483)
Core\EM\usb\uhcd.c (EIP #118912) (EIP #118383)
Core\EM\usb\usbbus.c (EIP #120345)
Core\EM\usb\rt\usbdef.h (EIP #118912)
Known Limitations and Erratas in this label:
NONE
Remaining Issues:
NONE
Unit Testing:
The test report will provide upon request.
Validation Testing:
NONE
Release History:
4.6.3_USB_08.10.26 Release Notes
4.6.3_USB_08.10.24 Release Notes

© American Megatrends Inc.


Release Notes - NDA Required

Component Information:
Component Title: USB
Component Reference Name: USB
Component Type: eModule
Release Date: 2013-09-06
Source Control Label: 4.6.3_USB_08.10.28
Source Control Location: SS: Alaska;$/Alaska:/Source/Modules/USB/Alaska;
Dependencies
Component Dependencies
N0NE

File Dependencies
N0NE

Protocol Dependencies
ONE
Dependent Protocol Name: SmmBaseProtocol
Dependent Protocol GUID: EFI_SMM_BASE_PROTOCOL_GUID
TWO
Dependent Protocol Name: LegacyBiosProtocol
Dependent Protocol GUID: EFI_LEGACY_BIOS_PROTOCOL_GUID
Non-Compiled BIN and LIB File(s) within this Component:

UI13.bin
Component Title: USB
Component Reference Name: USB
Component Source Control Label: CSM16_USB_03
Component Source Control Location: SS: ALASKA;$/Alaska/CSM16/USB;
Project Source Control Label: 8.00.10.00.0x.65
Project Source Control Location: SS: ALASKA;$/Alaska/CSM16/Complete Project/Furball10.64K/Furball10.veb;
Component Description:
This component, termed as "USB" is designed to provide support for:
UHCI, OHCI, EHCI, and XHCI controllers, and USB devices
Filename | Description
Main Component | Root\Board\em\usb
amiusb.cif | Component information file for the eModule.
Usb.sdl | BIOS build parameters for USB component.
UsbPort.c | Porting Specific functions implementation.
Usb.chm | Contains module description and release note of USB component.
UsbRt ModulePart | Root\Core\em\usb\rt – Runtime functions.
UsbRt.cif | Component information file of USB runtime module part
AmiUsb.c | AMI USB API Implementation functions.
Guids.c | AMI USB guids library.
Debug.c | AMI USB Debug output implementation routnes.
Elib.c | AMI USB MEM/IO/PCI access routines.
SysKbc.c | KBC related functions for platform with HW KBC.
SysNoKbc.c | KBC related functions for platform without HW KBC.
Usb.c | AMI USB main wrapper.
UsbHub.c | Runtime functions for USB hub support.
UsbMass.c | Runtime functions for USB mass storage device support.
UsbMass.h | Definitions for USB mass storage device support.
UsbHid.c | Runtime functions for USB HID device support.
UsbMs.c | Runtime functions for USB mice support.
UsbPoint.c | Runtime functions for USB pointer device support.
UsbKbd.c | Runtime functions for USB keyboard support.
UsbKbd.h | Definitions for USB keyboard support.
UsbCcid.c | Runtime functions for USB CCID device support.
Uhci.c | USB 1.1 host UHCI specific functions.
Uhci.h | Definitions for UHCI host functions.
Ohci.c | USB 1.1 host OHCI specific functions.
Ohci.h | Definitions for OHCI host functions.
Ehci.c | USB 2.0 host EHCI specific functions.
Ehci.h | Definitions for EHCI host functions.
Xhci.c | USB 3.0 host XHCI specific functions
Xhci.h | Definitions for XHCI host functions.
UHCD ModulePart | Root\Core\em\usb – USB functions in UEFI environment.
Uhcd.cif | Component information file of UHCD module part.
Uhcd.c | AMI USB host controller driver.
AmiUsbHc.c | AMI USB HC protocol wrapper.
UsbBus.c | Source code of USB bus driver.
UsbBus.h | Definitions of USB bus driver.
UsbMisc.c | Miscellaneous functions for USB component.
Tree.c | USB device tree manipulation functions.
Tree.h | Definitions of USB device tree function.
UsbSrc.sdl | BIOS build parameters and elinks for USB component.
EfiUsbHid.c | EFI driver for USB HID device support.
EfiUsbKb.c | EFI driver for USB keyboard support.
EfiUsbKb.h | Definitions for EFI driver of USB keyboard.
EfiUsbMass.c | EFI Driver for USB mass storage devices support.
EfiUsbMs.c | EFI Driver for USB mice support.
EfiUsbPoint.c | EFI Driver for USB pointer support.
EfiUsbCcid.c | EFI Driver for USB CCID device support.
ComponentName.c | Contains EFI component name for EFI standard.
ComponentName.h | Definitions for EFI component name.
Framework ModulePart | Root\Core\em\usb - UEFI Framework.
Framework.cif | Component information file of framework module part.
Uhcd.mak | Makefile for UHCD module part.
Uhcd.h | AMI USB host controller driver header file.
Usbdef.h | AMI USB driver definitions.
Amidef.h | AMI USB driver framework specific definitions.
Uhcd.dxs | Dependency file for UHCD driver.
AmiUsb.dxs | Dependency file for AMI USB wrapper driver.
Usbrt.mak | Makefile for USB runtime component.
AmiUsb.h | AMI USB driver definitions.
AmiUsbRtCcid.h | AMI USB CCID runtime driver definitions.
AmiUsbProtocols ModulePart | Root\Include\Protocol - USB Protocols definitions.
AmiUsbProtocols.cif | Component information file of AMI USB protocols module part.
AmiUsbController.h | Definitions of AMI specific USB protocol.
UsbIo.h | EFI USB IO protocol definitions.
UsbHc.h | USB HC protocol definitions.
UsbPolicy.h | USB policy definitions.
Emul6064Trap.h | Definitions of KBC emulation functions.
Emul6064KbdInput.h | Definitions of keyboard support of KBC emulation functions.
Emul6064MsInput.h | Definitions of mouse support of KBC emulation functions.
AmiUsbCcid.h | AMI USB CCID protocol definitions
UsbSetup ModulePart | Root\Core\em\usb\setup - Setup items and functions.
UsbSetup.cif | Component information file of USB setup module part.
Usb.uni | Unicode strings of USB component.
Usb.sd | Setup definitions of USB component.
UsbSetup.c | Setup functions of USB component.
UsbLegacy ModulePart | Root\Core\em\usb – Contains module parts for legacy support.
UsbLegacy.cif | Component information file of USB legacy module part.
Usb Int13 ModulePart | Root\Core\em\usb\int13 - Usb Int13 driver.
UsbInt13.cif | Component information file of USB Int13 module part.
UsbInt13.sdl | BIOS build parameters of USB Int13 module part.
UsbInt13.mak | Makefile of Usb Int13 module part.
UsbInt13.inf | Description file for inject USB int13 binary to BIOS ROM image.
UsbInt13.c | Functions for USB Int13 functions installation.
UsbInt13.h | Definitions for USB Int13 functions installation.
UsbInt13ComponentName.c | Component Name Protocol Member Functions for USB Int13.
UsbInt13.dxs | Dependency file for USB int13.
USB INT13 16-bit Binary ModulePart | Root\Addon - USB Int13 service binary image.
UsbI13bin.cif | Component information file of USB Int13 binary module part.
Ui13.bin | Int13 functions for USB module.
USB Int1C ModulePart | Root\Core\EM\usb\int1c - Int1c functions for USB module.
UsbInt1c.cif | Component information file of UsbInt1c module part.
UsbInt1c.sdl | BIOS build parameters of USB Int1c module part.
UsbInt1c.mak | Makefile of USB Int1c module part.
UsbInt1c.asm | Int1c timer interrupt handler for USB module.
SouthBridge - Template ModulePart | Root\Chipset\sb\usb – Template for SB specific changes.
UsbSb.cif | Component information file of SB component.
UsbSb.c | Contain South bridge specific changes for USB.
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_40, Dated: 2012/07/03
Visual eBios: RSS.5.73.0239, Dated: 2012/06/21
Compiler Tool(s): Microsoft Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
NONE
General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
Add usage page check for HID set feature request.
Set the data toggle to QH at EHCI_ActivatePolling and EHCI_InterruptTransfer.
Fix the AMI_MULTI_LANG_SUPPORT_PROTOCOL redefinition problem.

EIP Addressed
EIP #123235 - Stop the usb host controller at ExitBootService if it is an extend card or it doesn't support HW SMI.
EIP #122142 - Improve periodic schedule mechanism
EIP #125357 - Check if the port releases to a select host controller.
EIP #134478 - The devices which behind the hub don't install successfully in shell.
EIP #126741 - Cannot boot to uefi usb device with Sophos software.
EIP #126319 - TEAC floppy can not detect when cold boot.
EIP #121643 - Cannot detect the usb floppy.
EIP #121374 - USB flash is not recognized after re-plugged on DOS.
EIP #135036 - MultilUN deviices don't install successfully after hotplug in shell.
EIP #133270 - Sony MS card reader sometimes cause system hang at 0xD5.
EIP #131624 - USB mass storage configured fails
EIP #128964 - Int 13 Function 08 doesn't work right for USB mass storage devices.
EIP #127941 - Replace UI13HDDFunc08 with UI13FDDFunc08 if the media descriptor is a fixed disk.
EIP #127800 - Add non-bootable device type handing
EIP #126814 - Security code check fail in the function USBAPI_CCIDRequest() in usbCCID.c.
EIP #122944 - Remove mouse_flag3 and check the mouse interface status in the CCB byte before we send the data to KBC.
EIP #127014 - Mouse drifting not smooth
EIP #135237 - USB can't work when turn on AMIDEBUG_RX_SUPPORT.
EIP #122174 - Usb keyboard can not work.When special usb key insert
EIP #121790 - The usb keyboard doesn't work fine behind usb 2.0 hub.
EIP #132012 - Remove the private timeout of xhci bulk transfer.
EIP #130328 - Handle that the base address of xhci was changed.
EIP #123988 - Move the code creating BBS table to end of POST.
EIP #124584 - Tab, Backspace, Enter Key's are considerd as Non printable Key's.
EIP #121333 - Multiple USB mouse support for UEFI USB mouse driver
EIP #125560 - Please support Boot Sector Virus Protection for CSM Disabled Mode
EIP #122407 - Move the USB varstore out ADVANCED_FORM_SET definition check.
Files Changed for General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
Core\EM\usb\rt\usbhid.c
Core\EM\usb\rt\ehci.c
Core\EM\usb\efiusbkb.h

EIP Addressed
Board\EM\usb\usbport.c (EIP #127455) (EIP #125792)
Core\EM\usb\rt\amiusb.c (EIP #128970) (EIP #123235)
Core\EM\usb\rt\uhci.c (EIP #122142) (EIP #125357) (EIP #123235)
Core\EM\usb\rt\usb.c (EIP #134478) (EIP #126741) (EIP #125357) (EIP #126319) (EIP #125792) (EIP #121643)
Core\EM\usb\rt\usbhub.c (EIP #125357) (EIP #121374)
Core\EM\usb\rt\usbmass.c (EIP #135036) (EIP #133270) (EIP #131624) (EIP #126741) (EIP #128964) (EIP #127941) (EIP #127800)
Core\EM\usb\rt\usbCCID.c (EIP #126814)
Core\EM\usb\rt\usbms.c (EIP #122944) (EIP #127014)
Core\EM\usb\rt\usbhid.c (EIP #127014)
Core\EM\usb\rt\uhci.h (EIP #122142)
Core\EM\usb\rt\usbkbd.h (EIP #127014)
Core\EM\usb\rt\ehci.c (EIP #135237) (EIP #122142) (EIP #125357) (EIP #122174) (EIP #123235) (EIP #121790) (EIP #121643)
Core\EM\usb\rt\ehci.h (EIP #122142)
Core\EM\usb\rt\ohci.c (EIP #122142) (EIP #125357) (EIP #124581) (EIP #123235)
Core\EM\usb\rt\ohci.h (EIP #122142)
Core\EM\usb\rt\syskbc.c (EIP #122944)
Core\EM\usb\rt\xhci.h (EIP #132012)
Core\EM\usb\rt\xhci.c (EIP #134478) (EIP #132012) (EIP #130328) (EIP #125357) (EIP #123235)
Core\EM\usb\uhcd.c (EIP #126741) (EIP #123988) (EIP #123235)
Core\EM\usb\amiusbhc.c (EIP #122142)
Core\EM\usb\usbbus.c (EIP #134478) (EIP #126741)
Core\EM\usb\efiusbkb.c (EIP #124584)
Core\EM\usb\efiusbkb.h (EIP #121333)
Core\EM\usb\efiusbmass.c (EIP #126741) (EIP #123988) (EIP #127800) (EIP #125560)
Core\EM\usb\efiusbms.c (EIP #121333)
Core\EM\usb\efiusbhid.c (EIP #121333)
Core\EM\usb\uhcd.h (EIP #123988)
Core\EM\usb\rt\usbdef.h (EIP #122142) (EIP #127941) (EIP #125357) (EIP #127014) (EIP #121374) (EIP #123235)
Include\Protocol\AmiUsbController.h (EIP #123988)
Core\EM\usb\setup\usb.sd (EIP #122407)
Core\EM\usb\int13\UsbInt13.sdl (EIP #123988)
Core\EM\usb\int13\UsbInt13.mak (EIP #123988)
Core\EM\usb\int13\UsbInt13.c (EIP #127941) (EIP #123988)
Core\EM\usb\int13\UsbInt13.h (EIP #127941) (EIP #123988)
Addon\UI13.bin (EIP #127941)
Chipset\SB\usb\usbsb.c (EIP #123235)
Known Limitations and Erratas in this label:
NONE
Remaining Issues:
NONE
Unit Testing:
The test report will provide upon request.
Validation Testing:
NONE
Release History:
4.6.3_USB_08.10.27 Release Notes
4.6.3_USB_08.10.26 Release Notes
4.6.3_USB_08.10.24 Release Notes

© American Megatrends Inc.


Release Notes - NDA Required

Component Information:
Component Title: USB
Component Reference Name: USB
Component Type: eModule
Release Date: 2013-12-31
Source Control Label: 4.6.3_USB_08.10.29
Source Control Location: SS: Alaska;$/Alaska:/Source/Modules/USB/Alaska;
Dependencies
Component Dependencies
N0NE

File Dependencies
N0NE

Protocol Dependencies
ONE
Dependent Protocol Name: SmmBaseProtocol
Dependent Protocol GUID: EFI_SMM_BASE_PROTOCOL_GUID
TWO
Dependent Protocol Name: LegacyBiosProtocol
Dependent Protocol GUID: EFI_LEGACY_BIOS_PROTOCOL_GUID
Non-Compiled BIN and LIB File(s) within this Component:

UI13.bin
Component Title: USB
Component Reference Name: USB
Component Source Control Label: CSM16_USB_03
Component Source Control Location: SS: ALASKA;$/Alaska/CSM16/USB;
Project Source Control Label: 8.00.10.00.0x.65
Project Source Control Location: SS: ALASKA;$/Alaska/CSM16/Complete Project/Furball10.64K/Furball10.veb;
Component Description:
This component, termed as "USB" is designed to provide support for:
UHCI, OHCI, EHCI, and XHCI controllers, and USB devices
Filename | Description
Main Component | Root\Board\em\usb
amiusb.cif | Component information file for the eModule.
Usb.sdl | BIOS build parameters for USB component.
UsbPort.c | Porting Specific functions implementation.
Usb.chm | Contains module description and release note of USB component.
UsbRt ModulePart | Root\Core\em\usb\rt – Runtime functions.
UsbRt.cif | Component information file of USB runtime module part
AmiUsb.c | AMI USB API Implementation functions.
Guids.c | AMI USB guids library.
Debug.c | AMI USB Debug output implementation routnes.
Elib.c | AMI USB MEM/IO/PCI access routines.
SysKbc.c | KBC related functions for platform with HW KBC.
SysNoKbc.c | KBC related functions for platform without HW KBC.
Usb.c | AMI USB main wrapper.
UsbHub.c | Runtime functions for USB hub support.
UsbMass.c | Runtime functions for USB mass storage device support.
UsbMass.h | Definitions for USB mass storage device support.
UsbHid.c | Runtime functions for USB HID device support.
UsbMs.c | Runtime functions for USB mice support.
UsbPoint.c | Runtime functions for USB pointer device support.
UsbKbd.c | Runtime functions for USB keyboard support.
UsbKbd.h | Definitions for USB keyboard support.
UsbCcid.c | Runtime functions for USB CCID device support.
Uhci.c | USB 1.1 host UHCI specific functions.
Uhci.h | Definitions for UHCI host functions.
Ohci.c | USB 1.1 host OHCI specific functions.
Ohci.h | Definitions for OHCI host functions.
Ehci.c | USB 2.0 host EHCI specific functions.
Ehci.h | Definitions for EHCI host functions.
Xhci.c | USB 3.0 host XHCI specific functions
Xhci.h | Definitions for XHCI host functions.
UHCD ModulePart | Root\Core\em\usb – USB functions in UEFI environment.
Uhcd.cif | Component information file of UHCD module part.
Uhcd.c | AMI USB host controller driver.
AmiUsbHc.c | AMI USB HC protocol wrapper.
UsbBus.c | Source code of USB bus driver.
UsbBus.h | Definitions of USB bus driver.
UsbMisc.c | Miscellaneous functions for USB component.
Tree.c | USB device tree manipulation functions.
Tree.h | Definitions of USB device tree function.
UsbSrc.sdl | BIOS build parameters and elinks for USB component.
EfiUsbHid.c | EFI driver for USB HID device support.
EfiUsbKb.c | EFI driver for USB keyboard support.
EfiUsbKb.h | Definitions for EFI driver of USB keyboard.
EfiUsbMass.c | EFI Driver for USB mass storage devices support.
EfiUsbMs.c | EFI Driver for USB mice support.
EfiUsbPoint.c | EFI Driver for USB pointer support.
EfiUsbCcid.c | EFI Driver for USB CCID device support.
ComponentName.c | Contains EFI component name for EFI standard.
ComponentName.h | Definitions for EFI component name.
Framework ModulePart | Root\Core\em\usb - UEFI Framework.
Framework.cif | Component information file of framework module part.
Uhcd.mak | Makefile for UHCD module part.
Uhcd.h | AMI USB host controller driver header file.
Usbdef.h | AMI USB driver definitions.
Amidef.h | AMI USB driver framework specific definitions.
Uhcd.dxs | Dependency file for UHCD driver.
AmiUsb.dxs | Dependency file for AMI USB wrapper driver.
Usbrt.mak | Makefile for USB runtime component.
AmiUsb.h | AMI USB driver definitions.
AmiUsbRtCcid.h | AMI USB CCID runtime driver definitions.
AmiUsbProtocols ModulePart | Root\Include\Protocol - USB Protocols definitions.
AmiUsbProtocols.cif | Component information file of AMI USB protocols module part.
AmiUsbController.h | Definitions of AMI specific USB protocol.
UsbIo.h | EFI USB IO protocol definitions.
UsbHc.h | USB HC protocol definitions.
UsbPolicy.h | USB policy definitions.
Emul6064Trap.h | Definitions of KBC emulation functions.
Emul6064KbdInput.h | Definitions of keyboard support of KBC emulation functions.
Emul6064MsInput.h | Definitions of mouse support of KBC emulation functions.
AmiUsbCcid.h | AMI USB CCID protocol definitions
UsbSetup ModulePart | Root\Core\em\usb\setup - Setup items and functions.
UsbSetup.cif | Component information file of USB setup module part.
Usb.uni | Unicode strings of USB component.
Usb.sd | Setup definitions of USB component.
UsbSetup.c | Setup functions of USB component.
UsbLegacy ModulePart | Root\Core\em\usb – Contains module parts for legacy support.
UsbLegacy.cif | Component information file of USB legacy module part.
Usb Int13 ModulePart | Root\Core\em\usb\int13 - Usb Int13 driver.
UsbInt13.cif | Component information file of USB Int13 module part.
UsbInt13.sdl | BIOS build parameters of USB Int13 module part.
UsbInt13.mak | Makefile of Usb Int13 module part.
UsbInt13.inf | Description file for inject USB int13 binary to BIOS ROM image.
UsbInt13.c | Functions for USB Int13 functions installation.
UsbInt13.h | Definitions for USB Int13 functions installation.
UsbInt13ComponentName.c | Component Name Protocol Member Functions for USB Int13.
UsbInt13.dxs | Dependency file for USB int13.
USB INT13 16-bit Binary ModulePart | Root\Addon - USB Int13 service binary image.
UsbI13bin.cif | Component information file of USB Int13 binary module part.
Ui13.bin | Int13 functions for USB module.
USB Int1C ModulePart | Root\Core\EM\usb\int1c - Int1c functions for USB module.
UsbInt1c.cif | Component information file of UsbInt1c module part.
UsbInt1c.sdl | BIOS build parameters of USB Int1c module part.
UsbInt1c.mak | Makefile of USB Int1c module part.
UsbInt1c.asm | Int1c timer interrupt handler for USB module.
SouthBridge - Template ModulePart | Root\Chipset\sb\usb – Template for SB specific changes.
UsbSb.cif | Component information file of SB component.
UsbSb.c | Contain South bridge specific changes for USB.
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_40, Dated: 2012/07/03
Visual eBios: RSS.5.73.0239, Dated: 2012/06/21
Compiler Tool(s): Microsoft Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
NONE
General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
Fix build error if we use USBSB_PeriodicTimerCallBack.
Corrent max packet size check for full speed device in AmiUsb2HcSyncInterruptTransfer().

EIP Addressed
EIP #138258 - Change option name "USB3.0 Support" to "XHCI Legacy Support" and add the token "HIDE_USB_XHCI_LEGACY_SUPPORT_SETUP_QUESTION" to switch to hide/Un-hide USB XHCI Legacy Support setup question.
EIP #138257 - Correct USB HID device type.
EIP #135636 - NumLock LED cannot be on/off properly.
EIP #132985 - Clear the SMI enable bit if UHCI is not controlled by BIOS.
EIP #139714 - Improve the UsbIoPortReset function to support the xhci controller.
EIP #139719 - Ignore the bulk data if the status transport causes time out.
EIP #139807 - Handle the 4 bytes of item size.
EIP #137385 - Check if host controller interface version number is valid.
EIP #135009 - Retry 3 times when devices stall the get descriptor command.
EIP #131339 - Synchronize USB\Touch device mouse pointer position.
EIP #136594 - Support 64 bits LBA of usb mass storages.
EIP #143251 - The usb mouse lost if it behinds TI TUSB8040A1 hub under BIOS.
EIP #143124 - Added 1 ms delay after HUB port reset.
EIP #147532 - Dynamic DVD Insertion failed to Read the files.
EIP #142940 - USB keyboard cannot work if token USB_RUNTIME_DRIVER_IN_SMM is disabled.
EIP #146938 - USB 3.0 Dev Disconnect Asserts on specific USB 3.0 ports on AztecCity/MayanCity.
EIP #145736 - Correct Interval field in Endpoint context.
EIP #145745 - Route String field shall be set for all USB devices, irrespective of their speed.
EIP #147402 - System hang at 0xA2 if plugging Seagate USB device.
EIP #142509 - Added usage 0x87 and 0x89.
EIP #145616 - Check if the key has been registered before.
EIP #147574 - MbrWriteProtectionProtocol file name changesd to AmiMbrWriteProtectionProtocol.h
EIP #142992 - Install usb legacy boot device only if the class is mass storage.
EIP #148707 - We need to store wheel data before clearing the buffer.
EIP #148411 - Check if CCB_MOUSE_INTRPT is set before we sent mouse data.
EIP #148177 - change from EFI_MBR_WRITE_PROTECTION_PROTOCOL to AMI_BLOCKIO_WRITE_PROTECTION_PROTOCOL
Files Changed for General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
Core\EM\usb\amiusbhc.c
Chipset\SB\usb\usbsb.c

EIP Addressed
Board/EM/usb/usb.sdl (EIP #138258)
Core/EM/usb/rt/amiusb.c (EIP #136594) (EIP #135636) (EIP #138257)
Core/EM/usb/rt/usbkbd.c (EIP #135636)
Core/EM/usb/rt/uhci.c (EIP #132985)
Core/EM/usb/rt/usb.c (EIP #143251) (EIP #139714)
Core/EM/usb/rt/usbhub.c (EIP #143124) (EIP #143251)
Core/EM/usb/rt/usbmass.c (EIP #147532) (EIP #136594) (EIP #139719)
Core/EM/usb/rt/UsbMass.h (EIP #136594)
Core/EM/usb/rt/usbms.c (EIP #148707)
Core/EM/usb/rt/usbhid.c (EIP #139807) (EIP #138257)
Core/EM/usb/rt/usbkbd.h (EIP #148411)
Core/EM/usb/rt/ehci.c (EIP #142940)
Core/EM/usb/rt/syskbc.c (EIP #148411)
Core/EM/usb/rt/xhci.c (EIP #145745) (EIP #145736) (EIP #146938) (EIP #137385)
Core/EM/usb/uhcd.c (EIP #138257)
Core/EM/usb/usbbus.c (EIP #147402) (EIP #135009)
Core/EM/usb/efiusbkb.c (EIP #145616) (EIP #142509) (EIP #135636)
Core/EM/usb/efiusbkb.h (EIP #142509)
Core/EM/usb/usbbus.h (EIP #147402)
Core/EM/usb/efiusbmass.c (EIP #148177) (EIP #147574) (EIP #136594)
Core/EM/usb/efiusbms.c (EIP #148707) (EIP #131339)
Core/EM/usb/efiusbpoint.c (EIP #131339)
Core/EM/usb/efiusbhid.c (EIP #138257)
Core/EM/usb/rt/usbdef.h (EIP #136594) (EIP #138257)
Core/EM/usb/rt/amidef.h (EIP #142509)
Core/EM/usb/setup/usb.uni (EIP #138258)
Core/EM/usb/setup/usb.sd (EIP #138258)
Core/EM/usb/int13/UsbInt13.c (EIP #136594) (EIP #142992)
Core/EM/usb/int13/UsbInt13.h (EIP #136594)
Addon/UI13.bin (EIP #136594)
Known Limitations and Erratas in this label:
NONE
Remaining Issues:
NONE
Unit Testing:
The test report will provide upon request.
Validation Testing:
NONE
Release History:
4.6.3_USB_08.10.28 Release Notes
4.6.3_USB_08.10.27 Release Notes
4.6.3_USB_08.10.26 Release Notes
4.6.3_USB_08.10.24 Release Notes

© American Megatrends Inc.


Release Notes - NDA Required

Component Information:
Component Title: USB
Component Reference Name: USB
Component Type: eModule
Release Date: 2014-05-16
Source Control Label: 4.6.3_USB_08.10.30
Source Control Location: SS: Alaska;$/Alaska:/Source/Modules/USB/Alaska;
Dependencies
Component Dependencies
N0NE

File Dependencies
N0NE

Protocol Dependencies
ONE
Dependent Protocol Name: SmmBaseProtocol
Dependent Protocol GUID: EFI_SMM_BASE_PROTOCOL_GUID
TWO
Dependent Protocol Name: LegacyBiosProtocol
Dependent Protocol GUID: EFI_LEGACY_BIOS_PROTOCOL_GUID
Non-Compiled BIN and LIB File(s) within this Component:

UI13.bin
Component Title: USB
Component Reference Name: USB
Component Source Control Label: CSM16_USB_03
Component Source Control Location: SS: ALASKA;$/Alaska/CSM16/USB;
Project Source Control Label: 8.00.10.00.0x.75
Project Source Control Location: SS: ALASKA;$/Alaska/CSM16/Complete Project/Furball10.64K/Furball10.veb;
Component Description:
This component, termed as "USB" is designed to provide support for:
UHCI, OHCI, EHCI, and XHCI controllers, and USB devices
Filename | Description
Main Component | Root\Board\em\usb
amiusb.cif | Component information file for the eModule.
Usb.sdl | BIOS build parameters for USB component.
UsbPort.c | Porting Specific functions implementation.
Usb.chm | Contains module description and release note of USB component.
UsbRt ModulePart | Root\Core\em\usb\rt – Runtime functions.
UsbRt.cif | Component information file of USB runtime module part
AmiUsb.c | AMI USB API Implementation functions.
Guids.c | AMI USB guids library.
Debug.c | AMI USB Debug output implementation routnes.
Elib.c | AMI USB MEM/IO/PCI access routines.
SysKbc.c | KBC related functions for platform with HW KBC.
SysNoKbc.c | KBC related functions for platform without HW KBC.
Usb.c | AMI USB main wrapper.
UsbHub.c | Runtime functions for USB hub support.
UsbMass.c | Runtime functions for USB mass storage device support.
UsbMass.h | Definitions for USB mass storage device support.
UsbHid.c | Runtime functions for USB HID device support.
UsbMs.c | Runtime functions for USB mice support.
UsbPoint.c | Runtime functions for USB pointer device support.
UsbKbd.c | Runtime functions for USB keyboard support.
UsbKbd.h | Definitions for USB keyboard support.
UsbCcid.c | Runtime functions for USB CCID device support.
Uhci.c | USB 1.1 host UHCI specific functions.
Uhci.h | Definitions for UHCI host functions.
Ohci.c | USB 1.1 host OHCI specific functions.
Ohci.h | Definitions for OHCI host functions.
Ehci.c | USB 2.0 host EHCI specific functions.
Ehci.h | Definitions for EHCI host functions.
Xhci.c | USB 3.0 host XHCI specific functions
Xhci.h | Definitions for XHCI host functions.
UHCD ModulePart | Root\Core\em\usb – USB functions in UEFI environment.
Uhcd.cif | Component information file of UHCD module part.
Uhcd.c | AMI USB host controller driver.
AmiUsbHc.c | AMI USB HC protocol wrapper.
UsbBus.c | Source code of USB bus driver.
UsbBus.h | Definitions of USB bus driver.
UsbMisc.c | Miscellaneous functions for USB component.
Tree.c | USB device tree manipulation functions.
Tree.h | Definitions of USB device tree function.
UsbSrc.sdl | BIOS build parameters and elinks for USB component.
EfiUsbHid.c | EFI driver for USB HID device support.
EfiUsbKb.c | EFI driver for USB keyboard support.
EfiUsbKb.h | Definitions for EFI driver of USB keyboard.
EfiUsbMass.c | EFI Driver for USB mass storage devices support.
EfiUsbMs.c | EFI Driver for USB mice support.
EfiUsbPoint.c | EFI Driver for USB pointer support.
EfiUsbCcid.c | EFI Driver for USB CCID device support.
ComponentName.c | Contains EFI component name for EFI standard.
ComponentName.h | Definitions for EFI component name.
Framework ModulePart | Root\Core\em\usb - UEFI Framework.
Framework.cif | Component information file of framework module part.
Uhcd.mak | Makefile for UHCD module part.
Uhcd.h | AMI USB host controller driver header file.
Usbdef.h | AMI USB driver definitions.
Amidef.h | AMI USB driver framework specific definitions.
Uhcd.dxs | Dependency file for UHCD driver.
AmiUsb.dxs | Dependency file for AMI USB wrapper driver.
Usbrt.mak | Makefile for USB runtime component.
AmiUsb.h | AMI USB driver definitions.
AmiUsbRtCcid.h | AMI USB CCID runtime driver definitions.
AmiUsbProtocols ModulePart | Root\Include\Protocol - USB Protocols definitions.
AmiUsbProtocols.cif | Component information file of AMI USB protocols module part.
AmiUsbController.h | Definitions of AMI specific USB protocol.
UsbIo.h | EFI USB IO protocol definitions.
UsbHc.h | USB HC protocol definitions.
UsbPolicy.h | USB policy definitions.
Emul6064Trap.h | Definitions of KBC emulation functions.
Emul6064KbdInput.h | Definitions of keyboard support of KBC emulation functions.
Emul6064MsInput.h | Definitions of mouse support of KBC emulation functions.
AmiUsbCcid.h | AMI USB CCID protocol definitions
UsbSetup ModulePart | Root\Core\em\usb\setup - Setup items and functions.
UsbSetup.cif | Component information file of USB setup module part.
Usb.uni | Unicode strings of USB component.
Usb.sd | Setup definitions of USB component.
UsbSetup.c | Setup functions of USB component.
UsbLegacy ModulePart | Root\Core\em\usb – Contains module parts for legacy support.
UsbLegacy.cif | Component information file of USB legacy module part.
Usb Int13 ModulePart | Root\Core\em\usb\int13 - Usb Int13 driver.
UsbInt13.cif | Component information file of USB Int13 module part.
UsbInt13.sdl | BIOS build parameters of USB Int13 module part.
UsbInt13.mak | Makefile of Usb Int13 module part.
UsbInt13.inf | Description file for inject USB int13 binary to BIOS ROM image.
UsbBbs.c | Functions for BBS table of USB mass storage devices.
UsbInt13.c | Functions for USB Int13 functions installation.
UsbInt13.h | Definitions for USB Int13 functions installation.
UsbInt13ComponentName.c | Component Name Protocol Member Functions for USB Int13.
UsbInt13.dxs | Dependency file for USB int13.
USB INT13 16-bit Binary ModulePart | Root\Addon - USB Int13 service binary image.
UsbI13bin.cif | Component information file of USB Int13 binary module part.
Ui13.bin | Int13 functions for USB module.
USB Int1C ModulePart | Root\Core\EM\usb\int1c - Int1c functions for USB module.
UsbInt1c.cif | Component information file of UsbInt1c module part.
UsbInt1c.sdl | BIOS build parameters of USB Int1c module part.
UsbInt1c.mak | Makefile of USB Int1c module part.
UsbInt1c.asm | Int1c timer interrupt handler for USB module.
SouthBridge - Template ModulePart | Root\Chipset\sb\usb – Template for SB specific changes.
UsbSb.cif | Component information file of SB component.
UsbSb.c | Contain South bridge specific changes for USB.
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_41, Dated: 2013/03/19
Visual eBios: RSS.5.73.0244, Dated: 2013/03/19
Compiler Tool(s): Microsoft Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
EIP #161709 - Dynamically update the usb device list in BIOS setup.
General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
Add a #ifndef CR around the definition of the CR MACRO.
Fix the code check error result.

EIP Addressed
EIP #149854 - Add data length parameter to polling callback function.
EIP #149929 - Stop all external EHCI HCs in ACPI enable call.
EIP #151374 - Calculates maximum data length to be reported in the HID device.
EIP #151894 - Correct the break code of arrow keys.
EIP #152203 - Hardcoded value for bProtocolNum removed.
EIP #152539 - If the pervious device status is that media not present and current device status comes as media present, modified the code to report as media changed along with current status in the usbmass.c.
EIP #155805 - WinCE loader can't boot.
EIP #156126 - The power Format of UEFI can not be identified when we install OS from USB CD-ROM.
EIP #156742 - System hang at 0x9C during DC cycle test under RHEL6.5 UEFI.
EIP #157193 - Stop the usb host controllers at AcpiModeEnable if they art extend cards or don't support HW SMI.
EIP #158119 - Change parent port number of USB device paths to 0-based.
EIP #158723 - It sends set idle command before getting report descriptor command.
EIP #160289 - Handle zero length of short packet.
EIP #161240 - Use Div64 if variables is UINT64.
EIP #162589 - Do not register external controller as key repeat controller.
EIP #162993 - We need to return success on INT 13 func 2 even if there is no media.
EIP #163828 - The mouses stop more than 4 seconds during TP 0xB4 when power on several times.
EIP #164772 - System would auto wake up if USB hot-plug in S5 state via USB hub.
EIP #164842 - Check if the devices have put into to our queue before we put them.
EIP #165208 - Add 20 ms delay after port reset completed.
EIP #165318 - Retry the DisconnectController() from a timer event until it succeeds if it fails.
EIP #165610 - We still need to try readformatcapacity command even if the subclass isn't UFI.
EIP #166594 - Add the token "USB_SETUP_VARIABLE_RUNTIME_ACCESS" to control if we set runtime attribute for the setup variables used by USB module.
EIP #166835 - Arrow keys cannot work with specific USB keyboard.
EIP #167644 - Add VARSTORE variable eLink into USB module.
EIP #168389 - Usb tip switch data may not be correct if the device is multi-touch.
EIP #168515 - Add the token "USB_CONTROLLERS_INITIAL_DELAY_LIST" if usb controllers need to delay for stabilization.
Files Changed for General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
Core/EM/usb/efiusbms.c
Core/EM/usb/uhcd.c
Core/EM/usb/rt/usbkbd.c

EIP Addressed
Board/EM/usb/usb.sdl (EIP #161709) (EIP #166594) (EIP #167644) (EIP #168515)
Board/EM/usb/usbport.c (EIP #166594)
Core/EM/usb/rt/amiusb.c (EIP #149929) (EIP #157193) (EIP #164842)
Core/EM/usb/rt/usbkbd.c (EIP #149854) (EIP #166835)
Core/EM/usb/rt/uhci.c (EIP #149854) (EIP #151374) (EIP #160289) (EIP #162589)
Core/EM/usb/rt/usb.c (EIP #149854) (EIP #164772) (EIP #164842) (EIP #168515)
Core/EM/usb/rt/usbhub.c (EIP #149854) (EIP #151374) (EIP #165208)
Core/EM/usb/rt/usbmass.c (EIP #155805) (EIP #161240) (EIP #156126) (EIP #152539) (EIP #165610) (EIP #162993) (EIP #164842)
Core/EM/usb/rt/usbCCID.c (EIP #152203) (EIP #149854) (EIP #151374)
Core/EM/usb/rt/usbms.c (EIP #149854) (EIP #166835)
Core/EM/usb/rt/usbhid.c (EIP #149854) (EIP #158723) (EIP #163828) (EIP #151374) (EIP #166835)
Core/EM/usb/rt/usbpoint.c (EIP #149854) (EIP #166835) (EIP #168389)
Core/EM/usb/rt/usbkbd.h (EIP #149854) (EIP #166835)
Core/EM/usb/rt/ehci.c (EIP #149854) (EIP #164842) (EIP #151374) (EIP #162589)
Core/EM/usb/rt/ohci.c (EIP #149854) (EIP #164842) (EIP #151374) (EIP #162589)
Core/EM/usb/rt/syskbc.c (EIP #163828) (EIP #151894) (EIP #166835)
Core/EM/usb/rt/sysnokbc.c (EIP #163828) (EIP #166835)
Core/EM/usb/rt/xhci.c (EIP #149854) (EIP #164842) (EIP #151374)
Core/EM/usb/uhcd.c (EIP #156742) (EIP #161709) (EIP #164842)
Core/EM/usb/amiusbhc.c (EIP #164842)
Core/EM/usb/usbbus.c (EIP #158119) (EIP #165318) (EIP #164842)
Core/EM/usb/efiusbmass.c (EIP #156126) (EIP #164842)
Core/EM/usb/efiusbpoint.c (EIP #166835)
Core/EM/usb/efiusbhid.c (EIP #166835)
Core/EM/usb/usbmisc.c (EIP #156742)
Core/EM/usb/uhcd.h (EIP #156742)
Core/EM/usb/rt/usbdef.h (EIP #149854) (EIP #156126) (EIP #164842) (EIP #151374) (EIP #166835)
Core/EM/usb/rt/amiusb.h (EIP #163828)
Core/EM/usb/setup/usb.sd (EIP #161709)
Core/EM/usb/setup/usbsetup.c (EIP #161709) (EIP #166594)
Core/EM/usb/int13/UsbInt13.c (EIP #164842)
Addon/UI13.bin (EIP #162993)
Chipset/SB/usb/usbsb.c (EIP #164842)
Known Limitations and Erratas in this label:
NONE
Remaining Issues:
NONE
Unit Testing:
The test report will provide upon request.
Validation Testing:
NONE
Release History:
4.6.3_USB_08.10.29 Release Notes
4.6.3_USB_08.10.28 Release Notes
4.6.3_USB_08.10.27 Release Notes
4.6.3_USB_08.10.26 Release Notes
4.6.3_USB_08.10.24 Release Notes

© American Megatrends Inc.


Release Notes - NDA Required

Component Information:
Component Title: USB
Component Reference Name: USB
Component Type: eModule
Release Date: 2014-06-09
Source Control Label: 4.6.3_USB_08.10.31
Source Control Location: SS: Alaska;$/Alaska:/Source/Modules/USB/Alaska;
Dependencies
Component Dependencies
N0NE

File Dependencies
N0NE

Protocol Dependencies
ONE
Dependent Protocol Name: SmmBaseProtocol
Dependent Protocol GUID: EFI_SMM_BASE_PROTOCOL_GUID
TWO
Dependent Protocol Name: LegacyBiosProtocol
Dependent Protocol GUID: EFI_LEGACY_BIOS_PROTOCOL_GUID
Non-Compiled BIN and LIB File(s) within this Component:

UI13.bin
Component Title: USB
Component Reference Name: USB
Component Source Control Label: CSM16_USB_03
Component Source Control Location: SS: ALASKA;$/Alaska/CSM16/USB;
Project Source Control Label: 8.00.10.00.0x.75
Project Source Control Location: SS: ALASKA;$/Alaska/CSM16/Complete Project/Furball10.64K/Furball10.veb;
Component Description:
This component, termed as "USB" is designed to provide support for:
UHCI, OHCI, EHCI, and XHCI controllers, and USB devices
Filename | Description
Main Component | Root\Board\em\usb
amiusb.cif | Component information file for the eModule.
Usb.sdl | BIOS build parameters for USB component.
UsbPort.c | Porting Specific functions implementation.
Usb.chm | Contains module description and release note of USB component.
UsbRt ModulePart | Root\Core\em\usb\rt – Runtime functions.
UsbRt.cif | Component information file of USB runtime module part
AmiUsb.c | AMI USB API Implementation functions.
Guids.c | AMI USB guids library.
Debug.c | AMI USB Debug output implementation routnes.
Elib.c | AMI USB MEM/IO/PCI access routines.
SysKbc.c | KBC related functions for platform with HW KBC.
SysNoKbc.c | KBC related functions for platform without HW KBC.
Usb.c | AMI USB main wrapper.
UsbHub.c | Runtime functions for USB hub support.
UsbMass.c | Runtime functions for USB mass storage device support.
UsbMass.h | Definitions for USB mass storage device support.
UsbHid.c | Runtime functions for USB HID device support.
UsbMs.c | Runtime functions for USB mice support.
UsbPoint.c | Runtime functions for USB pointer device support.
UsbKbd.c | Runtime functions for USB keyboard support.
UsbKbd.h | Definitions for USB keyboard support.
UsbCcid.c | Runtime functions for USB CCID device support.
Uhci.c | USB 1.1 host UHCI specific functions.
Uhci.h | Definitions for UHCI host functions.
Ohci.c | USB 1.1 host OHCI specific functions.
Ohci.h | Definitions for OHCI host functions.
Ehci.c | USB 2.0 host EHCI specific functions.
Ehci.h | Definitions for EHCI host functions.
Xhci.c | USB 3.0 host XHCI specific functions
Xhci.h | Definitions for XHCI host functions.
UHCD ModulePart | Root\Core\em\usb – USB functions in UEFI environment.
Uhcd.cif | Component information file of UHCD module part.
Uhcd.c | AMI USB host controller driver.
AmiUsbHc.c | AMI USB HC protocol wrapper.
UsbBus.c | Source code of USB bus driver.
UsbBus.h | Definitions of USB bus driver.
UsbMisc.c | Miscellaneous functions for USB component.
Tree.c | USB device tree manipulation functions.
Tree.h | Definitions of USB device tree function.
UsbSrc.sdl | BIOS build parameters and elinks for USB component.
EfiUsbHid.c | EFI driver for USB HID device support.
EfiUsbKb.c | EFI driver for USB keyboard support.
EfiUsbKb.h | Definitions for EFI driver of USB keyboard.
EfiUsbMass.c | EFI Driver for USB mass storage devices support.
EfiUsbMs.c | EFI Driver for USB mice support.
EfiUsbPoint.c | EFI Driver for USB pointer support.
EfiUsbCcid.c | EFI Driver for USB CCID device support.
ComponentName.c | Contains EFI component name for EFI standard.
ComponentName.h | Definitions for EFI component name.
Framework ModulePart | Root\Core\em\usb - UEFI Framework.
Framework.cif | Component information file of framework module part.
Uhcd.mak | Makefile for UHCD module part.
Uhcd.h | AMI USB host controller driver header file.
Usbdef.h | AMI USB driver definitions.
Amidef.h | AMI USB driver framework specific definitions.
Uhcd.dxs | Dependency file for UHCD driver.
AmiUsb.dxs | Dependency file for AMI USB wrapper driver.
Usbrt.mak | Makefile for USB runtime component.
AmiUsb.h | AMI USB driver definitions.
AmiUsbRtCcid.h | AMI USB CCID runtime driver definitions.
AmiUsbProtocols ModulePart | Root\Include\Protocol - USB Protocols definitions.
AmiUsbProtocols.cif | Component information file of AMI USB protocols module part.
AmiUsbController.h | Definitions of AMI specific USB protocol.
UsbIo.h | EFI USB IO protocol definitions.
UsbHc.h | USB HC protocol definitions.
UsbPolicy.h | USB policy definitions.
Emul6064Trap.h | Definitions of KBC emulation functions.
Emul6064KbdInput.h | Definitions of keyboard support of KBC emulation functions.
Emul6064MsInput.h | Definitions of mouse support of KBC emulation functions.
AmiUsbCcid.h | AMI USB CCID protocol definitions
UsbSetup ModulePart | Root\Core\em\usb\setup - Setup items and functions.
UsbSetup.cif | Component information file of USB setup module part.
Usb.uni | Unicode strings of USB component.
Usb.sd | Setup definitions of USB component.
UsbSetup.c | Setup functions of USB component.
UsbLegacy ModulePart | Root\Core\em\usb – Contains module parts for legacy support.
UsbLegacy.cif | Component information file of USB legacy module part.
Usb Int13 ModulePart | Root\Core\em\usb\int13 - Usb Int13 driver.
UsbInt13.cif | Component information file of USB Int13 module part.
UsbInt13.sdl | BIOS build parameters of USB Int13 module part.
UsbInt13.mak | Makefile of Usb Int13 module part.
UsbInt13.inf | Description file for inject USB int13 binary to BIOS ROM image.
UsbBbs.c | Functions for BBS table of USB mass storage devices.
UsbInt13.c | Functions for USB Int13 functions installation.
UsbInt13.h | Definitions for USB Int13 functions installation.
UsbInt13ComponentName.c | Component Name Protocol Member Functions for USB Int13.
UsbInt13.dxs | Dependency file for USB int13.
USB INT13 16-bit Binary ModulePart | Root\Addon - USB Int13 service binary image.
UsbI13bin.cif | Component information file of USB Int13 binary module part.
Ui13.bin | Int13 functions for USB module.
USB Int1C ModulePart | Root\Core\EM\usb\int1c - Int1c functions for USB module.
UsbInt1c.cif | Component information file of UsbInt1c module part.
UsbInt1c.sdl | BIOS build parameters of USB Int1c module part.
UsbInt1c.mak | Makefile of USB Int1c module part.
UsbInt1c.asm | Int1c timer interrupt handler for USB module.
SouthBridge - Template ModulePart | Root\Chipset\sb\usb – Template for SB specific changes.
UsbSb.cif | Component information file of SB component.
UsbSb.c | Contain South bridge specific changes for USB.
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_41, Dated: 2013/03/19
Visual eBios: RSS.5.73.0244, Dated: 2013/03/19
Compiler Tool(s): Microsoft Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
NONE
General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
NONE

EIP Addressed
EIP #171786 - The PS2 scan code of "0x64 Keyboard Non-US \ and |" is 0x56 and "0x67 Keypad =" is 0x59.
EIP #171837 - When use afuwin update BIOS or read ROMID under pure Win8.1 OS, sometimes the system will blue screen.
Files Changed for General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
NONE

EIP Addressed
Core/EM/usb/rt/amiusb.c (EIP #171837)
Core/EM/usb/efiusbkb.c (EIP #171786)
Known Limitations and Erratas in this label:
NONE
Remaining Issues:
NONE
Unit Testing:
The test report will provide upon request.
Validation Testing:
NONE
Release History:
4.6.3_USB_08.10.30 Release Notes
4.6.3_USB_08.10.29 Release Notes
4.6.3_USB_08.10.28 Release Notes
4.6.3_USB_08.10.27 Release Notes
4.6.3_USB_08.10.26 Release Notes
4.6.3_USB_08.10.24 Release Notes

© American Megatrends Inc.


Release Notes - NDA Required

Component Information:
Component Title: USB
Component Reference Name: USB
Component Type: eModule
Release Date: 2014-11-21
Source Control Label: 4.6.3_USB_08.10.32
Source Control Location: SS: Alaska;$/Alaska:/Source/Modules/USB/Alaska;
Dependencies
Component Dependencies
N0NE

File Dependencies
N0NE

Protocol Dependencies
ONE
Dependent Protocol Name: SmmBaseProtocol
Dependent Protocol GUID: EFI_SMM_BASE_PROTOCOL_GUID
TWO
Dependent Protocol Name: LegacyBiosProtocol
Dependent Protocol GUID: EFI_LEGACY_BIOS_PROTOCOL_GUID
Non-Compiled BIN and LIB File(s) within this Component:

UI13.bin
Component Title: USB
Component Reference Name: USB
Component Source Control Label: CSM16_USB_03
Component Source Control Location: SS: ALASKA;$/Alaska/CSM16/USB;
Project Source Control Label: 8.00.10.00.0x.76
Project Source Control Location: SS: ALASKA;$/Alaska/CSM16/Complete Project/Furball10.64K/Furball10.veb;
Component Description:
This component, termed as "USB" is designed to provide support for:
UHCI, OHCI, EHCI, and XHCI controllers, and USB devices
Filename | Description
Main Component | Root\Board\em\usb
amiusb.cif | Component information file for the eModule.
Usb.sdl | BIOS build parameters for USB component.
UsbPort.c | Porting Specific functions implementation.
Usb.chm | Contains module description and release note of USB component.
UsbRt ModulePart | Root\Core\em\usb\rt – Runtime functions.
UsbRt.cif | Component information file of USB runtime module part
AmiUsb.c | AMI USB API Implementation functions.
Guids.c | AMI USB guids library.
Debug.c | AMI USB Debug output implementation routines.
Elib.c | AMI USB MEM/IO/PCI access routines.
SysKbc.c | KBC related functions for platform with HW KBC.
SysNoKbc.c | KBC related functions for platform without HW KBC.
Usb.c | AMI USB main wrapper.
UsbHub.c | Runtime functions for USB hub support.
UsbMass.c | Runtime functions for USB mass storage device support.
UsbMass.h | Definitions for USB mass storage device support.
UsbHid.c | Runtime functions for USB HID device support.
UsbMs.c | Runtime functions for USB mice support.
UsbPoint.c | Runtime functions for USB pointer device support.
UsbKbd.c | Runtime functions for USB keyboard support.
UsbKbd.h | Definitions for USB keyboard support.
UsbCcid.c | Runtime functions for USB CCID device support.
Uhci.c | USB 1.1 host UHCI specific functions.
Uhci.h | Definitions for UHCI host functions.
Ohci.c | USB 1.1 host OHCI specific functions.
Ohci.h | Definitions for OHCI host functions.
Ehci.c | USB 2.0 host EHCI specific functions.
Ehci.h | Definitions for EHCI host functions.
Xhci.c | USB 3.0 host XHCI specific functions
Xhci.h | Definitions for XHCI host functions.
UHCD ModulePart | Root\Core\em\usb – USB functions in UEFI environment.
Uhcd.cif | Component information file of UHCD module part.
Uhcd.c | AMI USB host controller driver.
AmiUsbHc.c | AMI USB HC protocol wrapper.
UsbBus.c | Source code of USB bus driver.
UsbBus.h | Definitions of USB bus driver.
UsbMisc.c | Miscellaneous functions for USB component.
Tree.c | USB device tree manipulation functions.
Tree.h | Definitions of USB device tree function.
UsbSrc.sdl | BIOS build parameters and elinks for USB component.
EfiUsbHid.c | EFI driver for USB HID device support.
EfiUsbKb.c | EFI driver for USB keyboard support.
EfiUsbKb.h | Definitions for EFI driver of USB keyboard.
EfiUsbMass.c | EFI Driver for USB mass storage devices support.
EfiUsbMs.c | EFI Driver for USB mice support.
EfiUsbPoint.c | EFI Driver for USB pointer support.
EfiUsbCcid.c | EFI Driver for USB CCID device support.
ComponentName.c | Contains EFI component name for EFI standard.
ComponentName.h | Definitions for EFI component name.
Framework ModulePart | Root\Core\em\usb - UEFI Framework.
Framework.cif | Component information file of framework module part.
Uhcd.mak | Makefile for UHCD module part.
Uhcd.h | AMI USB host controller driver header file.
Usbdef.h | AMI USB driver definitions.
Amidef.h | AMI USB driver framework specific definitions.
Uhcd.dxs | Dependency file for UHCD driver.
AmiUsb.dxs | Dependency file for AMI USB wrapper driver.
Usbrt.mak | Makefile for USB runtime component.
AmiUsb.h | AMI USB driver definitions.
AmiUsbRtCcid.h | AMI USB CCID runtime driver definitions.
AmiUsbProtocols ModulePart | Root\Include\Protocol - USB Protocols definitions.
AmiUsbProtocols.cif | Component information file of AMI USB protocols module part.
AmiUsbController.h | Definitions of AMI specific USB protocol.
UsbIo.h | EFI USB IO protocol definitions.
UsbHc.h | USB HC protocol definitions.
UsbPolicy.h | USB policy definitions.
Emul6064Trap.h | Definitions of KBC emulation functions.
Emul6064KbdInput.h | Definitions of keyboard support of KBC emulation functions.
Emul6064MsInput.h | Definitions of mouse support of KBC emulation functions.
AmiUsbCcid.h | AMI USB CCID protocol definitions
UsbSetup ModulePart | Root\Core\em\usb\setup - Setup items and functions.
UsbSetup.cif | Component information file of USB setup module part.
Usb.uni | Unicode strings of USB component.
Usb.sd | Setup definitions of USB component.
UsbSetup.c | Setup functions of USB component.
UsbLegacy ModulePart | Root\Core\em\usb – Contains module parts for legacy support.
UsbLegacy.cif | Component information file of USB legacy module part.
Usb Int13 ModulePart | Root\Core\em\usb\int13 - Usb Int13 driver.
UsbInt13.cif | Component information file of USB Int13 module part.
UsbInt13.sdl | BIOS build parameters of USB Int13 module part.
UsbInt13.mak | Makefile of Usb Int13 module part.
UsbInt13.inf | Description file for inject USB int13 binary to BIOS ROM image.
UsbBbs.c | Functions for BBS table of USB mass storage devices.
UsbInt13.c | Functions for USB Int13 functions installation.
UsbInt13.h | Definitions for USB Int13 functions installation.
UsbInt13ComponentName.c | Component Name Protocol Member Functions for USB Int13.
UsbInt13.dxs | Dependency file for USB int13.
USB INT13 16-bit Binary ModulePart | Root\Addon - USB Int13 service binary image.
UsbI13bin.cif | Component information file of USB Int13 binary module part.
Ui13.bin | Int13 functions for USB module.
USB Int1C ModulePart | Root\Core\EM\usb\int1c - Int1c functions for USB module.
UsbInt1c.cif | Component information file of UsbInt1c module part.
UsbInt1c.sdl | BIOS build parameters of USB Int1c module part.
UsbInt1c.mak | Makefile of USB Int1c module part.
UsbInt1c.asm | Int1c timer interrupt handler for USB module.
SouthBridge - Template ModulePart | Root\Chipset\sb\usb – Template for SB specific changes.
UsbSb.cif | Component information file of SB component.
UsbSb.c | Contain South bridge specific changes for USB.
Non-Compiled BIN and LIB File(s) in Flavor:
N0NE
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_41, Dated: 2013-03-19
Visual eBios: RSS.5.73.0244, Dated: 2013-03-19
Compiler Tool(s): Microsoft Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
EIP #172625 - Usb skip table function adds the flag "SKIP_FLAG_SKIP_MULTI_LEVEL" that skips usb ports include down stream ports.
EIP #181169 - Support XHCI 1.1/USB 3.1.
General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
Disable the CCID feature by default.

EIP Addressed
EIP #169003 - Implement Block Set Address request for legacy USB devices.
EIP #170577 - Change the maximum amount of data per EHCI BulkTransfer to 16K.
EIP #173190 - Stop all USB controllers at ExitBootService event.
EIP #173387 - Remove TODO comments.
EIP #173968 - Use MaxPacketSize of hubs to poll data for the device compatibility issue.
EIP #174022 - Check if it is error when we get descriptors in UsbSmiGetDescriptor function.
EIP #174589 - Fix build error if USB_HID_KEYREPEAT_USE_SETIDLE is 1.
EIP #175328 - Bluetooth module asserts in AmiUsb_07.
EIP #175485 - USB key can't save during secure boot key.
EIP #176070 - Add 100 microseconds before we send get configuration descriptor command if the device is full speed.
EIP #176288 - Change the value of MAX_CONTROL_DATA_SIZE to 0x800.
EIP #176289 - The device path for multiple LUN devices is created using MSG_DEVICE_LOGICAL_UNIT_DP node.
EIP #176293 - The changes are for DisplayLink USB Network driver.
EIP #176517 - Check SmiTickInterval that are supported by the chipset.
EIP #176549 - Microstep USB Keyboard issue.
EIP #176898 - Use suppressif TRUE to hide the setup item.
EIP #177642 - SysKbcAutoRepeat handles the error case, the kbdInput_Send returns error status.
EIP #179794 - Unplug RTKUSB LAN on BSU cause system hang up.
EIP #180089 - After updating to AMI_USB_07, we get EHCI TIMEOUT for specific mouse.
EIP #180650 - Hide mass storage devices if "Usb Support" is disable.
EIP #180686 - Right shifts 64bit values that should be used Shr64().
EIP #180970 - Update X and Y data to usbmousedata and install SimplePointerProtocol interface if the mouses are using boot protocol interface.
EIP #182011 - We don't need to update NVRAM variables in InstallUsbMass and UninstallUSBMass functions.
EIP #182567 - POST B4h sometimes stays about 30 sec if using special KB/Ms.
EIP #183463 - In UEFI spec, the definitions of bits within ActiveButtons are EFI_ABSP_TouchActive and EFI_ABS_AltActive, we don't support AltActive, clear the unnecessary bits.
EIP #183522 - Heads, Sectors and Cylinders aren't correct if usb mass storages report media change.
EIP #183572 - Change tpl of UsbHcOnTimer to EFI_TPL_CALLBACK.
EIP #183901 - System will hang up when attaching special docking.
EIP #185391 - Use 0xF to mask the port number for SKIP_FLAG_SKIP_MULTI_LEVEL function.
EIP #186438 - We should close UsbIoProtocol if it has any error in InstallUsbMass.
EIP #186639 - Medigenic-Esterline USB keyboard (Advanced Input Devices chip) workaround.
Files Changed for General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
Core/EM/usb/usbsrc.sdl

EIP Addressed
Board/EM/usb/usbport.c (EIP #172625) (EIP #173387) (EIP #180650) (EIP #185391)
Core/EM/usb/rt/syskbc.c (EIP #173387) (EIP #177642)
Core/EM/usb/rt/uhci.c (EIP #173387)
Core/EM/usb/rt/usb.c (EIP #174589) (EIP #173387) (EIP #176070) (EIP #176293) (EIP #182567) (EIP #181169)
Core/EM/usb/rt/usbCCID.c (EIP #173387)
Core/EM/usb/rt/usbhid.c (EIP #176549) (EIP#182567) (EIP#183901) (EIP #186639)
Core/EM/usb/rt/usbhub.c (EIP #173968)
Core/EM/usb/rt/usbkbd.c (EIP #176549)
Core/EM/usb/rt/usbmass.c (EIP #173387) (EIP #175485) (EIP #180686) (EIP #183522)
Core/EM/usb/rt/UsbMass.h (EIP #175485)
Core/EM/usb/rt/usbms.c (EIP #180970)
Core/EM/usb/rt/usbpoint.c (EIP #183463)
Core/EM/usb/rt/xhci.c (EIP #173387) (EIP #174022) (EIP #169003) (EIP# 181169)
Core/EM/usb/rt/xhci.h (EIP #169003) (EIP #181169)
Core/EM/usb/amiusbhc.c (EIP #175328)
Core/EM/usb/efiusbhid.c (EIP #180970)
Core/EM/usb/efiusbmass.c (EIP #174022) (EIP #182011) (EIP #186438) (EIP #183572)
Core/EM/usb/uhcd.c (EIP #173387) (EIP #173190) (EIP #180650)
Core/EM/usb/usbbus.c (EIP #173387) (EIP #176289) (EIP #176293) (EIP #180089) (EIP #179794) (EIP #181169) (EIP #183572)
Core/EM/usb/usbsrc.sdl (EIP #170577)
Core/EM/usb/rt/usbdef.h (EIP #176288) (EIP #176549) (EIP #180089) (EIP #182567) (EIP #181169)
Include/Protocol/AmiUsbController.h (EIP #172625)
Include/Protocol/UsbHC.h (EIP #181169)
Core/EM/usb/setup/usb.sd (EIP #176898)
Core/EM/usb/setup/usbsetup.c (EIP #173387) (EIP #182011)
Chipset/SB/usb/usbsb.c (EIP #176517)
Known Limitations and Erratas in this label:
NONE
Remaining Issues:
NONE
Unit Testing:
Test1: USB Device Function.
1. Connect USB devices (Keyboard, Mice and Mass Storage) to SUT.
2. Power on SUT
3. Enter BIOS setup or boot to DOS, Shell or Win8.1.
4. Ensure USB device behaviors well.
Test2: USB Device Hotpluggability.
1. Power on system with target USB devices (Keyboard, Mice and Mass Storage) are connected.
2. Power on SUT
3. Enter BIOS setup or boot to DOS, Shell or Win8.1
4. Remove USB devices
5. Insert USB devices
6. Ensure USB device behaviors well.
7. Repeat steps #4, #5, #6 five times.
Validation Testing:
Test Procedure Report
Release History:
4.6.3_USB_08.10.31 Release Notes
4.6.3_USB_08.10.30 Release Notes
4.6.3_USB_08.10.29 Release Notes
4.6.3_USB_08.10.28 Release Notes
4.6.3_USB_08.10.27 Release Notes
4.6.3_USB_08.10.26 Release Notes
4.6.3_USB_08.10.24 Release Notes

© American Megatrends Inc.


Release Notes - NDA Required

Component Information:
Component Title: USB
Component Reference Name: USB
Component Type: eModule
Release Date: 2014-12-18
Source Control Label: 4.6.3_USB_08.10.33
Source Control Location: SS: Alaska;$/Alaska:/Source/Modules/USB/Alaska;
Dependencies
Component Dependencies
AmiBufferValidationLib
Dependent Component Title: AmiBufferValidationLib
Dependent Component Reference Name: AmiBufferValidationLib
Dependent Source Control Label: AmiBufferValidationLib_01
Dependent Source Control Location: Path:$/Alaska/SOURCE/Modules/AmiBufferValidationLib;

File Dependencies
N0NE

Protocol Dependencies
ONE
Dependent Protocol Name: SmmBaseProtocol
Dependent Protocol GUID: EFI_SMM_BASE_PROTOCOL_GUID
TWO
Dependent Protocol Name: LegacyBiosProtocol
Dependent Protocol GUID: EFI_LEGACY_BIOS_PROTOCOL_GUID
Non-Compiled BIN and LIB File(s) within this Component:

UI13.bin
Component Title: USB
Component Reference Name: USB
Component Source Control Label: CSM16_USB_03
Component Source Control Location: SS: ALASKA;$/Alaska/CSM16/USB;
Project Source Control Label: 8.00.10.00.0x.76
Project Source Control Location: SS: ALASKA;$/Alaska/CSM16/Complete Project/Furball10.64K/Furball10.veb;
Component Description:
This component, termed as "USB" is designed to provide support for:
UHCI, OHCI, EHCI, and XHCI controllers, and USB devices
Filename | Description
Main Component | Root\Board\em\usb
amiusb.cif | Component information file for the eModule.
Usb.sdl | BIOS build parameters for USB component.
UsbPort.c | Porting Specific functions implementation.
Usb.chm | Contains module description and release note of USB component.
UsbRt ModulePart | Root\Core\em\usb\rt – Runtime functions.
UsbRt.cif | Component information file of USB runtime module part
AmiUsb.c | AMI USB API Implementation functions.
Guids.c | AMI USB guids library.
Debug.c | AMI USB Debug output implementation routines.
Elib.c | AMI USB MEM/IO/PCI access routines.
SysKbc.c | KBC related functions for platform with HW KBC.
SysNoKbc.c | KBC related functions for platform without HW KBC.
Usb.c | AMI USB main wrapper.
UsbHub.c | Runtime functions for USB hub support.
UsbMass.c | Runtime functions for USB mass storage device support.
UsbMass.h | Definitions for USB mass storage device support.
UsbHid.c | Runtime functions for USB HID device support.
UsbMs.c | Runtime functions for USB mice support.
UsbPoint.c | Runtime functions for USB pointer device support.
UsbKbd.c | Runtime functions for USB keyboard support.
UsbKbd.h | Definitions for USB keyboard support.
UsbCcid.c | Runtime functions for USB CCID device support.
Uhci.c | USB 1.1 host UHCI specific functions.
Uhci.h | Definitions for UHCI host functions.
Ohci.c | USB 1.1 host OHCI specific functions.
Ohci.h | Definitions for OHCI host functions.
Ehci.c | USB 2.0 host EHCI specific functions.
Ehci.h | Definitions for EHCI host functions.
Xhci.c | USB 3.0 & 3.1 host XHCI specific functions
Xhci.h | Definitions for XHCI host functions.
UHCD ModulePart | Root\Core\em\usb – USB functions in UEFI environment.
Uhcd.cif | Component information file of UHCD module part.
Uhcd.c | AMI USB host controller driver.
AmiUsbHc.c | AMI USB HC protocol wrapper.
UsbBus.c | Source code of USB bus driver.
UsbBus.h | Definitions of USB bus driver.
UsbMisc.c | Miscellaneous functions for USB component.
Tree.c | USB device tree manipulation functions.
Tree.h | Definitions of USB device tree function.
UsbSrc.sdl | BIOS build parameters and elinks for USB component.
EfiUsbHid.c | EFI driver for USB HID device support.
EfiUsbKb.c | EFI driver for USB keyboard support.
EfiUsbKb.h | Definitions for EFI driver of USB keyboard.
EfiUsbMass.c | EFI Driver for USB mass storage devices support.
EfiUsbMs.c | EFI Driver for USB mice support.
EfiUsbPoint.c | EFI Driver for USB pointer support.
EfiUsbCcid.c | EFI Driver for USB CCID device support.
ComponentName.c | Contains EFI component name for EFI standard.
ComponentName.h | Definitions for EFI component name.
Framework ModulePart | Root\Core\em\usb - UEFI Framework.
Framework.cif | Component information file of framework module part.
Uhcd.mak | Makefile for UHCD module part.
Uhcd.h | AMI USB host controller driver header file.
Usbdef.h | AMI USB driver definitions.
Amidef.h | AMI USB driver framework specific definitions.
Uhcd.dxs | Dependency file for UHCD driver.
AmiUsb.dxs | Dependency file for AMI USB wrapper driver.
Usbrt.mak | Makefile for USB runtime component.
AmiUsb.h | AMI USB driver definitions.
AmiUsbRtCcid.h | AMI USB CCID runtime driver definitions.
AmiUsbProtocols ModulePart | Root\Include\Protocol - USB Protocols definitions.
AmiUsbProtocols.cif | Component information file of AMI USB protocols module part.
AmiUsbController.h | Definitions of AMI specific USB protocol.
UsbIo.h | EFI USB IO protocol definitions.
UsbHc.h | USB HC protocol definitions.
UsbPolicy.h | USB policy definitions.
Emul6064Trap.h | Definitions of KBC emulation functions.
Emul6064KbdInput.h | Definitions of keyboard support of KBC emulation functions.
Emul6064MsInput.h | Definitions of mouse support of KBC emulation functions.
AmiUsbCcid.h | AMI USB CCID protocol definitions
UsbSetup ModulePart | Root\Core\em\usb\setup - Setup items and functions.
UsbSetup.cif | Component information file of USB setup module part.
Usb.uni | Unicode strings of USB component.
Usb.sd | Setup definitions of USB component.
UsbSetup.c | Setup functions of USB component.
UsbLegacy ModulePart | Root\Core\em\usb – Contains module parts for legacy support.
UsbLegacy.cif | Component information file of USB legacy module part.
Usb Int13 ModulePart | Root\Core\em\usb\int13 - Usb Int13 driver.
UsbInt13.cif | Component information file of USB Int13 module part.
UsbInt13.sdl | BIOS build parameters of USB Int13 module part.
UsbInt13.mak | Makefile of Usb Int13 module part.
UsbInt13.inf | Description file for inject USB int13 binary to BIOS ROM image.
UsbBbs.c | Functions for BBS table of USB mass storage devices.
UsbInt13.c | Functions for USB Int13 functions installation.
UsbInt13.h | Definitions for USB Int13 functions installation.
UsbInt13ComponentName.c | Component Name Protocol Member Functions for USB Int13.
UsbInt13.dxs | Dependency file for USB int13.
USB INT13 16-bit Binary ModulePart | Root\Addon - USB Int13 service binary image.
UsbI13bin.cif | Component information file of USB Int13 binary module part.
Ui13.bin | Int13 functions for USB module.
USB Int1C ModulePart | Root\Core\EM\usb\int1c - Int1c functions for USB module.
UsbInt1c.cif | Component information file of UsbInt1c module part.
UsbInt1c.sdl | BIOS build parameters of USB Int1c module part.
UsbInt1c.mak | Makefile of USB Int1c module part.
UsbInt1c.asm | Int1c timer interrupt handler for USB module.
SouthBridge - Template ModulePart | Root\Chipset\sb\usb – Template for SB specific changes.
UsbSb.cif | Component information file of SB component.
UsbSb.c | Contain South bridge specific changes for USB.
Non-Compiled BIN and LIB File(s) in Flavor:
N0NE
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_41, Dated: 2013-03-19
Visual eBios: RSS.5.73.0244, Dated: 2013-03-19
Compiler Tool(s): Microsoft Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
NONE
General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
NONE

EIP Addressed
EIP #183742 - Check if default xhci timeouts are defined.
EIP #185972 - To acquire more bandwidth, a dynamically transfer queue allocation mechanism is required.
EIP #186754 - The minimum of sector should be 1.
EIP #188119 - Disconnect devices and uninstall usb device related protocols if we call stop api for the host controllers.
EIP #188492 - Create a token to keep usb mass storage devices are RemovableMedia.
EIP #188680 - Add Genovation USB Mini-Terminal Model #904-RJ to UsbBadDeviceTable.
EIP #189293 - Implement XHCI key repeat function.
EIP #190127 - Remove scan code algorithm update.
EIP #190205 - Add the token "DEFAULT_XHCI_HANDOFF_OPTION" that controls the default value of the XHCI Hand-off option.
EIP #191745 - Check if this device is still enabled before we ring the door bell to start polling interrupt endpoint.
EIP #192326 - Check that division by zero exception doesn't occur.
EIP #192468 - Set XHCI BIOS own bit when the BIOS now owns the XHCI controller.
EIP #192819 - Check the endpoint state before we send related commands.
EIP #193805 - Security Enhancement for SMIHandler in USB module.
EIP #193829 - Ghost on multiple USB dvd rom span (Legacy Dos )fails if boot disk is smaller than second disk.
EIP #194720 - System shutdown delay when connect with cardreader.
EIP #196114 - Fix build error if x64_BUILD is 0.
EIP #196712 - Change usb form definition to USB_FORM_USB.
Files Changed for General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
NONE

EIP Addressed
board/em/usb/usb.sdl (EIP #190205) (EIP #188492)
board/em/usb/usbport.c (EIP #188680)
core/em/usb/rt/amiusb.c (EIP #189293) (EIP #193805)
core/em/usb/rt/ehci.c (EIP #185972)
core/em/usb/rt/usb.c (EIP #189293) (EIP #194720)
core/em/usb/rt/usbkbd.c (EIP #188119) (EIP #190127)
core/em/usb/rt/usbmass.c (EIP #188492) (EIP #186754) (EIP #192326) (EIP #193829)
core/em/usb/rt/xhci.c (EIP #189293) (EIP #192468) (EIP #191745) (EIP# 192819)
core/em/usb/rt/xhci.h (EIP #189293) (EIP #183742)
core/em/usb/uhcd.c (EIP #188119) (EIP #193805) (EIP #196114)
core/em/usb/usbbus.c (EIP #188119)
core/em/usb/uhcd.h (EIP #188119)
core/em/usb/rt/usbdef.h (EIP #185972) (EIP #193805)
core/em/usb/rt/usbrt.mak (EIP #193805)
core/em/usb/setup/usb.sd (EIP #190205) (EIP #196712)
chipset/sb/usb/usbsb.c (EIP #193805)
Known Limitations and Erratas in this label:
NONE
Remaining Issues:
NONE
Unit Testing:
Test1: USB Device Function.
1. Connect USB devices (Keyboard, Mice and Mass Storage) to SUT.
2. Power on SUT
3. Enter BIOS setup or boot to DOS, Shell or Win8.1.
4. Ensure USB device behaviors well.
Test2: USB Device Hotpluggability.
1. Power on system with target USB devices (Keyboard, Mice and Mass Storage) are connected.
2. Power on SUT
3. Enter BIOS setup or boot to DOS, Shell or Win8.1
4. Remove USB devices
5. Insert USB devices
6. Ensure USB device behaviors well.
7. Repeat steps #4, #5, #6 five times.
Validation Testing:
Test Procedure Report
Release History:
4.6.3_USB_08.10.32 Release Notes
4.6.3_USB_08.10.31 Release Notes
4.6.3_USB_08.10.30 Release Notes
4.6.3_USB_08.10.29 Release Notes
4.6.3_USB_08.10.28 Release Notes
4.6.3_USB_08.10.27 Release Notes
4.6.3_USB_08.10.26 Release Notes
4.6.3_USB_08.10.24 Release Notes

© American Megatrends Inc.


Release Notes - NDA Required

Component Information:
Component Title: USB
Component Reference Name: USB
Component Type: eModule
Release Date: 2015-10-02
Source Control Label: 4.6.3_USB_08.10.34
Source Control Location: SS: Alaska;$/Alaska:/Source/Modules/USB/Alaska;
Dependencies
Component Dependencies
AmiBufferValidationLib
Dependent Component Title: AmiBufferValidationLib
Dependent Component Reference Name: AmiBufferValidationLib
Dependent Source Control Label: AmiBufferValidationLib_01
Dependent Source Control Location: Path:$/Alaska/SOURCE/Modules/AmiBufferValidationLib;

File Dependencies
N0NE

Protocol Dependencies
ONE
Dependent Protocol Name: SmmBaseProtocol
Dependent Protocol GUID: EFI_SMM_BASE_PROTOCOL_GUID
TWO
Dependent Protocol Name: LegacyBiosProtocol
Dependent Protocol GUID: EFI_LEGACY_BIOS_PROTOCOL_GUID
Non-Compiled BIN and LIB File(s) within this Component:

UI13.bin
Component Title: USB
Component Reference Name: USB
Component Source Control Label: CSM16_USB_03
Component Source Control Location: SS: ALASKA;$/Alaska/CSM16/USB;
Project Source Control Label: 8.00.10.00.0x.77
Project Source Control Location: SS: ALASKA;$/Alaska/CSM16/Complete Project/Furball10.64K/Furball10.veb;
Component Description:
This component, termed as "USB" is designed to provide support for:
UHCI, OHCI, EHCI, and XHCI controllers, and USB devices
Filename | Description
Main Component | Root\Board\em\usb
amiusb.cif | Component information file for the eModule.
Usb.sdl | BIOS build parameters for USB component.
UsbPort.c | Porting Specific functions implementation.
Usb.chm | Contains module description and release note of USB component.
UsbRt ModulePart | Root\Core\em\usb\rt – Runtime functions.
UsbRt.cif | Component information file of USB runtime module part
AmiUsb.c | AMI USB API Implementation functions.
Guids.c | AMI USB guids library.
Debug.c | AMI USB Debug output implementation routines.
Elib.c | AMI USB MEM/IO/PCI access routines.
SysKbc.c | KBC related functions for platform with HW KBC.
SysNoKbc.c | KBC related functions for platform without HW KBC.
Usb.c | AMI USB main wrapper.
UsbHub.c | Runtime functions for USB hub support.
UsbMass.c | Runtime functions for USB mass storage device support.
UsbMass.h | Definitions for USB mass storage device support.
UsbHid.c | Runtime functions for USB HID device support.
UsbMs.c | Runtime functions for USB mice support.
UsbPoint.c | Runtime functions for USB pointer device support.
UsbKbd.c | Runtime functions for USB keyboard support.
UsbKbd.h | Definitions for USB keyboard support.
UsbCcid.c | Runtime functions for USB CCID device support.
Uhci.c | USB 1.1 host UHCI specific functions.
Uhci.h | Definitions for UHCI host functions.
Ohci.c | USB 1.1 host OHCI specific functions.
Ohci.h | Definitions for OHCI host functions.
Ehci.c | USB 2.0 host EHCI specific functions.
Ehci.h | Definitions for EHCI host functions.
Xhci.c | USB 3.0 & 3.1 host XHCI specific functions
Xhci.h | Definitions for XHCI host functions.
UHCD ModulePart | Root\Core\em\usb – USB functions in UEFI environment.
Uhcd.cif | Component information file of UHCD module part.
Uhcd.c | AMI USB host controller driver.
AmiUsbHc.c | AMI USB HC protocol wrapper.
UsbBus.c | Source code of USB bus driver.
UsbBus.h | Definitions of USB bus driver.
UsbMisc.c | Miscellaneous functions for USB component.
Tree.c | USB device tree manipulation functions.
Tree.h | Definitions of USB device tree function.
UsbSrc.sdl | BIOS build parameters and elinks for USB component.
EfiUsbHid.c | EFI driver for USB HID device support.
EfiUsbKb.c | EFI driver for USB keyboard support.
EfiUsbKb.h | Definitions for EFI driver of USB keyboard.
EfiUsbMass.c | EFI Driver for USB mass storage devices support.
EfiUsbMs.c | EFI Driver for USB mice support.
EfiUsbPoint.c | EFI Driver for USB pointer support.
EfiUsbCcid.c | EFI Driver for USB CCID device support.
ComponentName.c | Contains EFI component name for EFI standard.
ComponentName.h | Definitions for EFI component name.
Framework ModulePart | Root\Core\em\usb - UEFI Framework.
Framework.cif | Component information file of framework module part.
Uhcd.mak | Makefile for UHCD module part.
Uhcd.h | AMI USB host controller driver header file.
Usbdef.h | AMI USB driver definitions.
Amidef.h | AMI USB driver framework specific definitions.
Uhcd.dxs | Dependency file for UHCD driver.
AmiUsb.dxs | Dependency file for AMI USB wrapper driver.
Usbrt.mak | Makefile for USB runtime component.
AmiUsb.h | AMI USB driver definitions.
AmiUsbRtCcid.h | AMI USB CCID runtime driver definitions.
AmiUsbProtocols ModulePart | Root\Include\Protocol - USB Protocols definitions.
AmiUsbProtocols.cif | Component information file of AMI USB protocols module part.
AmiUsbController.h | Definitions of AMI specific USB protocol.
UsbIo.h | EFI USB IO protocol definitions.
UsbHc.h | USB HC protocol definitions.
UsbPolicy.h | USB policy definitions.
Emul6064Trap.h | Definitions of KBC emulation functions.
Emul6064KbdInput.h | Definitions of keyboard support of KBC emulation functions.
Emul6064MsInput.h | Definitions of mouse support of KBC emulation functions.
AmiUsbCcid.h | AMI USB CCID protocol definitions
UsbSetup ModulePart | Root\Core\em\usb\setup - Setup items and functions.
UsbSetup.cif | Component information file of USB setup module part.
Usb.uni | Unicode strings of USB component.
Usb.sd | Setup definitions of USB component.
UsbSetup.c | Setup functions of USB component.
UsbLegacy ModulePart | Root\Core\em\usb – Contains module parts for legacy support.
UsbLegacy.cif | Component information file of USB legacy module part.
Usb Int13 ModulePart | Root\Core\em\usb\int13 - Usb Int13 driver.
UsbInt13.cif | Component information file of USB Int13 module part.
UsbInt13.sdl | BIOS build parameters of USB Int13 module part.
UsbInt13.mak | Makefile of Usb Int13 module part.
UsbInt13.inf | Description file for inject USB int13 binary to BIOS ROM image.
UsbBbs.c | Functions for BBS table of USB mass storage devices.
UsbInt13.c | Functions for USB Int13 functions installation.
UsbInt13.h | Definitions for USB Int13 functions installation.
UsbInt13ComponentName.c | Component Name Protocol Member Functions for USB Int13.
UsbInt13.dxs | Dependency file for USB int13.
USB INT13 16-bit Binary ModulePart | Root\Addon - USB Int13 service binary image.
UsbI13bin.cif | Component information file of USB Int13 binary module part.
Ui13.bin | Int13 functions for USB module.
USB Int1C ModulePart | Root\Core\EM\usb\int1c - Int1c functions for USB module.
UsbInt1c.cif | Component information file of UsbInt1c module part.
UsbInt1c.sdl | BIOS build parameters of USB Int1c module part.
UsbInt1c.mak | Makefile of USB Int1c module part.
UsbInt1c.asm | Int1c timer interrupt handler for USB module.
SouthBridge - Template ModulePart | Root\Chipset\sb\usb – Template for SB specific changes.
UsbSb.cif | Component information file of SB component.
UsbSb.c | Contain South bridge specific changes for USB.
Non-Compiled BIN and LIB File(s) in Flavor:
N0NE
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_41, Dated: 2013-03-19
Visual eBios: RSS.5.73.0244, Dated: 2013-03-19
Compiler Tool(s): Microsoft Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
EIP #194683 - Add the flag "USB_INCMPT_HID_BOOT_PROTOCOL_ONLY" of usb bad device table to keep devices use boot protocol.
EIP #196287 - Display info of connected usb controllers and remove or grayed-out some item according the connected usb controller number.
EIP #197814 - Support recovery request without checking key modifiers combination.
EIP #201667 - UsbPei module updates for XHCI 1.1/USB3.1 support.
General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
Fixed build error in non-smm projects.
Update xhci keyrepeat algorithm.
DevInfo->fpPollTDPtr doesn't free in XHCI_DeactivatePolling.

EIP Addressed
EIP #149716 - Error Handling in USB mouse data.
EIP #192517 - USB Driver handles 0x100 NumHeads as a valid value.
EIP #194553 - Realtek 8111EP EHCI controller workaround, this controller doesn't work if the buffer address isn't DWORD alignment (current offset of qTD). Provide the workaround to locate DWORD alignment buffer.
EIP #196001 - Some keys(shift, ctrl, alt or win) of USB KB funtion lost in Shell after reconnecting usb controllers.
EIP #196753 - Check Max Scratchpad Buffers (Max Scratchpad Bufs Hi) register and allocate Scratchpad buffers.
EIP #196897 - Hide USB legacy support setup question if USB_RUNTIME_DRIVER_IN_SMM is 0.
EIP #197655 - After ExitBootServices, the boot service function isn't used, it is not necessary to uninstall the related protocol at ExitBootServices.
EIP #197834 - USB KB/MS can't wake up system from S5 status.
EIP #198358 - The ISP and IOC flags shall be cleared in all Transfer TRBs when using Event Data TRBs to flag the completion of a TD that may receive a Short Packet.
EIP #198806 - Send "RequestSense" command only if "TestUnitReady" command is failed.
EIP #201112 - Wait 50 ms for port to become stable before we process xhci port changes.
EIP #201434 - Number of connected devices isn't correct if we plug out keyboards or mice behind hub in xhci.
EIP #202436 - Issues a SetPortFeature(PORT_POWER) request for hub ports over-current recovery.
EIP #202592 - Don't reset xhci controller if it's Debug Capability is enabled.
EIP #203888 - RateAndProtocolManagement() default return changed from EFI_DEVICE_ERROR to EFI_SUCCESS.
EIP #203944 - If InputReportDataLength is less than IntMaxPkt, we need to use IntMaxPkt polling interrupt data.
EIP #204948 - Reset the port if the link is Inactive.
EIP #205373 - Cppcheck errors in Usb module.
EIP #205784 - Don't read Periodic Frame List Base Address Register if the controller doesn't support periodic schedule.
EIP #206118 - Remove dead loop in EHCIStartAsyncSchedule and EHCIStopAsyncSchedule functions.
EIP #207413 - Install UsbApiTable and UsbMassApitTable in AmiUsbSmmProtocol.
EIP #207774 - Set USB_FLAG_DRIVER_STARTED flag when HC is running and clear it if we don't start any HC.
EIP #209904 - Remove "ASSERT(HubNode != NULL);" because it will be to see a DEV_INFO from not-yet-installed hub in the some cases.
EIP #210432 - Change ReportCount to UINT32.
EIP #211366 - Use USB3.0 Hub and into USB3.0 devices enter recovery mode not load bios recovery rom.
EIP #211598 - Keyboard/Mouse sometimes cannot work when connected to USB 3.0 HUB.
EIP #211824 - Can't run boot block recovery from usb Pioneer ODD (DVR XD11T).
EIP #211855 - Set the default interface if the device has alternate setting for the interface.
EIP #212211 - USB transfer speed is slower than before in EHCI.
EIP #213778 - Issue with right button on usb absolute mouses.
EIP #213823 - The memory type for "mUsbKeyboardRecord" is changed from EfiRuntimeServicesData to EfiBootServicesData.
EIP #214555 - It's failed at setting XhciTConfigureEndpoint command for isochronous endpoints.
EIP #215031 - Transcend USB 3.0 HDD is disappeared in the setup menu by cold boot.
EIP #215588 - Provide the number of the xhci root hub ports by EFI_USB2_HC_PROTOCOL.GetCapability().
EIP #215830 - CYBORG R.A.T3 Gaming Mouse left/right button has no function, instead DPI UP/DOWN config button has left/right click function.
EIP #215978 - Remove "TotalSize" parameter from AlignPhysicalAddress().
EIP #216587 - Add 64-bit addressing buffer support for usb transfers.
EIP #216986 - BIOS can't find Realtek usb Lan dongle if this device is in some hubs.
EIP #218997 - Break the GetQueue loop if UninstallDevice is failed.
EIP #219177 - Fixed static code analysis issues in Usb module.
EIP #219658 - It is failed at executing ConfigureEndpoint command for DisplayLink devices.
EIP #219785 - Suspend usb devices which are connected to Hubs.
EIP #220162 - The read / write request contain the latest LBA that are valid.
EIP #226493 - Block to process periodic list to prevent that we might send the wrong command sequences to the same device.
EIP #228352 - Check if DpLastPciNode is NULL after we parse the device path.
EIP #229294 - If the device descriptor returns with a value in its length field that is greater 18, it is valid and we should ignore the extra bytes.
EIP #230092 - Usb devices don't work in VL801 / VL805 under BIOS.
EIP #231280 - When SenseKey is 0x06 and Asc is 0x28, set RetryReq to 1 to retry to read capacity.
EIP #231252 - Calculate the actual length of InterruptTransfer for xhci.
EIP #235482 - Select this alternate setting for multiple TTs hubs.
EIP #235977 - Break the loop which we check list processing TD if NextTd is the same as Td.
EIP #236613 - Return the correct status for BotCheckDeviceReady function.
Files Changed for General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
core/em/usb/rt/amiusb.c
core/em/usb/rt/xhci.c

EIP Addressed
board/em/usb/usbport.c (EIP #196287) (EIP #205373)
core/em/usb/rt/amiusb.c (EIP #207413)
core/em/usb/rt/ehci.c (EIP #194553) (EIP #201434) (EIP #206118) (EIP #205784) (EIP #207774) (EIP #206118) (EIP #212211) (EIP #207413) (EIP #219177) (EIP #226493)
core/em/usb/rt/ohci.c (EIP #201434) (EIP #207774) (EIP #235977)
core/em/usb/rt/syskbc.c (EIP #149716)
core/em/usb/rt/uhci.c (EIP #201434) (EIP #207774) (EIP #207413)
core/em/usb/rt/usb.c (EIP #201434) (EIP #205373) (EIP #207774) (EIP #211598) (EIP #211855) (EIP #215031) (EIP #219785) (EIP #229294) (EIP #235482)
core/em/usb/rt/usbCCID.c (EIP #205373) (EIP #203888) (EIP #207413)
core/em/usb/rt/usbhid.c (EIP #194683) (EIP #203944) (EIP #215830)
core/em/usb/rt/usbhub.c (EIP #201434) (EIP #202436) (EIP #204948) (EIP #216986) (EIP #235482)
core/em/usb/rt/usbkbd.c (EIP #194683)
core/em/usb/rt/usbkbd.h (EIP #149716)
core/em/usb/rt/usbmass.c (EIP #192517) (EIP #198806) (EIP #215031) (EIP #220162) (EIP #226493)
core/em/usb/rt/usbms.c (EIP #194683) (EIP #149716) (EIP #215830)
core/em/usb/rt/usbpoint.c (EIP #213778) (EIP #215830)
core/em/usb/rt/xhci.c (EIP #196001) (EIP #197834) (EIP #198358) (EIP# 201434) (EIP# 201112) (EIP# 202592) (EIP# 149716) (EIP# 202592) (EIP# 207774) (EIP# 214555) (EIP# 215588) (EIP# 219658) (EIP #226493) (EIP #231252)
core/em/usb/rt/xhci.h (EIP #196753) (EIP #201112) (EIP# 202592) (EIP #226493)
core/em/usb/amiusbhc.c (EIP #196753) (EIP #201434) (EIP #202592) (EIP #207413) (EIP #216587) (EIP #230092)
core/em/usb/efiusbhid.c (EIP #218997)
core/em/usb/efiusbkb.c (EIP #213823) (EIP #218997)
core/em/usb/efiusbmass.c (EIP #215031) (EIP #216587) (EIP #220162) (EIP #218997)
core/em/usb/efiusbms.c (EIP #218997)
core/em/usb/efiusbpoint.c (EIP #218997)
core/em/usb/uhcd.c (EIP #196001) (EIP #196287) (EIP #197655) (EIP #205373) (EIP #207413) (EIP #228352) (EIP #226493)
core/em/usb/usbbus.c (EIP #209904) (EIP #215031) (EIP #219177) (EIP #218997)
core/em/usb/usbmisc.c (EIP #215978)
core/em/usb/rt/amiusb.h (EIP #207774) (EIP #207413) (EIP #235482)
core/em/usb/rt/amiusbrtCCID.h (EIP #207413)
core/em/usb/rt/usbdef.h (EIP #192517) (EIP #194683) (EIP #201434) (EIP #210432) (EIP #207413) (EIP #211855) (EIP #215031) (EIP #219658) (EIP #219785) (EIP #226493) (EIP #235482)
Include/Protocol/AmiUsbController.h (EIP #196287) (EIP #207413)
Include/Protocol/UsbHC.h (EIP #201667)
Include/Protocol/UsbPolicy.h (EIP #196287)
core/em/usb/setup/usb.sd (EIP #196897) (EIP #196287)
core/em/usb/setup/usb.uni (EIP #196287)
core/em/usb/setup/usbsetup.c (EIP #196287)
core/em/usb/int13/UsbInt13.c (EIP #192517) (EIP #219177)
core/em/usb/int13/UsbInt13.h (EIP #192517)
Addon/UI13.bin (EIP #192517)
core/em/usb/PEI/HubPeim.c (EIP #201667)
core/em/usb/PEI/PeiUsbLib.c (EIP #201667)
core/em/usb/PEI/UsbPei.c (EIP #197814)
core/em/usb/PEI/UsbPei.h (EIP #201667)
core/em/usb/PEI/UsbPeim.c (EIP #201667) (EIP #211366)
core/em/usb/PEI/XhciPEI/PeiXhci.c (EIP #201667) (EIP #202592) (EIP #230092)
core/em/usb/PEI/XhciPEI/PeiXhci.h (EIP #201667) (EIP #202592)
core/em/usb/PEI/BotPEI/BotPeim.c (EIP #211824)
core/em/usb/PEI/BotPEI/UsbBotPeim.c (EIP #231280) (EIP #236613)
Known Limitations and Erratas in this label:
NONE
Remaining Issues:
NONE
Unit Testing:
Test1: USB Device Function.
1. Connect USB devices (Keyboard, Mice and Mass Storage) to SUT.
2. Power on SUT
3. Enter BIOS setup or boot to DOS, Shell or Win8.1.
4. Ensure USB device behaviors well.
Test2: USB Device Hotpluggability.
1. Power on system with target USB devices (Keyboard, Mice and Mass Storage) are connected.
2. Power on SUT
3. Enter BIOS setup or boot to DOS, Shell or Win8.1
4. Remove USB devices
5. Insert USB devices
6. Ensure USB device behaviors well.
7. Repeat steps #4, #5, #6 five times.
Validation Testing:
Test Procedure Report
Release History:
4.6.3_USB_08.10.33 Release Notes
4.6.3_USB_08.10.32 Release Notes
4.6.3_USB_08.10.31 Release Notes
4.6.3_USB_08.10.30 Release Notes
4.6.3_USB_08.10.29 Release Notes
4.6.3_USB_08.10.28 Release Notes
4.6.3_USB_08.10.27 Release Notes
4.6.3_USB_08.10.26 Release Notes
4.6.3_USB_08.10.24 Release Notes

© American Megatrends Inc.


Release Notes - NDA Required

Component Information:
Component Title: USB
Component Reference Name: USB
Component Type: eModule
Release Date: 2016-08-01
Source Control Label: 4.6.3_USB_08.10.35
Source Control Location: SS: Alaska;$/Alaska:/Source/Modules/USB/Alaska;
Dependencies
Component Dependencies
AmiBufferValidationLib
Dependent Component Title: AmiBufferValidationLib
Dependent Component Reference Name: AmiBufferValidationLib
Dependent Source Control Label: AmiBufferValidationLib_01
Dependent Source Control Location: Path:$/Alaska/SOURCE/Modules/AmiBufferValidationLib;

File Dependencies
N0NE

Protocol Dependencies
ONE
Dependent Protocol Name: SmmBaseProtocol
Dependent Protocol GUID: EFI_SMM_BASE_PROTOCOL_GUID
TWO
Dependent Protocol Name: LegacyBiosProtocol
Dependent Protocol GUID: EFI_LEGACY_BIOS_PROTOCOL_GUID
Non-Compiled BIN and LIB File(s) within this Component:

UI13.bin
Component Title: USB
Component Reference Name: USB
Component Source Control Label: CSM16_USB_03
Component Source Control Location: SS: ALASKA;$/Alaska/CSM16/USB;
Project Source Control Label: 8.00.10.00.0x.77
Project Source Control Location: SS: ALASKA;$/Alaska/CSM16/Complete Project/Furball10.64K/Furball10.veb;
Component Description:
This component, termed as "USB" is designed to provide support for:
UHCI, OHCI, EHCI, and XHCI controllers, and USB devices
Filename | Description
Main Component | Root\Board\em\usb
amiusb.cif | Component information file for the eModule.
Usb.sdl | BIOS build parameters for USB component.
UsbPort.c | Porting Specific functions implementation.
Usb.chm | Contains module description and release note of USB component.
UsbRt ModulePart | Root\Core\em\usb\rt – Runtime functions.
UsbRt.cif | Component information file of USB runtime module part
AmiUsb.c | AMI USB API Implementation functions.
Guids.c | AMI USB guids library.
Debug.c | AMI USB Debug output implementation routines.
Elib.c | AMI USB MEM/IO/PCI access routines.
SysKbc.c | KBC related functions for platform with HW KBC.
SysNoKbc.c | KBC related functions for platform without HW KBC.
Usb.c | AMI USB main wrapper.
UsbHub.c | Runtime functions for USB hub support.
UsbMass.c | Runtime functions for USB mass storage device support.
UsbMass.h | Definitions for USB mass storage device support.
UsbHid.c | Runtime functions for USB HID device support.
UsbMs.c | Runtime functions for USB mice support.
UsbPoint.c | Runtime functions for USB pointer device support.
UsbKbd.c | Runtime functions for USB keyboard support.
UsbKbd.h | Definitions for USB keyboard support.
UsbCcid.c | Runtime functions for USB CCID device support.
Uhci.c | USB 1.1 host UHCI specific functions.
Uhci.h | Definitions for UHCI host functions.
Ohci.c | USB 1.1 host OHCI specific functions.
Ohci.h | Definitions for OHCI host functions.
Ehci.c | USB 2.0 host EHCI specific functions.
Ehci.h | Definitions for EHCI host functions.
Xhci.c | USB 3.0 & 3.1 host XHCI specific functions
Xhci.h | Definitions for XHCI host functions.
UHCD ModulePart | Root\Core\em\usb – USB functions in UEFI environment.
Uhcd.cif | Component information file of UHCD module part.
Uhcd.c | AMI USB host controller driver.
AmiUsbHc.c | AMI USB HC protocol wrapper.
UsbBus.c | Source code of USB bus driver.
UsbBus.h | Definitions of USB bus driver.
UsbMisc.c | Miscellaneous functions for USB component.
Tree.c | USB device tree manipulation functions.
Tree.h | Definitions of USB device tree function.
UsbSrc.sdl | BIOS build parameters and elinks for USB component.
EfiUsbHid.c | EFI driver for USB HID device support.
EfiUsbKb.c | EFI driver for USB keyboard support.
EfiUsbKb.h | Definitions for EFI driver of USB keyboard.
EfiUsbMass.c | EFI Driver for USB mass storage devices support.
EfiUsbMs.c | EFI Driver for USB mice support.
EfiUsbPoint.c | EFI Driver for USB pointer support.
EfiUsbCcid.c | EFI Driver for USB CCID device support.
ComponentName.c | Contains EFI component name for EFI standard.
ComponentName.h | Definitions for EFI component name.
Framework ModulePart | Root\Core\em\usb - UEFI Framework.
Framework.cif | Component information file of framework module part.
Uhcd.mak | Makefile for UHCD module part.
Uhcd.h | AMI USB host controller driver header file.
Usbdef.h | AMI USB driver definitions.
Amidef.h | AMI USB driver framework specific definitions.
Uhcd.dxs | Dependency file for UHCD driver.
AmiUsb.dxs | Dependency file for AMI USB wrapper driver.
Usbrt.mak | Makefile for USB runtime component.
AmiUsb.h | AMI USB driver definitions.
AmiUsbRtCcid.h | AMI USB CCID runtime driver definitions.
AmiUsbProtocols ModulePart | Root\Include\Protocol - USB Protocols definitions.
AmiUsbProtocols.cif | Component information file of AMI USB protocols module part.
AmiUsbController.h | Definitions of AMI specific USB protocol.
UsbIo.h | EFI USB IO protocol definitions.
UsbHc.h | USB HC protocol definitions.
UsbPolicy.h | USB policy definitions.
Emul6064Trap.h | Definitions of KBC emulation functions.
Emul6064KbdInput.h | Definitions of keyboard support of KBC emulation functions.
Emul6064MsInput.h | Definitions of mouse support of KBC emulation functions.
AmiUsbCcid.h | AMI USB CCID protocol definitions
UsbSetup ModulePart | Root\Core\em\usb\setup - Setup items and functions.
UsbSetup.cif | Component information file of USB setup module part.
Usb.uni | Unicode strings of USB component.
Usb.sd | Setup definitions of USB component.
UsbSetup.c | Setup functions of USB component.
UsbLegacy ModulePart | Root\Core\em\usb – Contains module parts for legacy support.
UsbLegacy.cif | Component information file of USB legacy module part.
Usb Int13 ModulePart | Root\Core\em\usb\int13 - Usb Int13 driver.
UsbInt13.cif | Component information file of USB Int13 module part.
UsbInt13.sdl | BIOS build parameters of USB Int13 module part.
UsbInt13.mak | Makefile of Usb Int13 module part.
UsbInt13.inf | Description file for inject USB int13 binary to BIOS ROM image.
UsbBbs.c | Functions for BBS table of USB mass storage devices.
UsbInt13.c | Functions for USB Int13 functions installation.
UsbInt13.h | Definitions for USB Int13 functions installation.
UsbInt13ComponentName.c | Component Name Protocol Member Functions for USB Int13.
UsbInt13.dxs | Dependency file for USB int13.
USB INT13 16-bit Binary ModulePart | Root\Addon - USB Int13 service binary image.
UsbI13bin.cif | Component information file of USB Int13 binary module part.
Ui13.bin | Int13 functions for USB module.
USB Int1C ModulePart | Root\Core\EM\usb\int1c - Int1c functions for USB module.
UsbInt1c.cif | Component information file of UsbInt1c module part.
UsbInt1c.sdl | BIOS build parameters of USB Int1c module part.
UsbInt1c.mak | Makefile of USB Int1c module part.
UsbInt1c.asm | Int1c timer interrupt handler for USB module.
SouthBridge - Template ModulePart | Root\Chipset\sb\usb – Template for SB specific changes.
UsbSb.cif | Component information file of SB component.
UsbSb.c | Contain South bridge specific changes for USB.
Non-Compiled BIN and LIB File(s) in Flavor:
N0NE
AMI Build Tools:
Tools Label: 4.5.5_TOOLS_41, Dated: 2013-03-19
Visual eBios: RSS.5.73.0244, Dated: 2013-03-19
Compiler Tool(s): Microsoft Windows Driver Kit (WDK) Ver. 7600.16385.1
New features added in this label:
EIP #257506 - Add USB_KEYREPEAT_INTERVAL token to change the key repeat interval.
General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
Build error if USB_HID_KEYREPEAT_USE_SETIDLE is 1.

EIP Addressed
EIP #241067 - Add the device descriptor to the DEV_INFO structure.
EIP #241977 - Improve UsbKbcAccessControl api function.
EIP #244406 - Keyboard is abnormal on DOS for USB module Ver.13.
EIP #247363 - USB hot-plug function is failed in external uhci controllers.
EIP #247625 - USB hot-plug function is failed in external uhci controllers.
EIP #249947 - Improve the timing of xhci key repeat function.
EIP #251337 - Free resources of usb controllers when gEfiEndOfPeiSignalPpiGuid is installed.
EIP #252487 - Static code analysis issues found in Usb module.
EIP #251519 - Return current state of the USB host controller on EFI_USB2_HC_PROTOCOL.GetState().
EIP #251667 - Implement EFI_USB2_HC_PROTOCOL.SetState() function.
EIP #254309 - GK-FORCE K83 USB KB function abnormal.
EIP #254924 - Issue a Set TR Dequeue Pointer Command after issuing for a ClearFeature(ENDPOINT_HALT) request to device.
EIP #256089 - Add {0, 0, 0, 0, 0, 0} for the end of USB_SKIP_LIST structure in UsbGetSkipList function.
EIP #256758 - Press the arrow key and remove usb keyboard and mouse at the same time under BIOS Setup Menu. Setup Menu will constantly move.
EIP #257403 - Improve the xhci keyrepeat function.
EIP #259282 - Update AmiUsbHcGetRootHubPortStatus function to support super speed devices.
EIP #260113 - We return success for writing data to to the write-protected device.
EIP #261091 - USB 3.0 key boot failed after PXE boot failed.
EIP #264662 - Don't install usb hw smi after reconnecting usb controllers.
EIP #268836 - The system will loop in USB runtime module during IPMI are resetting USB controller.
EIP #277810 - Validate the memory buffer is entirely outside of SMM.
EIP #279279 - Add 10 ms delay after we reset usb ports.
EIP #279597 - Software shall be responsible for timing the Reset "recovery interval" required by USB.
EIP #279707 - Clear USB_FLAG_RUNNING_UNDER_EFI flag at OnExitBootServices.
Files Changed for General Bug Fixes and EIP Addressed in this Label:
General Bug Fixes
core/em/usb/rt/usbkbd.c

EIP Addressed
board/em/usb/usb.sdl (EIP #257506)
board/em/usb/usbport.c (EIP #256089)
core/em/usb/rt/amiusb.c (EIP #241977) (EIP #277810) (EIP #264662)
core/em/usb/rt/ehci.c (EIP #254309) (EIP #257506) (EIP #277810) (EIP #268836)
core/em/usb/rt/ohci.c (EIP #254309) (EIP #257506) (EIP #277810) (EIP #264662)
core/em/usb/rt/uhci.c (EIP #247625) (EIP #254309) (EIP #257506) (EIP #277810)
core/em/usb/rt/usb.c (EIP #241067) (EIP #254309) (EIP #264662)
core/em/usb/rt/usbCCID.c (EIP #254309) (EIP #277810)
core/em/usb/rt/usbhid.c (EIP #254309)
core/em/usb/rt/usbhub.c (EIP #254309)
core/em/usb/rt/usbkbd.c (EIP #254309)
core/em/usb/rt/usbkbd.h (EIP #254309) (EIP #257506)
core/em/usb/rt/usbmass.c (EIP #254924) (EIP #260113) (EIP #277810)
core/em/usb/rt/xhci.c (EIP #241067) (EIP #244406) (EIP #249947) (EIP# 254924) (EIP# 256758) (EIP# 257403) (EIP# 254309) (EIP# 261091) (EIP# 277810) (EIP# 279279) (EIP# 279597)
core/em/usb/rt/xhci.h (EIP #244406) (EIP #249947) (EIP# 257506) (EIP #279279) (EIP #279597)
core/em/usb/amiusbhc.c (EIP #247363) (EIP #252487) (EIP #251519) (EIP #251667) (EIP #254309) (EIP #259282) (EIP #277810) (EIP #264662)
core/em/usb/efiusbccid.c (EIP #277810)
core/em/usb/efiusbmass.c (EIP #277810)
core/em/usb/efiusbms.c (EIP #254309)
core/em/usb/uhcd.c (EIP #277810) (EIP #279707) (EIP #264662)
core/em/usb/usbbus.c (EIP #241067)
core/em/usb/usbmisc.c (EIP #277810)
core/em/usb/rt/amiusb.h (EIP #254309)
core/em/usb/uhcd.h (EIP #251667) (EIP #277810)
core/em/usb/rt/usbdef.h (EIP #241067) (EIP #254309) (EIP #277810)
Include/Protocol/AmiUsbController.h (EIP #241067) (EIP #254309)
chipset/sb/usb/usbsb.c (EIP #277810)
core/em/usb/PEI/HubPeim.c (EIP #279279)
core/em/usb/PEI/UsbPei.h (EIP #279279)
core/em/usb/PEI/UsbPeim.c (EIP #279279)
core/em/usb/PEI/EhciPEI/PeiEhci.c (EIP #251337)
core/em/usb/PEI/EhciPEI/PeiEhci.h (EIP #251337)
core/em/usb/PEI/OhciPEI/PeiOhci.c (EIP #251337)
core/em/usb/PEI/OhciPEI/PeiOhci.h (EIP #251337)
core/em/usb/PEI/OhciPEI/PeiOhciBoard.c (EIP #251337)
core/em/usb/PEI/UhciPei/UhcPeim.c (EIP #251337)
core/em/usb/PEI/UhciPei/UhcPeim.h (EIP #251337)
core/em/usb/PEI/XhciPEI/PeiXhci.c (EIP #251337) (EIP #279597)
core/em/usb/PEI/XhciPEI/PeiXhci.h (EIP #251337) (EIP #279597)
Known Limitations and Erratas in this label:
NONE
Remaining Issues:
NONE
Unit Testing:
Test1: USB Device Function.
1. Connect USB devices (Keyboard, Mice and Mass Storage) to SUT.
2. Power on SUT
3. Enter BIOS setup or boot to DOS, Shell or Win8.1.
4. Ensure USB device behaviors well.
Test2: USB Device Hotpluggability.
1. Power on system with target USB devices (Keyboard, Mice and Mass Storage) are connected.
2. Power on SUT
3. Enter BIOS setup or boot to DOS, Shell or Win8.1
4. Remove USB devices
5. Insert USB devices
6. Ensure USB device behaviors well.
7. Repeat steps #4, #5, #6 five times.
Validation Testing:
The test report will provide upon request.
Release History:
4.6.3_USB_08.10.34 Release Notes
4.6.3_USB_08.10.33 Release Notes
4.6.3_USB_08.10.32 Release Notes
4.6.3_USB_08.10.31 Release Notes
4.6.3_USB_08.10.30 Release Notes
4.6.3_USB_08.10.29 Release Notes
4.6.3_USB_08.10.28 Release Notes
4.6.3_USB_08.10.27 Release Notes
4.6.3_USB_08.10.26 Release Notes
4.6.3_USB_08.10.24 Release Notes

© American Megatrends Inc.


AMI USB – Test Procedures for Functional Testing

Copyright ©2014 American Megatrends, Inc.

AMI Internal Only (INT) - Page 3 of 3