Subversion Repositories HelenOS

Rev

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

Rev 277 Rev 282
Line 52... Line 52...
52
.code16
52
.code16
53
	cli
53
	cli
54
	xorw %ax, %ax
54
	xorw %ax, %ax
55
	movw %ax, %ds
55
	movw %ax, %ds
56
 
56
 
57
	lgdt ap_bootstrap_gdtr_boot	# initialize Global Descriptor Table register
57
	lgdt real_bootstrap_gdtr_boot	# initialize Global Descriptor Table register
58
	
58
	
59
	movl %cr0, %eax
59
	movl %cr0, %eax
60
	orl $1, %eax
60
	orl $1, %eax
61
	movl %eax, %cr0			# switch to protected mode
61
	movl %eax, %cr0			# switch to protected mode
62
	
62
	
Line 94... Line 94...
94
	# At this point we are in compatibility mode
94
	# At this point we are in compatibility mode
95
	jmpl $gdtselector(KTEXT_DES), $start64
95
	jmpl $gdtselector(KTEXT_DES), $start64
96
 
96
 
97
.code64
97
.code64
98
start64:
98
start64:
99
	movq $ctx, %rax
-
 
100
	movq 0(%rax), %rsp
99
	movq (ctx), %rsp
101
	call main_ap   # never returns
100
	call main_ap   # never returns
102
	
101
	
103
.global ap_bootstrap_gdtr_boot
-
 
104
ap_bootstrap_gdtr_boot:
-
 
105
	.word gdtselector(GDT_ITEMS)
-
 
106
	.long KA2PA(gdt)
-
 
107
 
-
 
108
	
102
	
109
#endif /* __SMP__ */
103
#endif /* __SMP__ */