aboutsummaryrefslogtreecommitdiff
path: root/stand/efi/loader/arch/amd64/amd64_tramp.S
diff options
context:
space:
mode:
Diffstat (limited to 'stand/efi/loader/arch/amd64/amd64_tramp.S')
-rw-r--r--stand/efi/loader/arch/amd64/amd64_tramp.S12
1 files changed, 12 insertions, 0 deletions
diff --git a/stand/efi/loader/arch/amd64/amd64_tramp.S b/stand/efi/loader/arch/amd64/amd64_tramp.S
index c102d9243589..877705407f92 100644
--- a/stand/efi/loader/arch/amd64/amd64_tramp.S
+++ b/stand/efi/loader/arch/amd64/amd64_tramp.S
@@ -30,6 +30,9 @@
#include <machine/asmacros.h>
+#define ASM_FILE
+#include "multiboot2.h"
+
.text
.globl amd64_tramp
@@ -58,6 +61,15 @@ amd64_tramp:
ALIGN_TEXT
amd64_tramp_end:
+/* void multiboot2_exec(uint64_t entry, uint64_t multiboot_info, uint64_t stack) */
+ .globl multiboot2_exec
+multiboot2_exec:
+ movq %rdx,%rsp
+ pushq %rdi
+ movq %rsi,%rbx
+ movq $MULTIBOOT2_BOOTLOADER_MAGIC,%rax
+ ret
+
.data
.globl amd64_tramp_size
amd64_tramp_size: