Microsoft KB Archive/250635

= Windows 98: Computer Problems with USB Legacy Support =

Article ID: 250635

Article Last Modified on 2/12/2007

-

APPLIES TO


 * Microsoft Windows 98 Standard Edition
 * Microsoft Windows 98 Second Edition
 * Microsoft Windows 98 Driver Development Kit (DDK)

-



This article was previously published under Q250635



SYMPTOMS
On a Windows 98-based computer, when Universal Serial Bus (USB) legacy support is enabled in the basic input/output system (BIOS), your computer may not detect USB devices or may stop responding (hang) when you start or shut down your computer.



CAUSE
This problem can occur if there is a conflict between Windows and the BIOS that involves the USB host controller. BIOS uses SMI# to periodically read the controller status to provide USB legacy support. During startup, after Peripheral Component Interconnect (PCI) enumeration, control of USB is changed from the BIOS to Windows. Sometimes, during Windows PCI bus enumeration, the BIOS may not obtain a correct value for the host controller base address, which results in the inability to transfer control of the USB controller to Windows.

This condition can result in the USB devices not working, your computer may hang during startup or shutdown, or a Windows message that states that the PS/2 keyboard or mouse cannot be found (if the USB keyboard or mouse is not found, software may search for a PS/2 keyboard or mouse).



RESOLUTION
To resolve this behavior, BIOS vendors can either disable USB legacy support or include a workaround patch.



MORE INFORMATION
The behavior is caused by a lack of synchronization between Windows 98 and the BIOS during PCI bus enumeration. The OpenHCI specification outlines a synchronization mechanism in which the operating system clears the Memory Access bit (bit 1) in the PCI command register before accessing the base address register (BAR). The BIOS should check this bit; if it is clear, the BIOS SMM code should not access the host controller operational registers. Unfortunately, some computer chipsets stop working correctly when this bit is cleared. To avoid these chipset behaviors, Windows 98 does not clear this bit during PCI enumeration, which means that the BIOS may obtain an incorrect controller address because it does not detect the enumeration. While Windows 98 is performing this PCI enumeration, Windows 98 writes a test pattern of FFFF_FFFFh to the Base Address register of the USB controller and reads it back as FFFF_F000h to indicate that the range size is 1000h bytes.

If a SMI# is generated by the USB controller at this time, the BIOS SMI handler cannot access the USB controller because the Base Address register is invalid. This asynchronous event can result in the SMI# signal being asserted indefinitely; therefore, the subsequent OpenHCI USB hand-over from BIOS to Windows does not work. Windows tries to detect the PS/2 keyboard and mouse, and the user may receive an error message that states that the PS/2 keyboard or mouse was not detected.

The BIOS can work around this behavior by reading the USB controller Base Address in the SMI handler, and by saving a copy of valid addresses in SMM memory. If the Base Address has a FFFF_F000h pattern, which is the test pattern written by Windows during PCI enumeration, the BIOS can write the previous valid value to the Base Address register and continue the SMI handling; therefore, the USB controller remains accessible and the SMI# is cleared properly. At the end of the SMI handler, the BIOS can restore the FFFF_F000h test pattern to the Base Address register, so Windows can continue the PCI enumeration.

