APPENDIX D

80286/80386 SOFTVVARE

COMPATIBILITY CONSIDERATIONS

This appendix describes the considerations required in designing an Operating System for the protected mode 80286 so that it will operate on an 80386. An 80286 Operating System running on the 80386 would not use any of the advanced features of the 80386 (Le., paging or segments larger than 64K), but would run 80286 code faster. Use of the new 80386 features requires changes in the 80286 Operating System.

The 80386 is no different than any other software compatible processor in terms of requiring the same system environment to run the same software; the 80386 must have the same amount of physical memory and I/O devices in the system as the 80286 system to run the same software. Note that an 80386 system requires a different memory system to achieve the higher performance.

The 80286 design considerations can be generally characterized as avoiding use of functions or memory that the 80386 will use. The exception to this rule is initialization code executed after power up. Such code must be changed to configure the 80386 system to match that of the 80286 system.

The following are 80286/80386 software compatibility design considerations:

1.Isolate the protected mode initialization code.

System initialization code will be required on the 80386 to program operating parameters before executing any significant amount of 80286 software. The 80286 initialization software should be isolated from the rest of the Operating System.

The initialization code in Appendix A is an example of isolated initialization code. Such code can be extended to include programming of operating parameters before executing the initial protected mode task.

2.Avoid wraparound of 80286 24-bit physical address space.

Since the 80386 has a larger physical address space, any segment whose base address is greater than FFOOOO and whose limit is beyond FFFFFF will address the seventeenth megabyte of memory in the 80386 32-bit physical address space instead of the first megabyte on an 80286.

No expand-down segments shouldhave a base address in the range FF00001-FFFFFF. No expand- up segments should wrap around the 80286 address space (the sum of their base and limit is in the range OOOOOO-OOFFFE).

3.Zero the last word of every 80286 descriptor.

The 80386 uses the last word of each descriptor to expand the base address and limit fields of segments. Placing zeros in the descriptor will cause the 80386 to treat the segments the same way as an 80286 (except for address space wraparound as mentioned above).

4.Use only 80H or OOH for invalid descriptors.

The 80386 uses more descriptor types than the 80286. Numeric values of 8-15 in bits 3-0 of the access byte for control descriptors will cause a protection exception on the 80286, but may be defined for other segment types on the 80386. Access byte values of 80H and OOH will remain undefined descriptors on both the 80286 and the 80386.

5.Put error interrupt handlers in reserved interrupts 14, 15, 17-31.

Some of the unused, Intel-reserved interrupts of the 80286 will be used by the 80386 (Le., page fault or bus error). These interrupts should not occur while executing an 80286 operating system on an 80386. However, it is safest to place an interrupt handler in these interrupts to print an error message and stop the system if they do occur.

0-1

Page 335
Image 335
Intel 80287 manual 80286/80386 Softvvare