diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-02-16 21:55:09 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-02-16 21:55:09 +0000 |
commit | 07ce05eaa93941648721973375f1c11874122d45 (patch) | |
tree | 6b7d33aa0cefea4ef200996dcdc69039f05a1d11 /linux_boot.S | |
parent | b324e814a9a7114ba2d753de133cdc75a88f9860 (diff) |
fast Linux boot support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@614 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux_boot.S')
-rw-r--r-- | linux_boot.S | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/linux_boot.S b/linux_boot.S new file mode 100644 index 0000000000..353052c976 --- /dev/null +++ b/linux_boot.S @@ -0,0 +1,32 @@ +/* + * QEMU Boot sector to launch a preloaded Linux kernel + * Copyright (c) 2004 Fabrice Bellard + */ + +#define LOAD_SEG 0x9000 + +.code16 +.text + .globl linux_boot_start + .globl linux_boot_end + +linux_boot_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 - linux_boot_start), 1, 0 + + /* boot sector signature */ + .byte 0x55 + .byte 0xaa + +linux_boot_end: |