Subversion Repositories HelenOS

Rev

Rev 174 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 174 Rev 176
Line 38... Line 38...
38
# time. So we can just load the respective table registers and
38
# time. So we can just load the respective table registers and
39
# switch to protected mode.
39
# switch to protected mode.
40
#
40
#
41
kernel_image_start:
41
kernel_image_start:
42
	cli
42
	cli
43
	call memmap_arch_init
-
 
44
	xorw %ax,%ax
43
	xorw %ax,%ax
45
	movw %ax,%ds
44
	movw %ax,%ds
-
 
45
	movw %ax,%ss			# initialize stack segment register
-
 
46
	movl $0x7c00,%esp		# initialize stack pointer
-
 
47
	
-
 
48
	call memmap_arch_init
-
 
49
	
46
	lgdt gdtr
50
	lgdt gdtr
47
	movl %cr0,%eax
51
	movl %cr0,%eax
48
	orl $0x1,%eax
52
	orl $0x1,%eax
49
	movl %eax,%cr0
53
	movl %eax,%cr0
50
	jmpl $8,$meeting_point
54
	jmpl $8,$meeting_point
Line 55... Line 59...
55
	movw %ax,%es
59
	movw %ax,%es
56
	movw %ax,%gs
60
	movw %ax,%gs
57
	movw %ax,%fs
61
	movw %ax,%fs
58
	movw %ax,%ds			# kernel data + stack
62
	movw %ax,%ds			# kernel data + stack
59
	movw %ax,%ss
63
	movw %ax,%ss
60
	movl $0x7c00,%esp
-
 
61
 
64
 
62
	lidt idtr
65
	lidt idtr
63
 
66
 
64
	call map_kernel
67
	call map_kernel
65
 
68