Subversion Repositories HelenOS

Rev

Rev 4346 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4346 Rev 4347
Line 29... Line 29...
29
 
29
 
30
#include <arch/boot/boot.h>
30
#include <arch/boot/boot.h>
31
#include <arch/boot/memmap.h>
31
#include <arch/boot/memmap.h>
32
#include <arch/mm/page.h>
32
#include <arch/mm/page.h>
33
#include <arch/pm.h>
33
#include <arch/pm.h>
-
 
34
#include <arch/cpuid.h>
34
 
35
 
35
#define START_STACK (BOOT_OFFSET - BOOT_STACK_SIZE)
36
#define START_STACK (BOOT_OFFSET - BOOT_STACK_SIZE)
36
 
37
 
37
.section K_TEXT_START, "ax"
38
.section K_TEXT_START, "ax"
38
 
39
 
Line 65... Line 66...
65
	multiboot_meeting_point:
66
	multiboot_meeting_point:
66
	
67
	
67
	movl %eax, grub_eax         # save parameters from GRUB
68
	movl %eax, grub_eax         # save parameters from GRUB
68
	movl %ebx, grub_ebx
69
	movl %ebx, grub_ebx
69
	
70
	
70
	xorl %eax, %eax
71
	movl $(INTEL_CPUID_LEVEL), %eax
71
	cpuid
72
	cpuid
72
	cmp $0x0, %eax              # any function > 0?
73
	cmp $0x0, %eax              # any function > 0?
73
	jbe pse_unsupported
74
	jbe pse_unsupported
-
 
75
	
74
	movl $0x1, %eax             # basic function code 1
76
	movl $(INTEL_CPUID_STANDARD), %eax
75
	cpuid
77
	cpuid
76
	bt $3, %edx                 # test if PSE is supported
78
	bt $(INTEL_PSE), %edx
77
	jc pse_supported
79
	jc pse_supported
78
	
80
	
79
	pse_unsupported:
81
	pse_unsupported:
80
		movl $pse_msg, %esi
82
		movl $pse_msg, %esi
81
		jmp error_halt
83
		jmp error_halt
82
	
84
	
83
	pse_supported:
85
	pse_supported:
-
 
86
	
-
 
87
	bt $(INTEL_SEP), %edx
-
 
88
	jc sep_supported
-
 
89
	
-
 
90
		movl $sep_msg, %esi
-
 
91
		jmp error_halt
-
 
92
	
-
 
93
	sep_supported:
84
 
94
 
85
#include "vesa_prot.inc"
95
#include "vesa_prot.inc"
86
 
96
 
87
	# map kernel and turn paging on
97
	# map kernel and turn paging on
88
	call map_kernel
98
	call map_kernel
Line 211... Line 221...
211
grub_ebx:
221
grub_ebx:
212
	.long 0
222
	.long 0
213
 
223
 
214
pse_msg:
224
pse_msg:
215
	.asciz "Page Size Extension not supported. System halted."
225
	.asciz "Page Size Extension not supported. System halted."
-
 
226
 
-
 
227
sep_msg:
-
 
228
	.asciz "SYSENTER/SYSEXIT not supported. System halted."