[app][uefi] Make allocate_pool return identity mapped memory

This commit is contained in:
Kelvin Zhang
2024-10-08 10:40:02 -07:00
parent 1249e8a03b
commit 0d8a1ec055
6 changed files with 97 additions and 8 deletions

View File

@@ -46,6 +46,7 @@ __BEGIN_CDECLS
#define PAGE_ALIGN(x) ALIGN(x, PAGE_SIZE)
#define IS_PAGE_ALIGNED(x) IS_ALIGNED(x, PAGE_SIZE)
struct list_node *get_arena_list(void);
struct mmu_initial_mapping {
paddr_t phys;

View File

@@ -34,6 +34,8 @@ static mutex_t lock = MUTEX_INITIAL_VALUE(lock);
#define ADDRESS_IN_ARENA(address, arena) \
((address) >= (arena)->base && (address) <= (arena)->base + (arena)->size - 1)
struct list_node *get_arena_list() { return &arena_list; }
static inline bool page_is_free(const vm_page_t *page) {
return !(page->flags & VM_PAGE_FLAG_NONFREE);
}