From 3b4d7c53fa6ee21c6d2dea9cd9f307f6bb24abb9 Mon Sep 17 00:00:00 2001 From: Andy-Python-Programmer Date: Tue, 10 Aug 2021 16:22:16 +1000 Subject: [PATCH] Implement the "stivale2_struct_tag_kernel_file_v2" tag Signed-off-by: Andy-Python-Programmer --- stage23/protos/stivale2.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/stage23/protos/stivale2.c b/stage23/protos/stivale2.c index bc6d4592..945f962c 100644 --- a/stage23/protos/stivale2.c +++ b/stage23/protos/stivale2.c @@ -218,6 +218,19 @@ failed_to_load_header_section: append_tag(&stivale2_struct, (struct stivale2_tag *)tag); } + ////////////////////////////////////////////// + // Create kernel file v2 struct tag + ////////////////////////////////////////////// + { + struct stivale2_struct_tag_kernel_file_v2 *tag = ext_mem_alloc(sizeof(struct stivale2_struct_tag_kernel_file_v2)); + + tag->tag.identifier = STIVALE2_STRUCT_TAG_KERNEL_FILE_V2_ID; + tag->kernel_file = REPORTED_ADDR((uint64_t)(uintptr_t)kernel); + tag->kernel_size = kernel_file->size; + + append_tag(&stivale2_struct, (struct stivale2_tag *)tag); + } + ////////////////////////////////////////////// // Create kernel slide struct tag //////////////////////////////////////////////