The Pedigree Project
0.1
|
#include <VirtualAddressSpace.h>
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 void * | allocateStack () |
Public Member Functions inherited from X86VirtualAddressSpace | |
virtual bool | isAddressValid (void *virtualAddress) |
virtual void * | allocateStack (size_t stackSz) |
virtual void | freeStack (void *pStack) |
virtual bool | memIsInHeap (void *pMem) |
virtual void * | getEndOfHeap () |
virtual VirtualAddressSpace * | clone () |
virtual void | revertToKernelAddressSpace () |
bool | mapPageStructures (physical_uintptr_t physicalAddress, void *virtualAddress, size_t flags) |
virtual | ~X86VirtualAddressSpace () |
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 |
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 VirtualAddressSpace * | clone (bool copyOnWrite=true)=0 |
virtual | ~VirtualAddressSpace () |
void | setHeap (void *heap, void *heapEnd) |
virtual bool | memIsInKernelHeap (void *pMem)=0 |
virtual uintptr_t | getKernelCacheStart () const =0 |
virtual uintptr_t | getKernelCacheEnd () const =0 |
virtual uintptr_t | getKernelEventBlockStart () const =0 |
virtual uintptr_t | getKernelModulesStart () const =0 |
virtual uintptr_t | getKernelModulesEnd () const =0 |
virtual uintptr_t | getDynamicStart () const |
virtual uintptr_t | getDynamicEnd () const |
virtual uintptr_t | getGlobalInfoBlock () const |
Private Member Functions | |
X86KernelVirtualAddressSpace () | |
~X86KernelVirtualAddressSpace () | |
X86KernelVirtualAddressSpace (const X86KernelVirtualAddressSpace &) | |
X86KernelVirtualAddressSpace & | operator= (const X86KernelVirtualAddressSpace &) |
Static Private Attributes | |
static X86KernelVirtualAddressSpace | m_Instance |
Friends | |
class | X86VirtualAddressSpace |
VirtualAddressSpace & | VirtualAddressSpace::getKernelAddressSpace () |
Additional Inherited Members | |
Static Public Member Functions inherited from X86VirtualAddressSpace | |
static void | initialise () INITIALISATION_ONLY |
Static Public Member Functions inherited from VirtualAddressSpace | |
static EXPORTED_PUBLIC VirtualAddressSpace & | getKernelAddressSpace () |
static VirtualAddressSpace * | create () |
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 X86VirtualAddressSpace | |
X86VirtualAddressSpace (void *Heap, physical_uintptr_t PhysicalPageDirectory, void *VirtualPageDirectory, void *VirtualPageTables, void *VirtualStack) INITIALISATION_ONLY | |
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) | |
The kernel's VirtualAddressSpace on x86
Definition at line 240 of file kernel/core/processor/x86/VirtualAddressSpace.h.
|
private |
The constructor
Definition at line 913 of file x86/VirtualAddressSpace.cc.
|
private |
The destructor
Definition at line 927 of file x86/VirtualAddressSpace.cc.
|
private |
The copy-constructor
|
virtual |
Allocates a single stack for a thread. Will use the default kernel thread size.
Reimplemented from X86VirtualAddressSpace.
Definition at line 907 of file x86/VirtualAddressSpace.cc.
|
virtual |
Get the physical address and the flags associated with the specific virtual address.
[in] | virtualAddress | the address in the virtual address space |
[out] | flags | the flags |
[out] | physicalAddress | the physical address |
Reimplemented from X86VirtualAddressSpace.
Definition at line 893 of file x86/VirtualAddressSpace.cc.
|
virtual |
Checks whether a mapping the the specific virtual address exists. Pages marked as swapped out are not considered mapped.
[in] | virtualAddress | the virtual address |
Reimplemented from X86VirtualAddressSpace.
Definition at line 884 of file x86/VirtualAddressSpace.cc.
|
virtual |
Map a specific physical page (of size PhysicalMemoryManager::getPageSize()) at a specific location into the virtual address space.
[in] | physicalAddress | the address of the physical page that should be mapped into the virtual address space. |
[in] | virtualAddress | the virtual address at which the page apears within the virtual address space. |
[in] | flags | flags that describe which accesses should be allowed on the page. |
Reimplemented from X86VirtualAddressSpace.
Definition at line 888 of file x86/VirtualAddressSpace.cc.
|
private |
The assignment operator
|
virtual |
Set the flags of the page at a specific virtual address.
[in] | virtualAddress | the virtual address |
[in] | newFlags | the flags |
Reimplemented from X86VirtualAddressSpace.
Definition at line 898 of file x86/VirtualAddressSpace.cc.
|
virtual |
Remove the page at the specific virtual address from the virtual address space.
[in] | virtualAddress | the virtual address |
Reimplemented from X86VirtualAddressSpace.
Definition at line 903 of file x86/VirtualAddressSpace.cc.
VirtualAddressSpace::getKernelAddressSpace() needs access to m_Instance
|
friend |
X86VirtualAddressSpace needs access to m_Instance
Definition at line 243 of file kernel/core/processor/x86/VirtualAddressSpace.h.
|
staticprivate |
The kernel virtual address space
Definition at line 276 of file kernel/core/processor/x86/VirtualAddressSpace.h.