PatchworkOS
Loading...
Searching...
No Matches
mem.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
stdint.h
>
4
5
#include <
boot/boot_info.h
>
6
#include <
kernel/mem/paging_types.h
>
7
22
#define MEM_BASIC_ALLOCATOR_MIN_PAGES 8192
23
29
#define MEM_BASIC_ALLOCATOR_RESERVE_PERCENTAGE 5
30
36
EFI_STATUS
mem_init
(
void
);
37
44
EFI_STATUS
mem_map_init
(
boot_memory_map_t
*
map
);
45
51
void
mem_map_deinit
(
boot_memory_map_t
*
map
);
52
67
void
mem_page_table_init
(
page_table_t
* table,
boot_memory_map_t
*
map
,
boot_gop_t
*
gop
,
boot_kernel_t
* kernel);
68
boot_info.h
mem_map_init
EFI_STATUS mem_map_init(boot_memory_map_t *map)
Initialize and load the memory map provided by the UEFI firmware.
Definition
mem.c:64
mem_page_table_init
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.
Definition
mem.c:125
mem_map_deinit
void mem_map_deinit(boot_memory_map_t *map)
Deinitializes the memory map and frees any allocated resources.
Definition
mem.c:83
mem_init
EFI_STATUS mem_init(void)
Initializes the basic memory allocator.
Definition
mem.c:22
gop
boot_gop_t * gop
Definition
mem.c:18
map
boot_memory_map_t * map
Definition
mem.c:19
paging_types.h
stdint.h
boot_gop_t
Definition
boot_info.h:32
boot_kernel_t
Definition
boot_info.h:79
boot_memory_map_t
Definition
boot_info.h:45
page_table_t
A page table structure.
Definition
paging_types.h:385
src
boot
mem.h
Generated by
1.9.8