summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorAda Christine <adachristine18@gmail.com>2021-12-19 01:16:51 +0000
committerAda Christine <adachristine18@gmail.com>2021-12-19 01:16:51 +0000
commitbff63a4337eb3388617d230970c5eb2684d6a215 (patch)
treef40891f45918b23dac0f31888142136434c7fc8c /api
parentd5f485a4f6801f58cbb2bc9d8e80c955c79ff044 (diff)
i don't know what i'm doing anymore
Diffstat (limited to 'api')
-rw-r--r--api/kernel/component.h10
-rw-r--r--api/kernel/entry.h6
-rw-r--r--api/loader/efi/shim.h4
3 files changed, 14 insertions, 6 deletions
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;