|
Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
|
Go to the source code of this file.
Data Structures | |
| struct | memory_region |
Macros | |
| #define | BLOCK_SIZE (uint64_t) 0x1000 |
Enumerations | |
| enum | MEMORY_ENTRY_TYPE { RESERVED , USABLE } |
Functions | |
| void | phys_base_allocator_install (struct stivale2_struct_tag_memmap *stivale_memmap) |
| void * | phys_base_alloc (uint64_t size) |
| void * | phys_base_alloc_aligned (uint64_t block, uint64_t align) |
| void | vxPhysBaseFree (void *page, uint64_t length) |
| void | pmm_log_usage () |
| uint64_t | pys_base_get_free_block_count () |
| void * | phys_base_alloc_on_top (uint64_t block) |
Variables | |
| uint64_t | bitmap_size_ |
| #define BLOCK_SIZE (uint64_t) 0x1000 |
Definition at line 7 of file phys_base_allocator.h.
Referenced by __attribute__(), acpi_map_phys_page(), alloc_page_locked(), elf_count_load_size(), elf_load(), elf_roffset_to_kernel_ptr(), execve(), get_default_slab_addr(), INIT(), INIT(), INIT(), INIT(), mmap_handle_anonymous(), phys_base_alloc(), pmm_log_usage(), proccess_elf(), pys_base_get_free_block_count(), vaddr_alloc_locked(), vxCreateSlabCache(), vxPhysBaseFree(), and vxSlabAlloc().
| enum MEMORY_ENTRY_TYPE |
| Enumerator | |
|---|---|
| RESERVED | |
| USABLE | |
Definition at line 9 of file phys_base_allocator.h.
| void * phys_base_alloc | ( | uint64_t | size | ) |
Definition at line 187 of file phys_base_allocator.c.
References bitmap_base_, BLOCK_SIZE, higher_base_length_, memcopy(), NULL, pmm_lock, spin_acquire(), spin_release(), and used.
Referenced by __attribute__(), alloc_page_locked(), elf_load(), elf_mmap_got(), execve(), INIT(), mmap_handle_anonymous(), paging_create_page_directory(), syscall_brk(), vxCreateSlabCache(), vxMmap(), and vxSlabAlloc().
References bitmap_size_, length, and page.
| void * phys_base_alloc_on_top | ( | uint64_t | block | ) |
Definition at line 243 of file phys_base_allocator.c.
References NULL.
| void phys_base_allocator_install | ( | struct stivale2_struct_tag_memmap * | stivale_memmap | ) |
References size.
| void pmm_log_usage | ( | ) |
Definition at line 272 of file phys_base_allocator.c.
References BLOCK_SIZE, DEBUG_LEVEL_INFO, KDEBUG, pys_base_get_free_block_count(), and usable_total.
Referenced by __attribute__().
| uint64_t pys_base_get_free_block_count | ( | ) |
Definition at line 250 of file phys_base_allocator.c.
References bitmap_base_, BLOCK_SIZE, count, and higher_base_length_.
Referenced by pmm_log_usage().
| void vxPhysBaseFree | ( | void * | page, |
| uint64_t | length ) |
Definition at line 263 of file phys_base_allocator.c.
References bitmap_base_, BLOCK_SIZE, pmm_lock, ptr, size, spin_acquire(), and spin_release().
Referenced by slab_cache_destroy().
|
extern |
Referenced by phys_base_alloc_aligned().