/* * QEMU Boot sector to launch a preloaded Linux kernel * Copyright (c) 2004 Fabrice Bellard */ // MetalSVM reuses the same routine to launch its preloaded kernel #define LOAD_SEG 0x9000 // define CONFIG_MCEMU_DEBUG 1 .code16 .text .globl _start .org 0x0000 .ascii "MetalSVM Boot sector" _realstart: #ifdef CONFIG_MCEMU_DEBUG movl $27, %eax movw $0xff8, %dx outl %eax, %dx movl $0x0010, %eax movw $0xffc, %dx outl %eax, %dx #endif cli cld mov $LOAD_SEG, %ax mov %ax, %ds mov %ax, %es mov %ax, %fs mov %ax, %gs mov %ax, %ss mov $0x8ffe, %sp ljmp $LOAD_SEG + 0x20, $0 .org 0x0ff0 _start: jmp _realstart _end: .fill 4096 - $, 1, 0