Commit 07ce05eaa93941648721973375f1c11874122d45
1 parent
b324e814
fast Linux boot support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@614 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
32 additions
and
0 deletions
linux_boot.S
0 → 100644
| 1 | +/* | ||
| 2 | + * QEMU Boot sector to launch a preloaded Linux kernel | ||
| 3 | + * Copyright (c) 2004 Fabrice Bellard | ||
| 4 | + */ | ||
| 5 | + | ||
| 6 | +#define LOAD_SEG 0x9000 | ||
| 7 | + | ||
| 8 | +.code16 | ||
| 9 | +.text | ||
| 10 | + .globl linux_boot_start | ||
| 11 | + .globl linux_boot_end | ||
| 12 | + | ||
| 13 | +linux_boot_start: | ||
| 14 | + cli | ||
| 15 | + cld | ||
| 16 | + mov $LOAD_SEG, %ax | ||
| 17 | + mov %ax, %ds | ||
| 18 | + mov %ax, %es | ||
| 19 | + mov %ax, %fs | ||
| 20 | + mov %ax, %gs | ||
| 21 | + mov %ax, %ss | ||
| 22 | + mov $0x8ffe, %sp | ||
| 23 | + ljmp $LOAD_SEG + 0x20, $0 | ||
| 24 | + | ||
| 25 | +1: | ||
| 26 | + .fill 510 - (1b - linux_boot_start), 1, 0 | ||
| 27 | + | ||
| 28 | + /* boot sector signature */ | ||
| 29 | + .byte 0x55 | ||
| 30 | + .byte 0xaa | ||
| 31 | + | ||
| 32 | +linux_boot_end: |