multiboot64.S revision 1.1
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 */ 23ENTRY(multiboot64_start) 24start: 25 26 movq %rdx, %rax 27 movq %rsi, %rbx 28 jmp *%rdi 29multiboot64_end: 30