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

#include <VirtualAddressSpace.h>

+ Inheritance diagram for ArmV7KernelVirtualAddressSpace:
+ Collaboration diagram for ArmV7KernelVirtualAddressSpace:

Public Member Functions

virtual bool isMapped (void *virtualAddress)
 
virtual bool map (physical_uintptr_t physicalAddress, void *virtualAddress, size_t flags)
 
virtual void getMapping (void *virtualAddress, physical_uintptr_t &physicalAddress, size_t &flags)
 
virtual void setFlags (void *virtualAddress, size_t newFlags)
 
virtual void unmap (void *virtualAddress)
 
virtual bool initialiseKernelAddressSpace ()
 
- Public Member Functions inherited from ArmV7VirtualAddressSpace
virtual bool isAddressValid (void *virtualAddress)
 
virtual void * allocateStack ()
 
virtual void * allocateStack (size_t stackSz)
 
virtual void freeStack (void *pStack)
 
virtual bool memIsInHeap (void *pMem)
 
virtual void * getEndOfHeap ()
 
bool mapPageStructures (physical_uintptr_t physicalAddress, void *virtualAddress, size_t flags)
 
virtual VirtualAddressSpaceclone ()
 
virtual void revertToKernelAddressSpace ()
 
virtual uintptr_t getKernelStart () const
 
virtual uintptr_t getUserStart () const
 
virtual uintptr_t getUserReservedStart () const
 
virtual uintptr_t getDynamicLinkerAddress () const
 
virtual uintptr_t getKernelHeapStart () const
 
virtual uintptr_t getKernelHeapEnd () const
 
virtual uintptr_t getKernelCacheStart () const
 
virtual uintptr_t getKernelCacheEnd () const
 
virtual uintptr_t getKernelEventBlockStart () const
 
virtual uintptr_t getKernelModulesStart () const
 
virtual uintptr_t getKernelModulesEnd () const
 
- Public Member Functions inherited from VirtualAddressSpace
virtual void * expandHeap (ssize_t incr, size_t flags)
 
virtual bool mapHuge (physical_uintptr_t physAddress, void *virtualAddress, size_t count, size_t flags)
 
virtual void freeStack (Stack *pStack)=0
 
virtual VirtualAddressSpaceclone (bool copyOnWrite=true)=0
 
virtual ~VirtualAddressSpace ()
 
void setHeap (void *heap, void *heapEnd)
 
virtual bool memIsInKernelHeap (void *pMem)=0
 
virtual uintptr_t getDynamicStart () const
 
virtual uintptr_t getDynamicEnd () const
 
virtual uintptr_t getGlobalInfoBlock () const
 

Private Member Functions

 ArmV7KernelVirtualAddressSpace ()
 
 ~ArmV7KernelVirtualAddressSpace ()
 
 ArmV7KernelVirtualAddressSpace (const ArmV7KernelVirtualAddressSpace &)
 
ArmV7KernelVirtualAddressSpaceoperator= (const ArmV7KernelVirtualAddressSpace &)
 

Static Private Attributes

static ArmV7KernelVirtualAddressSpace m_Instance
 

Friends

class Processor
 
class ArmV7VirtualAddressSpace
 
VirtualAddressSpaceVirtualAddressSpace::getKernelAddressSpace ()
 

Additional Inherited Members

- Static Public Member Functions inherited from VirtualAddressSpace
static EXPORTED_PUBLIC VirtualAddressSpacegetKernelAddressSpace ()
 
static VirtualAddressSpacecreate ()
 
- Public Attributes inherited from VirtualAddressSpace
void * m_Heap
 
void * m_HeapEnd
 
- Static Public Attributes inherited from VirtualAddressSpace
static const size_t KernelMode = 0x01
 
static const size_t Write = 0x02
 
static const size_t Execute = 0x04
 
static const size_t WriteThrough = 0x08
 
static const size_t CacheDisable = 0x10
 
static const size_t CopyOnWrite = 0x20
 
static const size_t Swapped = 0x40
 
static const size_t MemoryCoherent = 0x80
 
static const size_t Guarded = 0x100
 
static const size_t Shared = 0x200
 
static const size_t WriteCombine = 0x400
 
static const size_t Accessed = 0x800
 
static const size_t Dirty = 0x1000
 
static const size_t ClearDirty = 0x2000
 
static physical_uintptr_t m_ZeroPage = 0
 
- Protected Member Functions inherited from ArmV7VirtualAddressSpace
virtual ~ArmV7VirtualAddressSpace ()
 
 ArmV7VirtualAddressSpace (void *Heap, physical_uintptr_t PhysicalPageDirectory, void *VirtualPageDirectory, void *VirtualPageTables, void *VirtualStack)
 
bool doIsMapped (void *virtualAddress)
 
bool doMap (physical_uintptr_t physicalAddress, void *virtualAddress, size_t flags)
 
void doGetMapping (void *virtualAddress, physical_uintptr_t &physicalAddress, size_t &flags)
 
void doSetFlags (void *virtualAddress, size_t newFlags)
 
