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
 
IoBase * m_Io
 
size_t m_Padding
 

Private Member Functions

 Address (const Address &)
 
Address & operator= (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 89 of file Device.h.

Constructor & Destructor Documentation

◆ Address()

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 305 of file Device.cc.

References IoPort::allocate(), EMIT_IF, PhysicalMemoryManager::getPageSize(), m_Io, m_IsIoSpace, and m_Name.

◆ ~Address()

Device::Address::~Address ( )

Definition at line 375 of file Device.cc.

Member Function Documentation

◆ map()

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

Member Data Documentation

◆ m_Address

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 102 of file Device.h.

Referenced by Device::Device(), and PciAtaController::PciAtaController().

◆ m_bMapped

bool Device::Address::m_bMapped
private

Definition at line 119 of file Device.h.

◆ m_Io

IoBase* Device::Address::m_Io

Either IoPort or MemoryMappedIO depending on the address space type.

Definition at line 110 of file Device.h.

Referenced by Address(), Device::Device(), PciAtaController::PciAtaController(), and Device::removeIoMappings().

◆ m_IsIoSpace

bool Device::Address::m_IsIoSpace

True if the address range is in I/O space, false if in memory space

Definition at line 107 of file Device.h.

Referenced by Address(), and Device::Device().

◆ m_Name

String Device::Address::m_Name

A textual identifier for this address range.

Definition at line 99 of file Device.h.

Referenced by Address(), and Device::Device().

◆ m_Padding

size_t Device::Address::m_Padding

Some devices' registers aren't contiguous in memory, but padded to boundaries.

Definition at line 113 of file Device.h.

Referenced by Device::Device().

◆ m_Size

size_t Device::Address::m_Size

The length of the address range.

Definition at line 104 of file Device.h.

Referenced by Device::Device().


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