Blame manual/platform.texi

Packit 6c4009
@node Platform, Contributors, Maintenance, Top
Packit 6c4009
@c %MENU% Describe all platform-specific facilities provided
Packit 6c4009
@appendix Platform-specific facilities
Packit 6c4009
Packit 6c4009
@Theglibc{} can provide machine-specific functionality.
Packit 6c4009
Packit 6c4009
@menu
Packit 6c4009
* PowerPC::           Facilities Specific to the PowerPC Architecture
Packit 6c4009
* RISC-V::            Facilities Specific to the RISC-V Architecture
Packit Bot a81ab8
* X86::               Facilities Specific to the X86 Architecture
Packit 6c4009
@end menu
Packit 6c4009
Packit 6c4009
@node PowerPC
Packit 6c4009
@appendixsec PowerPC-specific Facilities
Packit 6c4009
Packit 6c4009
Facilities specific to PowerPC that are not specific to a particular
Packit 6c4009
operating system are declared in @file{sys/platform/ppc.h}.
Packit 6c4009
Packit 6c4009
@deftypefun {uint64_t} __ppc_get_timebase (void)
Packit 6c4009
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
Packit 6c4009
Read the current value of the Time Base Register.
Packit 6c4009
Packit 6c4009
The @dfn{Time Base Register} is a 64-bit register that stores a monotonically
Packit 6c4009
incremented value updated at a system-dependent frequency that may be
Packit 6c4009
different from the processor frequency.  More information is available in
Packit 6c4009
@cite{Power ISA 2.06b - Book II - Section 5.2}.
Packit 6c4009
Packit 6c4009
@code{__ppc_get_timebase} uses the processor's time base facility directly
Packit 6c4009
without requiring assistance from the operating system, so it is very
Packit 6c4009
efficient.
Packit 6c4009
@end deftypefun
Packit 6c4009
Packit 6c4009
@deftypefun {uint64_t} __ppc_get_timebase_freq (void)
Packit 6c4009
@safety{@prelim{}@mtunsafe{@mtuinit{}}@asunsafe{@asucorrupt{:init}}@acunsafe{@acucorrupt{:init}}}
Packit 6c4009
@c __ppc_get_timebase_freq=__get_timebase_freq @mtuinit @acsfd
Packit 6c4009
@c  __get_clockfreq @mtuinit @asucorrupt:init @acucorrupt:init @acsfd
Packit 6c4009
@c    the initialization of the static timebase_freq is not exactly
Packit 6c4009
@c    safe, because hp_timing_t cannot be atomically set up.
Packit 6c4009
@c   syscall:get_tbfreq ok
Packit 6c4009
@c   open dup @acsfd
Packit 6c4009
@c   read dup ok
Packit 6c4009
@c   memcpy dup ok
Packit 6c4009
@c   memmem dup ok
Packit 6c4009
@c   close dup @acsfd
Packit 6c4009
Read the current frequency at which the Time Base Register is updated.
Packit 6c4009
Packit 6c4009
This frequency is not related to the processor clock or the bus clock.
Packit 6c4009
It is also possible that this frequency is not constant.  More information is
Packit 6c4009
available in @cite{Power ISA 2.06b - Book II - Section 5.2}.
Packit 6c4009
@end deftypefun
Packit 6c4009
Packit 6c4009
The following functions provide hints about the usage of resources that are
Packit 6c4009
shared with other processors.  They can be used, for example, if a program
Packit 6c4009
waiting on a lock intends to divert the shared resources to be used by other
Packit 6c4009
processors.  More information is available in @cite{Power ISA 2.06b - Book II -
Packit 6c4009
Section 3.2}.
Packit 6c4009
Packit 6c4009
@deftypefun {void} __ppc_yield (void)
Packit 6c4009
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
Packit 6c4009
Provide a hint that performance will probably be improved if shared resources
Packit 6c4009
dedicated to the executing processor are released for use by other processors.
Packit 6c4009
@end deftypefun
Packit 6c4009
Packit 6c4009
@deftypefun {void} __ppc_mdoio (void)
Packit 6c4009
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
Packit 6c4009
Provide a hint that performance will probably be improved if shared resources
Packit 6c4009
dedicated to the executing processor are released until all outstanding storage
Packit 6c4009
accesses to caching-inhibited storage have been completed.
Packit 6c4009
@end deftypefun
Packit 6c4009
Packit 6c4009
@deftypefun {void} __ppc_mdoom (void)
Packit 6c4009
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
Packit 6c4009
Provide a hint that performance will probably be improved if shared resources
Packit 6c4009
dedicated to the executing processor are released until all outstanding storage
Packit 6c4009
accesses to cacheable storage for which the data is not in the cache have been
Packit 6c4009
completed.
Packit 6c4009
@end deftypefun
Packit 6c4009
Packit 6c4009
@deftypefun {void} __ppc_set_ppr_med (void)
Packit 6c4009
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
Packit 6c4009
Set the Program Priority Register to medium value (default).
Packit 6c4009
Packit 6c4009
The @dfn{Program Priority Register} (PPR) is a 64-bit register that controls
Packit 6c4009
the program's priority.  By adjusting the PPR value the programmer may
Packit 6c4009
improve system throughput by causing the system resources to be used
Packit 6c4009
more efficiently, especially in contention situations.
Packit 6c4009
The three unprivileged states available are covered by the functions
Packit 6c4009
@code{__ppc_set_ppr_med} (medium -- default), @code{__ppc_set_ppc_low} (low)
Packit 6c4009
and @code{__ppc_set_ppc_med_low} (medium low).  More information
Packit 6c4009
available in @cite{Power ISA 2.06b - Book II - Section 3.1}.
Packit 6c4009
@end deftypefun
Packit 6c4009
Packit 6c4009
@deftypefun {void} __ppc_set_ppr_low (void)
Packit 6c4009
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
Packit 6c4009
Set the Program Priority Register to low value.
Packit 6c4009
@end deftypefun
Packit 6c4009
Packit 6c4009
@deftypefun {void} __ppc_set_ppr_med_low (void)
Packit 6c4009
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
Packit 6c4009
Set the Program Priority Register to medium low value.
Packit 6c4009
@end deftypefun
Packit 6c4009
Packit 6c4009
Power ISA 2.07 extends the priorities that can be set to the Program Priority
Packit 6c4009
Register (PPR).  The following functions implement the new priority levels:
Packit 6c4009
very low and medium high.
Packit 6c4009
Packit 6c4009
@deftypefun {void} __ppc_set_ppr_very_low (void)
Packit 6c4009
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
Packit 6c4009
Set the Program Priority Register to very low value.
Packit 6c4009
@end deftypefun
Packit 6c4009
Packit 6c4009
@deftypefun {void} __ppc_set_ppr_med_high (void)
Packit 6c4009
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
Packit 6c4009
Set the Program Priority Register to medium high value.  The medium high
Packit 6c4009
priority is privileged and may only be set during certain time intervals by
Packit 6c4009
problem-state programs.  If the program priority is medium high when the time
Packit 6c4009
interval expires or if an attempt is made to set the priority to medium high
Packit 6c4009
when it is not allowed, the priority is set to medium.
Packit 6c4009
@end deftypefun
Packit 6c4009
Packit 6c4009
@node RISC-V
Packit 6c4009
@appendixsec RISC-V-specific Facilities
Packit 6c4009
Packit 6c4009
Cache management facilities specific to RISC-V systems that implement the Linux
Packit 6c4009
ABI are declared in @file{sys/cachectl.h}.
Packit 6c4009
Packit 6c4009
@deftypefun {void} __riscv_flush_icache (void *@var{start}, void *@var{end}, unsigned long int @var{flags})
Packit 6c4009
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
Packit 6c4009
Enforce ordering between stores and instruction cache fetches.  The range of
Packit 6c4009
addresses over which ordering is enforced is specified by @var{start} and
Packit 6c4009
@var{end}.  The @var{flags} argument controls the extent of this ordering, with
Packit 6c4009
the default behavior (a @var{flags} value of 0) being to enforce the fence on
Packit 6c4009
all threads in the current process.  Setting the
Packit 6c4009
@code{SYS_RISCV_FLUSH_ICACHE_LOCAL} bit allows users to indicate that enforcing
Packit 6c4009
ordering on only the current thread is necessary.  All other flag bits are
Packit 6c4009
reserved.
Packit 6c4009
@end deftypefun
Packit Bot a81ab8
Packit Bot a81ab8
@node X86
Packit Bot a81ab8
@appendixsec X86-specific Facilities
Packit Bot a81ab8
Packit Bot a81ab8
Facilities specific to X86 that are not specific to a particular
Packit Bot a81ab8
operating system are declared in @file{sys/platform/x86.h}.
Packit Bot a81ab8
Packit Bot a81ab8
@deftypefun {const struct cpu_features *} __x86_get_cpu_features (unsigned int @var{max})
Packit Bot a81ab8
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
Packit Bot a81ab8
Return a pointer to x86 CPU feature structure used by query macros for x86
Packit Bot a81ab8
CPU features.  If @var{max} exceeds @code{COMMON_CPUID_INDEX_MAX} which
Packit Bot a81ab8
is the limit of the CPUID leaves supported by @Theglibc{}, the function
Packit Bot a81ab8
returns @code{NULL}, indicating that the queried processor feature is
Packit Bot a81ab8
unsupported by @Theglibc{} run-time.
Packit Bot a81ab8
@end deftypefun
Packit Bot a81ab8
Packit Bot a81ab8
@deftypefn Macro int HAS_CPU_FEATURE (@var{name})
Packit Bot a81ab8
This macro returns a nonzero value (true) if the processor has the feature
Packit Bot a81ab8
@var{name}.
Packit Bot a81ab8
@end deftypefn
Packit Bot a81ab8
Packit Bot a81ab8
@deftypefn Macro int CPU_FEATURE_USABLE (@var{name})
Packit Bot a81ab8
This macro returns a nonzero value (true) if the processor has the feature
Packit Bot a81ab8
@var{name} and the feature is supported by the operating system.
Packit Bot a81ab8
@end deftypefn
Packit Bot a81ab8
Packit Bot a81ab8
The supported processor features are:
Packit Bot a81ab8
Packit Bot a81ab8
@itemize @bullet
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{ACPI} -- Thermal Monitor and Software Controlled Clock Facilities.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{ADX} -- ADX instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{APIC} -- APIC On-Chip.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{AES} -- The AES instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot f45701
@code{AESKLE} -- AES Key Locker instructions are enabled by OS.
Packit Bot f45701
Packit Bot f45701
@item
Packit Bot a81ab8
@code{AMX_BF16} -- Tile computational operations on bfloat16 numbers.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{AMX_INT8} -- Tile computational operations on 8-bit numbers.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{AMX_TILE} -- Tile architecture.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{ARCH_CAPABILITIES} -- IA32_ARCH_CAPABILITIES MSR.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{AVX} -- The AVX instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{AVX2} -- The AVX2 instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot 8fd0f1
@code{AVX_VNNI} -- The AVX-VNNI instruction extensions.
Packit Bot 8fd0f1
Packit Bot 8fd0f1
@item
Packit Bot a81ab8
@code{AVX512_4FMAPS} -- The AVX512_4FMAPS instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{AVX512_4VNNIW} -- The AVX512_4VNNIW instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{AVX512_BF16} -- The AVX512_BF16 instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{AVX512_BITALG} -- The AVX512_BITALG instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot 80c48e
@code{AVX512_FP16} -- The AVX512_FP16 instruction extensions.
Packit Bot 80c48e
Packit Bot 80c48e
@item
Packit Bot a81ab8
@code{AVX512_IFMA} -- The AVX512_IFMA instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{AVX512_VBMI} -- The AVX512_VBMI instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{AVX512_VBMI2} -- The AVX512_VBMI2 instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{AVX512_VNNI} -- The AVX512_VNNI instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{AVX512_VP2INTERSECT} -- The AVX512_VP2INTERSECT instruction
Packit Bot a81ab8
extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{AVX512_VPOPCNTDQ} -- The AVX512_VPOPCNTDQ instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{AVX512BW} -- The AVX512BW instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{AVX512CD} -- The AVX512CD instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{AVX512ER} -- The AVX512ER instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{AVX512DQ} -- The AVX512DQ instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{AVX512F} -- The AVX512F instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{AVX512PF} -- The AVX512PF instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{AVX512VL} -- The AVX512VL instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{BMI1} -- BMI1 instructions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{BMI2} -- BMI2 instructions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{CLDEMOTE} -- CLDEMOTE instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{CLFLUSHOPT} -- CLFLUSHOPT instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{CLFSH} -- CLFLUSH instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{CLWB} -- CLWB instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{CMOV} -- Conditional Move instructions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{CMPXCHG16B} -- CMPXCHG16B instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{CNXT_ID} -- L1 Context ID.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{CORE_CAPABILITIES} -- IA32_CORE_CAPABILITIES MSR.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{CX8} -- CMPXCHG8B instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{DCA} -- Data prefetch from a memory mapped device.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{DE} -- Debugging Extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{DEPR_FPU_CS_DS} -- Deprecates FPU CS and FPU DS values.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{DS} -- Debug Store.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{DS_CPL} -- CPL Qualified Debug Store.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{DTES64} -- 64-bit DS Area.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{EIST} -- Enhanced Intel SpeedStep technology.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{ENQCMD} -- Enqueue Stores instructions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{ERMS} -- Enhanced REP MOVSB/STOSB.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{F16C} -- 16-bit floating-point conversion instructions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{FMA} -- FMA extensions using YMM state.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{FMA4} -- FMA4 instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{FPU} -- X87 Floating Point Unit On-Chip.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{FSGSBASE} -- RDFSBASE/RDGSBASE/WRFSBASE/WRGSBASE instructions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot c2dc32
@code{FSRCS} -- Fast Short REP CMP and SCA.
Packit Bot c2dc32
Packit Bot c2dc32
@item
Packit Bot a81ab8
@code{FSRM} -- Fast Short REP MOV.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot c2dc32
@code{FSRS} -- Fast Short REP STO.
Packit Bot c2dc32
Packit Bot c2dc32
@item
Packit Bot a81ab8
@code{FXSR} -- FXSAVE and FXRSTOR instructions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot c2dc32
@code{FZLRM} -- Fast Zero-Length REP MOV.
Packit Bot c2dc32
Packit Bot c2dc32
@item
Packit Bot a81ab8
@code{GFNI} -- GFNI instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{HLE} -- HLE instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{HTT} -- Max APIC IDs reserved field is Valid.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot f88fd1
@code{HRESET} -- History reset.
Packit Bot f88fd1
Packit Bot f88fd1
@item
Packit Bot a81ab8
@code{HYBRID} -- Hybrid processor.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{IBRS_IBPB} -- Indirect branch restricted speculation (IBRS) and
Packit Bot a81ab8
the indirect branch predictor barrier (IBPB).
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{IBT} -- Intel Indirect Branch Tracking instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{INVARIANT_TSC} -- Invariant TSC.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{INVPCID} -- INVPCID instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot f45701
@code{KL} -- AES Key Locker instructions.
Packit Bot f45701
Packit Bot f45701
@item
Packit Bot a81ab8
@code{L1D_FLUSH} -- IA32_FLUSH_CMD MSR.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{LAHF64_SAHF64} -- LAHF/SAHF available in 64-bit mode.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{LM} -- Long mode.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{LWP} -- Lightweight profiling.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{LZCNT} -- LZCNT instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{MCA} -- Machine Check Architecture.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{MCE} -- Machine Check Exception.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{MD_CLEAR} -- MD_CLEAR.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{MMX} -- Intel MMX Technology.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{MONITOR} --  MONITOR/MWAIT instructions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{MOVBE} -- MOVBE instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{MOVDIRI} -- MOVDIRI instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{MOVDIR64B} -- MOVDIR64B instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{MPX} -- Intel Memory Protection Extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{MSR} -- Model Specific Registers RDMSR and WRMSR instructions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{MTRR} -- Memory Type Range Registers.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{NX} -- No-execute page protection.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{OSPKE} -- OS has set CR4.PKE to enable protection keys.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{OSXSAVE} -- The OS has set CR4.OSXSAVE[bit 18] to enable
Packit Bot a81ab8
XSETBV/XGETBV instructions to access XCR0 and to support processor
Packit Bot a81ab8
extended state management using XSAVE/XRSTOR.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{PAE} -- Physical Address Extension.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{PAGE1GB} -- 1-GByte page.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{PAT} -- Page Attribute Table.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{PBE} -- Pending Break Enable.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{PCID} -- Process-context identifiers.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{PCLMULQDQ} -- PCLMULQDQ instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{PCONFIG} -- PCONFIG instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{PDCM} -- Perfmon and Debug Capability.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{PGE} -- Page Global Bit.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{PKS} -- Protection keys for supervisor-mode pages.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{PKU} -- Protection keys for user-mode pages.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{POPCNT} -- POPCNT instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{PREFETCHW} -- PREFETCHW instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{PREFETCHWT1} -- PREFETCHWT1 instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{PSE} -- Page Size Extension.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{PSE_36} -- 36-Bit Page Size Extension.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{PSN} -- Processor Serial Number.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{RDPID} -- RDPID instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{RDRAND} -- RDRAND instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{RDSEED} -- RDSEED instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{RDT_A} -- Intel Resource Director Technology (Intel RDT) Allocation
Packit Bot a81ab8
capability.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{RDT_M} -- Intel Resource Director Technology (Intel RDT) Monitoring
Packit Bot a81ab8
capability.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{RDTSCP} -- RDTSCP instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{RTM} -- RTM instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{SDBG} -- IA32_DEBUG_INTERFACE MSR for silicon debug.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{SEP} -- SYSENTER and SYSEXIT instructions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{SERIALIZE} -- SERIALIZE instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{SGX} -- Intel Software Guard Extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{SGX_LC} -- SGX Launch Configuration.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{SHA} -- SHA instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{SHSTK} -- Intel Shadow Stack instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{SMAP} -- Supervisor-Mode Access Prevention.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{SMEP} -- Supervisor-Mode Execution Prevention.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{SMX} -- Safer Mode Extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{SS} -- Self Snoop.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{SSBD} -- Speculative Store Bypass Disable (SSBD).
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{SSE} -- Streaming SIMD Extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{SSE2} -- Streaming SIMD Extensions 2.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{SSE3} -- Streaming SIMD Extensions 3.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{SSE4_1} -- Streaming SIMD Extensions 4.1.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{SSE4_2} -- Streaming SIMD Extensions 4.2.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{SSE4A} -- SSE4A instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{SSSE3} -- Supplemental Streaming SIMD Extensions 3.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{STIBP} -- Single thread indirect branch predictors (STIBP).
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{SVM} -- Secure Virtual Machine.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{SYSCALL_SYSRET} -- SYSCALL/SYSRET instructions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{TBM} -- Trailing bit manipulation instructions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{TM} -- Thermal Monitor.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{TM2} -- Thermal Monitor 2.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{TRACE} -- Intel Processor Trace.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{TSC} -- Time Stamp Counter.  RDTSC instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{TSC_ADJUST} -- IA32_TSC_ADJUST MSR.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{TSC_DEADLINE} -- Local APIC timer supports one-shot operation
Packit Bot a81ab8
using a TSC deadline value.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{TSXLDTRK} -- TSXLDTRK instructions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot b61944
@code{UINTR} -- User interrupts.
Packit Bot b61944
Packit Bot b61944
@item
Packit Bot a81ab8
@code{UMIP} -- User-mode instruction prevention.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{VAES} -- VAES instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{VME} -- Virtual 8086 Mode Enhancements.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{VMX} -- Virtual Machine Extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{VPCLMULQDQ} -- VPCLMULQDQ instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{WAITPKG} -- WAITPKG instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{WBNOINVD} -- WBINVD/WBNOINVD instructions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot f45701
@code{WIDE_KL} -- AES wide Key Locker instructions.
Packit Bot f45701
Packit Bot f45701
@item
Packit Bot a81ab8
@code{X2APIC} -- x2APIC.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{XFD} -- Extended Feature Disable (XFD).
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{XGETBV_ECX_1} -- XGETBV with ECX = 1.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{XOP} -- XOP instruction extensions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{XSAVE} -- The XSAVE/XRSTOR processor extended states feature, the
Packit Bot a81ab8
XSETBV/XGETBV instructions, and XCR0.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{XSAVEC} -- XSAVEC instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{XSAVEOPT} -- XSAVEOPT instruction.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{XSAVES} -- XSAVES/XRSTORS instructions.
Packit Bot a81ab8
Packit Bot a81ab8
@item
Packit Bot a81ab8
@code{XTPRUPDCTRL} -- xTPR Update Control.
Packit Bot a81ab8
Packit Bot a81ab8
@end itemize
Packit Bot a81ab8
Packit Bot a81ab8
You could query if a processor supports @code{AVX} with:
Packit Bot a81ab8
Packit Bot a81ab8
@smallexample
Packit Bot a81ab8
#include <sys/platform/x86.h>
Packit Bot a81ab8
Packit Bot a81ab8
int
Packit Bot a81ab8
support_avx (void)
Packit Bot a81ab8
@{
Packit Bot a81ab8
  return HAS_CPU_FEATURE (AVX);
Packit Bot a81ab8
@}
Packit Bot a81ab8
@end smallexample
Packit Bot a81ab8
Packit Bot a81ab8
and if @code{AVX} is usable with:
Packit Bot a81ab8
Packit Bot a81ab8
@smallexample
Packit Bot a81ab8
#include <sys/platform/x86.h>
Packit Bot a81ab8
Packit Bot a81ab8
int
Packit Bot a81ab8
usable_avx (void)
Packit Bot a81ab8
@{
Packit Bot a81ab8
  return CPU_FEATURE_USABLE (AVX);
Packit Bot a81ab8
@}
Packit Bot a81ab8
@end smallexample