20 #ifndef KERNEL_PROCESSOR_VIRTUALADDRESSSPACE_H 21 #define KERNEL_PROCESSOR_VIRTUALADDRESSSPACE_H 23 #include "pedigree/kernel/compiler.h" 24 #include "pedigree/kernel/processor/types.h" 49 static const size_t Write = 0x02;
73 static const size_t Dirty = 0x1000;
86 virtual void *
expandHeap(ssize_t incr,
size_t flags);
97 virtual bool isMapped(
void *virtualAddress) = 0;
119 physical_uintptr_t physAddress,
void *virtualAddress,
size_t count,
134 virtual void setFlags(
void *virtualAddress,
size_t newFlags) = 0;
139 virtual void unmap(
void *virtualAddress) = 0;
260 Stack(
void *top,
size_t size) : m_Top(top), m_Size(size)
269 size_t getSize()
const 274 operator void *()
const virtual void unmap(void *virtualAddress)=0
virtual uintptr_t getKernelEventBlockStart() const =0
virtual bool isAddressValid(void *virtualAddress)=0
virtual ~VirtualAddressSpace()
virtual bool memIsInHeap(void *pMem)=0
virtual void getMapping(void *virtualAddress, physical_uintptr_t &physicalAddress, size_t &flags)=0
VirtualAddressSpace & operator=(const VirtualAddressSpace &)
virtual uintptr_t getKernelModulesEnd() const =0
virtual uintptr_t getUserStart() const =0
virtual void setFlags(void *virtualAddress, size_t newFlags)=0
VirtualAddressSpace(void *Heap)
virtual uintptr_t getKernelHeapEnd() const =0
static const size_t Accessed
virtual uintptr_t getDynamicLinkerAddress() const =0
virtual bool isMapped(void *virtualAddress)=0
static const size_t Execute
virtual bool map(physical_uintptr_t physicalAddress, void *virtualAddress, size_t flags)=0
virtual uintptr_t getUserReservedStart() const =0
static const size_t Guarded
static const size_t WriteThrough
static const size_t MemoryCoherent
static EXPORTED_PUBLIC VirtualAddressSpace & getKernelAddressSpace()
virtual Stack * allocateStack()=0
virtual uintptr_t getKernelStart() const =0
virtual void freeStack(Stack *pStack)=0
static const size_t WriteCombine
static physical_uintptr_t m_ZeroPage
static const size_t Write
static VirtualAddressSpace * create()
uintptr_t physicalAddress(physical_uintptr_t address) PURE
static const size_t KernelMode
virtual bool memIsInKernelHeap(void *pMem)=0
static const size_t Shared
void rollbackHeapExpansion(void *virtualAddress, size_t pageCount)
virtual uintptr_t getKernelCacheEnd() const =0
static const size_t Swapped
virtual uintptr_t getDynamicEnd() const
virtual uintptr_t getKernelHeapStart() const =0
void setHeap(void *heap, void *heapEnd)
static const size_t Dirty
virtual uintptr_t getDynamicStart() const
virtual uintptr_t getKernelCacheStart() const =0
virtual void revertToKernelAddressSpace()=0
virtual void * getEndOfHeap()=0
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 Stack * allocateStack(size_t stackSz)
virtual VirtualAddressSpace * clone(bool copyOnWrite=true)=0
static const size_t CacheDisable
virtual uintptr_t getKernelModulesStart() const =0
virtual uintptr_t getGlobalInfoBlock() const
static const size_t CopyOnWrite
static const size_t ClearDirty