summaryrefslogtreecommitdiff
path: root/boot/efi/start.c
diff options
context:
space:
mode:
Diffstat (limited to 'boot/efi/start.c')
-rw-r--r--boot/efi/start.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/boot/efi/start.c b/boot/efi/start.c
index f1f4ec7..fc44377 100644
--- a/boot/efi/start.c
+++ b/boot/efi/start.c
@@ -28,8 +28,18 @@ EFI_STATUS _start(EFI_HANDLE handle, EFI_SYSTEM_TABLE *system_table)
EFI_GUID lip_guid = EFI_LOADED_IMAGE_PROTOCOL_GUID;
EFI_LOADED_IMAGE_PROTOCOL *lip = efi_get_protocol(efi_context->handle, &lip_guid);
+ uint64_t text_base;
+ uint64_t data_base;
+
printf("DEBUG: EFI_LOADED_IMAGE_PROTOCOL { .ImageBase = %p }\n", lip->ImageBase);
__asm__ volatile ("movq %0, %%rax" :: "r"(lip->ImageBase) : "rax");
+ __asm__ volatile (
+ "lea .text, %0\n"
+ "lea .data, %1\n"
+ : "=r"(text_base), "=r"(data_base)
+ :
+ );
+ printf("DEBUG: .text %p .data %p\n", text_base, data_base);
bool wait = true;
while(wait)