Patent ID: 7415547

Claim:
A method for tracking a state of communication between a PS/2 device and a PS/2 device driver within an extensible firmware interface (EFI) environment, the method comprising: receiving from an application associated with the EFI environment a request for data; in response to receiving the request, reading a state machine table within the PS/2 device driver to determine a current state in processing a data sequence being sent from the PS/2 device, wherein the current state is stored within the state machine table and comprises one of a state indicating that data has been processed, a state indicating that a command is in progress, and a state indicating that data is ready; in response to determining that the current state is the state indicating that data has been processed, utilizing the state machine table to select and execute a routine to send a command to determine a status of the PS/2 device and store the current state as the state indicating that a command is in progress; in response to determining that the current state is the state indicating that a command is in progress, utilizing the state machine table to select and execute a routine to determine whether the PS/2 device has data available for delivery to the PS/2 device driver; and in response to determining that no data is available for delivery to the PS/2 device driver, returning a status indicating that data is not ready, store the current state as the state indicating that a command is in progress, and pass control back to the application.