Index: kernel/arch/amd64/src/boot/boot.S
===================================================================
--- kernel/arch/amd64/src/boot/boot.S	(revision 4f42d52e33ada8d9034f22f9f731bb5660569488)
+++ kernel/arch/amd64/src/boot/boot.S	(revision 4cc2dddec0731c6f01a0f290b358ad6fbd7e81f4)
@@ -1,3 +1,3 @@
-#
+
 # Copyright (c) 2005 Ondrej Palkovsky
 # Copyright (c) 2006 Martin Decky
@@ -76,18 +76,49 @@
 	# the Default operand size must not be 1 when entering long mode
 	
-	movl $0x80000000, %eax  
+	movl $(INTEL_CPUID_EXTENDED), %eax  
  	cpuid
- 	cmp $0x80000000, %eax						# any function > 80000000h?
-	jbe long_mode_unsupported
-	movl $(AMD_CPUID_EXTENDED), %eax			# Extended function code 80000001
+ 	cmp $(INTEL_CPUID_EXTENDED), %eax
+	ja extended_cpuid_supported
+		
+		movl $extended_cpuid_msg, %esi
+		jmp error_halt
+	
+	extended_cpuid_supported:
+	
+	movl $(AMD_CPUID_EXTENDED), %eax
 	cpuid
-	bt $29, %edx								# Test if long mode is supported.
+	bt $(AMD_EXT_LONG_MODE), %edx
  	jc long_mode_supported
-
-	long_mode_unsupported:
+		
 		movl $long_mode_msg, %esi
 		jmp error_halt
-	
+
 	long_mode_supported:
+	
+	bt $(AMD_EXT_NOEXECUTE), %edx
+	jc noexecute_supported
+	
+		movl $noexecute_msg, %esi
+		jmp error_halt
+	
+	noexecute_supported:
+	
+	movl $(INTEL_CPUID_STANDARD), %eax
+	cpuid
+	bt $(INTEL_FXSAVE), %edx
+ 	jc fx_supported
+	
+		movl $fx_msg, %esi
+		jmp error_halt
+	
+	fx_supported:
+	
+	bt $(INTEL_SSE2), %edx
+ 	jc sse2_supported
+	
+		movl $sse2_msg, %esi
+		jmp error_halt
+	
+	sse2_supported:
 	
 #ifdef CONFIG_FB
@@ -112,5 +143,5 @@
 #endif	
 	
-	# Enable 64-bit page transaltion entries - CR4.PAE = 1.
+	# Enable 64-bit page translation entries - CR4.PAE = 1.
 	# Paging is not enabled until after long mode is enabled
 	
@@ -128,8 +159,8 @@
 	movl $EFER_MSR_NUM, %ecx	# EFER MSR number
 	rdmsr						# Read EFER
-	btsl $AMD_LME_FLAG, %eax	# Set LME=1
+	btsl $AMD_LME_FLAG, %eax	# Set LME = 1
 	wrmsr						# Write EFER
 	
-	# Enable paging to activate long mode (set CR0.PG=1)
+	# Enable paging to activate long mode (set CR0.PG = 1)
 	
 	movl %cr0, %eax
@@ -636,4 +667,12 @@
 	.long 0
 
+extended_cpuid_msg:
+	.asciz "Extended CPUID not supported. System halted."
 long_mode_msg:
 	.asciz "64 bit long mode not supported. System halted."
+noexecute_msg:
+	.asciz "No-execute pages not supported. System halted."
+fx_msg:
+	.asciz "FXSAVE/FXRESTORE instructions not supported. System halted."
+sse2_msg:
+	.asciz "SSE2 instructions not supported. System halted."
