Technical Field
The invention relates generally to hardware diagnostics for personal computers (PC) and, more particularly, to a method for executing embedded hardware diagnostics from an operating system-based applications program.
Background of the Invention
It is generally accepted that the most reliable way to perform comprehensive, user-selectable hardware diagnostics on a personal computer (PC) is to execute diagnostics code embedded in BIOS memory (hereinafter "embedded diagnostics") from system power-up or reset. In this manner, a series of hardware diagnostics tests may be performed in a "crawl-out" sequence, with hardware components being initialized and tested one at a time and with no tests relying on components that have not yet been tested. This procedure allows for greater fault detection and component level and field replaceable unit (FRU) fault isolation and eliminates dependency on the operating system (OS), BIOS and component drivers. In addition, embedded diagnostics will run even if the PC will not boot an OS, which may often be the case.
A problem with the use of embedded diagnostics is that they cannot be run directly from an OS, such as DOS or Windows, without resetting the PC and thereby losing the OS and all open applications. In addition, a technical support representative that has accessed a customer's PC using a remote-control communications package, for example, PC Anywhere or CarbonCopy, is also unable to run the embedded diagnostics to help isolate hardware problems for that same reason.
An alternative to embedded diagnostics has been to develop OS-based diagnostics applications that can be run without the user's resetting or rebooting the PC. Accordingly, such OS-based diagnostics applications can also be run under the control of a "remote" user, such as a technical support representative. An example of an OS-based diagnostics application available "off-the-shelf" is QAPlus.
OS-based diagnostics applications also suffer from certain deficiencies, not the least of which is their failure effectively to test hardware and identify failing components, due in part to the fact that the OS, BIOS and drivers create a software "layer" between the diagnostics application and the hardware being tested. Moreover, available OS-based diagnostics applications are dependent on the identity of the OS, BIOS and drivers. In this regard, multitasking OSs, such as Windows, create additional problems for OS-based diagnostics applications, since a main purposes of such OSs is to isolate the hardware from all applications, including diagnostics.
Therefore, what is needed is a way to execute embedded diagnostics from an OS-based application in a manner that is transparent to both a user and an OS of the PC.
Summary of the Invention
The foregoing problems are solved and a technical advance is achieved by method and apparatus for transparently executing embedded PC diagnostics from OS-based applications. In a departure from the art, an OS-based utility of the present invention calls an OS-independent BIOS routine for saving the state of the PC to a hard disk thereof, resetting the PC, initiating execution of diagnostics code embedded in BIOS memory, and, upon completion of the execution of the embedded diagnostics code, restoring the state of the PC from the hard disk.
In a preferred embodiment, once the OS-based utility of the present invention has been initiated, a user may request execution of the embedded diagnostics by, for example, typing in an appropriate command or selecting a designated icon. Responsive to the request, the utility calls an OS-independent BIOS routine for executing a suspend-to-disk (S2D) operation, resetting the PC, and initiating the embedded diagnostics. The embedded diagnostics code runs to completion from PC reset, saving failure and status information to a nonvolatile storage device, and resets the PC once more. The PC boots normally from reset and executes a resume-from-disk (RFD) to restore the state of the PC, thereby restoring the OS-based utility. The utility may then be used to access the saved failure and status information and display and/or otherwise act on the information.
In one aspect of the present invention, a TEST flag stored in the nonvolatile storage device or a configuration register of the PC is set by the BIOS function to cause the embedded diagnostics code to be executed responsive to a subsequent PC reset and then cleared by the embedded diagnostics after execution of the test sequence to cause BIOS boot code to be executed responsive to a subsequent PC reset.
In another aspect of the present invention, the embedded diagnostics code can be executed to perform power-up self-tests and adjustments of memory, CPU, digital circuitry, read/write chips and currents, and the tape handling mechanism, for example.
A technical advantage achieved with the invention is that it provides a seamless, transparent interface between an OS-based application and the embedded diagnostics.
A further technical advantage achieved with the invention is that it provides a technical support representative with the ability to run the embedded diagnostics remotely, using either a custom or off-the-shelf communications package.
Brief Description of the Drawings
FIG. 1 is a block diagram of a personal computer (PC) for implementing the method of the present invention.
FIG. 2 is a flowchart of a block diagram illustrating the operation of the method of the present invention for transparently implementing embedded diagnostics from an OS-based application.
Detailed Description of the Preferred Embodiment
FIG. 1 is a system block diagram of a personal computer (PC) 10 in which a method of the present invention for transparently executing embedded diagnostics from an OS-based application is implemented. In a preferred embodiment, the PC 10 comprises a CPU 12 connected to system RAM 14 via a memory controller 16 and a host bus 17. The CPU 12 is further connected to a hard disk 18, soft power circuitry 20, BIOS memory 22, a nonvolatile storage device, such as NVRAM 24, and a plurality of other I/O devices, including, for example, one or more of a keyboard, a display and a mouse, and collectively designated by a reference numeral 26, via the host bus 17, bus controller 28 and an I/O bus 30. An OS-based utility embodying features of the present invention, designated by a reference numeral 14a, is stored in system RAM 14 for purposes which will be described in detail with reference to FIG.
Additionally, customized BIOS code and embedded diagnostics code, respectively designated by reference numerals 22a and 22b, are stored in BIOS memory 22, which, in a preferred environment, comprises a flash memory device, an electrically erasable programmable read-only memory (EEPROM) or some other appropriate ROM device.
In particular, the BIOS code 22a includes conventional boot code and code for implementing an OS-independent BIOS function for suspending the operation of the PC 10 to the hard disk 18, setting a TEST flag (not shown) in NVRAM 24 or a configuration register (not shown), and resetting the PC 10. The state of TEST flag (set or clear) when the PC 10 is reset indicates whether or not the embedded diagnostics code 22b is to be executed.
FIG. 2 is a flowchart of the operation of the method of the present invention for executing embedded diagnostics from an OS-based application. Execution begins in step 200 when the OS-based utility 14a is initiated. In step 202, a user requests execution of the embedded diagnostics code 22b, for example, by clicking on an icon designated for that purpose or typing in an appropriate command. As previously indicated, the embedded diagnostics code 22b can be used, for example, to perform power-up self-tests and adjustments of system RAM 14, the CPU 12, and other digital circuitry and read/write chips and currents. In step 204, the OS-based utility 14a calls the OS-independent BIOS function. In step 206, the OS-independent BIOS function executes a suspend-to-disk (S2D) to suspend the operation of the PC 10 to the hard disk 18, sets the TEST flag (not shown) to indicate that the embedded diagnostics code 22b are to be executed the next time the PC 10 is reset, and causes the soft power circuitry 20 to reset the PC 10 in step 208. In step 210, BIOS code 22a examines the state of the TEST flag in step 206 and, upon determining that the TEST flag is set, branches into execution of the embedded diagnostics code 22b.
In step 212, the embedded diagnostics code 22b runs its "crawl-out" test sequence and stores the resulting status and failure information in NVRAM 24. In step 214, the embedded diagnostics code 22b clears the TEST flag previously set in step 206 and causes the soft power circuitry 20 to execute a power cycle to reset the PC 10 in step 216. In step 218, the BIOS code 22a reboots the PC 10 using the boot code thereof and, upon examining the TEST flag and determining that it is clear, executes a resume-from-disk (RFD) operation to restore the state of the PC 10 to where it was prior to execution of step 206. In step 220, the OS-based utility 14a accesses the status and failure information stored in NVRAM 24 and displays and/or acts upon the information.
In this manner, the crawl-out test sequence of the embedded diagnostics code 22b is executed transparently to both the user and the OS, with the results being stored in NVRAM 24 for subsequent access by the user or a technical support representative via a display or printer connected to the PC 10. In addition, the system of the present invention provides technical support representatives with the ability to initiate the embedded diagnostics code 22b from a remote location, view the results of the diagnostics tests, and then act accordingly, all without requiring user interaction.
It is understood that the present invention can take many forms and embodiments. The embodiments shown herein are intended to illustrate rather than to limit the invention, it being appreciated that variations may be made without departing from the spirit or the scope of the invention. For example, the remote utility could be configured automatically to reconnect after the embedded diagnostics have been run, as PC reset would break the connection. In addition, the same concept could be used to run a ROM-based setup or other utility from an OS-based application.
Although illustrative embodiments of the invention have been shown and described, a wide range of modification, change and substitution is intended in the foregoing disclosure and in some instances some features of the present invention may be employed without a corresponding use of the other features. Accordingly, it is appropriate that the appended claims be construed broadly and in a manner consistent with the scope of the invention.