Classes | Public Types | Public Member Functions | Public Attributes

Utcb Struct Reference

#include <utcb.h>

Inheritance diagram for Utcb:
CpuState

List of all members.

Classes

struct  Descriptor
class  Frame
 A smaller frame on the UTCB. More...
struct  head
struct  String
struct  TypedIdentifyCap
struct  TypedMapCap

Public Types

enum  { STACK_START = 512 }
enum  { MINSHIFT = 12 }
enum  { HEADER_SIZE = sizeof(struct head) }
typedef struct Utcb::Descriptor Descriptor

Public Member Functions

Frame get_nested_frame ()
Utcbadd_frame ()
 Push UTCB header and data to a stack area in the UTCB.
void skip_frame ()
void drop_frame ()
 Restore UTCB to the state saved by the last add_frame() and remove the restored state from the stack area.
void set_header (unsigned untyped, unsigned typed)
unsigned * item_start ()
Utcboperator<< (unsigned value)
bool validate_bounds ()
template<typename T >
Utcboperator<< (T &value)
Utcboperator<< (String string)
Utcboperator<< (TypedMapCap value)
Utcboperator<< (TypedIdentifyCap value)
Utcboperator<< (Crd value)
template<typename T >
bool operator>> (T &value)

Public Attributes

struct Utcb::head head
union {
   struct {
      unsigned   mtd
      unsigned   inst_len
      unsigned   eip
      unsigned   efl
      unsigned   intr_state
      unsigned   actv_state
      unsigned   inj_info
      unsigned   inj_error
      union {
         struct {
         } 
         unsigned   gpr [8]
      } 
      unsigned long long   qual [2]
      unsigned   ctrl [2]
      unsigned long long   tsc_off
      unsigned   cr0
      unsigned   cr2
      unsigned   cr3
      unsigned   cr4
      unsigned   dr7
      unsigned   sysenter_cs
      unsigned   sysenter_esp
      unsigned   sysenter_eip
      Descriptor   es
      Descriptor   cs
      Descriptor   ss
      Descriptor   ds
      Descriptor   fs
      Descriptor   gs
      Descriptor   ld
      Descriptor   tr
      Descriptor   gd
      Descriptor   id
   } 
   unsigned   msg [(4096-sizeof(struct head))/sizeof(unsigned)]
}; 

Member Typedef Documentation


Member Enumeration Documentation

anonymous enum
Enumerator:
STACK_START 
anonymous enum
Enumerator:
MINSHIFT 
anonymous enum
Enumerator:
HEADER_SIZE 

Member Function Documentation

Utcb& Utcb::add_frame (  )  [inline]

Push UTCB header and data to a stack area in the UTCB.

Later, UTCB can be fully restored by drop_frame() or partially restored by skip_frame().

TODO: put error code at some fixed point

void Utcb::drop_frame (  )  [inline]

Restore UTCB to the state saved by the last add_frame() and remove the restored state from the stack area.

Frame Utcb::get_nested_frame (  )  [inline]
unsigned* Utcb::item_start (  )  [inline]
Utcb& Utcb::operator<< ( TypedMapCap  value  )  [inline]
Utcb& Utcb::operator<< ( Crd  value  )  [inline]
template<typename T >
Utcb& Utcb::operator<< ( T &  value  )  [inline]
Utcb& Utcb::operator<< ( String  string  )  [inline]
Utcb& Utcb::operator<< ( unsigned  value  )  [inline]
Utcb& Utcb::operator<< ( TypedIdentifyCap  value  )  [inline]
template<typename T >
bool Utcb::operator>> ( T &  value  )  [inline]
void Utcb::set_header ( unsigned  untyped,
unsigned  typed 
) [inline]
void Utcb::skip_frame (  )  [inline]
bool Utcb::validate_bounds (  )  [inline]

Member Data Documentation

union { ... }
unsigned Utcb::actv_state
unsigned Utcb::cr0
unsigned Utcb::cr2
unsigned Utcb::cr3
unsigned Utcb::cr4
unsigned Utcb::ctrl[2]
unsigned Utcb::dr7
unsigned Utcb::efl
unsigned Utcb::eip
unsigned Utcb::gpr[8]
unsigned Utcb::inj_error
unsigned Utcb::inj_info
unsigned Utcb::inst_len
unsigned Utcb::intr_state
unsigned Utcb::msg[(4096-sizeof(struct head))/sizeof(unsigned)]
unsigned Utcb::mtd
unsigned long long Utcb::qual[2]
unsigned long long Utcb::tsc_off

The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines