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

#include <VirtualAddressSpace.h>

+ Inheritance diagram for X64VirtualAddressSpace:
+ Collaboration diagram for X64VirtualAddressSpace:

Public Member Functions

virtual bool isAddressValid (void *virtualAddress)
 
virtual bool isMapped (void *virtualAddress)
 
virtual bool map (physical_uintptr_t physAddress, void *virtualAddress, size_t flags)
 
virtual bool mapHuge (physical_uintptr_t physAddress, void *virtualAddress, size_t count, size_t flags)
 
virtual void getMapping (void *virtualAddress, physical_uintptr_t &physAddress, size_t &flags)
 
virtual void setFlags (void *virtualAddress, size_t newFlags)
 
virtual void unmap (void *virtualAddress)
 
virtual StackallocateStack ()
 
virtual StackallocateStack (size_t stackSz)
 
virtual void freeStack (Stack *pStack)
 
virtual bool memIsInKernelHeap (void *pMem)
 
virtual bool memIsInHeap (void *pMem)
 
virtual void * getEndOfHeap ()
 
virtual VirtualAddressSpaceclone (bool copyOnWrite=true)
 
virtual void revertToKernelAddressSpace ()
 
bool mapPageStructures (physical_uintptr_t physAddress, void *virtualAddress, size_t flags)
 
bool mapPageStructuresAbove4GB (physical_uintptr_t physAddress, void *virtualAddress, size_t flags)
 
virtual ~X64VirtualAddressSpace ()
 
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 getDynamicStart () const
 
virtual uintptr_t getDynamicEnd () const
 
virtual uintptr_t getGlobalInfoBlock () 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 ~VirtualAddressSpace ()
 
void setHeap (void *heap, void *heapEnd)
 

Private Member Functions

 X64VirtualAddressSpace ()
 
 X64VirtualAddressSpace (void *Heap, physical_uintptr_t PhysicalPML4, void *VirtualStack)
 
 X64VirtualAddressSpace (const X64VirtualAddressSpace &)
 
X64VirtualAddressSpaceoperator= (const X64VirtualAddressSpace &)
 
bool getPageTableEntry (void *virtualAddress, uint64_t *&pageTableEntry) const
 
void maybeFreeTables (void *virtualAddress)
 Possibly cleans up tables for the given address. More...
 
uint64_t toFlags (size_t flags, bool bFinal=false) const PURE
 
size_t fromFlags (uint64_t Flags, bool bFinal=false) const PURE
 
bool conditionalTableEntryAllocation (uint64_t *tableEntry, uint64_t flags)
 
bool conditionalTableEntryMapping (uint64_t *tableEntry, uint64_t physAddress, uint64_t flags)
 
bool mapUnlocked (physical_uintptr_t physAddress, void *virtualAddress, size_t flags, bool locked=false)
 
void unmapUnlocked (void *virtualAddress, bool requireMapped=true)
 
StackdoAllocateStack (size_t sSize)
 

Private Attributes

physical_uintptr_t m_PhysicalPML4
 
void * m_pStackTop
 
Vector< Stack * > m_freeStacks
 
bool m_bKernelSpace
 
Spinlock m_Lock
 
Spinlock m_StacksLock
 

Static Private Attributes

static X64VirtualAddressSpace m_KernelSpace
 

Friends

class Processor
 
class Multiprocessor
 
VirtualAddressSpaceVirtualAddressSpace::getKernelAddressSpace ()
 
VirtualAddressSpaceVirtualAddressSpace::create ()
 

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 VirtualAddressSpace
 VirtualAddressSpace (void *Heap)
 

Detailed Description

The X64VirtualAddressSpace implements the VirtualAddressSpace class for the x64 processor architecture, that means it wraps around the processor's paging functionality.

Definition at line 90 of file kernel/core/processor/x64/VirtualAddressSpace.h.

Constructor & Destructor Documentation

X64VirtualAddressSpace::~X64VirtualAddressSpace ( )
virtual

