Revision 07ce05ea

b/linux_boot.S
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:

Also available in: Unified diff