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

Pic Class Reference

Encapsulation of the platforms interrupt controller. More...

#include <pic.h>

List of all members.

Public Types

typedef unsigned Status
 The type holding the saved Pic state.
enum  {
  MASTER_PIC_BASE = 0x20, SLAVES_PIC_BASE = 0xa0, OFF_ICW = 0x00, OFF_OCW = 0x01,
  MASTER_ICW = MASTER_PIC_BASE + OFF_ICW, MASTER_OCW = MASTER_PIC_BASE + OFF_OCW, SLAVES_ICW = SLAVES_PIC_BASE + OFF_ICW, SLAVES_OCW = SLAVES_PIC_BASE + OFF_OCW,
  ICW_TEMPLATE = 0x10, LEVL_TRIGGER = 0x08, EDGE_TRIGGER = 0x00, ADDR_INTRVL4 = 0x04,
  ADDR_INTRVL8 = 0x00, SINGLE__MODE = 0x02, CASCADE_MODE = 0x00, ICW4__NEEDED = 0x01,
  NO_ICW4_NEED = 0x00, SLAVE_ON_IR0 = 0x01, SLAVE_ON_IR1 = 0x02, SLAVE_ON_IR2 = 0x04,
  SLAVE_ON_IR3 = 0x08, SLAVE_ON_IR4 = 0x10, SLAVE_ON_IR5 = 0x20, SLAVE_ON_IR6 = 0x40,
  SLAVE_ON_IR7 = 0x80, I_AM_SLAVE_0 = 0x00, I_AM_SLAVE_1 = 0x01, I_AM_SLAVE_2 = 0x02,
  I_AM_SLAVE_3 = 0x03, I_AM_SLAVE_4 = 0x04, I_AM_SLAVE_5 = 0x05, I_AM_SLAVE_6 = 0x06,
  I_AM_SLAVE_7 = 0x07, SNF_MODE_ENA = 0x10, SNF_MODE_DIS = 0x00, BUFFERD_MODE = 0x08,
  NONBUFD_MODE = 0x00, AUTO_EOI_MOD = 0x02, NRML_EOI_MOD = 0x00, I8086_EMM_MOD = 0x01,
  SET_MCS_MODE = 0x00, PICM_MASK = 0xFF, PICS_MASK = 0xFF, NON_SPEC_EOI = 0x20,
  SPECIFIC_EOI = 0x60, ROT_NON_SPEC = 0xa0, SET_ROT_AEOI = 0x80, RSET_ROTAEOI = 0x00,
  ROT_SPEC_EOI = 0xe0, SET_PRIORITY = 0xc0, NO_OPERATION = 0x40, SND_EOI_IR0 = 0x00,
  SND_EOI_IR1 = 0x01, SND_EOI_IR2 = 0x02, SND_EOI_IR3 = 0x03, SND_EOI_IR4 = 0x04,
  SND_EOI_IR5 = 0x05, SND_EOI_IR6 = 0x06, SND_EOI_IR7 = 0x07, OCW_TEMPLATE = 0x08,
  SPECIAL_MASK = 0x40, MASK_MDE_SET = 0x20, MASK_MDE_RST = 0x00, POLL_COMMAND = 0x04,
  NO_POLL_CMND = 0x00, READ_NEXT_RD = 0x02, READ_IR_ONRD = 0x00, READ_IS_ONRD = 0x01,
  PICM_ICW1, PICM_ICW3 = SLAVE_ON_IR2, PICM_ICW4, PICS_ICW1,
  PICS_ICW3 = I_AM_SLAVE_2, PICS_ICW4
}

Static Public Member Functions

static void init ()
 Static initalization of the interrupt controller.
static void disable (unsigned irqnum)
 Disable the given irq.
static void enable (unsigned irqnum, unsigned prio=0)
 Enable the given irq.
static void acknowledge (unsigned irq)
 Acknowledge the given IRQ.
static void block (unsigned irq)
 Block the given IRQ til the next ACK.
static void disable_locked (unsigned irqnum)
 Disable the given irq (without lock protection).
static void enable_locked (unsigned irqnum, unsigned prio=0)
 Enable the given irq (without lock protection).
static void block_locked (unsigned irqnum)
 Temporarily block the IRQ til the next ACK.
static Status disable_all_save ()
 Disable all IRQ's and and return the old Pic state.
static void restore_all (Status s)
 Restore the IRQ's to the saved state s.
static void acknowledge_locked (unsigned irq)
 Acknowledge the given IRQ.

Static Public Attributes

static int special_fully_nested_mode = 1

Static Private Member Functions

static FIASCO_INIT void pic_init (unsigned char master_base, unsigned char slave_base)


Detailed Description