The destructor cleans up the address space

Todo:
validate that we're cleaning up enough stuff here for example are we missing stuff like PDPTs etc?

Definition at line 933 of file x64/VirtualAddressSpace.cc.

References PhysicalMemoryManager::freePage(), PhysicalMemoryManager::instance(), and VirtualAddressSpace::revertToKernelAddressSpace().

X64VirtualAddressSpace::X64VirtualAddressSpace ( )
private

The default constructor

Definition at line 949 of file x64/VirtualAddressSpace.cc.

References PhysicalMemoryManager::allocatePage(), PhysicalMemoryManager::instance(), m_KernelSpace, m_PhysicalPML4, and physicalAddress().

Referenced by getKernelModulesEnd().

+ Here is the caller graph for this function:

X64VirtualAddressSpace::X64VirtualAddressSpace ( void *  Heap,
physical_uintptr_t  PhysicalPML4,
void *  VirtualStack 
)
private

The constructor for already present paging structures

Parameters
[in]Heapvirtual address of the beginning of the heap
[in]PhysicalPageDirectoryphysical address of the page directory
[in]VirtualStackvirtual address of the top of the next kernel stack
Note
This constructor is only used to construct the kernel VirtualAddressSpace

Definition at line 971 of file x64/VirtualAddressSpace.cc.

X64VirtualAddressSpace::X64VirtualAddressSpace ( const X64VirtualAddressSpace )
private

The copy-constructor

Note
NOT implemented

Member Function Documentation

VirtualAddressSpace::Stack * X64VirtualAddressSpace::allocateStack ( )
virtual

Allocates a single stack for a thread. Will use the default kernel thread size.

Implements VirtualAddressSpace.

Definition at line 809 of file x64/VirtualAddressSpace.cc.

VirtualAddressSpace::Stack * X64VirtualAddressSpace::allocateStack ( size_t  stackSz)
virtual

Allocates a single stack of the given size for a thread.

Reimplemented from VirtualAddressSpace.

Definition at line 818 of file x64/VirtualAddressSpace.cc.

References VirtualAddressSpace::allocateStack().

VirtualAddressSpace * X64VirtualAddressSpace::clone ( bool  copyOnWrite = true)
virtual

Clone this VirtualAddressSpace. That means that we copy-on-write-map the application * image. *

Parameters
[in]copyOnWritewhether the new address space copies pages on write, or shares them with the parent address space.
Returns
pointer to the new VirtualAddressSpace
Todo:
figure out how to handle page tracking here
Todo:
Deal with 2MB pages here.

Implements VirtualAddressSpace.

Definition at line 474 of file x64/VirtualAddressSpace.cc.

References Vector< T >::begin(), VirtualAddressSpace::create(), PhysicalMemoryManager::instance(), Processor::invalidate(), m_freeStacks, VirtualAddressSpace::m_Heap, VirtualAddressSpace::m_HeapEnd, m_Lock, m_pStackTop, m_StacksLock, mapUnlocked(), physicalAddress(), PhysicalMemoryManager::pin(), Vector< T >::pushBack(), and WARNING.

bool X64VirtualAddressSpace::conditionalTableEntryAllocation ( uint64_t *  tableEntry,
uint64_t  flags 
)
private

Allocate and map the table entry if none is present

Parameters
[in]tableEntrypointer to the current table entry
[in]flagsflags that are used for the mapping
Returns
true, if successfull, false otherwise

Definition at line 1192 of file x64/VirtualAddressSpace.cc.

References PhysicalMemoryManager::allocatePage(), ERROR, PhysicalMemoryManager::getPageSize(), PhysicalMemoryManager::instance(), physicalAddress(), and toFlags().

Referenced by getKernelModulesEnd().

+ Here is the caller graph for this function:

bool X64VirtualAddressSpace::conditionalTableEntryMapping ( uint64_t *  tableEntry,
uint64_t  physAddress,
uint64_t  flags 
)
private

map the table entry if none is present

