Autodetect support for SYSENTER on ia32
|Reported by:||jermar||Owned by:|
|Blocker for:||Depends on:|
As of now, HelenOS will not boot if SYSENTER is not supported by the processor. (This is currently preventing us to run on VirtualBox?).
The kernel supports both the SYSENTER and INT syscall mechanisms, as well as libc, there just need to be some minor changes done:
- the kernel needs to initialize the SYSENTER MSR's only if it detects that the CPU supports SYSENTER using the CPUID instruction
- the libc needs to detect whether SYSENTER is supported, again using the CPUID instruction, and setup the syscall mechanism for the "fast" syscall path accordingly; this can be done by using some sort of a function pointer or code patching