[kernel] Update kernel binary's header structure

The kernel's file header has not been verified for a long time. This
change returns file verification to the bootloader to make sure the ELF
loaded in position 0 is actually the kernel.
This commit is contained in:
Justin C. Miller
2021-05-28 14:44:13 -07:00
parent 910fde3b2c
commit 9fbbd8b954
6 changed files with 78 additions and 17 deletions

View File

@@ -38,5 +38,13 @@ load_program(
buffer data,
uefi::boot_services *bs);
/// Verify that a loaded ELF has the j6 kernel header
/// \arg program The program to check for a header
/// \arg bs Boot services
void
verify_kernel_header(
kernel::init::program &program,
uefi::boot_services *bs);
} // namespace loader
} // namespace boot