From bff63a4337eb3388617d230970c5eb2684d6a215 Mon Sep 17 00:00:00 2001 From: Ada Christine Date: Sun, 19 Dec 2021 01:16:51 +0000 Subject: i don't know what i'm doing anymore --- api/kernel/component.h | 10 ++++++++++ api/kernel/entry.h | 6 +----- api/loader/efi/shim.h | 4 +++- 3 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 api/kernel/component.h (limited to 'api') diff --git a/api/kernel/component.h b/api/kernel/component.h new file mode 100644 index 0000000..d795283 --- /dev/null +++ b/api/kernel/component.h @@ -0,0 +1,10 @@ +#pragma once + +extern char kc_image_base; +extern char kc_text_begin; +extern char kc_text_end; +extern char kc_rodata_begin; +extern char kc_rodata_end; +extern char kc_data_begin; +extern char kc_data_end; + diff --git a/api/kernel/entry.h b/api/kernel/entry.h index d119ca1..d1a6ee0 100644 --- a/api/kernel/entry.h +++ b/api/kernel/entry.h @@ -1,8 +1,4 @@ #pragma once -#define KERNEL_ENTRY_STACK_SIZE 0x4000 -#define KERNEL_ENTRY_STACK_HEAD (void *)0xffffffffff000000 -#define KERNEL_ENTRY_STACK_BASE ((char *)KERNEL_ENTRY_STACK_HEAD - KERNEL_ENTRY_STACK_SIZE) - -typedef void (*kernel_entry_func)(void *data); +typedef int (*kc_entry_func)(void *parameters); diff --git a/api/loader/efi/shim.h b/api/loader/efi/shim.h index 9421cc3..0255361 100644 --- a/api/loader/efi/shim.h +++ b/api/loader/efi/shim.h @@ -16,7 +16,6 @@ struct efi_loader_image { CHAR16 *path; - EFI_HANDLE image_handle; EFI_SYSTEM_TABLE *system_table; EFI_FILE_PROTOCOL *root; EFI_FILE_PROTOCOL *file; @@ -32,6 +31,9 @@ typedef EFI_STATUS (*efi_page_free_func)(EFI_PHYSICAL_ADDRESS base, UINTN size); struct efi_loader_interface { + EFI_HANDLE image_handle; + EFI_SYSTEM_TABLE *system_table; + efi_page_alloc_func page_alloc; efi_page_free_func page_free; -- cgit v1.3.1-1-g115d