-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.S
More file actions
40 lines (34 loc) · 799 Bytes
/
start.S
File metadata and controls
40 lines (34 loc) · 799 Bytes
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
/* start.S - multiboot2 entry for 32-bit mode */
/* Multiboot2 header */
.section .multiboot
.align 8
multiboot2_header_start:
.long 0xE85250D6 /* magic */
.long 0 /* architecture (i386) */
.long 24 /* header length (24 bytes total) */
.long 0x17ADAF12 /* checksum (calculated manually) */
/* end tag */
.align 8
.short 0 /* type */
.short 0 /* flags */
.long 8 /* size */
multiboot2_header_end:
/* Start in 32-bit mode */
.section .text
.global _start
.type _start, @function
_start:
cli
movl $stack_top, %esp
cld
call kernel_main
.hang:
cli
hlt
jmp .hang
/* Stack */
.section .bss
.align 16
stack_bottom:
.skip 16384
stack_top: