diff options
| author | Ada Christine <adachristine18@gmail.com> | 2021-04-11 18:49:06 +0000 |
|---|---|---|
| committer | Ada Christine <adachristine18@gmail.com> | 2021-04-11 18:49:06 +0000 |
| commit | 397e32d7d93b078edc3e96441e6ff7e53176980f (patch) | |
| tree | 23dc46e2366c47b5feba3e5eec17edb989285730 /kernel/entry_efi.c | |
| parent | 2f0ea03aef728ec0cb56ae8e32dcc5da4c20283d (diff) | |
renamed parse_efi_memmap() to efi_memory_init(). removed the testing loop for alloc_page()
Diffstat (limited to 'kernel/entry_efi.c')
| -rw-r--r-- | kernel/entry_efi.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/kernel/entry_efi.c b/kernel/entry_efi.c index 01a5f93..7d8e058 100644 --- a/kernel/entry_efi.c +++ b/kernel/entry_efi.c @@ -13,8 +13,12 @@ static noreturn void hang(void); -static void parse_efi_memmap(struct efi_memory_map_data *map) +static void efi_memory_init(struct efi_memory_map_data *map) { + // FIXME: bad girl shit: overwriting on aliased pointers. + // this is a temporary solution to shortcomings with + // loader boot data. it's sort-of OK because the memory_range struct + // is smaller than EFI_MEMORY_DESCRIPTOR. it's still not good. struct memory_range *ranges = (struct memory_range *)map->data; int entries = map->size / map->descsize; @@ -60,13 +64,7 @@ noreturn void kernel_entry(struct efi_boot_data *data) cpu_init(); serial_init(); kputs("<hacker voice> i'm in\r\n"); - parse_efi_memmap(data->memory_map); - for (int i = 0; i < 10; i++) - { - phys_addr_t page = page_alloc(); - (void)page; - page_free(page); - } + efi_memory_init(data->memory_map); hang(); } |
