User's Manual

t
HIGHER
ADDRESSES
LOWER
ADDRESSES
~
PARM
3
PARM
2
PARM
1
PROTECTION
SS:SP
FROM
OLDSS:SP_
....
____
...
NEW
SS
+
SP
OLD
STACK
(AT
"OUTER"
PRIVILEGE
LEVEL)
TSS
OLO
SS
OLDSP
PARM3
PARM
2
PARM
1
OLDCS
OLDIP
NEW
STACK
(AT "INNER"
PRIVILEGE
LEVEL)
Figure 7-12. Stack Contents after
an
Inter-Level Call
DIRECTION
OF
STACK
GROWTH
G30108
The old SS:SP value
is
then adjusted by the number of bytes indicated
in
the RET instruction and
loaded into
SS:SP. The
new
SP
value
is
not checked for validity.
If
SP
is
invalid
it
is
not
recognized
until the first stack operation. The
SS:SP value of the returning program
is
not saved. (Note: this value
normally
is
the same
as
that saved
in
the TSS.)
The last step in the return
is
checking the contents of the DS and ES descriptor register. If.DS or ES
refer to segments whose DPL
is
greater than the
new
CPL (excluding conforming code segments), the
segment registers are loaded with the null selector. Any subsequent memory reference that attempts
to use the segment register containing the null selector
will
cause a general protection fault. This prevents
less privileged code from accessing more privileged data previously accessed by the more privileged
program.
7-21