Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Apic Class Reference

#include <apic.h>

List of all members.

Public Types

enum  Apic_type { APIC_NONE, APIC_P6, APIC_P4, APIC_K7 }

Static Public Member Functions

static void init () FIASCO_INIT
static unsigned get_frequency_khz ()
static Unsigned32 reg_read (unsigned reg)
static void reg_write (unsigned reg, Unsigned32 val)
static int reg_delivery_mode (Unsigned32 val)
static int reg_lvt_vector (Unsigned32 val)
static Unsigned32 timer_reg_read ()
static Unsigned32 timer_reg_read_initial ()
static void timer_reg_write (Unsigned32 val)
static Unsigned32 ns_to_apic (Unsigned64 ns)
static void timer_enable_irq ()
static void timer_disable_irq ()
static int timer_is_irq_enabled ()
static void timer_set_periodic ()
static void timer_set_one_shot ()
static void timer_assign_irq_vector (unsigned vector)
static void irq_ack ()
static int have_pcint ()
static int have_tsint ()
static int test_present_but_disabled ()
static FIASCO_INIT int check_still_getting_interrupts ()
static int is_present ()
static int cpu_type ()
static void set_perf_nmi ()
static void done ()
static void reg_show (unsigned reg)
static void regs_show (void)
static void timer_show (void)
static void id_show (void)
static void irr_show ()
static void isr_show ()

Private Types

enum  {
  APIC_ID = 0x20, APIC_LVR = 0x30, APIC_TASKPRI = 0x80, APIC_TPRI_MASK = 0xFF,
  APIC_EOI = 0xB0, APIC_LDR = 0xD0, APIC_LDR_MASK = (0xFF<<24), APIC_DFR = 0xE0,
  APIC_SPIV = 0xF0, APIC_ISR = 0x100, APIC_TMR = 0x180, APIC_IRR = 0x200,
  APIC_ESR = 0x280, APIC_LVTT = 0x320, APIC_LVTTHMR = 0x330, APIC_LVTPC = 0x340,
  APIC_LVT0 = 0x350, APIC_TIMER_BASE_DIV = 0x2, APIC_LVT1 = 0x360, APIC_LVTERR = 0x370,
  APIC_TMICT = 0x380, APIC_TMCCT = 0x390, APIC_TDCR = 0x3E0, APIC_SND_PENDING = (1<<12),
  APIC_INPUT_POLARITY = (1<<13), APIC_LVT_REMOTE_IRR = (1<<14), APIC_LVT_LEVEL_TRIGGER = (1<<15), APIC_LVT_MASKED = (1<<16),
  APIC_LVT_TIMER_PERIODIC = (1<<17), APIC_TDR_DIV_1 = 0xB, APIC_TDR_DIV_2 = 0x0, APIC_TDR_DIV_4 = 0x1,
  APIC_TDR_DIV_8 = 0x2, APIC_TDR_DIV_16 = 0x3, APIC_TDR_DIV_32 = 0x8, APIC_TDR_DIV_64 = 0x9,
  APIC_TDR_DIV_128 = 0xA
}
enum  {
  MASK = 1, TRIGGER_MODE = 2, REMOTE_IRR = 4, PIN_POLARITY = 8,
  DELIVERY_STATE = 16, DELIVERY_MODE = 32
}
enum  { APIC_BASE_MSR = 0x1b }

Private Member Functions

 Apic ()
 Apic (const Apic &)

Static Private Member Functions

static void error_interrupt (Return_frame *regs) asm("apic_error_interrupt") FIASCO_FASTCALL
static Unsigned32 get_id ()
static Unsigned32 get_version ()
static int is_integrated ()
static Unsigned32 get_max_lvt ()
static Unsigned32 get_num_errors ()
static void clear_num_errors ()
static FIASCO_INIT void map_apic_page ()
static FIASCO_INIT int test_cpu ()
static int test_present ()
static void timer_set_divisor (unsigned newdiv)
static FIASCO_INIT int get_maxlvt ()
static FIASCO_INIT int check_working ()
static FIASCO_INIT void init_spiv ()
static FIASCO_INIT void enable_errors ()
static FIASCO_INIT void route_pic_through_apic ()
static FIASCO_INIT void init_lvt ()
static FIASCO_INIT void activate_by_msr ()
static FIASCO_INIT void calibrate_timer ()
static const char * reg_lvt_bit_str (unsigned reg, Unsigned32 val, int bit)
static void bitfield_show (unsigned reg, const char *name, char flag)

Static Private Attributes

static int present
static int good_cpu
static const Address io_base = Mem_layout::Local_apic_page
static Address phys_base
static unsigned timer_divisor = 1
static Apic_type type = APIC_NONE
static unsigned frequency_khz
static unsigned max_lvt
static Unsigned32 scaler_ns_to_apic


Member Enumeration Documentation

anonymous enum [private]
 

Enumeration values:
APIC_ID 
APIC_LVR 
APIC_TASKPRI 
APIC_TPRI_MASK 
APIC_EOI 
APIC_LDR 
APIC_LDR_MASK 
APIC_DFR 
APIC_SPIV 
APIC_ISR 
APIC_TMR 
APIC_IRR 
APIC_ESR 
APIC_LVTT 
APIC_LVTTHMR 
APIC_LVTPC 
APIC_LVT0 
APIC_TIMER_BASE_DIV 
APIC_LVT1 
APIC_LVTERR 
APIC_TMICT 
APIC_TMCCT 
APIC_TDCR 
APIC_SND_PENDING 
APIC_INPUT_POLARITY 
APIC_LVT_REMOTE_IRR 
APIC_LVT_LEVEL_TRIGGER 
APIC_LVT_MASKED 
APIC_LVT_TIMER_PERIODIC 
APIC_TDR_DIV_1 
APIC_TDR_DIV_2 
APIC_TDR_DIV_4 
APIC_TDR_DIV_8 
APIC_TDR_DIV_16 
APIC_TDR_DIV_32 
APIC_TDR_DIV_64 
APIC_TDR_DIV_128 

