summaryrefslogtreecommitdiff
path: root/src/sys/arch/i386/locore.S
blob: c1eb715146047de67b49f1080e27eaf633e8e9c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
    .set MAGIC, 0xe85250d6
    .set ARCH,  0x00            // i386, protected mode
    .set LEN, hdr_end - hdr_start
    .set CHECKSUM, 0x100000000 - (0xe85250d6 + 0 + (hdr_end - hdr_start))

    .section .multiboot
    .align 4
hdr_start:
    .long MAGIC
    .long ARCH
    .long LEN
    .long CHECKSUM
hdr_end:

fbtag_start:
    .word 5                         // Type
    .word 1                         // Flags
    .long fbtag_end - fbtag_start   // Length
    .long 800                       // Width
    .long 600                       // Height
    .long 32                        // Depth
fbtag_end:

    .align 8
endtag:
    .word 0
    .word 0
    .word 8

    .text
    .code32
    .globl _start
_start:
    cli
    mov stack_bottom, %esp
    push %ebx
    push %eax
    jmp .

    .section .bss
stack_bottom:
    .fill 4096 * 16, 0