summaryrefslogtreecommitdiff
path: root/kernel/init/entry.asm
blob: afb04348934cddf582066d118a22aa14ea9afc79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[BITS 32]

EXTERN KernelEntry
GLOBAL StartOfKernelImage
GLOBAL IdleLoop
                
;;; 
;;; I put "entry.o" first in line at the linker so I am sure this function
;;; gets put first in the kernel image.  This is good because:
;;;
;;;     1. We know there is valid code at 0x00010000 when we jump here
;;;     2. We can use the address of this function as the start of image
;;;     3. We don't have to make sure main (or KernelEntry or whatever) 
;;;        is always the first function in main.c
;;; 
StartOfKernelImage:
        jmp KernelEntry
        ret

IdleLoop:
        sti
        hlt
        jmp IdleLoop