diff options
| author | Bradley Morgan <brads@mainlining.org> | 2026-10-04 10:42:10 +0000 |
|---|---|---|
| committer | Bradley Morgan <brads@mainlining.org> | 2026-10-04 10:46:46 +0000 |
| commit | 5ff54a875642962fc857cee00bde17f9a465f1fa (patch) | |
| tree | b265a12d538167c3bbb86b24118a7ad7a062fc74 /include/boot.h | |
holy shit it's here, Tashaboot, based from arm arm, enjoy
reading this masterpiece
Signed-off-by: Bradley Morgan <brads@mainlining.org>
Diffstat (limited to 'include/boot.h')
| -rw-r--r-- | include/boot.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/include/boot.h b/include/boot.h new file mode 100644 index 0000000..06b05d7 --- /dev/null +++ b/include/boot.h @@ -0,0 +1,33 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __BOOT_H +#define __BOOT_H + +#include <sys/types.h> +#include <stdint.h> + +/* + * payload loading and the arm64 boot protocol. See Documentation/ + * arch/arm64/booting.rst in the kernel tree for the contract this + * implements. + */ + +/* + * where an image landed after the loader placed it. ep is the first + * instruction executed, the whole image including its 64 byte header + * sits at load. + */ +struct tb_image { + uintptr_t load; /* image start in memory */ + uintptr_t ep; /* entry point */ + size_t size; /* total image size */ +}; + +/* common/image.c, the arm64 Image header math */ +int tb_image_setup(uintptr_t image, struct tb_image *img); + +/* common/load.c */ +int tb_load_raw(const char *fname, uintptr_t load_addr, size_t *sizep); +int tb_load_semihosting(const char *fname, uintptr_t load_addr, + struct tb_image *img); + +#endif |
