User And Supervisor Stacks; Interrupt And Fault Calls - Intel i960 Jx Developer's Manual

Microprocessor
Table of Contents

Advertisement

7.6

USER AND SUPERVISOR STACKS

When using the user-supervisor protection mechanism, the processor maintains separate stacks in
the address space. One of these stacks — the user stack — is for procedures executed in user mode;
the other stack — the supervisor stack — is for procedures executed in supervisor mode.
The user and supervisor stacks are identical in structure
supervisor stack is automatically read from the system procedure table and cached internally
during initialization. Each time a user-to-supervisor mode switch occurs, the cached supervisor
stack pointer base is used for the starting point of the new supervisor stack. The base stack pointer
for the user stack is usually created in the initialization code. See
IZATION" (pg.
12-2). The base stack pointers must be aligned to a 16-byte boundary; otherwise,
the first frame pointer on the interrupt stack is rounded up to the previous 16-byte boundary.
7.7

INTERRUPT AND FAULT CALLS

The architecture defines two types of implicit calls that make use of the call and return mechanism:
interrupt-handling procedure calls and fault-handling procedure calls. A call to an interrupt
procedure is similar to a system-supervisor call. Here, the processor obtains pointers to the
interrupt procedures through the interrupt table. The processor always switches to supervisor mode
on an interrupt procedure call.
A call to a fault procedure is similar to a system call. Fault procedure calls can be local calls or
supervisor calls. The processor obtains pointers to fault procedures through the fault table and
(optionally) through the system procedure table.
When a fault call or interrupt call is made, a fault record or interrupt record is placed in the newly
generated stack frame for the call. These records hold the machine state and information to identify
the fault or interrupt. When a return from an interrupt or fault is executed, machine state is restored
from these records. See
CHAPTER 8, FAULTS
information on the structure of the fault and interrupt records.
PROCEDURE CALLS
(Figure
7-1). The base stack pointer for the
section 12.2, "INITIAL-
and
CHAPTER 11, INTERRUPTS
7
for more
7-19

Advertisement

Table of Contents
loading

Table of Contents