anonymous enum [private]
 

Enumeration values:
MASK 
TRIGGER_MODE 
REMOTE_IRR 
PIN_POLARITY 
DELIVERY_STATE 
DELIVERY_MODE 

anonymous enum [private]
 

Enumeration values:
APIC_BASE_MSR 

enum Apic::Apic_type
 

Enumeration values:
APIC_NONE 
APIC_P6 
APIC_P4 
APIC_K7 


Constructor & Destructor Documentation

Apic::Apic  )  [private]
 

Apic::Apic const Apic  )  [private]
 


Member Function Documentation

FIASCO_INIT void Apic::activate_by_msr  )  [static, private]
 

void Apic::bitfield_show unsigned  reg,
const char *  name,
char  flag
[static, private]
 

FIASCO_INIT void Apic::calibrate_timer  )  [static, private]
 

FIASCO_INIT int Apic::check_still_getting_interrupts  )  [static]
 

FIASCO_INIT int Apic::check_working  )  [static, private]
 

void Apic::clear_num_errors  )  [inline, static, private]
 

int Apic::cpu_type  )  [inline, static]
 

void Apic::done  )  [static]
 

FIASCO_INIT void Apic::enable_errors  )  [static, private]
 

void Apic::error_interrupt Return_frame regs  )  [static, private]
 

unsigned Apic::get_frequency_khz  )  [inline, static]
 

Unsigned32 Apic::get_id  )  [inline, static, private]
 

Unsigned32 Apic::get_max_lvt  )  [inline, static, private]
 

FIASCO_INIT int Apic::get_maxlvt  )  [static, private]
 

Unsigned32 Apic::get_num_errors  )  [inline, static, private]
 

Unsigned32 Apic::get_version  )  [inline, static, private]
 

int Apic::have_pcint  )  [inline, static]
 

int Apic::have_tsint  )  [inline, static]
 

void Apic::id_show void   )  [static]
 

void Apic::init  )  [static]
 

FIASCO_INIT void Apic::init_lvt  )  [static, private]
 

FIASCO_INIT void Apic::init_spiv  )  [static, private]
 

void Apic::irq_ack  )  [inline, static]
 

void Apic::irr_show  )  [static]
 

int Apic::is_integrated  )  [inline, static, private]
 

int Apic::is_present  )  [inline, static]
 

void Apic::isr_show  )  [static]
 

FIASCO_INIT void Apic::map_apic_page  )  [static, private]
 

Unsigned32 Apic::ns_to_apic Unsigned64  ns  )  [inline, static]
 

int Apic::reg_delivery_mode Unsigned32  val  )  [inline, static]
 

const char * Apic::reg_lvt_bit_str unsigned  reg,
Unsigned32  val,
int  bit
[static, private]
 

int Apic::reg_lvt_vector Unsigned32  val  )  [inline, static]
 

Unsigned32 Apic::reg_read unsigned  reg  )  [inline, static]
 

void Apic::reg_show unsigned  reg  )  [static]
 

void Apic::reg_write unsigned  reg,
Unsigned32  val
[inline, static]
 

void Apic::regs_show void   )  [static]
 

FIASCO_INIT void Apic::route_pic_through_apic  )  [static, private]
 

void Apic::set_perf_nmi  )  [static]
 

FIASCO_INIT int Apic::test_cpu  )  [static, private]
 

int Apic::test_present  )  [inline, static, private]
 

int Apic::test_present_but_disabled  )  [static]
 

void Apic::timer_assign_irq_vector unsigned  vector  )  [inline, static]
 

void Apic::timer_disable_irq  )  [inline, static]
 

void Apic::timer_enable_irq  )  [inline, static]
 

int Apic::timer_is_irq_enabled  )  [inline, static]
 

Unsigned32 Apic::timer_reg_read  )  [inline, static]
 

Unsigned32 Apic::timer_reg_read_initial  )  [inline, static]
 

void Apic::timer_reg_write Unsigned32  val  )  [inline, static]
 

void Apic::timer_set_divisor unsigned  newdiv  )  [static, private]
 

void Apic::timer_set_one_shot  )  [inline, static]
 

void Apic::timer_set_periodic  )  [inline, static]
 

void Apic::timer_show void   )  [static]
 


Member Data Documentation

unsigned Apic::frequency_khz [static, private]
 

int Apic::good_cpu [static, private]
 

const Address Apic::io_base = Mem_layout::Local_apic_page [static, private]
 

unsigned Apic::max_lvt [static, private]
 

Address Apic::phys_base [static, private]
 

int Apic::present [static, private]
 

Unsigned32 Apic::scaler_ns_to_apic [static, private]
 

unsigned Apic::timer_divisor = 1 [static, private]
 

Apic::Apic_type Apic::type = APIC_NONE [static, private]
 


The documentation for this class was generated from the following files:
Generated on Mon Sep 26 14:20:14 2005 for Fiasco by  doxygen 1.4.2