The Pedigree Project  0.1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
MipsCommonPhysicalMemoryManager Class Reference

Implementation of the PhysicalMemoryManager for common mips. More...

#include <PhysicalMemoryManager.h>

+ Inheritance diagram for MipsCommonPhysicalMemoryManager:
+ Collaboration diagram for MipsCommonPhysicalMemoryManager:

Public Member Functions

virtual physical_uintptr_t allocatePage ()
 
virtual void freePage (physical_uintptr_t page)
 
virtual bool allocateRegion (MemoryRegion &Region, size_t cPages, size_t pageConstraints, size_t Flags, physical_uintptr_t start=-1)
 
- Public Member Functions inherited from PhysicalMemoryManager
virtual physical_uintptr_t allocatePage (size_t pageConstraints=0)=0
 
virtual void pin (physical_uintptr_t page)=0
 
void allocateMemoryRegionList (Vector< MemoryRegionInfo * > &MemoryRegions)
 
void freeMemoryRegionList (Vector< MemoryRegionInfo * > &MemoryRegions)
 
virtual size_t freePageCount () const
 

Static Public Member Functions

static MipsCommonPhysicalMemoryManagerinstance ()
 
- Static Public Member Functions inherited from PhysicalMemoryManager
static PhysicalMemoryManagerinstance ()
 
static size_t getPageSize () PURE
 

Protected Member Functions

 MipsCommonPhysicalMemoryManager ()
 
virtual ~MipsCommonPhysicalMemoryManager ()
 
- Protected Member Functions inherited from PhysicalMemoryManager
 PhysicalMemoryManager ()
 
virtual ~PhysicalMemoryManager ()
 

Private Member Functions

 MipsCommonPhysicalMemoryManager (const MipsCommonPhysicalMemoryManager &)
 
MipsCommonPhysicalMemoryManageroperator= (const MipsCommonPhysicalMemoryManager &)
 

Private Attributes

uintptr_t m_NextPage
 

Static Private Attributes

static MipsCommonPhysicalMemoryManager m_Instance
 

Additional Inherited Members

- Static Public Attributes inherited from PhysicalMemoryManager
static const size_t continuous = 1 << 0
 
static const size_t nonRamMemory = 1 << 1
 
static const size_t force = 1 << 2
 
static const size_t virtualOnly = 1 << 3
 
static const size_t below1MB = 1 << 4
 
static const size_t below16MB = 1 << 5
 
static const size_t below4GB = 1 << 6
 
static const size_t below64GB = 1 << 7
 
static const size_t addressConstraints
 
static const size_t anonymous = 1 << 8
 
- Protected Attributes inherited from PhysicalMemoryManager
Vector< MemoryRegion * > m_MemoryRegions
 

Detailed Description

Implementation of the PhysicalMemoryManager for common mips.

Warning
The implementation of this module has been seriously hacked together. It needs changing, currently it doesn't even support freeing of pages! The common mips implementation of the PhysicalMemoryManager

Definition at line 34 of file kernel/core/processor/mips_common/PhysicalMemoryManager.h.

Constructor & Destructor Documentation

MipsCommonPhysicalMemoryManager::MipsCommonPhysicalMemoryManager ( )
protected

The constructor

Definition at line 45 of file mips_common/PhysicalMemoryManager.cc.

Referenced by instance().

+ Here is the caller graph for this function:

MipsCommonPhysicalMemoryManager::~MipsCommonPhysicalMemoryManager ( )
protectedvirtual

The destructor

Definition at line 49 of file mips_common/PhysicalMemoryManager.cc.

Referenced by instance().

+ Here is the caller graph for this function:

MipsCommonPhysicalMemoryManager::MipsCommonPhysicalMemoryManager ( const MipsCommonPhysicalMemoryManager )
private

The copy-constructor

Note
Not implemented (singleton)

Member Function Documentation

bool MipsCommonPhysicalMemoryManager::allocateRegion ( MemoryRegion Region,
size_t  cPages,
size_t  pageConstraints,
size_t  Flags,
physical_uintptr_t  start = -1 
)
virtual

Allocate a memory-region with specific constraints the pages need to fullfill.

Parameters
[in]Regionreference to the MemoryRegion object
[in]cPagesthe number of pages to allocate for the MemoryRegion object
[in]pageConstraintsthe constraints the pages have to fullfill
[in]Flagsflags from the VirtualAddressSpace class namespace
[in]startthe physical address of the beginning of the region (optional)
Returns
true, if a valid MemoryRegion object is created, false otherwise

Implements PhysicalMemoryManager.

Definition at line 37 of file mips_common/PhysicalMemoryManager.cc.

Referenced by instance().

+ Here is the caller graph for this function:

void MipsCommonPhysicalMemoryManager::freePage ( physical_uintptr_t  page)
virtual

Free a page allocated with the allocatePage() function

Parameters
[in]pagephysical address of the page

Implements PhysicalMemoryManager.

Definition at line 33 of file mips_common/PhysicalMemoryManager.cc.

Referenced by instance().

+ Here is the caller graph for this function:

static MipsCommonPhysicalMemoryManager& MipsCommonPhysicalMemoryManager::instance ( )
inlinestatic
MipsCommonPhysicalMemoryManager& MipsCommonPhysicalMemoryManager::operator= ( const MipsCommonPhysicalMemoryManager )
private

The copy-constructor

Note
Not implemented (singleton)

Referenced by instance().

+ Here is the caller graph for this function:

Member Data Documentation

MipsCommonPhysicalMemoryManager MipsCommonPhysicalMemoryManager::m_Instance
staticprivate

The MipsCommonPhysicalMemoryManager class instance

Definition at line 71 of file kernel/core/processor/mips_common/PhysicalMemoryManager.h.

Referenced by instance().


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