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

I/OxAPIC model. More...

Inheritance diagram for IOApic:
DiscoveryHelper< IOApic > StaticReceiver< IOApic > Device

Public Types

enum  {
  IOAPIC_BASE = 0xfec00000, OFFSET_INDEX = 0x00, OFFSET_DATA = 0x10, OFFSET_PAR = 0x20,
  OFFSET_EOI = 0x40, PINS = 24, EXTINT_PIN = 0, NMI_PIN = 23
}

Public Member Functions

bool receive (MessageMem &msg)
bool receive (MessageIrq &msg)
bool receive (MessageLegacy &msg)
void discovery ()
 IOApic (Motherboard &mb, unsigned long base, unsigned gsibase)
- Public Member Functions inherited from StaticReceiver< IOApic >
 StaticReceiver ()
- Public Member Functions inherited from Device
void debug_dump ()
 Device (const char *debug_name)

Public Attributes

Motherboard_mb

Private Member Functions

unsigned irq_routing (unsigned gsi)
 Route IRQs and return a pin to a GSI number.
unsigned reverse_routing (unsigned pin)
 Return an GSI from a pin.
void read_data (unsigned &value)
 Read the data register.
void write_data (unsigned value)
 Write to the data register.
void notify (unsigned pin)
bool pin_assert (unsigned pin, MessageIrq::Type type)
 Assert a pin on this IO/APIC.
void eoi (unsigned char vector)
 EOI a vector.
void reset ()
 Reset the registers.

Private Attributes

unsigned _base
unsigned _gsibase
unsigned char _index
unsigned _id
unsigned _redir [PINS *2]
bool _rirr [PINS]
bool _ds [PINS]
bool _notify [PINS]

Additional Inherited Members

- Static Public Member Functions inherited from DiscoveryHelper< IOApic >
static bool discover (Device *o, MessageDiscovery &msg)
- Static Public Member Functions inherited from StaticReceiver< IOApic >
static bool receive_static (Device *o, M &msg)
- Protected Member Functions inherited from DiscoveryHelper< IOApic >
bool discovery_write_st (const char *resource, unsigned offset, const void *value, unsigned count)
bool discovery_write_dw (const char *resource, unsigned offset, unsigned value, unsigned count=4)
 Write a dword or less than it.
bool discovery_read_dw (const char *resource, unsigned offset, unsigned &value)
 Read a dword.
unsigned discovery_length (const char *resource, unsigned minlen)
 Return the length of an ACPI table or minlen if it is smaller.

Detailed Description

I/OxAPIC model.

State: testing Features: MSI generation, level+notify, PAR, EOI Difference: no APIC bus Documentation: Intel ICH4.

Member Enumeration Documentation

anonymous enum
Enumerator:
IOAPIC_BASE 
OFFSET_INDEX 
OFFSET_DATA 
OFFSET_PAR 
OFFSET_EOI 
PINS 
EXTINT_PIN 
NMI_PIN 

Constructor & Destructor Documentation

IOApic::IOApic ( Motherboard mb,
unsigned long  base,
unsigned  gsibase 
)
inline

Member Function Documentation

void IOApic::discovery ( )
inline
void IOApic::eoi ( unsigned char  vector)
inlineprivate

EOI a vector.

unsigned IOApic::irq_routing ( unsigned  gsi)
inlineprivate

Route IRQs and return a pin to a GSI number.

void IOApic::notify ( unsigned  pin)
inlineprivate
bool IOApic::pin_assert ( unsigned  pin,
MessageIrq::Type  type 
)
inlineprivate

Assert a pin on this IO/APIC.

void IOApic::read_data ( unsigned &  value)
inlineprivate

Read the data register.

bool IOApic::receive ( MessageMem msg)
inline
bool IOApic::receive ( MessageIrq msg)
inline
bool IOApic::receive ( MessageLegacy msg)
inline
void IOApic::reset ( )
inlineprivate

Reset the registers.

unsigned IOApic::reverse_routing ( unsigned  pin)
inlineprivate

Return an GSI from a pin.

void IOApic::write_data ( unsigned  value)
inlineprivate

Write to the data register.

We allow to write every bit, as we never actually use the value.

Member Data Documentation

unsigned IOApic::_base
private
bool IOApic::_ds[PINS]
private
unsigned IOApic::_gsibase
private
unsigned IOApic::_id
private
unsigned char IOApic::_index
private
Motherboard& IOApic::_mb
bool IOApic::_notify[PINS]
private
unsigned IOApic::_redir[PINS *2]
private
bool IOApic::_rirr[PINS]
private

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