void doUnmap (void *virtualAddress)
 
void * doAllocateStack (size_t sSize)
 
- Protected Member Functions inherited from VirtualAddressSpace
 VirtualAddressSpace (void *Heap)
 

Detailed Description

The kernel's VirtualAddressSpace on ArmV7

Definition at line 375 of file kernel/core/processor/armv7/VirtualAddressSpace.h.

Constructor & Destructor Documentation

ArmV7KernelVirtualAddressSpace::ArmV7KernelVirtualAddressSpace ( )
private

The constructor

Definition at line 652 of file armv7/VirtualAddressSpace.cc.

References initialiseKernelAddressSpace().

ArmV7KernelVirtualAddressSpace::~ArmV7KernelVirtualAddressSpace ( )
private

The destructor

Definition at line 663 of file armv7/VirtualAddressSpace.cc.

ArmV7KernelVirtualAddressSpace::ArmV7KernelVirtualAddressSpace ( const ArmV7KernelVirtualAddressSpace )
private

The copy-constructor

Note
NOT implemented (Singleton)

Member Function Documentation

void ArmV7KernelVirtualAddressSpace::getMapping ( void *  virtualAddress,
physical_uintptr_t &  physicalAddress,
size_t &  flags 
)
virtual

Get the physical address and the flags associated with the specific virtual address.

Note
This function is only valid on memory that was mapped with VirtualAddressSpace::map() and that is still mapped or marked as swapped out.
Parameters
[in]virtualAddressthe address in the virtual address space
[out]flagsthe flags
[out]physicalAddressthe physical address

Reimplemented from ArmV7VirtualAddressSpace.

Definition at line 676 of file armv7/VirtualAddressSpace.cc.

References VirtualAddressSpace::KernelMode.

bool ArmV7KernelVirtualAddressSpace::initialiseKernelAddressSpace ( )
virtual
bool ArmV7KernelVirtualAddressSpace::isMapped ( void *  virtualAddress)
virtual

Checks whether a mapping the the specific virtual address exists. Pages marked as swapped out are not considered mapped.

Note
This function must be valid on all the valid addresses within the virtual address space.
Parameters
[in]virtualAddressthe virtual address
Returns
true, if a mapping exists, false otherwise

Reimplemented from ArmV7VirtualAddressSpace.

Definition at line 667 of file armv7/VirtualAddressSpace.cc.

bool ArmV7KernelVirtualAddressSpace::map ( physical_uintptr_t  physicalAddress,
void *  virtualAddress,
size_t  flags 
)
virtual

Map a specific physical page (of size PhysicalMemoryManager::getPageSize()) at a specific location into the virtual address space.

Note
This function must also work on pages marked as swapped out.
Parameters
[in]physicalAddressthe address of the physical page that should be mapped into the virtual address space.
[in]virtualAddressthe virtual address at which the page apears within the virtual address space.
[in]flagsflags that describe which accesses should be allowed on the page.
Returns
true, if successfull, false otherwise

Reimplemented from ArmV7VirtualAddressSpace.

Definition at line 671 of file armv7/VirtualAddressSpace.cc.

References ArmV7VirtualAddressSpace::doMap().

ArmV7KernelVirtualAddressSpace& ArmV7KernelVirtualAddressSpace::operator= ( const ArmV7KernelVirtualAddressSpace )
private

The assignment operator

Note
NOT implemented (Singleton)
void ArmV7KernelVirtualAddressSpace::setFlags ( void *  virtualAddress,
size_t  newFlags 
)
virtual

Set the flags of the page at a specific virtual address.

Note
The page must have been mapped with VirtualAddressSpace::map() and the page must still be mapped or marked as swapped out.
Parameters
[in]virtualAddressthe virtual address
[in]newFlagsthe flags

Reimplemented from ArmV7VirtualAddressSpace.

Definition at line 683 of file armv7/VirtualAddressSpace.cc.

void ArmV7KernelVirtualAddressSpace::unmap ( void *  virtualAddress)
virtual

Remove the page at the specific virtual address from the virtual address space.

Note
This function is only valid on memory that was mapped with VirtualAddressSpace::map() and that is still mapped or marked as swapped out.
Parameters
[in]virtualAddressthe virtual address

Reimplemented from ArmV7VirtualAddressSpace.

Definition at line 688 of file armv7/VirtualAddressSpace.cc.

Friends And Related Function Documentation

friend class ArmV7VirtualAddressSpace
friend

ArmV7VirtualAddressSpace needs access to m_Instance

Definition at line 380 of file kernel/core/processor/armv7/VirtualAddressSpace.h.

friend class Processor
friend

Give Processor access to m_Instance

Definition at line 378 of file kernel/core/processor/armv7/VirtualAddressSpace.h.

Member Data Documentation

ArmV7KernelVirtualAddressSpace ArmV7KernelVirtualAddressSpace::m_Instance
staticprivate

The kernel virtual address space

Todo:
MAX_PROCESSORS

Definition at line 414 of file kernel/core/processor/armv7/VirtualAddressSpace.h.


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