Subversion Repositories HelenOS

Rev

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

Rev 2221 Rev 2222
Line 61... Line 61...
61
	movw %cx, %ss
61
	movw %cx, %ss
62
	
62
	
63
	jmpl $selector(KTEXT_DES), $multiboot_meeting_point
63
	jmpl $selector(KTEXT_DES), $multiboot_meeting_point
64
	multiboot_meeting_point:
64
	multiboot_meeting_point:
65
	
65
	
66
	pushl %ebx							# save parameters from GRUB
66
	movl %eax, grub_eax					# save parameters from GRUB
67
	pushl %eax
67
	movl %ebx, grub_ebx
68
	
68
	
69
	xorl %eax, %eax  
69
	xorl %eax, %eax  
70
 	cpuid
70
 	cpuid
71
 	cmp $0x0, %eax						# any function > 0?
71
 	cmp $0x0, %eax						# any function > 0?
72
	jbe pse_unsupported
72
	jbe pse_unsupported
Line 102... Line 102...
102
	mov %bx, KA2PA(vesa_bpp)
102
	mov %bx, KA2PA(vesa_bpp)
103
#endif	
103
#endif	
104
	
104
	
105
	call map_kernel							# map kernel and turn paging on
105
	call map_kernel							# map kernel and turn paging on
106
	
106
	
107
	popl %eax
107
	movl grub_eax, %eax
108
	popl %ebx
108
	movl grub_ebx, %ebx
109
	cmpl $MULTIBOOT_LOADER_MAGIC, %eax				# compare GRUB signature
109
	cmpl $MULTIBOOT_LOADER_MAGIC, %eax				# compare GRUB signature
110
	je valid_boot
110
	je valid_boot
111
		
111
		
112
		xorl %ecx, %ecx							# no memory size or map available
112
		xorl %ecx, %ecx							# no memory size or map available
113
		movl %ecx, e801memorysize
113
		movl %ecx, e801memorysize
Line 479... Line 479...
479
	jz 8b						# Force relative jump
479
	jz 8b						# Force relative jump
480
	
480
	
481
 
481
 
482
.code32
482
.code32
483
vesa_init_protect:
483
vesa_init_protect:
484
	popl %esp
-
 
485
 
-
 
486
	movw $selector(KDATA_DES), %cx
484
	movw $selector(KDATA_DES), %cx
487
	movw %cx, %es
485
	movw %cx, %es
488
	movw %cx, %fs
486
	movw %cx, %fs
489
	movw %cx, %gs
487
	movw %cx, %gs
490
	movw %cx, %ds					# kernel data + stack
488
	movw %cx, %ds					# kernel data + stack
491
	movw %cx, %ss
489
	movw %cx, %ss
492
	
490
	
-
 
491
	movl $START_STACK, %esp			# initialize stack pointer
-
 
492
 
493
	jmpl $selector(KTEXT_DES), $vesa_meeting_point
493
	jmpl $selector(KTEXT_DES), $vesa_meeting_point
494
 
494
 
495
.align 4
495
.align 4
496
e_vesa_init:
496
e_vesa_init:
497
#endif	
497
#endif	
Line 500... Line 500...
500
 
500
 
501
.align 4096
501
.align 4096
502
page_directory:
502
page_directory:
503
	.space 4096, 0
503
	.space 4096, 0
504
 
504
 
-
 
505
grub_eax:
-
 
506
	.long 0
-
 
507
 
-
 
508
grub_ebx:
-
 
509
	.long 0
-
 
510
 
505
pse_msg:
511
pse_msg:
506
	.ascii "Page Size Extension not supported. System halted.\0"
512
	.ascii "Page Size Extension not supported. System halted.\0"