metalsvm/tools/reset_vector.S
Stefan Lankes 93d9540785 switch to the standard gcc
Found a bug in Intel's cross-compiler.
=> Switch to the standard gcc and use the flags "-march=i586 -mtune=i586"
=> Code runs on all Pentium (I) systems
2012-09-12 00:46:52 -07:00

41 lines
730 B
ArmAsm

/*
* 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