tejdeep singh bawa :: Blog :: Ways to manage USB prudently


July 19, 2008

Have you ever wondered how system and methods fail to fulfill the required needs? We need to find a solution to the interruptions in a multi-processer computer.

One embodiment relates generally to computers and, more particularly, to a interrupt handling technique for a multi-processor computer.

Abstract

Most computers can support various components and devices that comprise or interface with the computer in a variety of different ways. These components and devices must be supported by different software programs and operating environments running in the computer.

Illustrations

For example, a personal computer may connect to peripheral devices through one or more peripheral buses or ports. Examples of popular peripheral buses include a universal serial bus ("USB") or an IEEE 1394 serial bus ("1394 bus"). The USB is a two-wire serial personal computer bus, designed by a consortium of computer makers and suppliers, which can support many peripheral devices either in parallel or in a daisy chain configuration. The 1394 bus is also a two-wire serial personal computer bus, very similar to the USB. For both the USB and the 1394 bus, when a device is connected to the bus, it provides a predetermined code that identifies its type and bandwidth requirements.

Problems occur when a computer implements an operating environment that is not aware of a specific type (e.g., does not provide appropriate device drivers) of device. To resolve these problems, the computer must implement device support outside of the operating environment. For example, if a computer uses a USB port for a USB keyboard while implementing a PS/2 operating environment (a PS/2 operating environment expects a PS/2 type keyboard), the computer's basic input/output system ("BIOS") can intercept data and software access to and from specific ports associated with the keyboard. The BIOS thereby "translates" the commands between the newer USB keyboard and the operating environment for use with older (or "legacy") keyboards by examining the internal processor ports and registers and "routing" data accordingly.

Continuing with the present example, if the processor writes a data value to port 60h (60 hexadecimal, which is a port defined for use by a PS/2 keyboard), the write instruction causes a system management interrupt ("SMI") trap. In response to the SMI trap, the BIOS instructs the processor to enter a system management mode. The BIOS then places the appropriate data in the processor's registers.

Similarly, the BIOS can be interrupted in order to be requested to go into standby mode. In order to determine what the BIOS was interrupted for, the BIOS must inspect the software instructions. The BIOS relies on data stored in the processor registers to determine this. The BIOS should then retrieve the appropriate data out of the processor's registers to make a decision or perform an action.

However, the BIOS may be interrupted for several reasons and may not be able to determine the reason from the hardware or the interrupt alone. A problem exists when the computer has multiple processors. In these computers, the BIOS has no way to know which of the processors in the multiprocessor system initiated the request. In the above-described examples, the BIOS must determine which of the processors instruction execution caused the interrupt to properly route the data to or from the USB keyboard.

Therefore, what is needed is a system and method for handling system management interrupts in a multiprocessor computer.

In response to the aforementioned problems, a technical advance is achieved by a system and method for handling interrupts in a multiprocessor computer. In one embodiment, the method handles one or more system management interrupts caused by one or more of the processors in the multiprocessor computer system. When a system management interrupt occurs, the computer enters system management mode and the processors store the contents of their registers in memory. The method checks the register contents stored in memory to find the actual physical location of desired data such as an opcode. The method fetches and examines the opcode indicated by the register contents. If the opcode is of the type that would cause a system management interrupt, such as a read or write to port 60h (hexadecimal) or 64 h, this indicates that the current processor is the one to receive the interrupt.

The opcodes may be read or write operations to ports that are not currently being used by existing components. For example, PS/2 keyboards often use ports 60h and 64 h for read and write operations. If the computer is running a program that only supports PS/2 keyboards, yet the computer itself has a USB keyboard, then the computer must translate and route data to the appropriate processor registers for the accesses to and from these ports.

In some embodiments, relative addressing is used by one or more of the processors. As a result, the method must also translate the relative address to an actual physical address in order to locate an operating instruction indicated by the register.

Select the USB stick to suit with your need. This can help you to enhance memory in your own computer.

Keywords: BIOS, USB

Posted by tejdeep singh bawa


You must be logged in to post a comment.