Re: SYSENTER based syscalls patch, 2.1.105, RFC

Gabriel Paubert (paubert@iram.es)
Wed, 17 Jun 1998 12:34:50 +0200 (METDST)


On 15 Jun 1998, David Wragg wrote:

> <mingo@hal.cobaltmicro.com> writes:
> > the attached patch implements SYSENTER/SYSEXIT based system calls for P6
> > type x86 CPUs that support it. (tested only on PII, - K6, PPro anyone?)
>
> This is great stuff.
>
> However, running the test program locks my PPro (stepping 7) machine
> solid when it tries the SYSENTER test. The kernel is 2.1.106, with the
> patch, and built using egcs-1.0.3a. Is this just me, or does everyone
> get this from PPros?
>

Intel's AP485 (Intel Processor Identification and the CPUID Instruction)
shows that on a PPro this feature is definitely a bug:

3.5. SYSENTER/SYSEXIT

SEP Features Bit The presence of this facility is indicated by the
SYSENTER Present (SEP) bit 11 of CPUID. An operating system that detects
the presence of the SEP bit must also qualify the processor family and
model to ensure that the SYSENTER/SYSEXIT instructions are actually
present:

If (CPUID SEP bit is set) {
If (Family == 6) AND (Model < 3) AND (Stepping< 3) {
THEN Fast System Call is NOT supported }
ELSE Fast System Call is supported }

The Pentium Pro processor (Model = 1) returns a set SEP CPUID feature bit,
but should not be used by software.

> Where was SYSENTER/SYSEXIT documented, by the way? Is it in
> Intel's PII operating system writer's guide?

Not AFAIK, if you want to investigate, a good starting point is:

<http://www.sandpile.org/80x86/appendix.shtml>

(hint: follow the links to the AMD version called SYSCALL/SYSRET).

Gabriel

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu