« PreviousContinue »
United States Patent   Patent Number 5,063,496
Dayan et al.  Date of Patent: Nov. 5, 1991
 SIGNALING ATTEMPTED TRANSFER TO PROTECTED ENTRY POINT BIOS ROUTINE
 Inventors: Richard A. Dayan; Douglas R.
Geisler; Scott G. Kinnear, all of Boca
Raton; James F. Macon, Jr., Boynton
Beach; William H. Schwartz, Delray
Beach, all of Fla.
 Assignee: International Business Machines
Corporation, Armonk, N.Y.
 Appl. No.: 201,651
 Filed: Jun. 1, 1988
 Int. CI.5 G06F 9/00; G06F 12/00
 U.S. a 395/700; 364/280.9;
364/281.3; 364/281.7; 364/975.4; 364/976;
364/DIG. 1; 364/DIG. 2  Field of Search ... 364/200 MS File, 900 MS File
 References Cited
U.S. PATENT DOCUMENTS
4,328,542 5/1982 Anastas et al 364/200
4,519,032 5/1985 Mendell 364/200
4,584,639 4/1986 Hardy 364/200
4,636,947 1/1987 Ward 364/200
4,654,783 3/1987 Veres et al 364/200
4,747,040 5/1988 Blanset et al 364/200
4,858,117 8/1989 DiChiara et al 364/200
4,926,476 5/1990 Covey 364/200
Primary Examiner—Thomas C. Lee
Assistant Examiner—Ayni Mohamed
Attorney, Agent, or Firm—Anibal Jose Cortina
A data processing system has a microprocessor, a memory system and a plurality of system devices the operation of which is controlled by BIOS routines. The BIOS routines are accessed through protected entry points. When an application program attempts to access one of the routines by using a hard coded instruction for jumping to such entry point, a BIOS signaling routine is executed which provides a signal to an operating system allowing the operating system to control the access without being bypassed.
1 Claim, 2 Drawing Sheets
U.S. Patent Nov. 5, 1991 Sheet 2 of 2 5,063,496
SIGNALING ATTEMPTED TRANSFER TO PROTECTED ENTRY POINT BIOS ROUTINE
FIELD OF THE INVENTION 5
This invention relates to data processing systems and, more particularly, to improvements in control programs for multitasking data processing systems in which application programs include hard coded instructions for transferring control to protected entry 10 points in basic input/output system (BIOS) routines.
Internationa) Business Machines Corporation (IBM) has marketed for the last several years different systems 15 of personal computers that have evolved from single task systems into multitasking systems. Such evolution involved changes in both the hardware and software while maintaining an upwards compatibility throughout the newer systems for running old application pro- 20 grams. Early systems included a BIOS and a personal computer disk operating system (PC/DOS) that interacted with the application program through several software interrupt routines that relieved the application programmer from having to write or create routines 25 common to many different application programs. BIOS was intended to provide routines for controlling operation of the major I/O devices and relieve the application programmer from concern about hardware device characteristics. The recommended manner of invoking 30 or transferring control to the DOS or BIOS routines was to use the well known INT instruction.
BIOS was intended to be invoked by loading the microprocessor's registers with parameters and issuing an INT instruction. Some application programs devel- 35 oped for the IBM PC and XT systems access BIOS in an unprescribed manner. Such application programs are referred to as ill-behaved and use the microprocessor register conventions to pass parameters but use a different invocation method. First, the application programs 40 setup the required return parameters on a stack. Second, the application programs load the microprocessor registers with parameters depending on the BIOS function requested. Then, the programs either jump or call BIOS via its physical address (commonly referred to as a 45 "hard coded" address) in ROM memory. The BIOS memory area was expanded on the IBM AT system. It was not possible to keep the individual BIOS routines or instructions at the same starting address as in prior systems. Directly accessing BIOS by using hard coded 50 addresses caused these applications problems when BIOS entry point addresses changed because the jump would be to an undesired sequence of instructions or into the middle of an instruction or data where the microprocessor would erroneously interpret the target 55 locations as an instruction. To ensure transportability of applications from the early systems to the more recent IBM PS/2 systems, the old locations corresponding to the old entry points, contain hard coded jump instructions to transfer control to the new locations of the 60 entry points. The areas in memory which have the hard coded jumps are referred to as protected entry points.
The IBM OS/2 operating system is a multitasking operating system developed for different computers including IBM PS/2 models 50-80 computers and the 65 IBM AT system. The use of protected entry points has been found to create a problem for such operating system. The OS/2 system maintains a PC/DOS environ
ment. This allows customers to run old PC/DOS applications under, and provides a migration path to, the OS/2 system. In order to run protect mode operations in the background and control foreground operations in the PC/DOS environment, the OS/2 system must have full control and ownership of all system resources. To accomplish such control, the operating system intercepts all BIOS requests through the interrupt vectors and thereby controls access to system resources. If an application, executing in the PC/DOS environment, directly accesses a BIOS routine via one of the protected entry points, the system may hang or act unpredictably where the BIOS routine or a device operation has already been invoked by some other application program or requestor. The BIOS routines are not reentrant because the BIOS work areas will only support a single request at any one time, and some devices cannot handle concurrent operations. Therefore, when an application program jumps directly to a BIOS routine by use of a hard coded address, such process is transparent to the operating system and sets up the potential situation of two different programs accessing the same system resource at the same time when in fact only one program can do so. Note that IBM, AT, PS/2, and OS/2 are trademarks of International Business Machines Corporation.
One of the objects of the invention is to provide, in a multitasking data processing system having protected entry points into BIOS routines, another BIOS routine that will provide a signal to the operating system, that a BIOS routine is about to be invoked through a protected entry point.
Another object is to provide a signal from a BIOS routine to the operating system that a system resource, specifically a BIOS routine, is the target of an attempt by an application program to transfer control to such BIOS routine, to thereby allow the operating system to take some action to prevent problems.
Briefly, the manner in which the above objects are achieved, is to store jump instructions at protected entry points in memory, to jump to BIOS signaling routines that, in turn, issue INT instructions for a new software interrupt called a Protected BIOS Entry Point Intercept Function, to signal the operating system that a BIOS access is being attempted. This signal indicates that an unrecommended access is about to occur and gives the operating system a chance to handle the request and control usage of the specific resource desired.
Other objects and advantages of the invention will be apparent from the following description taken in connection with the accompanying drawings wherein:
FIG. 1 is a schematic diagram of a data processing system embodying the invention;
FIG. 2 is a schematic diagram showing the relationship of certain aspects of the invention; and
FIG. 3 is a flow diagram of the invention.
Referring now to the drawings, FIG. 1 depicts a data processing system 8 comprising a microprocessor 10 connected over a bus system 12 to a memory system 14 and an input/output (1/0) subsystem 16, these various elements forming the hardware part of the data process