aboutsummaryrefslogtreecommitdiffstats
path: root/pc-bios/linux_boot.S
diff options
context:
space:
mode:
Diffstat (limited to 'pc-bios/linux_boot.S')
-rw-r--r--pc-bios/linux_boot.S29
1 files changed, 29 insertions, 0 deletions
diff --git a/pc-bios/linux_boot.S b/pc-bios/linux_boot.S
new file mode 100644
index 0000000..22fcd4b
--- /dev/null
+++ b/pc-bios/linux_boot.S
@@ -0,0 +1,29 @@
+/*
+ * QEMU Boot sector to launch a preloaded Linux kernel
+ * Copyright (c) 2004 Fabrice Bellard
+ */
+
+#define LOAD_SEG 0x9000
+
+.code16
+.text
+ .globl _start
+
+_start:
+ 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
+
+1:
+ .fill 510 - (1b - _start), 1, 0
+
+ /* boot sector signature */
+ .byte 0x55
+ .byte 0xaa