registers.h File Reference

i386 registers. More...

#include <stdint.h>

Go to the source code of this file.

Data Structures

union  PACKED
 A 16-bit general register. More...
union  PACKED
 A 16-bit general register. More...
struct  i386_regs
 A 32-bit general register dump. More...
struct  i386_seg_regs
 A segment register dump. More...
struct  i386_all_regs
 A full register dump. More...
struct  segoff

Defines

#define CF   ( 1 << 0 )
#define PF   ( 1 << 2 )
#define AF   ( 1 << 4 )
#define ZF   ( 1 << 6 )
#define SF   ( 1 << 7 )
#define OF   ( 1 << 11 )

Typedefs

typedef struct segoff segoff_t

Functions

 FILE_LICENCE (GPL2_OR_LATER)

Variables

struct i386_regs PACKED
 A 32-bit general register dump.


Detailed Description

i386 registers.

This file defines data structures that allow easy access to i386 register dumps.

Definition in file registers.h.


Define Documentation

#define CF   ( 1 << 0 )

Definition at line 181 of file registers.h.

Referenced by extmemsize_e801(), int13(), int21(), int22(), and meme820().

#define PF   ( 1 << 2 )

Definition at line 182 of file registers.h.

#define AF   ( 1 << 4 )

Definition at line 183 of file registers.h.

#define ZF   ( 1 << 6 )

Definition at line 184 of file registers.h.

Referenced by bios_iskey().

#define SF   ( 1 << 7 )

Definition at line 185 of file registers.h.

#define OF   ( 1 << 11 )

Definition at line 186 of file registers.h.

Referenced by int13().


Typedef Documentation

typedef struct segoff segoff_t

Definition at line 196 of file registers.h.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER   ) 


Variable Documentation

struct segoff PACKED

A 32-bit general register dump.

A full register dump.

A segment register dump.

This is the data structure that is created on the stack by the pushal instruction, and can be read back using the popal instruction.

The i386 has no equivalent of the pushal or popal instructions for the segment registers. We adopt the convention of always using the sequences

   pushw %gs ; pushw %fs ; pushw %es ; pushw %ds ; pushw %ss ; pushw %cs

and

   addw $4, %sp ; popw %ds ; popw %es ; popw %fs ; popw %gs

This is the data structure that is created and read back by these instruction sequences.

This data structure is created by the instructions

   pushfl
   pushal
   pushw %gs ; pushw %fs ; pushw %es ; pushw %ds ; pushw %ss ; pushw %cs

and can be read back using the instructions

   addw $4, %sp ; popw %ds ; popw %es ; popw %fs ; popw %gs
   popal
   popfl

prot_call() and kir_call() create this data structure on the stack and pass in a pointer to this structure.


Generated on Tue Apr 6 20:01:13 2010 for gPXE by  doxygen 1.5.7.1