]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Provide userspace versions of do_cpuid() and cpuid_count() on i386.
authorkib <kib@FreeBSD.org>
Thu, 14 Feb 2019 13:53:11 +0000 (13:53 +0000)
committerkib <kib@FreeBSD.org>
Thu, 14 Feb 2019 13:53:11 +0000 (13:53 +0000)
commit53fdbf40d87bde2df0ba99c1e0a12de9841a82f7
tree12c37285fa02cb51d036c042e66e3aa46e129245
parent99fe0dc772e003aa582f4c4654f44787b4f8d364
Provide userspace versions of do_cpuid() and cpuid_count() on i386.

Some older compilers, when generating PIC code, cannot handle inline
asm that clobbers %ebx (because %ebx is used as the GOT offset
register).  Userspace versions avoid clobbering %ebx by saving it to
stack before executing the CPUID instruction.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
sys/i386/include/cpufunc.h