Parse ELF and load kernel, specify mem types

* Very bare-bones ELF parsing to load the kernel
* Custom memory type values for allocated memory
This commit is contained in:
Justin C. Miller
2020-05-09 21:25:45 -07:00
parent f78a99927a
commit 9aa749e877
9 changed files with 212 additions and 205 deletions

View File

@@ -1,11 +1,16 @@
#pragma once
#include "kernel_args.h"
namespace boot {
namespace loader {
kernel::entrypoint load_elf(const void *data, size_t size, uefi::boot_services *bs);
struct loaded_elf
{
void *data;
uintptr_t vaddr;
uintptr_t entrypoint;
};
loaded_elf load(const void *data, size_t size, uefi::boot_services *bs);
} // namespace loader
} // namespace boot