The Pedigree Project  0.1
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
Device::Address Class Reference

#include <Device.h>

+ Collaboration diagram for Device::Address:

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
 
IoBasem_Io
 
size_t m_Padding
 

Private Member Functions

 Address (const Address &)
 
Addressoperator= (const Address &)
 

Private Attributes

bool m_bMapped
 

Detailed Description

Each device may have one or more disjoint regions of address space. This can be in I/O space or memory space.

Definition at line 73 of file Device.h.

Constructor & Destructor Documentation

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.

Member Function Documentation

void Device::Address::map ( size_t  forcedSize = 0,
bool  bUser = false,
bool  bWriteCombine = false,
bool  bWriteThrough = false 
)

Member Data Documentation

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().


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