NOVA User-Level Environment  Version testbox/changed-memory-timing-317-g320d8b5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PicDevice Class Reference

An implementation of the Intel 8259. More...

Inheritance diagram for PicDevice:
StaticReceiver< PicDevice > Device

Public Member Functions

bool receive (MessageLegacy &msg)
 The CPU send an int-ack cycle?
bool receive (MessagePic &msg)
 We get an request on the three-wire PIC bus.
bool receive (MessageIOIn &msg)
bool receive (MessageIOOut &msg)
 Write to the PIC via IO ports.
bool receive (MessageIrqLines &msg)
 Raise the an irqline.
 PicDevice (DBus< MessageIrqLines > &bus_irq, DBus< MessagePic > &bus_pic, DBus< MessageLegacy > &bus_legacy, DBus< MessageIrqNotify > &bus_notify, unsigned short base, unsigned char irq, unsigned short elcr_base, unsigned char virq)
- Public Member Functions inherited from StaticReceiver< PicDevice >
 StaticReceiver ()
- Public Member Functions inherited from Device
void debug_dump ()
 Device (const char *debug_name)

Private Types

enum  ICW_MODE {
  ICW1, ICW2, ICW3, ICW4,
  OCW1 = 0
}
enum  {
  ICW1_IC4 = 0x01, ICW1_SNGL = 0x02, ICW1_LTIM = 0x08, ICW4_AEOI = 0x02,
  ICW4_MS = 0x04, ICW4_BUF = 0x08, ICW4_SFNM = 0x10
}

Private Member Functions

bool is_slave ()
void rotate_prios ()
void specific_eoi (unsigned char irq)
void non_specific_eoi ()
void reset_values ()
bool prioritize_irq (unsigned char &irq_index, bool int_ack)
 Check whether irqs will happen, optionally ACK irq and return the irq index.
void propagate_irq (bool send_deassert)
 Propagate an irq upstream.
void get_irqvector (unsigned char &res)
 Upstream requests an irq vector.

Private Attributes

DBus< MessageIrqLines > & _bus_irq
DBus< MessagePic > & _bus_pic
DBus< MessageLegacy > & _bus_legacy
DBus< MessageIrqNotify > & _bus_notify
unsigned short _base
unsigned _upstream_irq
unsigned short _elcr_base
unsigned char _virq
unsigned char _icw [4]
ICW_MODE _icw_mode
bool _rotate_on_aeoi
bool _smm
bool _read_isr_reg
bool _poll_mode
unsigned char _prio_lowest
unsigned char _imr
unsigned char _isr
unsigned char _irr
unsigned char _elcr
unsigned char _notify

Additional Inherited Members

- Static Public Member Functions inherited from StaticReceiver< PicDevice >
static bool receive_static (Device *o, M &msg)

Detailed Description

An implementation of the Intel 8259.

State: stable Ignored bits: ADI, yPM Documentation: Intel 8259a - 8259A.pdf

Member Enumeration Documentation

anonymous enum
private
Enumerator:
ICW1_IC4 
ICW1_SNGL 
ICW1_LTIM 
ICW4_AEOI 
ICW4_MS 
ICW4_BUF 
ICW4_SFNM 
enum PicDevice::ICW_MODE
private
Enumerator:
ICW1 
ICW2 
ICW3 
ICW4 
OCW1 

Constructor & Destructor Documentation

PicDevice::PicDevice ( DBus< MessageIrqLines > &  bus_irq,
DBus< MessagePic > &  bus_pic,
DBus< MessageLegacy > &  bus_legacy,
DBus< MessageIrqNotify > &  bus_notify,
unsigned short  base,
unsigned char  irq,
unsigned short  elcr_base,
unsigned char  virq 
)
inline

Member Function Documentation

void PicDevice::get_irqvector ( unsigned char &  res)
inlineprivate

Upstream requests an irq vector.

bool PicDevice::is_slave ( )
inlineprivate
void PicDevice::non_specific_eoi ( )
inlineprivate
bool PicDevice::prioritize_irq ( unsigned char &  irq_index,
bool  int_ack 
)
inlineprivate

Check whether irqs will happen, optionally ACK irq and return the irq index.

void PicDevice::propagate_irq ( bool  send_deassert)
inlineprivate

Propagate an irq upstream.

bool PicDevice::receive ( MessageLegacy msg)
inline

The CPU send an int-ack cycle?

bool PicDevice::receive ( MessagePic msg)
inline

We get an request on the three-wire PIC bus.

bool PicDevice::receive ( MessageIOIn msg)
inline
bool PicDevice::receive ( MessageIOOut msg)
inline

Write to the PIC via IO ports.

bool PicDevice::receive ( MessageIrqLines msg)
inline

Raise the an irqline.

This function needs to be multi-entrance ready! It should only touch the _irr.

void PicDevice::reset_values ( )
inlineprivate
void PicDevice::rotate_prios ( )
inlineprivate
void PicDevice::specific_eoi ( unsigned char  irq)
inlineprivate

Member Data Documentation

unsigned short PicDevice::_base
private
DBus<MessageIrqLines>& PicDevice::_bus_irq
private
DBus<MessageLegacy>& PicDevice::_bus_legacy
private
DBus<MessageIrqNotify>& PicDevice::_bus_notify
private
DBus<MessagePic>& PicDevice::_bus_pic
private
unsigned char PicDevice::_elcr
private
unsigned short PicDevice::_elcr_base
private
unsigned char PicDevice::_icw[4]
private
ICW_MODE PicDevice::_icw_mode
private
unsigned char PicDevice::_imr
private
unsigned char PicDevice::_irr
private
unsigned char PicDevice::_isr
private
unsigned char PicDevice::_notify
private
bool PicDevice::_poll_mode
private
unsigned char PicDevice::_prio_lowest
private
bool PicDevice::_read_isr_reg
private
bool PicDevice::_rotate_on_aeoi
private
bool PicDevice::_smm
private
unsigned PicDevice::_upstream_irq
private
unsigned char PicDevice::_virq
private

The documentation for this class was generated from the following file: