The Pedigree Project
0.1
|
#include <Device.h>
Public Member Functions | |
Address (const String &n, uintptr_t a, size_t s, bool io, size_t pad=1) | |
void | map (size_t forcedSize=0, bool bUser=false, bool bWriteCombine=false, bool bWriteThrough=false) |
Public Attributes | |
String | m_Name |
uintptr_t | m_Address |
size_t | m_Size |
bool | m_IsIoSpace |
IoBase * | m_Io |
size_t | m_Padding |
Private Member Functions | |
Address (const Address &) | |
Address & | operator= (const Address &) |
Private Attributes | |
bool | m_bMapped |
Each device may have one or more disjoint regions of address space. This can be in I/O space or memory space.
Device::Address::Address | ( | const String & | n, |
uintptr_t | a, | ||
size_t | s, | ||
bool | io, | ||
size_t | pad = 1 |
||
) |
Constructor, takes arguments and assigns them blindly to member variables, then creates the IoPort or MemoryMappedIO instance.
Definition at line 356 of file Device.cc.
References IoPort::allocate(), PhysicalMemoryManager::getPageSize(), m_Io, m_IsIoSpace, and m_Name.
void Device::Address::map | ( | size_t | forcedSize = 0 , |
bool | bUser = false , |
||
bool | bWriteCombine = false , |
||
bool | bWriteThrough = false |
||
) |
Actually maps this address into memory if not already done.
Definition at line 386 of file Device.cc.
References PhysicalMemoryManager::allocateRegion(), VirtualAddressSpace::CacheDisable, PhysicalMemoryManager::continuous, ERROR, PhysicalMemoryManager::force, PhysicalMemoryManager::getPageSize(), Hex, PhysicalMemoryManager::instance(), VirtualAddressSpace::KernelMode, m_Address, m_Io, m_IsIoSpace, m_Size, PhysicalMemoryManager::nonRamMemory, NOTICE, VirtualAddressSpace::Write, VirtualAddressSpace::WriteCombine, and VirtualAddressSpace::WriteThrough.
uintptr_t Device::Address::m_Address |
The base of the address range, as the processor sees it (all parental address space transformations applied)
Definition at line 89 of file Device.h.
Referenced by Device::Device(), DevicesCommand::execute(), map(), and PciAtaController::PciAtaController().
IoBase* Device::Address::m_Io |
Either IoPort or MemoryMappedIO depending on the address space type.
Definition at line 97 of file Device.h.
Referenced by Address(), Device::Device(), map(), PciAtaController::PciAtaController(), and Device::removeIoMappings().
bool Device::Address::m_IsIoSpace |
True if the address range is in I/O space, false if in memory space
Definition at line 94 of file Device.h.
Referenced by Address(), Device::Device(), DevicesCommand::execute(), and map().
String Device::Address::m_Name |
A textual identifier for this address range.
Definition at line 86 of file Device.h.
Referenced by Address(), Device::Device(), and DevicesCommand::execute().
size_t Device::Address::m_Padding |
Some devices' registers aren't contiguous in memory, but padded to boundaries.
Definition at line 100 of file Device.h.
Referenced by Device::Device().
size_t Device::Address::m_Size |
The length of the address range.
Definition at line 91 of file Device.h.
Referenced by Device::Device(), DevicesCommand::execute(), and map().