20 #ifndef KERNEL_PROCESSOR_MIPS32_VIRTUALADDRESSSPACE_H 21 #define KERNEL_PROCESSOR_MIPS32_VIRTUALADDRESSSPACE_H 23 #include "pedigree/kernel/machine/mips_common/types.h" 24 #include "pedigree/kernel/processor/VirtualAddressSpace.h" 25 #include "pedigree/kernel/processor/types.h" 29 #define PAGE_SIZE 0x1000 33 #define MIPS32_PTE_GLOBAL 0x1 // If set, the TLB ignores the current ASID. 34 #define MIPS32_PTE_VALID 0x2 // If unset, the entry is invalid. 35 #define MIPS32_PTE_DIRTY \ 36 0x4 // Actually, write-enable. 1 to allow writes, 0 for read-only. 37 #define MIPS32_PTE_UNCACHED 0x10 // No caching - field C = 0x2. 38 #define MIPS32_PTE_CACHED \ 39 0x18 // Cache without multiprocessor signalling - field C = 0x3 108 virtual bool isMapped(
void *virtualAddress);
115 virtual void setFlags(
void *virtualAddress,
size_t newFlags);
116 virtual void unmap(
void *virtualAddress);
118 virtual void freeStack(
void *pStack);
138 void setPageTableChunk(uintptr_t chunkIdx, uintptr_t chunkAddr);
158 #define USERSPACE_VIRTUAL_HEAP static_cast<uintptr_t>(0x10000000) 159 #define VIRTUAL_PAGE_DIRECTORY static_cast<uintptr_t>(0xC0000000) 160 #define KERNEL_VIRTUAL_HEAP static_cast<uintptr_t>(0xC0800000) MIPS32VirtualAddressSpace & operator=(const MIPS32VirtualAddressSpace &)
virtual bool map(physical_uintptr_t physicalAddress, void *virtualAddress, size_t flags)
MIPS32VirtualAddressSpace()
uintptr_t generateNullChunk()
static MIPS32VirtualAddressSpace m_KernelSpace
uintptr_t m_pKusegDirectory[1024]
virtual void getMapping(void *virtualAddress, physical_uintptr_t &physicalAddress, size_t &flags)
virtual void setFlags(void *virtualAddress, size_t newFlags)
static EXPORTED_PUBLIC VirtualAddressSpace & getKernelAddressSpace()
virtual bool isAddressValid(void *virtualAddress)
virtual ~MIPS32VirtualAddressSpace()
uintptr_t physicalAddress(physical_uintptr_t address) PURE
static uintptr_t m_pKseg2Directory[512]
The exception was caused by a hardware task switch.
virtual bool isMapped(void *virtualAddress)
virtual void unmap(void *virtualAddress)
virtual void * allocateStack()
uintptr_t getPageTableChunk(uintptr_t chunkIdx)