Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4194 → Rev 4195

/trunk/kernel/arch/ia32/include/cpuid.h
35,6 → 35,13
#ifndef KERN_ia32_CPUID_H_
#define KERN_ia32_CPUID_H_
 
#define INTEL_CPUID_LEVEL 0x00000000
#define INTEL_CPUID_STANDARD 0x00000001
#define INTEL_PSE 3
#define INTEL_SEP 11
 
#ifndef __ASM__
 
#include <arch/types.h>
 
typedef struct {
104,6 → 111,7
);
}
 
#endif /* !def __ASM__ */
#endif
 
/** @}
/trunk/kernel/arch/ia32/src/boot/boot.S
31,6 → 31,7
#include <arch/boot/memmap.h>
#include <arch/mm/page.h>
#include <arch/pm.h>
#include <arch/cpuid.h>
 
#define START_STACK (BOOT_OFFSET - BOOT_STACK_SIZE)
 
67,13 → 68,14
movl %eax, grub_eax # save parameters from GRUB
movl %ebx, grub_ebx
xorl %eax, %eax
movl $(INTEL_CPUID_LEVEL), %eax
cpuid
cmp $0x0, %eax # any function > 0?
jbe pse_unsupported
movl $0x1, %eax # basic function code 1
movl $(INTEL_CPUID_STANDARD), %eax
cpuid
bt $3, %edx # test if PSE is supported
bt $(INTEL_PSE), %edx
jc pse_supported
pse_unsupported:
81,6 → 83,14
jmp error_halt
pse_supported:
bt $(INTEL_SEP), %edx
jc sep_supported
movl $sep_msg, %esi
jmp error_halt
sep_supported:
 
#include "vesa_prot.inc"
 
213,3 → 223,6
 
pse_msg:
.asciz "Page Size Extension not supported. System halted."
 
sep_msg:
.asciz "SYSENTER/SYSEXIT not supported. System halted."