![Digital Equipment Alpha 21164PC Hardware Reference Manual Download Page 224](http://html.mh-extra.com/html/digital-equipment/alpha-21164pc/alpha-21164pc_hardware-reference-manual_2498508224.webp)
6–2
Privileged Architecture Library Code
29 September 1997 – Subject To Change
PALmode Environment
•
CALL_PAL instructions
PALcode has characteristics that make it appear to be a combination of microcode,
ROM BIOS, and system service routines, though the analogy to any of these other
items is not exact. PALcode exists for several major reasons:
•
There are some necessary support functions that are too complex to implement
directly in a processor chip’s hardware, but that cannot be handled by a normal
operating system software routine. Routines to fill the translation buffer (TB),
acknowledge interrupts, and dispatch exceptions are some examples. In some
architectures, these functions are handled by microcode, but the Alpha architec-
ture is careful not to mandate the use of microcode so as to allow reasonable chip
implementations.
•
There are functions that must run atomically, yet involve long sequences of
instructions that may need complete access to all the underlying computer hard-
ware. An example of this is the sequence that returns from an exception or inter-
rupt.
•
There are some instructions that are necessary for backward compatibility or
ease of programming; however, these are not used often enough to dedicate them
to hardware, or are so complex that they would jeopardize the overall perfor-
mance of the computer. For example, an instruction that does a VAX style inter-
locked memory access might be familiar to someone used to programming on a
CISC machine, but is not included in the Alpha architecture. Another example is
the emulation of an instruction that has no direct hardware support in a particular
chip implementation.
In each of these cases, PALcode routines are used to provide the function. The rou-
tines are nothing more than programs invoked at specified times, and read in as
Istream code in the same way that all other Alpha code is read. Once invoked, how-
ever, PALcode runs in a special mode called PALmode.
6.2 PALmode Environment
PALcode runs in a special environment called PALmode, defined as follows:
•
Istream memory mapping is disabled. Because the PALcode is used to imple-
ment translation buffer fill routines, Istream mapping clearly cannot be enabled.
Dstream mapping is still enabled.