« Previous | Next » 

Revision 1b050077

ID1b050077d2d72b15c73257c13e2e46932786f7e2

Added by Andre Przywara over 14 years ago

target-i386: add RDTSCP support

RDTSCP reads the time stamp counter and atomically also the content
of a 32-bit MSR, which can be freely set by the OS. This allows CPU
local data to be queried by userspace.
Linux uses this to allow a fast implementation of the getcpu()
syscall, which uses the vsyscall page to avoid a context switch.
AMD CPUs since K8RevF and Intel CPUs since Nehalem support this
instruction.
RDTSCP is guarded by the RDTSCP CPUID bit (Fn8000_0001:EDX27).

Signed-off-by: Andre Przywara <>
Signed-off-by: Aurelien Jarno <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences