Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

pmode.h: Protected Mode Operations
[platform dependant portions (intel i386+)]


Defines

#define SEL_P0_DATA   (0x08)
#define SEL_P0_CODE   (0x10)
#define SEL_P0_STACK   (0x18)
#define SEL_P3_DATA   (0x20)
#define SEL_P3_CODE   (0x28)
#define SEL_P3_STACK   (0x30)

Functions

void jumpToTSS (short sel)
void loadTaskReg (short sel)
void invalidatePage (long physAddr)
void setCR0 (long CR0)
void setCR2 (long CR2)
void setCR3 (long CR3)
long getCR0 (void)
long getCR2 (void)
long getCR3 (void)

Detailed Description

 *  *  *  * This file defines data types and functions that are necessary for interation in protected mode. These functions are implemented in assembly language by pmode.asm

Define Documentation

#define SEL_P0_CODE   (0x10)
 

privelege level 0 (kernel) code selector

Definition at line 20 of file pmode.h.

#define SEL_P0_DATA   (0x08)
 

privelege level 0 (kernel) data selector

Definition at line 18 of file pmode.h.

#define SEL_P0_STACK   (0x18)
 

privelege level 0 (kernel) stack selector

Definition at line 22 of file pmode.h.

#define SEL_P3_CODE   (0x28)
 

privelege level 3 (apps) code selector

Definition at line 27 of file pmode.h.

#define SEL_P3_DATA   (0x20)
 

privelege level 3 (apps) data selector

Definition at line 25 of file pmode.h.

#define SEL_P3_STACK   (0x30)
 

privelege level 3 (apps) stack selector

Definition at line 29 of file pmode.h.


Function Documentation

long getCR0 void   ) 
 

Get the value of the CR0 register

Returns:
the value of the CR0 register

long getCR2 void   ) 
 

Get the value of the CR2 register

Returns:
the value of the CR2 register

long getCR3 void   ) 
 

Get the value of the CR3 register

Returns:
the value of the CR3 register

void invalidatePage long  physAddr  ) 
 

Invalidates a page of memory such that it is no longer accessable/cached

Parameters:
physAddr the physical address of the page to invalidate

void jumpToTSS short  sel  ) 
 

Execute a far jump to a task switch segment

Parameters:
sel the selector of the tss to jump to

void loadTaskReg short  sel  ) 
 

Loads the task register with a new tss

Parameters:
sel the selector of the tss to use

void setCR0 long  CR0  ) 
 

Set the CR0 register

Parameters:
CR0 value to set register to

void setCR2 long  CR2  ) 
 

Set the CR2 register

Parameters:
CR2 value to set register to

void setCR3 long  CR3  ) 
 

Set the CR3 register

Parameters:
CR3 value to set register to


Generated on Wed Mar 22 20:36:34 2006 for ndk by  doxygen 1.4.4