unsigned int uint32_t
Definition fb.h:17
uintptr_t phys_addr_t
physical addresses and the conversion between physical and virtual.
Definition phys.h:18
void * pmm_alloc_page(void)
allocate a single 4 KiB physical page frame.
Definition pmm.c:135
void pmm_mark_region_used(phys_addr_t start, phys_addr_t end)
mark all page frames within a physical address range as used.
Definition pmm.c:286
uint32_t pmm_total_count(void)
return the total number of page frames managed by the PMM.
Definition pmm.c:276
bool pmm_claim_pages(uint32_t first_page, uint32_t count)
claim a run of specific page frames, only if every one of them is free.
Definition pmm.c:314
void pmm_free_page(void *address)
drop one reference to a page frame.
Definition pmm.c:228
void pmm_init(boot_info_t *boot)
physical memory manager: a bitmap of 4 KiB page frames.
Definition pmm.c:61
bool pmm_is_page_free(uint32_t page_index)
check whether a specific page frame is free.
Definition pmm.c:304
uint32_t pmm_page_refcount(void *address)
read the reference count of a page frame.
Definition pmm.c:262
void pmm_page_ref(void *address)
add a reference to an allocated page frame, so that it stays allocated until pmm_free_page has been c...
Definition pmm.c:248
bool pmm_owns(phys_addr_t phys)
check whether a physical address falls within the RAM the PMM manages.
Definition pmm.c:281
void * pmm_alloc_contiguous(uint32_t count)
allocate a run of physically contiguous 4 KiB page frames.
Definition pmm.c:160
uint32_t pmm_free_count(void)
return the number of free page frames available for allocation.
Definition pmm.c:271
information the bootloader hands to the kernel.
Definition boot_info.h:21