From 5ff54a875642962fc857cee00bde17f9a465f1fa Mon Sep 17 00:00:00 2001 From: Bradley Morgan Date: Sun, 4 Oct 2026 10:42:10 +0000 Subject: tashaboot: arm64 bootloader holy shit it's here, Tashaboot, based from arm arm, enjoy reading this masterpiece Signed-off-by: Bradley Morgan --- include/boot.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 include/boot.h (limited to 'include/boot.h') 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 +#include + +/* + * 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 -- cgit v1.2.3