boot: Add EFISTUB and refactor boot protocols
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
// SPDX-License-Identifier: ISC
|
||||
|
||||
#include <zinnia/assert.h>
|
||||
#include <zinnia/boot.h>
|
||||
#include <zinnia/compiler.h>
|
||||
#include <zinnia/fdt.h>
|
||||
#include <zinnia/init.h>
|
||||
|
||||
[[__section(".boot.info")]]
|
||||
struct boot_info boot_info;
|
||||
|
||||
[[__init]]
|
||||
void kernel_entry() {
|
||||
kernel_early_init();
|
||||
|
||||
assert(boot_info.num_mem_maps, "Loader did not provide a memory map");
|
||||
|
||||
if (boot_info.dtb)
|
||||
boot_info.dtb_size = fdt_read_u32((const uint8_t*)(boot_info.hhdm_base + boot_info.dtb) + 4);
|
||||
|
||||
kernel_main(&boot_info);
|
||||
}
|
||||
Reference in New Issue
Block a user