The Pedigree Project  0.1
Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
IoBase Class Referenceabstract

Abstrace base class for hardware I/O capabilities. More...

#include <IoBase.h>

+ Inheritance diagram for IoBase:
+ Collaboration diagram for IoBase:

Public Member Functions

virtual ~IoBase ()
 
virtual size_t size () const =0
 
virtual uint8_t read8 (size_t offset=0)=0
 
virtual uint16_t read16 (size_t offset=0)=0
 
virtual uint32_t read32 (size_t offset=0)=0
 
virtual uint64_t read64 (size_t offset=0)=0
 
uint64_t read64LowFirst (size_t offset=0)
 
uint64_t read64HighFirst (size_t offset=0)
 
virtual void write8 (uint8_t value, size_t offset=0)=0
 
virtual void write16 (uint16_t value, size_t offset=0)=0
 
virtual void write32 (uint32_t value, size_t offset=0)=0
 
virtual void write64 (uint64_t value, size_t offset=0)=0
 
void write64LowFirst (uint64_t value, size_t offset=0)
 
void write64HighFirst (uint64_t value, size_t offset=0)
 
virtual operator bool () const =0
 

Protected Member Functions

 IoBase ()
 

Private Member Functions

 IoBase (const IoBase &)
 
IoBaseoperator= (const IoBase &)
 

Detailed Description

Abstrace base class for hardware I/O capabilities.

Interface to the hardware's I/O capabilities

Definition at line 31 of file IoBase.h.

Constructor & Destructor Documentation

IoBase::~IoBase ( )
virtualdefault

The destructor does nothing

IoBase::IoBase ( )
protecteddefault

The default constructor does nothing

IoBase::IoBase ( const IoBase )
private

The copy-constructor

Note
NOT implemented

Member Function Documentation

virtual IoBase::operator bool ( ) const
pure virtual

Check whether this class is usable

Returns
true, if the class holds a ressource that is correctly allocated and usable

Implemented in IoPort, and MemoryMappedIo.

IoBase& IoBase::operator= ( const IoBase )
private

The assignment operator

Note
NOT implemented
virtual uint16_t IoBase::read16 ( size_t  offset = 0)
pure virtual

Read two byte (16bit) from the I/O Port or the memory-mapped I/O region

Parameters
[in]offsetoffset from the I/O base port or the I/O base memory address
Returns
the two byte (16bit) that have been read

Implemented in IoPort, and MemoryMappedIo.

Referenced by AtaDisk::doRead(), AtaDisk::initialise(), Nic3C90x::irq(), Nic3C90x::issueCommand(), Ne2k::Ne2k(), Nic3C90x::Nic3C90x(), Nic3C90x::readEeprom(), Nic3C90x::reset(), Nic3C90x::send(), Ne2k::send(), AtaDisk::sendCommand(), and Nic3C90x::writeEepromWord().

+ Here is the caller graph for this function:

virtual uint32_t IoBase::read32 ( size_t  offset = 0)
pure virtual

Read four byte (32bit) from the I/O Port or the memory-mapped I/O region

Parameters
[in]offsetoffset from the I/O base port or the I/O base memory address
Returns
the four byte (32bit) that have been read

Implemented in IoPort, and MemoryMappedIo.

Referenced by OpenPic::initialise(), Heathrow::interrupt(), OpenPic::interrupt(), Nic3C90x::irq(), Nic3C90x::Nic3C90x(), read64HighFirst(), read64LowFirst(), VmwareGraphics::readRegister(), Nic3C90x::reset(), and Nic3C90x::send().

+ Here is the caller graph for this function:

virtual uint64_t IoBase::read64 ( size_t  offset = 0)
pure virtual

Read eight byte (64bit) from the I/O Port or the memory-mapped I/O region.

Parameters
[in]offsetoffset from the I/O base port or the I/O base memory address
Returns
the eight byte (64bit) that have been read

Implemented in IoPort, and MemoryMappedIo.

uint64_t IoBase::read64HighFirst ( size_t  offset = 0)
inline

Read eight byte (64bit) from the I/O Port or the memory-mapped I/O region. The 32bit at the higher address are read first, then the 32bit at the lower address.

Parameters
[in]offsetoffset from the I/O base port or the I/O base memory address
Returns
the eight byte (64bit) that have been read

Definition at line 32 of file IoBase.cc.

References read32().

uint64_t IoBase::read64LowFirst ( size_t  offset = 0)
inline

Read eight byte (64bit) from the I/O Port or the memory-mapped I/O region. The 32bit at the lower address are read first, then the 32bit at the higher address.

