|
The Pedigree Project 0.1
|
Memory mapped I/O range. More...
#include <MemoryMappedIo.h>
Inheritance diagram for MemoryMappedIo:
Collaboration diagram for MemoryMappedIo:Public Member Functions | |
| MemoryMappedIo (const char *pName, uintptr_t offset=0, uintptr_t padding=1) | |
| virtual | ~MemoryMappedIo () |
| virtual size_t | size () const |
| virtual uint8_t | read8 (size_t offset=0) |
| virtual uint16_t | read16 (size_t offset=0) |
| virtual uint32_t | read32 (size_t offset=0) |
| virtual uint64_t | read64 (size_t offset=0) |
| virtual void | write8 (uint8_t value, size_t offset=0) |
| virtual void | write16 (uint16_t value, size_t offset=0) |
| virtual void | write32 (uint32_t value, size_t offset=0) |
| virtual void | write64 (uint64_t value, size_t offset=0) |
| virtual | operator bool () const |
Public Member Functions inherited from IoBase | |
| virtual | ~IoBase () |
| uint64_t | read64LowFirst (size_t offset=0) |
| uint64_t | read64HighFirst (size_t offset=0) |
| void | write64LowFirst (uint64_t value, size_t offset=0) |
| void | write64HighFirst (uint64_t value, size_t offset=0) |
Public Member Functions inherited from MemoryRegion | |
| MemoryRegion (const char *pName) | |
| virtual | ~MemoryRegion () |
| void | free () |
| void * | virtualAddress () const |
| physical_uintptr_t | physicalAddress () const |
| size_t | size () const |
| const char * | name () const |
| operator bool () const | |
| bool | physicalBoundsCheck (physical_uintptr_t address) |
| template<typename T > | |
| T * | convertPhysicalPointer (physical_uintptr_t address) |
| void | setNonRamMemory (bool b) |
| bool | getNonRamMemory () |
| void | setForced (bool b) |
| bool | getForced () |
| void | setAnonymous (bool b) |
| bool | getAnonymous () const |
Private Member Functions | |
| MemoryMappedIo (const MemoryMappedIo &) | |
| MemoryMappedIo & | operator= (const MemoryMappedIo &) |
Private Attributes | |
| uintptr_t | m_Offset |
| size_t | m_Padding |
Additional Inherited Members | |
Protected Member Functions inherited from IoBase | |
| IoBase () | |
Memory mapped I/O range.
The MemoryMappedIo handles special MemoryRegions for I/O to hardware devices
Definition at line 32 of file MemoryMappedIo.h.
| MemoryMappedIo::MemoryMappedIo | ( | const char * | pName, |
| uintptr_t | offset = 0, |
||
| uintptr_t | padding = 1 |
||
| ) |
Definition at line 24 of file MemoryMappedIo.cc.
|
virtual |
The destructor frees the allocated ressources
Definition at line 27 of file MemoryMappedIo.cc.
|
private |
The copy-constructor
|
virtual |
Check whether this class is usable
Implements IoBase.
Definition at line 113 of file MemoryMappedIo.cc.
|
private |
The assignment operator
|
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 |
Implements IoBase.
Definition at line 43 of file MemoryMappedIo.cc.
References ProcessorBase::halt(), m_Offset, m_Padding, size(), and MemoryRegion::virtualAddress().
|
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 |
Implements IoBase.
Definition at line 53 of file MemoryMappedIo.cc.
References ProcessorBase::halt(), m_Offset, m_Padding, size(), and MemoryRegion::virtualAddress().
|
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 |
Implements IoBase.
Definition at line 63 of file MemoryMappedIo.cc.
References ProcessorBase::halt(), m_Offset, m_Padding, size(), and MemoryRegion::virtualAddress().
|
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 |
Implements IoBase.
Definition at line 33 of file MemoryMappedIo.cc.
References ProcessorBase::halt(), m_Offset, m_Padding, size(), and MemoryRegion::virtualAddress().
|
virtual |
|
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 |
Implements IoBase.
Definition at line 83 of file MemoryMappedIo.cc.
References ProcessorBase::halt(), m_Offset, m_Padding, size(), and MemoryRegion::virtualAddress().
|
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 |
Implements IoBase.
Definition at line 93 of file MemoryMappedIo.cc.
References ProcessorBase::halt(), m_Offset, m_Padding, size(), and MemoryRegion::virtualAddress().
|
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 |
Implements IoBase.
Definition at line 103 of file MemoryMappedIo.cc.
References ProcessorBase::halt(), m_Offset, m_Padding, size(), and MemoryRegion::virtualAddress().
|
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 |
Implements IoBase.
Definition at line 73 of file MemoryMappedIo.cc.
References ProcessorBase::halt(), m_Offset, m_Padding, size(), and MemoryRegion::virtualAddress().
|
private |
|
private |