The Pedigree Project
0.1
|
Abstrace base class for hardware I/O capabilities. More...
#include <IoBase.h>
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 &) | |
IoBase & | operator= (const IoBase &) |
Abstrace base class for hardware I/O capabilities.
Interface to the hardware's I/O capabilities
|
virtualdefault |
The destructor does nothing
|
protecteddefault |
The default constructor does nothing
|
private |
The copy-constructor
|
pure virtual |
Check whether this class is usable
Implemented in IoPort, and MemoryMappedIo.
|
pure virtual |
Read two byte (16bit) from the I/O Port or the memory-mapped I/O region
[in] | offset | offset from the I/O base port or the I/O base memory address |
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().
|
pure virtual |
Read four byte (32bit) from the I/O Port or the memory-mapped I/O region
[in] | offset | offset 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::irq(), Nic3C90x::Nic3C90x(), read64HighFirst(), read64LowFirst(), VmwareGraphics::readRegister(), Nic3C90x::reset(), and Nic3C90x::send().
|
pure virtual |
Read eight byte (64bit) from the I/O Port or the memory-mapped I/O region.
[in] | offset | offset from the I/O base port or the I/O base memory address |
Implemented in IoPort, and MemoryMappedIo.
|
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.
[in] | offset | offset from the I/O base port or the I/O base memory address |
Definition at line 32 of file IoBase.cc.
References read32().
|
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.
[in] | offset | offset from the I/O base port or the I/O base memory address |
Definition at line 25 of file IoBase.cc.
References read32().
|
pure virtual |
Read a byte (8bit) from the I/O Port or the memory-mapped I/O region
[in] | offset | offset 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(), Ne2k::send(), and AtaDisk::sendCommand().
|
pure virtual |
Get the size of the I/O region in bytes
Implemented in IoPort, and MemoryMappedIo.
Referenced by BusMasterIde::initialise().
|
pure virtual |
Write two byte (16bit) to the I/O port or the memory-mapped I/O region
[in] | value | the value that should be written |
[in] | offset | offset 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().
|
pure virtual |
Write four byte (32bit) to the I/O port or the memory-mapped I/O region
[in] | value | the value that should be written |
[in] | offset | offset 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().
|
pure virtual |
Write eight byte (64bit) to the I/O Port or the memory-mapped I/O region.
[in] | value | the value that should be written |
[in] | offset | offset 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.
[in] | value | the value that should be written |
[in] | offset | offset 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.
[in] | value | the value that should be written |
[in] | offset | offset from the I/O base port or the I/O base memory address |
Definition at line 39 of file IoBase.cc.
References write32().
|
pure virtual |
Write a byte (8bit) to the I/O port or the memory-mapped I/O region
[in] | value | the value that should be written |
[in] | offset | offset 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().