Encapsulation of the platforms interrupt controller.


Member Typedef Documentation

typedef unsigned Pic::Status
 

The type holding the saved Pic state.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
MASTER_PIC_BASE 
SLAVES_PIC_BASE 
OFF_ICW 
OFF_OCW 
MASTER_ICW 
MASTER_OCW 
SLAVES_ICW 
SLAVES_OCW 
ICW_TEMPLATE 
LEVL_TRIGGER 
EDGE_TRIGGER 
ADDR_INTRVL4 
ADDR_INTRVL8 
SINGLE__MODE 
CASCADE_MODE 
ICW4__NEEDED 
NO_ICW4_NEED 
SLAVE_ON_IR0 
SLAVE_ON_IR1 
SLAVE_ON_IR2 
SLAVE_ON_IR3 
SLAVE_ON_IR4 
SLAVE_ON_IR5 
SLAVE_ON_IR6 
SLAVE_ON_IR7 
I_AM_SLAVE_0 
I_AM_SLAVE_1 
I_AM_SLAVE_2 
I_AM_SLAVE_3 
I_AM_SLAVE_4 
I_AM_SLAVE_5 
I_AM_SLAVE_6 
I_AM_SLAVE_7 
SNF_MODE_ENA 
SNF_MODE_DIS 
BUFFERD_MODE 
NONBUFD_MODE 
AUTO_EOI_MOD 
NRML_EOI_MOD 
I8086_EMM_MOD 
SET_MCS_MODE 
PICM_MASK 
PICS_MASK 
NON_SPEC_EOI 
SPECIFIC_EOI 
ROT_NON_SPEC 
SET_ROT_AEOI 
RSET_ROTAEOI 
ROT_SPEC_EOI 
SET_PRIORITY 
NO_OPERATION 
SND_EOI_IR0 
SND_EOI_IR1 
SND_EOI_IR2 
SND_EOI_IR3 
SND_EOI_IR4 
SND_EOI_IR5 
SND_EOI_IR6 
SND_EOI_IR7 
OCW_TEMPLATE 
SPECIAL_MASK 
MASK_MDE_SET 
MASK_MDE_RST 
POLL_COMMAND 
NO_POLL_CMND 
READ_NEXT_RD 
READ_IR_ONRD 
READ_IS_ONRD 
PICM_ICW1 
PICM_ICW3 
PICM_ICW4 
PICS_ICW1 
PICS_ICW3 
PICS_ICW4 


Member Function Documentation

void Pic::acknowledge unsigned  irq  )  [inline, static]
 

Acknowledge the given IRQ.

void Pic::acknowledge_locked unsigned  irq  )  [inline, static]
 

Acknowledge the given IRQ.

Precondition:
The Cpu_lock must be locked (cli'ed).
Parameters:
irq,the irq to acknowledge.
This function must be implemented in the architecture specific part (e.g. pic-i8259.cpp).

void Pic::block unsigned  irq  )  [inline, static]
 

Block the given IRQ til the next ACK.

static void Pic::block_locked unsigned  irqnum  )  [static]
 

Temporarily block the IRQ til the next ACK.

Precondition:
The Cpu_lock must be locked (cli'ed)
This function must be implemented in the architecture specific part (e.g. pic-i8259.cpp).

void Pic::disable unsigned  irqnum  )  [inline, static]
 

Disable the given irq.

Pic::Status Pic::disable_all_save  )  [inline, static]
 

Disable all IRQ's and and return the old Pic state.

Precondition:
Must be done with disabled interrupts.

void Pic::disable_locked unsigned  irqnum  )  [inline, static]
 

Disable the given irq (without lock protection).

Precondition:
The Cpu_lock must be locked (cli'ed)
This function must be implemented in the architecture specific part (e.g. pic-i8259.cpp).

void Pic::enable unsigned  irqnum,
unsigned  prio = 0
[inline, static]
 

Enable the given irq.

void Pic::enable_locked unsigned  irqnum,
unsigned  prio = 0
[inline, static]
 

Enable the given irq (without lock protection).

Precondition:
The Cpu_lock must be locked (cli'ed)
This function must be implemented in the architecture specific part (e.g. pic-i8259.cpp).

FIASCO_INIT void Pic::init  )  [static]
 

Static initalization of the interrupt controller.

FIASCO_INIT void Pic::pic_init unsigned char  master_base,
unsigned char  slave_base
[static, private]
 

void Pic::restore_all Status  s  )  [inline, static]
 

Restore the IRQ's to the saved state s.

Precondition:
Must be done with disabled interrupts.
Parameters:
s,the saved state.


Member Data Documentation

int Pic::special_fully_nested_mode = 1 [static]
 


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