Changeset c18e666 in mainline for kernel/arch/ia32/src/boot/boot.S


Ignore:
Timestamp:
2009-03-30T20:30:32Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0dd1d444
Parents:
18251cc
Message:

detect SYSENTER/SYSEXIT support on boot
(this serves as a hint for people who try to boot HelenOS on Bochs emulating plain Pentium,
unfortunatelly it also kills VirtualBox, as it does not support SYSENTER/SYSEXIT officially,
see http://www.virtualbox.org/ticket/1248)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/boot/boot.S

    r18251cc rc18e666  
    3232#include <arch/mm/page.h>
    3333#include <arch/pm.h>
     34#include <arch/cpuid.h>
    3435
    3536#define START_STACK (BOOT_OFFSET - BOOT_STACK_SIZE)
     
    6869        movl %ebx, grub_ebx
    6970       
    70         xorl %eax, %eax
     71        movl $(INTEL_CPUID_LEVEL), %eax
    7172        cpuid
    7273        cmp $0x0, %eax              # any function > 0?
    7374        jbe pse_unsupported
    74         movl $0x1, %eax             # basic function code 1
     75       
     76        movl $(INTEL_CPUID_STANDARD), %eax
    7577        cpuid
    76         bt $3, %edx                 # test if PSE is supported
     78        bt $(INTEL_PSE), %edx
    7779        jc pse_supported
    7880       
     
    8284       
    8385        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:
    8494
    8595#include "vesa_prot.inc"
     
    214224pse_msg:
    215225        .asciz "Page Size Extension not supported. System halted."
     226
     227sep_msg:
     228        .asciz "SYSENTER/SYSEXIT not supported. System halted."
Note: See TracChangeset for help on using the changeset viewer.