Parameters
[in]tableEntrypointer to the current table entry
[in]physAddressphysical address of the page used as the table
[in]flagsflags that are used for the mapping
Returns
true, if the page has been used, false otherwise

Definition at line 1233 of file x64/VirtualAddressSpace.cc.

References PhysicalMemoryManager::getPageSize(), physicalAddress(), and toFlags().

Referenced by getKernelModulesEnd().

+ Here is the caller graph for this function:

VirtualAddressSpace::Stack * X64VirtualAddressSpace::doAllocateStack ( size_t  sSize)
private
void X64VirtualAddressSpace::freeStack ( Stack pStack)
virtual
size_t X64VirtualAddressSpace::fromFlags ( uint64_t  Flags,
bool  bFinal = false 
) const
private

Convert processor's representation of the flags to the processor independant representation

Parameters
[in]Flagsthe processor specific flag representation
[in]bFinalwhether this is for the actual page or just an intermediate PTE/PDE
Returns
the proessor independant flag representation

Definition at line 1161 of file x64/VirtualAddressSpace.cc.

References VirtualAddressSpace::Accessed, VirtualAddressSpace::CacheDisable, VirtualAddressSpace::CopyOnWrite, VirtualAddressSpace::Dirty, VirtualAddressSpace::Execute, VirtualAddressSpace::KernelMode, VirtualAddressSpace::Shared, VirtualAddressSpace::Swapped, VirtualAddressSpace::Write, VirtualAddressSpace::WriteCombine, and VirtualAddressSpace::WriteThrough.

Referenced by getKernelModulesEnd().

+ Here is the caller graph for this function:

virtual uintptr_t X64VirtualAddressSpace::getDynamicEnd ( ) const
inlinevirtual

Gets address of the end of dynamic memory mapping area.

Reimplemented from VirtualAddressSpace.

Definition at line 194 of file kernel/core/processor/x64/VirtualAddressSpace.h.

virtual uintptr_t X64VirtualAddressSpace::getDynamicLinkerAddress ( ) const
inlinevirtual

Gets address of the dynamic linker in the address space.

Implements VirtualAddressSpace.

Definition at line 169 of file kernel/core/processor/x64/VirtualAddressSpace.h.

References USERSPACE_DYNAMIC_LINKER_LOCATION.

virtual uintptr_t X64VirtualAddressSpace::getDynamicStart ( ) const
inlinevirtual

Gets address of the start of dynamic memory mapping area.

Reimplemented from VirtualAddressSpace.

Definition at line 188 of file kernel/core/processor/x64/VirtualAddressSpace.h.

void * X64VirtualAddressSpace::getEndOfHeap ( )
virtual

Gets a pointer to the byte after the end of the heap.

Implements VirtualAddressSpace.

Definition at line 133 of file x64/VirtualAddressSpace.cc.

References VirtualAddressSpace::m_Heap, and VirtualAddressSpace::m_HeapEnd.

virtual uintptr_t X64VirtualAddressSpace::getGlobalInfoBlock ( ) const
inlinevirtual

Gets address of the global info block location.

Reimplemented from VirtualAddressSpace.

Definition at line 200 of file kernel/core/processor/x64/VirtualAddressSpace.h.

virtual uintptr_t X64VirtualAddressSpace::getKernelCacheEnd ( ) const
inlinevirtual

Gets address of the end of the kernel's cache region.

Implements VirtualAddressSpace.

Definition at line 212 of file kernel/core/processor/x64/VirtualAddressSpace.h.

virtual uintptr_t X64VirtualAddressSpace::getKernelCacheStart ( ) const
inlinevirtual

Gets address of the start of the kernel's cache region.

Implements VirtualAddressSpace.

Definition at line 206 of file kernel/core/processor/x64/VirtualAddressSpace.h.

virtual uintptr_t X64VirtualAddressSpace::getKernelEventBlockStart ( ) const
inlinevirtual

Gets address of the start of the kernel's event handling block.

Implements VirtualAddressSpace.

Definition at line 219 of file kernel/core/processor/x64/VirtualAddressSpace.h.

virtual uintptr_t X64VirtualAddressSpace::getKernelHeapEnd ( ) const
inlinevirtual

Gets address of the end of the kernel's heap region.

Implements VirtualAddressSpace.

Definition at line 181 of file kernel/core/processor/x64/VirtualAddressSpace.h.

virtual uintptr_t X64VirtualAddressSpace::getKernelHeapStart ( ) const
inlinevirtual

Gets address of the start of the kernel's heap region.

Implements VirtualAddressSpace.

Definition at line 175 of file kernel/core/processor/x64/VirtualAddressSpace.h.

virtual uintptr_t X64VirtualAddressSpace::getKernelModulesEnd ( ) const
inlinevirtual
virtual uintptr_t X64VirtualAddressSpace::getKernelModulesStart ( ) const
inlinevirtual

Gets address of the start of the kernel's module region.

Implements VirtualAddressSpace.

Definition at line 225 of file kernel/core/processor/x64/VirtualAddressSpace.h.

virtual uintptr_t X64VirtualAddressSpace::getKernelStart ( ) const
inlinevirtual

Gets start address of the kernel in the address space.

Implements VirtualAddressSpace.

Definition at line 151 of file kernel/core/processor/x64/VirtualAddressSpace.h.

void X64VirtualAddressSpace::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

Implements VirtualAddressSpace.

Definition at line 398 of file x64/VirtualAddressSpace.cc.

References panic().

bool X64VirtualAddressSpace::getPageTableEntry ( void *  virtualAddress,
uint64_t *&  pageTableEntry 
) const
private

Get the page table entry, if it exists and check whether a page is mapped or marked as swapped out.

Parameters
[in]virtualAddressthe virtual address
[out]pageTableEntrypointer to the page table entry
Returns
true, if the page table is present and the page mapped or marked swapped out, false otherwise

Definition at line 979 of file x64/VirtualAddressSpace.cc.

References m_PhysicalPML4.

Referenced by getKernelModulesEnd().

+ Here is the caller graph for this function:

virtual uintptr_t X64VirtualAddressSpace::getUserReservedStart ( ) const
inlinevirtual

Gets start address of reserved areas of the userpace address space.

Implements VirtualAddressSpace.

Definition at line 163 of file kernel/core/processor/x64/VirtualAddressSpace.h.

virtual uintptr_t X64VirtualAddressSpace::getUserStart ( ) const
inlinevirtual

Gets start address of the region usable and cloneable for userspace.

Implements VirtualAddressSpace.

Definition at line 157 of file kernel/core/processor/x64/VirtualAddressSpace.h.

bool X64VirtualAddressSpace::isAddressValid ( void *  virtualAddress)
virtual

Is a particular virtual address valid?

Parameters
[in]virtualAddressthe virtual address to check
Returns
true, if the address is valid, false otherwise

Implements VirtualAddressSpace.

Definition at line 147 of file x64/VirtualAddressSpace.cc.

bool X64VirtualAddressSpace::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

Implements VirtualAddressSpace.

Definition at line 156 of file x64/VirtualAddressSpace.cc.

Referenced by X86CommonPhysicalMemoryManager::PageStack::maybeMap().

+ Here is the caller graph for this function:

bool X64VirtualAddressSpace::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

Implements VirtualAddressSpace.

Definition at line 197 of file x64/VirtualAddressSpace.cc.

bool X64VirtualAddressSpace::mapHuge ( physical_uintptr_t  physAddress,
void *  virtualAddress,
size_t  count,
size_t  flags 
)
virtual

Map a region of memory using the largest possible frame size. Where possible the largest page size should be used, degrading into smaller page sizes as needed (e.g. 1 GB, 2 MB, 4K) to reduce the overhead of the mapping on the system. Default implementation calls map() in a loop.

Returns
true if successful, false otherwise.
Todo:
this does not handle non-1G-aligned counts.
Todo:
we should unmap everything in the region first, clean up tables etc
Todo:
change define to mean huge
Todo:
sanity check physical address?

Reimplemented from VirtualAddressSpace.

Definition at line 205 of file x64/VirtualAddressSpace.cc.

References Processor::cpuid(), PhysicalMemoryManager::getPageSize(), and VirtualAddressSpace::mapHuge().

bool X64VirtualAddressSpace::mapPageStructures ( physical_uintptr_t  physAddress,
void *  virtualAddress,
size_t  flags 
)

Map the page directory pointer table, the page directory, the page table or the page frame if none is currently present

Note
This should only be used from the PhysicalMemoryManager
Parameters
[in]physAddressthe physical page that should be used as page table or page frame
[in]virtualAddressthe virtual address that should be checked for the existance of a page directory pointer table, page directory, page table or page frame
[in]flagsthe flags used for the mapping
Returns
true, if a page table/frame is already mapped for that address, false if the physicalAddress has been used as a page directory pointer table, page directory, page table or page frame.

Definition at line 718 of file x64/VirtualAddressSpace.cc.

Referenced by X86CommonPhysicalMemoryManager::PageStack::maybeMap().

+ Here is the caller graph for this function:

bool X64VirtualAddressSpace::mapUnlocked ( physical_uintptr_t  physAddress,
void *  virtualAddress,
size_t  flags,
bool  locked = false 
)
private

Perform a mapping proper, without taking the lock.

Parameters
[in]lockedwhether the lock was taken before calling or not.
Todo:
this can actually break if a process is removed from the scheduler while we iterate!

Definition at line 302 of file x64/VirtualAddressSpace.cc.

References Process::getAddressSpace(), Scheduler::getNumProcesses(), Scheduler::getProcess(), Scheduler::instance(), Processor::invalidate(), Processor::m_Initialised, and m_PhysicalPML4.

Referenced by clone(), and getKernelModulesEnd().

+ Here is the caller graph for this function:

void X64VirtualAddressSpace::maybeFreeTables ( void *  virtualAddress)
private

Possibly cleans up tables for the given address.

This is used when unmapping pages to opportunistically unmap paging structures that are no longer necessary.

Parameters
[in]virtualAddressthe virtual address
[out]pageTableEntrypointer to the page table entry

Definition at line 1021 of file x64/VirtualAddressSpace.cc.

References PhysicalMemoryManager::freePage(), PhysicalMemoryManager::instance(), and m_PhysicalPML4.

Referenced by getKernelModulesEnd().

+ Here is the caller graph for this function:

bool X64VirtualAddressSpace::memIsInHeap ( void *  pMem)
virtual

Determines if a given point is within the virtual address space region dedicated to the kernel heap.

Implements VirtualAddressSpace.

Definition at line 116 of file x64/VirtualAddressSpace.cc.

References VirtualAddressSpace::getEndOfHeap(), VirtualAddressSpace::m_Heap, and WARNING.

bool X64VirtualAddressSpace::memIsInKernelHeap ( void *  pMem)
virtual

Determines whether a given address is within the kernel's heap region.

Implements VirtualAddressSpace.

Definition at line 101 of file x64/VirtualAddressSpace.cc.

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

The copy-constructor

Note
Not implemented

Referenced by getKernelModulesEnd().

+ Here is the caller graph for this function:

void X64VirtualAddressSpace::revertToKernelAddressSpace ( )
virtual

Undo a clone() - this happens when an application is Exec()'d - we destroy all mappings not in the kernel address space so the space is 'clean'.

Todo:
Deal with 2MB pages here.
Todo:
When swap system comes along, we want to remove this page from swap!

Implements VirtualAddressSpace.

Definition at line 625 of file x64/VirtualAddressSpace.cc.

References PhysicalMemoryManager::freePage(), PhysicalMemoryManager::instance(), Processor::invalidate(), VirtualAddressSpace::m_Heap, VirtualAddressSpace::m_HeapEnd, and physicalAddress().

