Call Gate - How To Use

How To Use

Assuming a call gate has been set up already by the operating system kernel, code simply does a CALL FAR (LCALL in AT&T Syntax) with the necessary segment selector (the offset field is ignored). The processor will perform a number of checks to make sure the entry is valid and the code was operating at sufficient privilege to use the gate. Assuming all checks pass, a new CS/EIP is loaded from the segment descriptor, and continuation information is pushed onto the stack of the new privilege level (old SS, old ESP, old CS, old EIP in that order). Parameters may also be copied from the old stack to the new stack if needed. The number of parameters to copy is located in the call gate descriptor.

The kernel may return to the user space program by using a RET FAR (LRET) instruction which pops the continuation information off the stack and returns to the outer privilege level.

For information on the exact format of the call gate descriptor, please see the IA-32 manuals.

Read more about this topic:  Call Gate

Famous quotes containing the words how and/or use:

    It may be tempting to focus on the fact that, even among those who support equality, men’s involvement as fathers remains a far distance from what most women want and most children need. Yet it is also important to acknowledge how far and how fast many men have moved towards a pattern that not long ago virtually all men considered anathema.
    Katherine Gerson (20th century)

    ... it is use, and use alone, which leads one of us, tolerably trained to recognize any criterion of grace or any sense of the fitness of things, to tolerate ... the styles of dress to which we are more or less conforming every day of our lives. Fifty years hence they will seem to us as uncultivated as the nose-rings of the Hottentot seem today.
    Elizabeth Stuart Phelps (1844–1911)