23 lines
513 B
C
23 lines
513 B
C
// 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);
|
|
}
|