Parameters
[in]offsetoffset from the I/O base port or the I/O base memory address
Returns
the eight byte (64bit) that have been read

Definition at line 25 of file IoBase.cc.

References read32().

virtual uint8_t IoBase::read8 ( size_t  offset = 0)
pure virtual

Read a byte (8bit) from the I/O Port or the memory-mapped I/O region

Parameters
[in]offsetoffset from the I/O base port or the I/O base memory address
Returns
the byte (8bit) that have been read

Implemented in IoPort, and MemoryMappedIo.

Referenced by AtaDisk::doRead(), AtaDisk::doWrite(), AtaDisk::initialise(), Nic3C90x::irq(), Ne2k::irq(), Ne2k::Ne2k(), Ne2k::send(), and AtaDisk::sendCommand().

+ Here is the caller graph for this function:

virtual size_t IoBase::size ( ) const
pure virtual

Get the size of the I/O region in bytes

Implemented in IoPort, and MemoryMappedIo.

Referenced by BusMasterIde::initialise().

+ Here is the caller graph for this function:

virtual void IoBase::write16 ( uint16_t  value,
size_t  offset = 0 
)
pure virtual

Write two byte (16bit) to the I/O port or the memory-mapped I/O region

Parameters
[in]valuethe value that should be written
[in]offsetoffset from the I/O base port or the I/O base memory address

Implemented in IoPort, and MemoryMappedIo.

Referenced by AtaDisk::doWrite(), Nic3C90x::issueCommand(), Nic3C90x::Nic3C90x(), Nic3C90x::readEeprom(), Nic3C90x::reset(), Ne2k::send(), AtaDisk::sendCommand(), Ib700Watchdog::timer(), and Nic3C90x::writeEepromWord().

+ Here is the caller graph for this function:

virtual void IoBase::write32 ( uint32_t  value,
size_t  offset = 0 
)
pure virtual

Write four byte (32bit) to the I/O port or the memory-mapped I/O region

Parameters
[in]valuethe value that should be written
[in]offsetoffset from the I/O base port or the I/O base memory address

Implemented in IoPort, and MemoryMappedIo.

Referenced by OpenPic::initialise(), Heathrow::interrupt(), OpenPic::interrupt(), Nic3C90x::Nic3C90x(), VmwareGraphics::readRegister(), Nic3C90x::reset(), Nic3C90x::send(), write64HighFirst(), and write64LowFirst().

+ Here is the caller graph for this function:

virtual void IoBase::write64 ( uint64_t  value,
size_t  offset = 0 
)
pure virtual

Write eight byte (64bit) to the I/O Port or the memory-mapped I/O region.

Parameters
[in]valuethe value that should be written
[in]offsetoffset from the I/O base port or the I/O base memory address

Implemented in IoPort, and MemoryMappedIo.

void IoBase::write64HighFirst ( uint64_t  value,
size_t  offset = 0 
)

Write eight byte (64bit) to the I/O Port or the memory-mapped I/O region. The 32bit at the higher address are written first, then the 32bit at the lower address.

Parameters
[in]valuethe value that should be written
[in]offsetoffset from the I/O base port or the I/O base memory address

Definition at line 45 of file IoBase.cc.

References write32().

void IoBase::write64LowFirst ( uint64_t  value,
size_t  offset = 0 
)

Write eight byte (64bit) to the I/O Port or the memory-mapped I/O region. The 32bit at the lower address are written first, then the 32bit at the higher address.

Parameters
[in]valuethe value that should be written
[in]offsetoffset from the I/O base port or the I/O base memory address

Definition at line 39 of file IoBase.cc.

References write32().

virtual void IoBase::write8 ( uint8_t  value,
size_t  offset = 0 
)
pure virtual

Write a byte (8bit) to the I/O port or the memory-mapped I/O region

Parameters
[in]valuethe value that should be written
[in]offsetoffset from the I/O base port or the I/O base memory address

Implemented in IoPort, and MemoryMappedIo.

Referenced by AtaDisk::doRead(), AtaDisk::doWrite(), AtaDisk::initialise(), Nic3C90x::irq(), Ne2k::irq(), Ne2k::Ne2k(), Nic3C90x::Nic3C90x(), Nic3C90x::reset(), Ne2k::send(), AtaDisk::sendCommand(), AtaDisk::setFeatures(), AtaDisk::setupLBA28(), and AtaDisk::setupLBA48().

+ Here is the caller graph for this function:


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