Virtual address allocator
include/mem/vas.h View source View on GitHubFunctions
Section titled “Functions”vas_bootstrap
Section titled “vas_bootstrap”vas_create
Section titled “vas_create”vas_from
Section titled “vas_from”struct vas * vas_from(struct address_range *ar) source vas_bootstrap_from
Section titled “vas_bootstrap_from”struct vas * vas_bootstrap_from(struct address_range *ar) source vas_alloc
Section titled “vas_alloc”No touching in interrupts or above DISPATCH
vas_free
Section titled “vas_free”Giving the wrong size panics. TODO: we only need to pass in addr, we can update the APIs for that later on
vas_map_full
Section titled “vas_map_full”void * vas_map_full(
struct vas *vas,
paddr_t paddr,
size_t len,
struct vmm_request rq
) source vas_unmap
Section titled “vas_unmap”Drain cached reservations
vas_reclaim
Section titled “vas_reclaim”vas_reclaim_freelist_pages
Section titled “vas_reclaim_freelist_pages”vas_destroy
Section titled “vas_destroy”vas_space_dump
Section titled “vas_space_dump”vas_vaddr_in_vas
Section titled “vas_vaddr_in_vas”vas_vaddr_is_allocated
Section titled “vas_vaddr_is_allocated”Macros
Section titled “Macros”VAS_CHUNK_SHIFT
Section titled “VAS_CHUNK_SHIFT”#define VAS_CHUNK_SHIFT 26 source VAS_CHUNK_SIZE
Section titled “VAS_CHUNK_SIZE”#define VAS_CHUNK_SIZE BIT(VAS_CHUNK_SHIFT) source vas_map
Section titled “vas_map”Expansion
#define vas_map(vas, paddr, len, ...) \
vas_map_full((vas), (paddr), (len), vmm_request_with_defaults(__VA_ARGS__))