|
PatchworkOS
|
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_t * | callbacks |
| 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 |
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.
| uint64_t space_t::bitmapBuffer[BITMAP_BITS_TO_QWORDS(PML_MAX_CALLBACK)] |
Buffer for the callback bitmap, see bitmap_t for more info.
Definition at line 97 of file space.h.
Referenced by space_init().
| 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().
| 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().
| 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().
| 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().
| 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().
| space_flags_t space_t::flags |
Definition at line 85 of file space.h.
Referenced by space_deinit(), and space_init().
| 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_t space_t::lock |
Definition at line 100 of file space.h.
Referenced by space_init(), space_is_mapped(), space_load(), space_mapping_end(), space_mapping_start(), space_pin(), space_pin_terminated(), space_unpin(), and vmm_cpu_ctx_init_common().
| page_table_t space_t::pageTable |
The page table associated with the address space.
Definition at line 81 of file space.h.
Referenced by space_deinit(), space_find_free_region(), space_init(), space_is_mapped(), space_load(), space_map_kernel_space_region(), space_pin(), space_pin_depth_dec(), space_pin_depth_inc(), space_pin_terminated(), space_populate_user_region(), space_unmap_kernel_space_region(), vmm_alloc(), vmm_cpu_ctx_init_common(), vmm_init(), vmm_map(), vmm_map_bootloader_lower_half(), vmm_map_pages(), vmm_page_table_unmap_with_shootdown(), vmm_protect(), vmm_unmap(), and vmm_unmap_bootloader_lower_half().
| 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().
| 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().
| 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().