Compaq ECQD2KCTE Laptop User Manual


 
6–2 Alpha Architecture Handbook
The Alpha architecture lets these functions be implemented in standard machine code that is
resident in main memory. PALcode is written in standard machine code with some implemen-
tation-specific extensions to provide access to low-level hardware. This lets an Alpha
implementation make various design trade-offs based on the hardware technology being used
to implement the machine. The PALcode can abstract these differences and make them invisi-
ble to system software.
For example, in a MOS VLSI implementation, a small (32-entry) fully associative TB can be
the right match to the media, given that chip area is a costly resource. In an ECL version, a
large (1024 entry) direct-mapped TB can be used because it will use RAM chips and does not
have fast associative memories available. This difference would be handled by implementa-
tion-specific versions of the PALcode on the two systems, both versions providing transparent
TB miss service routines. The operating system code would not need to know there were any
differences.
An Alpha Privileged Architecture Library (PALcode) of routines and environments is supplied
by Compaq. Other systems may use a library supplied by Compaq or architect and implement a
different library of routines. Alpha systems are required to support the replacement of PAL-
code defined by Compaq with an operating system-specific version.
6.3 PALcode Environment
The PALcode environment differs from the normal environment in the following ways:
Complete control of the machine state.
Interrupts are disabled.
Implementation-specific hardware functions are enabled, as described below.
I-stream memory management traps are prevented (by disabling I-stream mapping,
mapping PALcode with a permanent TB entry, or by other mechanisms).
Complete control of the machine state allows all functions of the machine to be controlled.
Disabling interrupts allows the system to provide multi-instruction sequences as atomic opera-
tions. Enabling implementation-specific hardware functions allows access to low-level system
hardware. Preventing I-stream memory management traps allows PALcode to implement
memory management functions such as translation buffer fill.
6.4 Special Functions Required for PALcode
PALcode uses the Alpha instruction set for most of its operations. A small number of addi-
tional functions are needed to implement the PALcode. Five opcodes are reserved to
implement PALcode functions: PAL19, PAL1B, PAL1D, PAL1E, and PAL1F. These instruc-
tions produce an trap if executed outside the PALcode environment.
PALcode needs a mechanism to save the current state of the machine and dispatch into
PALcode.
PALcode needs a set of instructions to access hardware control registers.