|
PatchworkOS
|
#include "mem.h"#include "efidef.h"#include <efilib.h>#include <kernel/defs.h>#include <kernel/mem/paging_types.h>#include <boot/boot_info.h>#include <kernel/mem/paging.h>#include <sys/proc.h>Go to the source code of this file.
Functions | |
| EFI_STATUS | mem_init (void) |
| Initializes the basic memory allocator. | |
| EFI_STATUS | mem_map_init (boot_memory_map_t *map) |
| Initialize and load the memory map provided by the UEFI firmware. | |
| void | mem_map_deinit (boot_memory_map_t *map) |
| Deinitializes the memory map and frees any allocated resources. | |
| static NORETURN void | panic_without_boot_services (uint8_t red, uint8_t green, uint8_t blue) |
| static uint64_t | basic_allocator_alloc_pages (void **pages, uint64_t amount) |
| void | mem_page_table_init (page_table_t *table, boot_memory_map_t *map, boot_gop_t *gop, boot_kernel_t *kernel) |
| Initializes a page table for use by the kernel. | |
Variables | ||
| struct { | ||
| EFI_PHYSICAL_ADDRESS buffer | ||
| uint64_t maxPages | ||
| uint64_t pagesAllocated | ||
| boot_gop_t * gop | ||
| boot_memory_map_t * map | ||
| } | basicAllocator | |
Definition at line 109 of file mem.c.
References basicAllocator, PAGE_SIZE, and panic_without_boot_services().
Referenced by mem_page_table_init().
|
static |
Definition at line 90 of file mem.c.
References basicAllocator, x, and y.
Referenced by basic_allocator_alloc_pages(), and mem_page_table_init().
| struct { ... } basicAllocator |
Referenced by basic_allocator_alloc_pages(), mem_init(), mem_page_table_init(), and panic_without_boot_services().
| EFI_PHYSICAL_ADDRESS buffer |
Definition at line 15 of file mem.c.
Referenced by _file_init(), _std_stream_init(), _syscall_getdents(), _syscall_read(), _syscall_write(), acpi_table_read(), aml_buffer_set(), aml_buffer_to_buffer_field(), aml_buffer_to_debug_object(), aml_buffer_to_integer(), aml_buffer_to_string(), aml_convert_to_decimal_string(), aml_convert_to_hex_string(), aml_name_string_to_string(), aml_object_map_key(), aml_object_to_string(), bitmap_init(), cmdline_read(), const_null_read(), const_null_write(), const_one_read(), const_zero_read(), ctl_dispatch(), dentry_cache_key(), dentry_generic_getdents(), fb_info_read(), getdents(), gop_buffer_init(), interactive_shell(), join_args(), kbd_events_read(), kbd_name_read(), local_socket_recv(), local_socket_send(), map_key_buffer(), mount_cache_key(), mouse_events_read(), mouse_name_read(), note_queue_write(), page_table_page_buffer_flush(), page_table_page_buffer_push(), pipe_read(), pipe_write(), pipeline_execute(), pmm_bitmap_init(), print_stat(), procedure(), process_cmdline_read(), process_cwd_read(), process_note_write(), process_prio_read(), process_prio_write(), process_wait_read(), ramfs_inode_new(), ramfs_read(), ramfs_write(), rand_gen(), rand_gen_fallback(), read(), read_fd(), readfile(), ring_init(), ring_read(), ring_read_at(), ring_write(), socket_factory_read(), space_pin(), space_populate_user_region(), stack_overflow(), stack_pointer_init_buffer(), startmenu_procedure(), statistics_cpu_read(), statistics_mem_read(), SYSCALL_DEFINE(), SYSCALL_DEFINE(), SYSCALL_DEFINE(), SYSCALL_DEFINE(), taskbar_update_clock(), terminal_columns_get(), terminal_handle_output(), thread_send_note(), vfs_getdents(), vfs_read(), vfs_stat(), vfs_write(), vreadf(), vwritef(), write(), and writefile().
| boot_gop_t* gop |
Definition at line 18 of file mem.c.
Referenced by gop_buffer_init(), gop_init(), gop_mmap(), gop_select_mode(), log_init(), mem_page_table_init(), and vmm_init().
| boot_memory_map_t* map |
Definition at line 19 of file mem.c.
Referenced by acpi_reclaim_memory(), bitmap_clear(), bitmap_clear_range(), bitmap_find_clear_region_and_set(), bitmap_find_first_clear(), bitmap_find_first_set(), bitmap_init(), bitmap_is_set(), bitmap_set(), bitmap_set_range(), bitmap_sum(), init_free_loader_data(), map_capacity(), map_clear(), map_contains(), map_deinit(), map_find_slot(), map_get(), map_init(), map_insert(), map_is_empty(), map_remove(), map_reserve(), map_resize(), map_size(), mem_init(), mem_map_deinit(), mem_map_init(), mem_page_table_init(), pmm_detect_memory(), pmm_init(), pmm_load_memory(), and vfs_map_init().
| uint64_t maxPages |
Definition at line 16 of file mem.c.
Referenced by stack_pointer_init(), and thread_id_to_offset().