13.07.2015 Views

iAPX 286 Operating System Writers Guide 1983

iAPX 286 Operating System Writers Guide 1983

iAPX 286 Operating System Writers Guide 1983

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SYSTEM INITIALIZATIONStarting the first task is simply a 'matter of executing a long JMPvia the descriptor of a TSS'orvia II:task gate to that descriptor. This task can perform any remaining initialization work while enjoying thefull protection and virtual-address features of the <strong>iAPX</strong> <strong>286</strong>, the state assumed by the developmenttools.EXAMPLE OF I~ITIALIZATIONThe following figures present a detailed example of one way to initialize a protected, virtual-addressmode system. This example includes assembly language modules that work in conjunction with Builderspecifications.Figure 10-1 shows the primary initialization module ENTP (ENTer Protected mode). This module putsthe 80<strong>286</strong> into protected, virtual-address mode a.nd invokes the first task constructed by BLD<strong>286</strong>. Youuse a module such as ENTP by binding it with other modules (presumably those constituting theoperating system and the initial task) that you intend to place in EPROM.. .The module SEGS shown in figure 10-2 supplies dummy segment descriptions for ENTP. The programINIT shown in figure 10-3 serves as the initial task .. It merely displays a message when initialization iscomplete. ' .Initialization Module ENTPThe steps that ENTP takes are to• Switch into protected mode• Create a temporary GDT• 'Create an lOT and GDT copy in RAM from tables in EPROM• . Point the CPU to the RAM tables• Copy all the TSSs and LDTs identified in the .GDT from EPROMJo RAM'• Update the RAM GDT to point to the RAM copies• JMP to the initialization task in the GDTThe initializations immediately following RESET_STARTUP are redundant. They simulate ththardware RESET initializations in case of a software reset or in case of a 'branch toRESELSTARTUP during debugging.INITIALGDT is a temporary GDT containing descriptors for the lOT and the main GDT in EPROM(the one constructed by BLD<strong>286</strong>). Since the symbols for these descriptors, GDT_DESC and.IDTJ>ESC, are PUBLIC, the Builder can insert the actual base and limit values into the table. .The code in segment ENTP _CODE is self-relocatable. In an EPROM-based system, you would specifyto the Builder the actual address of the segment ENTP _CODE, making sure that the entry pointresides at physical address FFFFFOH.ENTP assumes a specific format for the GDT constructed by BLD<strong>286</strong>. The first two descriptors arethe data-segment aliases for the GDT and the IDT. The remaining descriptors are grouped accordingto the template defined by TASICENTRY. Three adjacent descriptors identify the key segments ofeach task. ENTP adapts at run time to the actual number of such groups in the GDT. The task thatENTP initiatcs is identified by a fixed position in the GDT.10-3 121960·001

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!