intal PRELIMINARY 80130/80130-2 iAPX 86/30, 88/30, 186/30, 188/30 iRMX 86 OPERATING SYSTEM PROCESSORS High-Performance 2-Chip Data Types: Jobs, Tasks, Segments, Processors Containing Operating Mailboxes, Regions System Primitives = 35 Operating System Primitives = Standard iAPX 86/10, 88/10 Instruction = Built-In Operating System Timers and Set Pius Task Management, Interrupt Interrupt Contro! Logic Expandable Management, Message Passing, From 8 to 57 Interrupts Fe dineaae-arnanoie Memory 8086/80150/80150-2/8088/80186/80188 ocation Primitives ; ; Compatible At Up To 8 MHz Without = Fully Extendable To and Compatible With Wait States iRMX* 86 MULTIBUS System Compatible Interface = Supports Five Operating System Data The Intel iAPX 86/30 and iAPX 88/30 are two-chip microprocessors offering general-purpose CPU (8086) instructions combined with real-time operating system support. They provide a foundation for multiprogram- ming and multitasking applications. The iAPX 86/30 consists of an iAPX 86/10 (16-bit 8086 CPU) and an Operating System Firmware (OSF) component (80130). The 88/30 consists of the OSF and an iAPX 88/10 (8-bit 8088 CPU). (80186 or 80188 CPUs may be used in place of the 8086 or 8088.) Both components of the 86/30 and 88/30 are implemented in N-channel, depletion-load, silicon-gate technol- ogy(HMOS}yand are housed in 40-pin packages. The 86/30 and 88/30 provide all the functions of the iAPX 86/10, 88/10 processors plus 35 operating system primitives, hardware support for eight interrupts, a system timer, a delay timer and a baud rate generator. 8088 | OR PROGRAM DATA euoen 8086 | MEMORY MEMORY 1 (] h INTERRUPT STATUS | DRIVER LOCAL BUS Bus SYSTEM BUS DRIVER ROY INTERFACE | INTERRUPT STATUS | CS.LIR cLock 80130 INTERRUPT PERIPHERAL REQUESTS ACKNOWLEDGE | it BAUD RATE DELAY SYSTEM iAPX 86/30, 88/30 TIMER TIMER TIMER | | | | | 82848 | | | | | | Figure 1. iAPX 86/30, 88/30 Block Diagram Intel Corporation Assumes No Responsibilty for the Use of Any Circuitry Other Than Circuitry Embodied in an Intel Product. No Other Circuit Patent Licenses are Implied. @INTEL CORPORATION, 1981 OCTOBER 1981 3-198 210216-002iAPX 86/30, 88/30, 186/30, 188/30 80130/80130-2 PRELIMINARY MAX MAX MODE MODE r 8086 8088 Vss ql 1 a 40 Voc vss [7] 1 XY 40 7 Voc ants] 2 39 [7] apis (avy ania [] 2 30 [7] avis (ats) apis [] 3 as |] ane (13) avta[_] 3 38] atsiss apiz[ Ja 37 [J ia7 (aig api2[] 4 a7 [J arzisa ADI1 2 5 36 In6 (AN) ADI CI 5 36 r] A18/S5 ano] 35 [_] ins (ato) aoro[_] 6 35 [7] arse ADS CO 7 34 | ina (Ag) avo] 7 34 Tt BHE/S7 (HIGH) ave [8 a3 [_] ina (as) ape[_ |e. 33] ania ao7 [_] 9 32 {] ire ap7[_} 9 sose 321] aD aps [} 10 gors0 at Bia aps [_] 10 and at] Raare aps [7] 30 [J ino aps {7} 11 30 [7] RaGT ana [| 12 29 ["] nr apa [| 12 23 |] cock apa |_| 43 2s [_] 52 apa [_} 13 2a |] 52 av2 [7] 14 27] st an2[_] 14 asi apt} 45 as |] 56 aot [_] 15 26 [ ]s avo [| 16 25 [_] ACK ADO CO 16 25 (_] aso memes [_] 17 2a[_] um nmi] 17 24[ Jas Tocs [J 18 23} ] systicx itr [| 18 23] Test cuk [7] 19 22[_] vevay cu [J 19 22[] neapy * Ves [| 20 21 [| eau vss [_] 20 21 |] reser Figure 2. iAPX 86/30, 88/30 Pin Configuration Table 1. 80130 Pin Description Symbol Type |. Name and Function AD15-ADg vo Address Data: These pins constitute the time multiplexed memory address (T,) and data (T2,T3, Tw, T4) bus. These lines are active HIGH. The address Presented during T, of a bus cycle will be latched internally and interpreted as an 80130 internal address if MEMNCS or IOCS is active for the invoked primitives. The 80130 pins float whenever it is not chip selected, and drive these pins only during To-Tg of aread cycle andT, of aniNTA cycle. BHE/S7 Bus High Enable: The 80130 uses the BHE signal from the Processor to determine : whether to respond with data on the upper or lower data pins, or both. The signal is active LOW. BHE is latched by the 80130 on the trailing edge of ALE. It controls the 80130 output data as shown. BHE Ag 0 0 Word on AD15-ADp 0 1 Upper byte on AD,5-ADg 1 0 . Lower byte on AD7~ADg . 1 1 Upper byte on AD7-ADg So, S71, Sq. | Status: For the 80130, the status pins are used as inputs only. 80130 encoding follows: 82 81 8 0 0 0 INTA 0 0 1. {ORD 0 1 0 iOWR 0 1 1 Passive 1 0 0 Instruction fetch 1 0 1 MEMRD 1 1 X Passive 3-199 210216-002\ 80130/80130-2 PRELIMINARY iAPX 86/30, 88/30, 186/30, 188/30 Table 1. 80130 Pin Description (Continued) Symbol Type Name and Function CLK I Clock: The system clock provides the basic timing for the processor and bus controller. It is asymmetric with a 33% duty cycle to provide optimized internal timing. The 80130 uses the system clock as an input to the SYSTICK and BAUD timers and to synchronize operation with the host CPU. INT oO Interrupt: INT is HIGH whenever a valid interrupt request is asserted. Itis normally used to interrupt the CPU by connecting it to INTR. IR7-IRo l Interrupt Requests: An interrupt request can be generated by raising an IR input (LOW to HIGH) and holding it HIGH until it is acknowledged (Edge-Triggered Mode), or just by a HIGH level on an IR input (Level-Triggered Mode). ACK oO Acknowledge: This line is LOW whenever an 80130 resource is being accessed. It is also LOW during the first INTA cycle and second INTA cycle if the 80130 is supplying the interrupt vector information. This signal can be used as a bus ready acknowledgement and/or bus transceiver control. MEMCS | Memory Chip Select: This input must be driven LOW when a kernel primitive is being fetched by the CPU. AD,3-ADg are used to select the instruction. 10cs | Input/Output Chip Select: When this input is low, during an IORD or IOWR cycle, the 80130's kernel primitives are accessing the appropriate peripheral function as specified by the following table: BHE Az Ap Ay Ao 0 x xX Xx X Passive xX x x xX 1 Passive xX 0 1 x X Passive 1 0 0 xX 0 Interrupt Controller 1 1 0 0 0 = Systick Timer 1 1 0 1 0 Delay Counter 1 1 1 0 0 Baud Rate Timer 1 1 1 1 0 Timer Control LIR Local Bus Interrupt Request: This signal is LOW when the interrupt request is for a non-slave input or slave input programmed as being a local slave. Vec Power: Vcc is the +5V supply pin. Vss Ground: Vss is the ground pin. SYSTICK oO System Clock Tick: Timer 0 Output. Operating System Clock Reference. SYSTICK is normally wired to |R2 to implement operating system timing interrupt. DELAY DELAY Timer: Output of timer. 1. Reserved by intel Corporation for future use. BAUD O Baud Rate Generator: 8254 Mode 3 compatible output. Output of 80130 Timer 2. FUNCTIONAL DESCRIPTION The increased performance and memory space of iAPX 86/10 and 88/10 microprocessors have proven sufficient to handle most of todays single-task or single-device control applications with performance to spare, and have led to the increased use of these microprocessors to control multiple tasks or devices in real-time. This trend has created a new challenge to designersdevelopment of real-time, multitask- ing application systems and software. Examples of such systems include control systems that monitor and react to external events in real-time, multifunc- tion desktop and personal computers, PABX equip- 3-200 ment which constantly controls the telephone traffic in a multiphone office, file servers/disk subsystems controlling and coordinating multiple disks and mul- tiple disk users, and transaction processing systems such as electronics funds transfer. The iAPX 86/30, 88/30 Operating System Processors The Intel iAPX 86/30, 88/30 Operating System Pro- cessors (OSPs) were developed to help solve this 210216-00280130/80130-2 iAPX 86/30, 88/30, 186/30, 188/30 PRELIMINARY FO ee ne we ee 7 1 OPERATING SYSTEM UNIT j | | | | | i \ 8 PROGRAMMABLE { nTenauer | INTERRUPT INPUTS | t or | { | INTERRUPT OUT | CONTROL | STORE ' | | | SYSTEM HH SYSTEM | TIMER | I | | | Da-15 | lw ELAY | ay fee | Lut | | | | | 1 i ! | NN] | | 4 BAUD RATE LY aaup vate i [ GENERATOR | ! ces | } Jo---~---- - = 2 aa -- 4 | i I I | [ft cLocK I | 3 { DATA Bus * BUFFER INTERFACE maa STATUS CO a AND 4 j ADDRESS L____J CONTROL Ih Bus CONTROL ADDRESS. | LATCH i DATA BUS | |. LOCAL i | INTERRUPT it CONTROL UNIT \ (cir Figure 3. OSF internal Block Diagram problem. Their goal is to simplify the design of multi- tasking application systems by providing a well- defined, fully debugged set of operating system primitives implemented directly in the hardware, thereby removing the burden of designing multitask- ing operating system primitives from the application programmer. Both the 86/30 and the 88/30 OSPs are two-chip sets consisting of a main processor, an 8086 or 8088 CPU, and the Intel 80130, Operating System Firmware component (OSF) (see Figure 1). The 80130 provides a set of muititasking kernel primitives, kernel control storage, and the additional support hardware, in- cluding system timers and interrupt control, re- quired by these primitives. From the application programmer's viewpoint, the OSF extends the base iAPX 86, 88 architecture by providing 35 operating system primitive instructions, and supporting five new system data types, making the OSF a logical and 3-201 easy-to-use architectural extension to iAPX 86, 88 system designs. The OSP Approach The OSP system data types (SDTs) and primitive in- structions allocate, manage and share low-level pro- cessor resources in an efficient manner. For example, the OSP implements task context manage- ment (managing a task state image consisting of both hardware register set and software control in- formation) for either the basic 86/10 context or the extended 86/20 (8086+8087) numerics context. The OSP manages the entire task state image both while the task is actively executing and while it is inactive. Tasks can be created, put to sleep for specified peri- ods, suspended, executed to perform their func- tions, and dynamically deleted when their functions are complete. 210216-002intel 80130/80130-2 iAPX 86/30, 88/30, 186/30, 188/30 PRELIMINARY The Operating System Processors support event- oriented systems designs. Each event may be pro- cessed by an individual responding task or along with other closely related events in a common task. External events and interrupts are processed by the OSP interrupt handler primitives using its built-in interrupt controller subsystem as they occur in real- time. The multiple tasks and the multiple events are coordinated by the OSP integral scheduler whose preemptive, priority-based scheduling algorithm and system timers organize and monitor the process- ing of every task to guarantee that events are pro- cessed as they occur in order of relative importance. The 86/30 also provides primitives for intertask com- munication (by mailboxes) and for mutual exclusion (by regions), essential functions for multitasking applications. Programming Language Support Programs for the OSP can be written in ASM 86/88 or PL/M 86/88, Intels standard system languages for iAPX 86,88 systems. The Operating System Processor Support Package (iOSP 86) provides an interface library for applica- tion programs written in any model of PL/M-86. This library also provides 80130 configuration and in- itialization support as well as complete user documentation. OSF PROGRAMMING INTERFACE The OSF provides 35 operating system kernel primitives which implement multitasking, interrupt management, free memory management, intertask communication and synchronization. Table 4 shows each primitive, and Table 5 gives the execution per- formance of typical primitives. . OSP primitives are executed by a combination of CPU and OSF (80130) activity. When an OSP primi- tive is called by an application program task, the iAPX CPU registers and stacks are used to perform the appropriate functions and relay the results to the application programs. OSP Primitive Calling Sequences Astandard, stack-based, calling sequence is used to invoke the OSF primitives. Before a primitive is called, its operand parameters must be pushed on the task stack. The SI register is loaded with the offset of the last parameter on the stack. The entry code for the primitive is loaded into AX. The primitive invocation call is made with a CPU software interrupt 3-202 (Table 4). A representative ASM86 sequence for call- ing a primitive is shown in Figure 4. In PL/M the OSP programmer uses a call to invoke the primitive. SAMPLE ASSEMBLY LANGUAGE PRIMITIVE CALL PUSH P, PUSH P, ;PUSH PARAMETER 1 ;PUSH PARAMETER 2 PUSH PARAMETER N STACK CALLING CONVENTION PUSH Py, PUSH BP MOV BP,SP LEA SI,SS:NUM_BYTES__PARAM = 2/BP1 ;$5:SI POINTS TO FIRST ;PARAMETER ON STACK MOV AX, ENTRY CODE AX SETS PRIMITIVE ENTRY CODE INT 184 ;OSF INTERRUPT OSP PRIMITIVE INVOKED POP BP RET NUM_BYTES__PARAM_ ;POP PARAMETERS ;CX CONTAINS EXCEPTION CODES ;DL CONTAINS PARAMETER NUMBER THAT CAUSED EXCEPTION (IF CX IS NON ZERO} ;AX CONTAINS WORD RETUAN VALUE jES:BX CONTAINS POINTER RETURN VALUE Figure 4. ASM/86 OSP Calling Convention OSP Functional Description Each major function of the OSP is described below. These are: Job and Task Management interrupt Management Free Memory Management Intertask Communication Intertask Synchronization Environmental Control The system data types (or SDTs) supported by the OSP are capitalized in the description. A short description of each SDT appears in Table 2. JOB and TASK Management Each OSP JOB is a controlled environment in which the applications program executes and the OSF sys- tem data types reside. Each individual application program is normally a separate OSP JOB, whether it has one initial task (the minimum) or multiple tasks. JOBs partition the system memory into pools. Each memory pool provides the storage areas in which the OSP will allocate TASK state images and other sys- tem data types created by the executing TASKs, and free memory for TASK working space. The OSP sup- ports multiple executing TASKs within a JOB by managing the resources used by each, including the CPU registers, NPX registers, stacks, the system data types, and the available free memory space pool. 210216-002intel 80130/80130-2 iAPX 86/30, 88/30, 186/30, 188/30 PRELIMINARY When a TASK is created, the OSP allocates memory (from the free memory of its JOB environment) for the TASKs stack and data area and initializes the additional TASK attributes such as the TASK priority level and its error handler location. (As an option, the caller of CREATE TASK may assign previously defined stack and data areas to the TASK.) Task priorities are integers between 0 and 255 (the lower the priority number the higher the scheduling priority of the TASK). Generally, priorities up to 128 will be assigned to TASKs which are to process inter- rupts. Priorities above 128 do not cause interrupts to be disabled, these priorities (129 to 255) are appro- priate for non-interrupt TASKs. if an 8087 Numerics Processor Extension is used, the error recovery inter- rupt level assigned to it will have a higher priority than a TASK executing on it, so that error handling is performed correctly. EXECUTION STATUS ATASK has an execution status or execution state. The OSP provides five execution states: RUNNING, READY, ASLEEP, SUSPENDED, and ASLEEP- SUSPENDED. ATASK is RUNNING if it has control of the processor. : ATASK is READY if it is not asleep, suspended, or asleep-suspended. For a TASK to become the run- ning (executing) TASK, it must be the highest Priority TASK in the ready state. ATASK is ASLEEP if it is waiting for a request to be granted or a timer event to occur. A TASK may put itself into the ASLEEP state. ATASK is SUSPENDED if it is placed there by another TASK or if it suspends itself. A TASK may have multiple suspensions, the count of suspen- sions is managed by the OSP as the TASK suspen- sion depth. ATASK is ASLEEP-SUSPENDED if it is both waiting and suspended. TASK attributes, the CPU register values, and the 8087 register values (if the 8087 is configured into the application) are maintained by the OSP in the TASK state image. Each TASK will have a unique TASK state image. SCHEDULING The OSP schedules the processor time among the various TASKs on the basis of priority. A TASK has an execution priority relative to all other TASKs in the system, which the OSP maintains for each TASK in its TASK state image. When a TASK of higher priority than the executing TASK becomes ready to execute, 3-203 the OSP switches the control of the processor to the higher priority TASK. First, the OSP saves the outgo- ing (lower priority) TASKs state including CPU regis- ter values in its TASK. state image. Then, it restores the CPU registers from the TASK state image of the incoming (higher priority) TASK. Finally, it causes the CPU to start or resume executing the higher priority TASK. TASK scheduling is performed by the OSP. The OSPs priority-oriented preemptive scheduler determines which TASK executes by comparing their relative priorities. The scheduler insures that the highest priority TASK with a status of READY will execute. A TASK will continue to execute until an interrupt with a higher priority occurs, or until it requests unavailable resources, for which it is willing to wait, or until it makes specific resources available to a higher priority TASK waiting for those resources. TASKs can become READY by receiving a message, receiving control, receiving an interrupt, or by timing out. The OSP always monitors the status of all the TASKs (and interrupts) in the system. Preemptive scheduling allows the system to be responsive to the external environment while only devoting CPU re- sources to TASKs with work to be performed. TIMED WAIT The OSP timer hardware facilities support timed waits and timeouts. Thus, in many primitives, a TASK can specify the length of time it is prepared to wait for an event to occur, for the desired resources to become available or for a message to be received at a MAILBOX. The timing interval (or System Tick) can be adjusted, with a lower limit of 1 millisecond. APPLICATION CONTROL OF TASK EXECUTION Programs may alter TASK execution status and priority dynamically. One TASK may suspend its own execution or the execution of another TASK for a period of time, then resume its execution later. Multi- ple suspensions are provided. A suspended TASK may be suspended again. The eight OSP Job and TASK management primitives are: CREATE JOB Partitions system resources and creates a TASK execution environment. Creates a TASK state image. Specifies the location of the TASK code instruction stream, its execution priority, and the other TASK attributes. CREATE TASK 210216-002intel 80130/80130-2 iAPX 86/30, 88/30, 186/30, 188/30 PRELIMINARY DELETE TASK Deletes the TASK state image, removes the instruction stream from execution and deailocates stack resources. Does not delete INTERRUPT TASKS. SUSPEND TASK Suspends the specified TASK or, if already suspended, _in- crements its suspension depth by one. Execute state is SUSPEND. RESUME TASK Decrements the TASK suspen- sion depth by one. If the sus- pension depth is then zero, the primitive changes the task execution status to READY, or ASLEEP (if ASLEEP/ SUSPENDED). SLEEP Places the requesting TASK in the ASLEEP state for a specified number of System Ticks. (The TICK interval can be configured down to 1 millisecond.) SET PRIORITY Alters the priority of a TASK. Interrupt Management The OSP supports up to 256 interrupt levels or- ganized in an interrupt vector, and up to 57 external interrupt sources of which one is the NMi (Non- Maskable Interrupt). The OSP manages each inter- rupt level independently. The OSF INTERRUPT SUBSYSTEM provides two mechanisms for interrupt management: INTERRUPT HANDLERs and INTER- RUPT TASKs. INTERRUPT HANDLERs disable all maskable interrupts and should be used only for servicing interrupts that require little processing time. Within an INTERRUPT HANDLER only certain OSF !nterrupt Management primitives (DISABLE, ENTER INTERRUPT, EXIT INTERRUPT, GET LEVEL, SIGNAL INTERRUPT) and basic CPU instructions can be used, other OSP primitives cannot be. The INTERRUPT TASK approach permits all OSP primitives to be issued and masks only lower priority interrupts. Work flow between an INTERRUPT HANDLER and an INTERRUPT TASK assigned to the same level is regulated with the SIGNAL INTERRUPT and WAIT INTERRUPT primitives. The flow is asynchronous. When an INTERRUPT HANDLER signals an INTER- RUPT TASK, the INTERRUPT HANDLER becomes immediately available to process another interrupt. The number of interrupts (specified for the level) the 3-204 INTERRUPT HANDLER can queue for the INTER- RUPT TASK can be limited to the value specified in the SET INTERRUPT primitive. When the INTER- RUPT TASK is finished processing, it issues a WAIT INTERRUPT primitive, and is immediately ready to process the queue of interrupts that the INTERRUPT HANDLER has built with repeated SIGNAL INTER- RUPT primitives while the INTERRUPT TASK was processing. If there were no interrupts at the level, the queue is empty and the INTERRUPT TASK is SUSPENDED. See the Example (Figure 5) and Fig- ures 6 and 7. OSP external INTERRUPT LEVELs are directly related to internal TASK scheduling priorities. The OSP maintains a single list of priorities including both tasks and INTERRUPT LEVELs. The priority of the executing TASK automatically determines which interrupts are masked. Interrupts are managed by INTERRUPT LEVEL number. The OSP supports eight levels directly and may be extended by means of slave 8259As to a total of 57. The nine Interrupt Management OSP primitives are: DISABLE Disables an external INTER- RUPT LEVEL. Enabies an external INTER- RUPT LEVEL. Gives an Interrupt Handler its own data segment, sepa- rate from the data segment of the interrupted task. Performs an END of INTER- RUPT" operation. Used by an INTERRUPT HANDLER which does not invoke an IN- TERRUPT TASK. Reenables interrupts, when the INTER- RUPT HANDLER gives up control. ENABLE ENTER INTERRUPT EXIT INTERRUPT GET LEVEL Returns the interrupt level number of the executing IN- TERRUPT HANDLER. Cancels the previous as- . signment made to an interrupt level by SET IN- TERRUPT primitive request. lf an INTERRUPT TASK has been assigned, it is also deleted. The interrupt level is disabled. Assigns an INTERRUPT HANDLER to an interrupt level and, optionally, an IN- TERRUPT TASK. RESET INTERRUPT SET INTERRUPT 210216-002ntel 80130/80130-2 iAPX 86/30, 88/30, 186/30, 188/30 PRELIMINARY (* CODE EXAMPLE A INTERRUPT TASK TO KEEP TRACK OF TIME-OF-DAY DECLARE SECONDSCOUNT BYTE, MINUTESCOUNT BYTE, HOURSSCOUNT BYTE; TIMESTASK: PROCEDURE; DECLARE TIMESEXCEPTSCODE WORD; ACSCYCLESCOUNT=0; CALL ROSSETSINTERRUPT(ACSINTERRUPTSLEVEL, 01H), @ACSHANDLER,0,@TIMESEXCEPTSCODE); CALL ROSRESUMESTASK(INITSTASKSTOKEN, @ TIMESEXCEPTSCODE); DO HOURSCOUNT=0 TO 23; DO MINUTESCOUNT=0 TO 59; DO SECONDSCOUNT-=0 TO 59; CALL AGSWAITSINTERRUPT(ACSINTERRUPTSLEVEL, @TIMESEXCEPT$CODE); IF SECONDSCOUNT MOD 5=0 THEN CALL PROTECTEDSCATSOUT(BEL); END; /" SECOND LOOP */ END; /* MINUTE LOOP */ END; /* HOUR LOOP */ CALL ROSRESETSINTERRUPT(ACSINTERRUPTSLEVEL, @TIMESEXCEPTSCODE); END TIMESTASK; : * CODEEXAMPLEB INTERRUPT HANDLER TO SUBDIVIDE A.C. SIGNAL BY 60. */ DECLARE ACSCYCLESCOUNT BYTE; ACSHANDLER: PROCEDURE INTERRUPT 59; DECLARE ACSEXCEPTSCODE WORD; ACSCYCLESCOUNT=ACSCYCLESCOUNT +1; IF ACSCYCLESCOUNT> =60 THEN DO; ACSCYCLESCOUNT=0; CALL AQSSIGNALSINTERRUPT(ACSINTERRUPTSLEVEL,@ACSEXCEPTSCODE): END; END ACSHANDLER; Figure 5. OSP Examples INTERRUPT OCCURS AND INTERRUPT HANDLER GETS CONTROL NEED ANEW OS VALUE ? CALL ENTERSINTERRUPT INTERRUPT HANOLEA DOES SOME INTERRUPT SERVICING NEED TO INVOKE INTERRUPT TASK ? INTERRUPT HANDLER CALLS EXITSINTERRUPT INTERRUPT HANDLER CALLS SIGNALSINTERARUPT I INTERRUPT TASK COMPLETES INTERRUPT SERVICING INTERRUPT TASK LES CA WAITSINTERRUPT CONTROL RETURNS TO AN APPLICATION TASK Figure 6. Interrupt Handling Flowchart 3-205 210216-00280130/80130-2 a if Ital iAPX 86/30, 88/30, 186/30, 188/30 BUFFERS ; @ OBTAINS FULL BUFFER e ares x / \ . { wrernupt 1 TASK Sw ,oo ~ / \ @ STARTS FILLING \ EMPTY BUFFER WHEN FULL, CALLS } SIGNALSINTERRUPT - TO START TASK ON N FULL BUFFER / \ INTERRUPT INTERRUPT INTERRUPT CALLS INTERRUPT | () PROCESSES HANDLER TASK WAITSINTEARRUPT \ ASK i FULL BUFFER TOWAIT FOR NEXT = \ / FULL BUFFER ~ Ue ~~ e Figure 7. Multiple Buffer Example SIGNAL INTERRUPT Used by an INTERRUPT HANDLER to activate an In- terrupt Task. WAIT INTERRUPT Suspends the calling Inter- rupt Task until the INTER- RUPT HANDLER performs a SIGNAL INTERRUPT to in- voke it. If a SIGNAL INTER- RUPT for the task has occurred, it is processed. FREE MEMORY MANAGEMENT The OSP Free Memory Manager manages the memory pool which is allocated to each JOB for its execution needs. (The CREATE JOB primitive al- locates the new JOBs memory pool from the memory poo! of the parent JOB.) The memory pool is part of the JOB resources but is not yet allocated between the tasks of the JOB. When a TASK, MAIL- BOX, or REGION system data type structure is created within that JOB, the OSP implicitly allocates memory for it from the JOBs memory pool, so that a separate call to allocate memory is not required. OSP primitives that use free memory management im- plicitly include CREATE JOB, CREATE TASK, DELETE TASK, CREATE MAILBOX, DELETE MAIL- BOX, CREATE REGION, and DELETE REGION. The CREATE SEGMENT primitive explicitly allocates a memory area when one is needed by the TASK. For example, a TASK may explicitly allocate a SEGMENT for use aS a memory buffer. The SEGMENT length can be any multiple of 16 bytes between 16 bytes and 64K bytes in length. The programmer may specify any number of bytes from 1 byte to 64 KB, the OSP will transparently round the value up to the appropri- ate segment size. The two explicit memory allocation/deallocation primitives are: CREATE SEGMENT Allocates a SEGMENT of spe- cified length (in 16-byte-long paragraphs) from the JOB Memory Pool. Dealiocates the SEGMENTs memory area, and returns it to the JOB memory pool. DELETE SEGMENT Intertask Communication The OSP has built-in intertask synchronization and communication, permitting TASKs to pass and share information with each other. OSP MAILBOXes con- tain controlied handshaking facilities which guaran- tee that acomplete message will always besent from a sending TASK to a receiving TASK. Each MAILBOX consists of two interlocked queues, one of TASKs 3-206 210216-002intel 80130/80130-2 iAPX 86/30, 88/30, 186/30, 188/30 PRELIMINARY and the other of Messages. Four OSP primitives for intertask synchronization and communication are provided: CREATE MAILBOX Creates intertask message exchange. Deletes an intertask mes- Sage exchange. Calling TASK receives a ms- sage from the MAILBOX. Calling TASK sends a message to the MAILBOX. DELETE MAILBOX RECEIVE MESSAGE SEND MESSAGE The CREATE MAILBOX primitive allocates a MAIL- BOX for use as an information exchange between TASKs. The OSP will post information at the MAIL- BOX in a FIFO (First-In First-Out) manner when a SEND MESSAGE instruction is issued. Similarily, a message is retrieved by the OSP if a TASK issues a RECEIVE MESSAGE primitive. The TASK which creates the MAILBOX may make it available to other TASKs to use. If no message is available, the TASK attempting to receive a message may choose to wait for one or continue executing. The queue management method for the task queue (FIFO or PRIORITY) determines which TASK in the MAILBOX TASK queue will receive a message from the MAILBOX. The method is specified in the CREATE MAILBOX primitive. Intertask Synchronization and Mutual Exclusion Mutual exclusion is essential to multiprogramming and multiprocessing systems. The REGION system data type implements mutual exclusion. A REGION is represented by a queue of TASKS waiting to use a resource which must be accessed by only one TASK at a time. The OSP provides primitives to use REGIONs to manage mutually exclusive data and resources. Both critical code sections and shared data structures can be protected by these primitives from simultaneous use by more than one task. REGIONs support both FIFO (First-In First-Out) or Priority queueing disciplines for the TASKS seeking to enter the REGION. The REGION SDT can also be used to implement software locks. Multiple REGIONSs are allowed, and are automatically exited in the reverse order of entry. While in a REGION, a TASK cannot be suspended by itself or any other TASK, and thereby avoids deadlock. There are five OSP primitives for mutual exclusion: CREATE REGION Create a REGION (lock). SEND CONTROL Give up the REGION. ACCEPT CONTROL Request the REGION, but do : not wait if it is not available. Request a REGION, wait if not immediately available. Delete a REGION. RECEIVE CONTROL DELETE REGION The OSP also provides dynamic priority adjustment for TASKs within Priority REGIONs: If a higher- priority TASK issues a RECEIVE CONTROL primitive, while a (lower-priority) TASK has the use of the same REGION, the lower-priority TASK will be trans- parently, and temporarily, elevated to the waiting TASK's priority until it relinquishes the REGION via SEND CONTROL. At that point, since it is no longer using the critical resource, the TASK will have its normal priority restored. OSP Control Facilities The OSP aiso includes system primitives that provide both control and customization capabilities to a mul- titasking system. These primitives are used to control the deletion of SDTs and the recovery of free memory in a system, to allow interrogation of operating sys- tem status, and to provide uniform means of adding user SDTs and type managers. DELETION CONTROL Deletion of each OSP system data type is explicitly controlled by the applications Programmer by set- ting a deletion attribute for that structure. For exam- ple, if a SEGMENT is to be kept in memory until DMA activity is completed, its deletion attribute should be disabled. Each TASK, MAILBOX, REGION, and SEG- MENT SDT is created with its deletion attribute en- abled (i.e., they may be deleted). Two OSP primitives control the deletion attribute: ENABLE DELETION and DISABLE DELETION. ENVIRONMENTAL CONTROL The OSP provides inquiry and control operations which help the user interrogate the application envi- ronment and implement flexible exception handling. These features aid in run-time decision making and in application error processing and recovery. There are five OSP environmental control primitives. OS EXTENSIONS The OSP architecture is defined to allow new user- defined System Data Types and the primitives to ma- nipulate them to be added to OSP capabilities 3-207 210216-002intel 80130/80130-2 iAPX 86/30, 88/30, 186/30, 188/30 PRELIMINARY provided by the built-in System Data Types. The type managers created for the user-defined SDTs are called user OS extensions and are installed in the system by the SET OS EXTENSION primitive. Once installed, the functions of the type manager may be invoked with user primitives conforming to the OSP interface. For well-structured extended architec- tures, each OS extension should support a separate user-defined system data type, and every OS exten- sion should provide the same calling sequence and program interface for the user as is provided for a built-in SDT. The type manager for the extension would be written to suit the needs of the application. OSP interrupt vector entries (224-255) are reserved for user OS extensions and are not used by the OSP. After assigning an interrupt number to the extension, the extension user may then cail it with the standard OSP call sequence (Figure 4), and the unique software interrupt number assigned to the extension. ENABLE DELETION "Allows a specific SEGMENT, TASK, MAILBOX, or REGION SDT to be deleted. Prevents a specific SEG- MENT, TASK, MAILBOX, or REGION SDT from being deleted. DISABLE DELETION GET TYPE Given a token for an in- stance of asystem data type, returns the type code. GET TASK TOKENS Returns to the caller infor- mation about the current task environment. Returns information about the calling TASKs current in- formation handler: its ad- dress, and when it is used. Provides the address and usage of an exception handler for a TASK. Modifies one of the interrupt vector entries reserved for OS extensions (224-255) to point to a user OS extension procedure. GET EXCEPTION HANDLER SET EXCEPTION HANDLER SET OS EXTENSION SIGNAL EXCEPTION | For use in OS extension er- ror processing. EXCEPTION HANDLING The OSP supports exception handlers. These are similar to CPU exception handlers such as OVER- FLOW and ILLEGAL OPERATION. Their purpose is to 3-208 allow the OSP primitives to report parameter errors in primitive calis, and errors in primitive usage. Ex- ception handling procedures are flexible and can be individually programmed by the application. In gen- eral, an exception handler if called will perform one or more of the following functions: Log the Error. Delete/Suspend the Task that caused the exception. lIgnore the error, presumably because it is not serious. An EXCEPTION HANDLER is written as a procedure. If PLM/86 is used, the compact, medium or large model of computation should be specified for the compilation of the program. The mode in which the EXCEPTION HANDLER operates may be speci- fied in the SET EXCEPTION HANDLER primitive. The return information from a primitive call is shown in Figure 4. CX is used to return standard system error conditions. Table 7 shows a list of these conditions, using the default EXCEPTION HANDLER of the OSP. HARDWARE DESCRIPTION The 80130 operates in a closely coupled mode with the iAPX 86/10 or 88/10 CPU. The 80130 resides on the CPU local multiplexed bus (Figure 8). The main processor is always configured for maximum mode operation. The 80130 automatically selects between its 88/30 and 86/30 operating modes. The 80130 used in the 86/30 configuration, as shown in Figure 8 (or a similar 88/30 configuration), operates at both 5 and 8 MHz without requiring pro- cessor wait states. Wait state memories are fully sup- ported, however. The 80130 may be configured with both an 8087 NPX and an 8089 IOP, and provides full context control over the 8087. The 80130 (shown in Figure 3) is internally divided into a contro! unit (CU) and operating system unit (OSU). The OSU contains facilities for OSP kernel support including the system timers for scheduling and timing waits, and the interrupt controller for interrupt management support. iAPX 86/30, iAPX 88/30 System Configuration The 80130 is both /O and memory mapped to the local CPU bus. The CPUs status S0/-S2/ is decoded along with lOCS/ (with BHE and AD3- AD) or MEMCS/ (with AD43-ADpo). The pins are internally latched. See Table 1 for the decoding of these lines. 210216-002intel 80130/80130-2 iAPX 86/30, 88/30, 186/30, 188/30 PRELIMINARY Memory Mapping Address lines A,g~A;4 can be used to form MEMCS/ since the 80130s memory-mapped portion is aligned along a 16K-byte boundry. The 80130 can reside on any 16K-byte boundry excluding the highest (FCOOOH-FFFFFH) and lowest (00000H-003FFH). The 80130 contro! store code is position-independent ex- cept as limited above, in order to make it compatible with many decoding logic designs. AD 13-ADpo are decoded by the 80130s kernel control store. V/O Mapping The I/O-mapped portion of the 80130 must be aligned along a 16-byte boundry. Address lines Ais-Aq should be used to form IOCS/. System Performance The approximate performance of representitive OSP Primitives is given in Table 5. These times are shown for a typical iAPX 86/30 implementation with an 8 MHz clock. These execution times are very compara- ble to the execution times of similar functions in minicomputers (where available) and are an order of magnitude faster than previous generation microprocessors. Initialization Both application system initialization and OSP- specific initialization/configuration are required to use the OSP. Configuration is based on a database provided by the user to the iOSP 86 support package. The OSP-specific initialization and configuration in- formation area is assigned to a user memory address adjacent to the 80130s memory-mapped location. (See Application Note 130 for further details.) The configuration data defines whether 8087 support is configured in the system, specifies if slave 8259A interrupt controllers are used in addition to the 80130, and sets the operating system time base (Tick Interval). Also located in the configuration area are the exception handler control Parameters, the ad- dress location of the (separate) application system configuration area and the OSP extensions in use. The OSP application system configuration area may be located anywhere in the user memory and must include the starting address of the application in- Struction code to be executed, plus the locations of the RAM memory blocks to be managed by the OSP free memory manager. Complete application system support and the required 80130 configuration sup- port are provided by the iAPX 86/30 and iAPX 88/30 OPERATING SYSTEM PROCESSOR SUPPORT PACKAGE (iOSP 86). 3-209 RAM Requirements The OSP manages its own interrupt vector, which is assigned to low RAM memory. Working RAM storage is required as stack space and data area. The memory space must be allocated in user RAM. OSP interrupt vector memory locations OH-3FFH must be RAM based. The OSP requires 2 bytes of allocated RAM. The processor working storage is dynamically allocated from free memory. Approxi- mately 300 bytes of stack should be allocated for each OSP task. TYPICAL SYSTEM CONFIGURATION Figure 8 shows the processing cluster of a typical iAPX 86/30 or iAPX 88/30 OSP system. Not shown are subsystems likely to vary with the application. The configuration includes an 8086 (or 8088) operating in maximum mode, an 8284A clock generator and an 8288 system controller. Note that the 80130 is located on the CPU side of any latches or transceivers. See Intel Application Note 130 for further details on configuration. OSP Timers The OSP Timers are connected to the lower half of the data bus and are addressed at even addresses. The timers are read as two successive bytes, always LSB followed by MSB. The MSB is always latched on a read operation and remains latched until read. Timers are not gatable. Baud Rate Generator The baud rate generator is 8254 compatible (square wave mode 3). Its output, BAUD, is initially high and remains high until the Count Register is loaded. The first falling edge of the clock after the Count Register is loaded causes the transfer of the internal counter to the Count Register. The output stays high for N/2 ((N+1)/2 if N is odd] and then goes low for N/2 [(N1)/2 if N is odd]. On the falling edge of the clock which signifies the final count for the output in low , state, the output returns to high state and the Count Register is transferred to the internal counter. The whole process is then repeated. Baud Rates are shown in Table 6. The baud rate generator is located at OCH (12), rela- tive to the 16-byte boundary in the I/O space in which the 80130 component is located (OSF in the follow- ing example), the timer control word is located at 210216-00280130/80130-2 intel iAPX 86/30, 88/30, 186/30, 188/30 PRELIMINARY -, 824A rae s ) oe . PEN AIg LOCAL . ADDRESS/DATA 8282 SYSTEM INTR ADO AND ADORESS . . AO RESOURCES Tt INT $2 mt CLK 3 AD1S ADO DECODE 1008 LoGiCc MEMCS ACK UR iRO. . BAUD og tR7 SYSTICK in2 INTERRUPT REQUESTS Figure 8. Typical OSP Configuration relative address, OEH(14). Timers are addressed with IOCS=0. Timers 0 and 1 are assigned to the use by the OSP, and should not be altered by the user. For most baud-rate generator applications, the com- mand byte OB6H Read/Write Baud-Rate Deiay Value will be used. A typical sequence to set a baud rate of 9600 using a count value of 52 follows (see Table 6): MOV AX,0B6H ;Prepare to Write Delay to Timer 3. OUT OSF+14,AX ;Control Word. MOV AX, 52 OUT OSF+12,AL ;LSB written first XCHG AL,AH OUT OSF+12,AL ;MSB written after. The 80130 timers are subset compatible with 8254 timers. 3-210 Interrupt Controller The Programmable Interrupt Controller (PIC), is also an integral unit of the 80130. tts eight input pins handie eight vectored priority interrupts. One of these pins must be used for the SYSTICK time func- tion in timing waits, using an external connection as shown. During the 80130 initialization and configura- tion sequence, each 80130 interrupt pin is individu- ally programmed as either level or edge sensitive. External slave 8259A interrupt controllers can be used to expand the total number of OSP external interrupts to 57. In addition to standard PiC funtions, 80130 PIC unit has an LIR output signal, which when low indicates an interrupt acknowledge cycle. LIR=0 is provided to control the 8289 Bus Arbiter SYSB/RESB pin. This will avoid the need of requesting the system bus to acknowledge local bus non-slave interrupts. The user defines the interrupt system as part of the configuration. 210216-002int 80130/80130-2 iAPX 86/30, 88/30, 186/30, 188/30 PRELIMINARY INTERRUPT SEQUENCE The OSP interrupt sequence is as follows: 1. One or more of the interrupts is set by a low-to- high transition on edge-sensitive IR inputs or by a high input on level-sensitive IR inputs. 2. The 80130 evaluates these requests, and sends an INT to the GPU, if appropriate. 3. The CPU acknowledges the INT and responds with an interrupt acknowledge cycle which is en- coded in S2-So. 4. Upon receiving the first interrupt acknowledge from the CPU, the highest-priority interrupt is set by the 80130 and the corresponding edge detect latch is reset. The 80130 does not drive the ad- dress/data bus during this bus cycle but does acknowledge the cycle by making ACK=0 and sending the LIR value for the IR input being acknowledged. 5. The CPU will then initiate a second interrupt ac- knowledge cycle. During this cycle, the 80130 will supply the cascade address of the interrupting input at T; on the bus and also release an 8-bit pointer onto the bus if appropriate, where it is read by the CPU. If the 80130 does supply the pointer, then ACK will be low for the cycle. This cycle also has the value LIR for the IR input being acknowledged. 6. This completes the interrupt cycle. The ISR bit remains set until an appropriate EXIT INTERRUPT primitive (EO! command) is called at the end of the Interrupt Handler. OSP APPLICATION EXAMPLE Figure 5 shows an application of the OSP primitives to keep track of time of day in a simplified example. The system design uses a 60 Hz A.C. signal as a time base. The power supply provides a TTL-compatible signal which drives one of 80130 edge-triggered in- terrupt request pins once each A.C. cycle. The Inter- rupt Handler responds to the interrupts, keeping track of one seconds A.C. cycles. The Interrupt Task counts the seconds and after a day deletes itself. In typical systems it might perform a data logging oper- ation once each day. The Interrupt Handler and Inter- rupt Task are written as separate modular programs. The Interrupt Handler will actually service interrupt 59 when it occurs. It simply counts each interrupt, and at a count of 60 performs a SIGNAL INTERRUPT to notify the Interrupt Task that a second has elapsed. The Interrupt Handler (ACS HANDLER) was assigned to this level by the SET INTERRUPT primitive. After doing this, the Interrupt Task performed the Primitive RESUME TASK to resume the application task (INITS TASKS TOKEN). The main body of the task is the counting loop. The Interrupt Task is signaled by the SIGNAL INTERRUPT primitive in the Interrupt Handler (at interrupt level ACS INTERRUPTS LEVEL). When the task is sig- nalled by the Interrupt Handler it will execute the loop exactly one time, increasing the time count variables. Then it will execute the WAIT INTERRUPT primitive, and wait until awakened by the Interrupt Handler. Normally, the task will now wait some period of time for the next signal. However, since the inter- face between the Handler and the Task is asyn- chronous, the handler may have aiready queued the interrupt for servicing, the writer of the task does not have to worry about this possibility. At the end of the day, the task will exit the loop and execute RESET INTERRUPT, which disables the in- terrupt level, and deletes the interrupt task. The OSP now reclaims the memory used by the Task and schedules another task. If an exception occurs, the coded value for the exception is available in TIMES EXCEPTS CODE after the execution of the primitive. A typical PL/M-86 calling sequence is illustrated by the call to RESET INTERRUPT shown in Figure 5. 3-214 210216-00280130/80130-2 ntel iAPX 86/30, 88/30, 186/30, 188/30 PRELIMINARY Table 2. OSP System Data Type Summary Job Jobs are the means of organizing the program environment and resources. An application consists of one or more jobs. Each iAPX 86/30 system data type is contained in some job. Jobs are independent of each other, but they may share access to resources. Each job has one or more tasks, one of whichis an initial task. Jobs are given pools of memory, and they may create subordinate offspring jobs, which may borrow memory from their parents. Task Tasks are the means by which computations are accomplished. A task is an instruction stream with its own execution stack and private data. Each task is part of a job and is restricted to the resources provided by its job. Tasks may perform general interrupt handling as well as other computational functions. Each task has a set of attributes, which is maintained for it by the iAPX 86/30, which characterize its status. These attributes are: its containing job | its register context its priority (0-255) its execution state (asleep, suspended, ready, running, asleep/suspended). its suspension depth . its user-selected exception handler its optional 8087 extended task state Segment Segments are the units of memory allocation. A segment is a physically contiguous sequence of 16-byte, 8086 paragraph-length, units. Segments are created dynamically from the free memory space of a Job as one of its Tasks requests memory for its use. Asegment is deleted when it is no longer needed. The iAPX 86/30 maintains and manages free memory in an orderly fashion, it obtains memory space from the pool assigned to the containing job of the requesting task and returns the space to the job memory pool (or the parent job pool) when it is no longer needed. It does not allocate memory to create a segment if sufficient free memory is not available to it, in that case it returns an error exception code. Mailbox Mailboxes are the means of intertask communication. Mailboxes are used by tasks to send and receive message segments. The iAPX 86/30 creates and manages two queues for each mailbox. One of these queues contains message segments sent to the mailbox but not yet received by any task. The other mailbox queue consists of tasks that are waiting to receive messages. The iAPX 86/30 operation assures that waiting tasks receive messages as soon as messages are available. Thus at any moment one or possibly both of two mailbox queues will be empty. Region Regions are the means of serialization and mutual exclusion. Regions are familiar as critical code regions. The iAPX 86/30 region data type consists of a queue of tasks. Each task waits to execute in mutually exclusive code or to access a shared data region, for example to update a file record. Tokens The OSP interface makes use of a 16-bit TOKEN data type to identify individual OSF data structures. Each of these (each instance) has its own unique TOKEN. When a primitive is called, it is passed the TOKENs of the data structures on which it will operate. 3-212 210216-00280130/80130-2 BLIMINARY ntal iADX 86/20. 88/30, 186/30, 188/30 PR Table 3. System Data Type Codes and Attributes S.D.T. Code Attributes Jobs 1 Tasks Memory Poot 8.D.T. Directory Tasks 2 Priority Stack Code State Exception Handler Mailboxes 3 Queue of S:D.T.s (generally segments) Queue of Tasks waiting for S.D.T.s Region 5 Queue of Tasks waiting for mutually exclusive code or data Segments 6 Buffer Length Table 4. OSP Primitives . Class OSsP Interrupt Entry Code Parameters Primitive Number in AX On Callers Stack J . oO CREATE JOB 184 0100H See 80130 User Manual B CREATE TASK "184 0200H Priority, iP Ptr, Data Segment, Stack Seg, Stack Size Task Information, T ExcptPtr A DELETE TASK 184 0201H TASK, ExcptPtr s SUSPEND TASK 184 0202H TASK, ExecptPtr K RESUME TASK 184 0203H TASK, ExcptPtr SET PRIORITY 184 0209H TASK, Priority, ExcptPtr SLEEP 184 0204H Time Limit,ExcptPtr DISABLE 190 0705H Level, ExcptPtr ! ENABLE 184 0704H Level #, ExcptPtr N ENTER INTERRUPT 184 0703H Level #, ExcptPtr T EXIT INTERRUPT 186 NONE Level #,ExcptPtr E GET LEVEL 188 0702H Level #, ExcptPtr R RESET INTERRUPT- 184 0706H Level #, ExcptPtr R SET INTERRUPT 184 0701H Level, Interrupt Task Flag Interrupt U Handler Ptr, Interrupt Handler DataSeg P ExcptPtr T SIGNAL INTERRUPT 185 NONE Level, ExcptPtr WAIT INTERRUPT 187 NONE Level, ExcptPtr Ss LE G CREATE SEGMENT 184 0600H Size, ExcptPtr M DELETE SEGMENT 184 0603H SEGMENT, ExceptPtr E N T 3-213 210216-00280130/80130-2 intel iAPX 86/30, 88/30, 186/30, 188/30 PRELIMINARY Table 4. OSP Primitives (Continued) Class OsP Interrupt Entry Code Parameters Primitive Number in AX On Caliers Stack M CREATE MAILBOX : 184 0300H Mailbox flags, ExcptPtr A DELETE MAILBOX 184 0301H MAILBOX, ExcptPtr RECEIVE MESSAGE 184 0303H MAILBOX, Time Limit ResponsePtr, L ExcptPtr 5 SEND MESSAGE 184 0302H MAILBOX,Message Response, ExcptPtr x R ACCEPT CONTROL 184 0504H REGION, ExcptPtr E CREATE REGION 184 0500H Region Flags, ExcptPtr G DELETE REGION 184 0501H REGION, ExcptPtr | RECEIVE CONTROL 184 0503H REGION, ExcptPtr N SEND CONTROL 184 0502H ExcptPtr N DISABLE DELETION 184 0001H TOKEN, ExcptPtr Vv ENABLE DELETION 184 0002H TOKEN,ExcptPtr | GET EXCEPTION R HANDLER 184 0800H Ptr,ExcptPtr oO GET TYPE 184 0000H TOKEN, ExcptPtr N GET TASK TOKENS 184 0206H Request, ExcptPtr M SET EXCEPTION E HANDLER 184 0801H Ptr, ExcptPtr N SET OS EXTENSION 184 O700H Code,InstPtr, ExcptPtr T SIGNAL A EXCEPTION 184 0802H Exception Code, Parameter Number, L StackPtr,0,0,ExcptPtr NOTES: All parameters are pushed onto the OSP stack. Each parameter is one word. See Figure 3 for Call Sequence. Explanation of the Symbols JOB OSP JOB SDT Token TASK OSP TASK SDT Token REGION OSP REGION SDT Token MAILBOX OSP MAILBOX SDT Token SEGMENT OSP SEGMENT SDT Token TOKEN Any SDT Token Levet Interrupt Level Number ExcptPtr Pointer to Exception Code Message Message Token Ptr Pointer to Code,Stack etc. Address Seg Value Loaded into appropriate Segment Register od Value Parameter. 3-214 210216-002 .I i 80130/80130-2 intel iAPX 86/30, 88/30, 186/30, 188/30 PRELIMINARY Table 5. OSP Primitive Performance Examples Ss Primitive Execution Speed* Datatype Class (microseconds) JOB CREATE JOB 2950 TASK CREATE TASK (no preemption) 1360 SEGMENT CREATE SEGMENT 700 MAILBOX SEND MESSAGE (with task switch) 475 SEND MESSAGE (no task switch). 265 RECEIVE MESSAGE (task waiting) 540 RECEIVE MESSAGE (message waiting) 260 REGION SEND CONTROL 170 RECEIVE CONTROL 205 *8 MHz iAPX 86/30 OSP Configuation. Table 6. Baud Rate Count Values (16X) Baud 8 MHz Count 5 MHz Count Rate Value Value 300 1667 1042 600 833 521 1200 417 260 2400 208 130 4800 104 65 9600 52 33 3-215 210216-002ntel 80130/80130-2 iAPX 86/30, 88/30, 186/30, 188/30 PRELIMINARY Table 7a. Mnemonic Codes for Unavoidabie Exceptions E$SOK Exception Code Value = 0 the operation was successful ESTIME Exception Code Value = 1 the specified time limit expired before completion of the operations was possible E$SMEM Exception Code Value = 2 insufficient nucleus memory is available to satisfy the request E$BUSY Exception Code Value = 3 specified region is currently busy ESLIMIT Exception Code Value = 4 attempted violation of a job, semaphore, or system limit ESCONTEXT Exception Code Value = 5 the primitive was called in an illegal context (e.g., call to enable for an already enabled interrupt) ESEXIST Exception Code Value = 6 atoken argument does not currently refer to any object; note that the object could have been deleted at any time by its owner ES$STATE Exception Code Value = 7 -attempted illegal state transition by a task ESNOT$CONFIGURED Exception Code Value = 8 the primitive called is not configured in this system ESINTERRUPT$SATURATION Exception Code Value = 9 The interrupt task on the requested level has reached its user specified saturation point for interrupt service requests. No further interrupts will be allowed on the level until the interrupt task executes a WAIT$INTERRUPT. (This error is only returned, in line, to interrupt handlers.) ESINTERRUPTSOVERFLOW Exception Code Value = 10 The interrupt task on the requested level previously reached its saturation point and caused an ESINTERRUPT$SATURATION condition. It subsequently executed an ENABLE allowing further interrupts to come in and has received another SIG- NALSINTERRUPTcail, bringing it over its specified saturation point for interrupt service requests. (This error is only returned, in line, to interrupt handlers). Table 7b. Mnemonic Codes for Avoidable Exceptions E$ZERO$DIVIDE Exception Code Vatue = 8000H divide by zero interrupt occurred ESOVERFLOW Exception Code Value = 8001H overflow interrupt occurred ESTYPE Exception Code Value = 8002H a token argument referred to an object tha was not of required type ESBOUNDS Exception Code Value = 8003H an offset argument is out of segment bounds ESPARAM Exception Code Value = 8004H a (non-token,non-offset) argument has an illegal value E$SBAD$CALL Exception Code Value = 8005H an entry code for which there is no corresponding primitive was passed ESARRAYSBOUNDS = 8006H Hardware or Language has detected an array overflow ESNDP$ERROR Exception Code Value = 8007H an 8087 (Numeric data Processor) error has been detected; (the 8087 status information is contained in a parameter to the exception handler) 3-216 210216-002ntel 80130/80130-2 iAPX 86/30, 88/30, 186/30, 188/30 PRELIMINARY ABSOLUTE MAXIMUM RATINGS* 0C to 70C ~65C to 150C Ambient Temperature Under Bins Storage Temperature Voltage on Any Pin With NOTICE: Stresses above those listed under Absolute Maximum Ratings may cause permanent damage to the device. This is a stress rating only and functional operation of the device at these or any other conditions above those indicated in the operational sections of this Specitication Respect to Ground .................. -~1.0V to +7V is not implied. Exposure to absolute maximum rating con- Power Dissipation ..............0...0..0000.. 1.0 Watts ditions for extended period may affect device reliability. D.C. CHARACTERISTICS = 1, =0C to 70C, Veg = 4.5 to 5.5V) Symbol Parameter Min. Max. Units Test Conditions Vie Input Low Voltage. -~ 0.5 08 v Vie Input High Voltage 2.0 Veo + 5 V Vor Output Low Voltage 0.45 V lo. =2mA Vou Output High Voltage 2.4 Vv loy = 400nA loc Power Supply Current 200 mA Ty = 25C la Input Leakage Current 10 BA 0 < Vy < Voc le IR Input Load Current 10 pA Vin = Voc ~ 300 BA Vin = 0 lo Output Leakage Current 10 LA 45 = Vin = Veo Vou Clock input Low 0.6 V Voui Clock Input High 3.9 Vv Cw Input Capacitance 10 pF Cio \/O Capacitance 15 pF lou Clock Input Leakage Current 10 uA Vin = Voc 150 pA Vin = 2.5V 10 uA Vin = OV A.C. CHARACTERISTICS | (1, = 0-70C, Veg = 4.5-5.5 Volt, Vgg = Ground) 80130 80130-2 Symbol Parameter Min. Max. Min. Max. Units Test Conditions Tovet CLK Cycle Period 200 - 125 - ns Toc CLK Low Time 90 - 55 = ns Toren CLK High Time 69 2000 44 2000 ns Tsyou Status Active Setup Time 80 - 65 - ns Tousy Status Inactive Hold Time 10 - 10 - ns Tgyo. Status Inactive Setup Time 55 - 55 - ns Tos Status Active Hold Time 10 - 10 - ns Tascu Address Valid Setup Time 8 - 8 ~ ns Tera Address Hold Time 10 - 10 > ns Toser Chip Select Setup Time 20 - 20 - ns Torcs Chip Select Hoid Time 0 ~ 0 - ns Tose Write Data Setup Time 80 - 60 - ns Toupy Write Data Hold Time 10 ~ 10 - ns Tyg IR Low Time 100 - 100 - ns Toto Read Data Vatid Delay - 140 - 105 ns C, = 200 pE Totpw Read Data Hold Time 10 - 10 ~ ns Totpx Read Data to Floating 10 100 10 100 ns Totca Cascade Address Delay Time - 85 _ 65 ns 3- 217 210216-002intel Baa et 302 PRELIMINARY iAPX 86/30, 88/30, 186/30, 188/30 A.C. CHARACTERISTICS (Continued) 80130 80130-2 Symbol - Parameter Min. Max. Min. Max. Units Notes Toucr Cascade Addresse Hold Time 10 ~ 10 - ns Tie INTA Status t Acknowledge - 80 - 80 ns Tone Acknowledge Hold Time 0 - 0 - ns Tosak Chip Select to ACK - 410 - 110 ns Tgack Status to ACK - 140 - 140 ns TACK Address to ACK - 30 - 90 ns TeLop Timer Output Delay Time - 200 - 200 ns C, = 100 pF Toop1 Timer1 Output Delay Time - 200 - 200 ns C, = 100 pF Tou INT Output Delay - 200 - 200 ns Tiree IR input Set Up 20 20 ns WAVEFORMS AC. CLK SYSTICK, DELAY. BAUD CLK | INT TJLJH ~< | TIRCL, | ToHIH 3-218 210216-002e ~N I 80130/80130-2 PRELIMINARY A iAPX 86/30, 88/30, 186/30, 188/30 WAVEFORMS AC. BHE.A..-A, VALID BHE, AD,<-AD, t r CSCL aj | TCHCS MEMCS, IOCS WRITE CYCLE | ae >| ADDRESS VALIO WRITE DATA VALID AD, <-ADy ACK READ CYCLE AODRESS VALID READ DATA VALID AD, 5~ADo ack 2ND INTA POINTER @ CASCADE apoRESS AD, 5-ADg TIAVE ACK TCHEH UA TCHEH NOTES: 1. CASCADE ADDRESS PRESENTED ON A08, AD9 AND AD10 CORRESPONDING TO CASO, CASI . AND CAS2 RESPECTIVELY. AD11-AD15 LINES ARE ACTIVE AND HAVE UNKNOWN VALUES. ADO-AD7 * ARE TRISTATE 2. POINTER VALUE 1S ACTIVE ONLY IF POINTER iS GENERATED FROM THE 80150 AND NOT FROM EXTERNAL SLAVE UNIT. 3. ACTIVE LOW ONLY WHEN POINTER DATA IS BEING SUPPLIED BY THE 80150, 4. LOW ONLY FOR LOCAL INTERRUPT. 3-219 210216-002