Home | History | Annotate | Line # | Download | only in bootx64
      1 /*	$NetBSD: multiboot64.S,v 1.1 2019/09/13 02:19:46 manu Exp $ */
      2 #include <machine/asm.h>
      3 #include <machine/specialreg.h>
      4 
      5 #define CODE_SEGMENT    0x08
      6 #define DATA_SEGMENT    0x10
      7 
      8 	.align	16
      9 	.globl _C_LABEL(multiboot64)
     10 _C_LABEL(multiboot64):
     11 	.quad 0
     12 
     13 	.globl _C_LABEL(multiboot64_size)
     14 _C_LABEL(multiboot64_size):
     15 	.long multiboot64_end - _C_LABEL(multiboot64_start)
     16 
     17 	.text
     18 	.p2align 4,,15
     19 
     20 /*
     21  * multiboot64(entry %rdi, multiboot2_info %rsi, magic %rdx);
     22  */
     23 ENTRY(multiboot64_start)
     24 start:
     25 
     26         movq    %rdx, %rax
     27 	movq    %rsi, %rbx
     28 	jmp    *%rdi
     29 multiboot64_end:
     30