PatchworkOS
Loading...
Searching...
No Matches
space_t Struct Reference

Virtual address space structure. More...

#include <space.h>

Data Fields

map_t pinnedPages
 Map of pages with a pin depth greater than 1.
 
page_table_t pageTable
 The page table associated with the address space.
 
uintptr_t startAddress
 The start address for allocations in this address space.
 
uintptr_t endAddress
 The end address for allocations in this address space.
 
uintptr_t freeAddress
 The next available free virtual address in this address space.
 
space_flags_t flags
 
space_callback_tcallbacks
 
uint64_t callbacksLength
 Length of the callbacks array.
 
bitmap_t callbackBitmap
 Bitmap to track available callback IDs.
 
uint64_t bitmapBuffer [BITMAP_BITS_TO_QWORDS(PML_MAX_CALLBACK)]
 
list_t cpus
 List of CPUs using this address space.
 
atomic_uint16_t shootdownAcks
 
lock_t lock
 

Detailed Description

Virtual address space structure.

The space_t structure represents a virtual address space.

Note that the actual pin depth, if its is greater than 1, is tracked in the pinnedPages map, the page table only tracks if a page is pinned or not for faster access and to avoid having to access the map even when just pinning a page once.

Definition at line 78 of file space.h.

Field Documentation

◆ bitmapBuffer

Buffer for the callback bitmap, see bitmap_t for more info.

Definition at line 97 of file space.h.

Referenced by space_init().

◆ callbackBitmap

bitmap_t space_t::callbackBitmap

Bitmap to track available callback IDs.

Definition at line 93 of file space.h.

Referenced by space_alloc_callback(), space_deinit(), space_free_callback(), space_init(), and vmm_unmap().

◆ callbacks

space_callback_t* space_t::callbacks

Array of callbacks for this address space, indexed by the callback ID.

Lazily initialized to a size equal to the largest used callback ID.

Definition at line 91 of file space.h.

Referenced by space_alloc_callback(), space_deinit(), space_init(), and vmm_unmap().

◆ callbacksLength

uint64_t space_t::callbacksLength

Length of the callbacks array.

Definition at line 92 of file space.h.

Referenced by space_alloc_callback(), and space_init().

◆ cpus

list_t space_t::cpus

List of CPUs using this address space.

Definition at line 98 of file space.h.

Referenced by space_deinit(), space_init(), space_load(), space_tlb_shootdown(), and vmm_cpu_ctx_init_common().

◆ endAddress

uintptr_t space_t::endAddress

The end address for allocations in this address space.

Definition at line 83 of file space.h.

Referenced by space_check_access(), space_find_free_region(), and space_init().

◆ flags

space_flags_t space_t::flags

Definition at line 85 of file space.h.

Referenced by space_deinit(), and space_init().

◆ freeAddress

uintptr_t space_t::freeAddress

The next available free virtual address in this address space.

Definition at line 84 of file space.h.

Referenced by space_find_free_region(), space_init(), and space_update_free_address().

◆ lock

◆ pageTable

◆ pinnedPages

map_t space_t::pinnedPages

Map of pages with a pin depth greater than 1.

Definition at line 80 of file space.h.

Referenced by space_init(), space_pin_depth_dec(), and space_pin_depth_inc().

◆ shootdownAcks

atomic_uint16_t space_t::shootdownAcks

Definition at line 99 of file space.h.

Referenced by space_init(), space_tlb_shootdown(), and vmm_shootdown_handler().

◆ startAddress

uintptr_t space_t::startAddress

The start address for allocations in this address space.

Definition at line 82 of file space.h.

Referenced by space_check_access(), space_find_free_region(), and space_init().


The documentation for this struct was generated from the following file: