m1n1/src/kboot.h

26 lines
734 B
C
Raw Normal View History

/* SPDX-License-Identifier: MIT */
#ifndef KBOOT_H
#define KBOOT_H
#include "types.h"
struct kernel_header {
u32 code[2]; /* Executable code */
u64 text_offset; /* Image load offset, little endian */
u64 image_size; /* Effective Image size, little endian */
u64 flags; /* kernel flags, little endian */
u64 res2; /* reserved */
u64 res3; /* reserved */
u64 res4; /* reserved */
u32 magic; /* Magic number, little endian, "ARM\x64" */
u32 res5; /* reserved (used for PE COFF offset) */
};
void kboot_set_initrd(void *start, size_t size);
void kboot_set_bootargs(const char *ba);
int kboot_prepare_dt(void *fdt);
int kboot_boot(void *kernel);
#endif