Subversion Repositories HelenOS

Rev

Rev 232 | Rev 279 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 232 Rev 267
Line 48... Line 48...
48
.code16
48
.code16
49
	cli
49
	cli
50
	xorw %ax,%ax
50
	xorw %ax, %ax
51
	movw %ax,%ds
51
	movw %ax, %ds
52
 
52
 
53
	lgdt gdtr			# initialize Global Descriptor Table register
53
	lgdt ap_bootstrap_gdtr	# initialize Global Descriptor Table register
54
	
54
	
55
	movl %cr0,%eax
55
	movl %cr0, %eax
56
	orl $1,%eax
56
	orl $1, %eax
57
	movl %eax,%cr0			# switch to protected mode
57
	movl %eax, %cr0			# switch to protected mode
58
	jmpl $KTEXT,$jump_to_kernel
58
	jmpl $KTEXT, $jump_to_kernel
-
 
59
	
59
jump_to_kernel:
60
jump_to_kernel:
60
.code32
61
.code32
61
	movw $KDATA,%ax
62
	movw $KDATA, %ax
62
	movw %ax,%ds
63
	movw %ax, %ds
63
	movw %ax,%es
64
	movw %ax, %es
Line 66... Line 67...
66
	movl (%eax),%esp
67
	movl (%eax), %esp
67
	subl $0x80000000,%esp		# KA2PA(ctx.sp)
68
	subl $0x80000000, %esp			# KA2PA(ctx.sp)
68
 
69
 
69
	call map_kernel			# map kernel and turn paging on
70
	call map_kernel					# map kernel and turn paging on
70
 
71
	
-
 
72
	movb $0xd1, %al					# enable A20 using the keyboard controller
-
 
73
	outb %al, $0x64
-
 
74
	movb $0xdf, %al
-
 
75
	outb %al, $0x60
-
 
76
 
71
	jmpl $KTEXT,$main_ap
77
	jmpl $KTEXT, $main_ap
72
 
78
 
73
#endif /* __SMP__ */
79
#endif /* __SMP__ */