#define assert(expression)
#define PML_HIGHER_TO_LOWER(addr)
Converts an address from the higher half to the lower half.
#define PML_HIGHER_HALF_START
The start of the higher half of the address space.
void * pmm_bitmap_alloc(pmm_bitmap_t *bitmap, uint64_t count, uintptr_t maxAddr, uint64_t alignment)
Allocates a contiguous region of pages from the bitmap.
void pmm_bitmap_init(pmm_bitmap_t *bitmap, void *buffer, uint64_t size, uintptr_t maxAddr)
Initializes a PMM bitmap.
void pmm_bitmap_free(pmm_bitmap_t *bitmap, void *address, uint64_t count)
Frees a region of pages, returning them to the bitmap.
static void bitmap_init(bitmap_t *map, void *buffer, uint64_t length)
Initialize a bitmap.
static void bitmap_clear_range(bitmap_t *map, uint64_t low, uint64_t high)
Clear a range of bits in the bitmap.
static uint64_t bitmap_find_clear_region_and_set(bitmap_t *map, uint64_t length, uintptr_t maxIdx, uint64_t align)
Find a clear region of specified length and alignment, and set it.
#define ROUND_DOWN(number, multiple)
#define ROUND_UP(number, multiple)
#define PAGE_SIZE
Memory page size.
#define NULL
Pointer error value.
EFI_PHYSICAL_ADDRESS buffer
static pmm_bitmap_t bitmap
__UINTPTR_TYPE__ uintptr_t
Represents a bitmap allocator's state.
uint64_t free
The number of free pages in the bitmap.
bitmap_t bitmap
The underlying bitmap used for tracking page status.
uint64_t total
The total number of pages managed by the bitmap.
uintptr_t maxAddr
The maximum address managed by the bitmap.