void X64VirtualAddressSpace::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

Implements VirtualAddressSpace.

Definition at line 414 of file x64/VirtualAddressSpace.cc.

References Processor::invalidate(), and panic().

uint64_t X64VirtualAddressSpace::toFlags ( size_t  flags,
bool  bFinal = false 
) const
private

Convert the processor independant flags to the processor's representation of the flags

Parameters
[in]flagsthe processor independant flag representation
[in]bFinalwhether this is for the actual page or just an intermediate PTE/PDE
Returns
the proessor specific flag representation

Definition at line 1124 of file x64/VirtualAddressSpace.cc.

References VirtualAddressSpace::Accessed, VirtualAddressSpace::CacheDisable, VirtualAddressSpace::ClearDirty, VirtualAddressSpace::CopyOnWrite, VirtualAddressSpace::Dirty, VirtualAddressSpace::Execute, VirtualAddressSpace::KernelMode, VirtualAddressSpace::Shared, VirtualAddressSpace::Swapped, VirtualAddressSpace::Write, VirtualAddressSpace::WriteCombine, and VirtualAddressSpace::WriteThrough.

Referenced by conditionalTableEntryAllocation(), conditionalTableEntryMapping(), and getKernelModulesEnd().

+ Here is the caller graph for this function:

void X64VirtualAddressSpace::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

Implements VirtualAddressSpace.

Definition at line 433 of file x64/VirtualAddressSpace.cc.

void X64VirtualAddressSpace::unmapUnlocked ( void *  virtualAddress,
bool  requireMapped = true 
)
private

Perform an unmap without taking the lock.

Definition at line 440 of file x64/VirtualAddressSpace.cc.

References Processor::invalidate(), and panic().

Referenced by getKernelModulesEnd().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

friend class Multiprocessor
friend

Multiprocessor::initialise() needs access to m_PhysicalPML4

Definition at line 95 of file kernel/core/processor/x64/VirtualAddressSpace.h.

friend class Processor
friend

Processor::switchAddressSpace() needs access to m_PhysicalPML4

Definition at line 93 of file kernel/core/processor/x64/VirtualAddressSpace.h.

VirtualAddressSpace::create needs access to the constructor

VirtualAddressSpace::getKernelAddressSpace() needs access to m_KernelSpace

Member Data Documentation

bool X64VirtualAddressSpace::m_bKernelSpace
private

Is this the kernel space?

Definition at line 320 of file kernel/core/processor/x64/VirtualAddressSpace.h.

Vector<Stack *> X64VirtualAddressSpace::m_freeStacks
private

List of free stacks

Definition at line 318 of file kernel/core/processor/x64/VirtualAddressSpace.h.

Referenced by clone().

X64VirtualAddressSpace X64VirtualAddressSpace::m_KernelSpace
staticprivate

The kernel virtual address space

Definition at line 327 of file kernel/core/processor/x64/VirtualAddressSpace.h.

Referenced by X64VirtualAddressSpace().

Spinlock X64VirtualAddressSpace::m_Lock
private

Lock to guard against multiprocessor reentrancy.

Definition at line 322 of file kernel/core/processor/x64/VirtualAddressSpace.h.

Referenced by clone().

physical_uintptr_t X64VirtualAddressSpace::m_PhysicalPML4
private

Physical address of the Page Map Level 4

Definition at line 314 of file kernel/core/processor/x64/VirtualAddressSpace.h.

Referenced by getPageTableEntry(), mapUnlocked(), maybeFreeTables(), and X64VirtualAddressSpace().

void* X64VirtualAddressSpace::m_pStackTop
private

Current top of the stacks

Definition at line 316 of file kernel/core/processor/x64/VirtualAddressSpace.h.

Referenced by clone().

Spinlock X64VirtualAddressSpace::m_StacksLock
private

Lock to guard against multiprocessor reentrancy for stack reuse.

Definition at line 324 of file kernel/core/processor/x64/VirtualAddressSpace.h.

Referenced by clone().


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