platform.texi 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774
  1. @node Platform, Contributors, Maintenance, Top
  2. @c %MENU% Describe all platform-specific facilities provided
  3. @appendix Platform-specific facilities
  4. @Theglibc{} can provide machine-specific functionality.
  5. @menu
  6. * PowerPC:: Facilities Specific to the PowerPC Architecture
  7. * RISC-V:: Facilities Specific to the RISC-V Architecture
  8. * X86:: Facilities Specific to the X86 Architecture
  9. @end menu
  10. @node PowerPC
  11. @appendixsec PowerPC-specific Facilities
  12. Facilities specific to PowerPC that are not specific to a particular
  13. operating system are declared in @file{sys/platform/ppc.h}.
  14. @deftypefun {uint64_t} __ppc_get_timebase (void)
  15. @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
  16. Read the current value of the Time Base Register.
  17. The @dfn{Time Base Register} is a 64-bit register that stores a monotonically
  18. incremented value updated at a system-dependent frequency that may be
  19. different from the processor frequency. More information is available in
  20. @cite{Power ISA 2.06b - Book II - Section 5.2}.
  21. @code{__ppc_get_timebase} uses the processor's time base facility directly
  22. without requiring assistance from the operating system, so it is very
  23. efficient.
  24. @end deftypefun
  25. @deftypefun {uint64_t} __ppc_get_timebase_freq (void)
  26. @safety{@prelim{}@mtunsafe{@mtuinit{}}@asunsafe{@asucorrupt{:init}}@acunsafe{@acucorrupt{:init}}}
  27. @c __ppc_get_timebase_freq=__get_timebase_freq @mtuinit @acsfd
  28. @c __get_clockfreq @mtuinit @asucorrupt:init @acucorrupt:init @acsfd
  29. @c the initialization of the static timebase_freq is not exactly
  30. @c safe, because hp_timing_t cannot be atomically set up.
  31. @c syscall:get_tbfreq ok
  32. @c open dup @acsfd
  33. @c read dup ok
  34. @c memcpy dup ok
  35. @c memmem dup ok
  36. @c close dup @acsfd
  37. Read the current frequency at which the Time Base Register is updated.
  38. This frequency is not related to the processor clock or the bus clock.
  39. It is also possible that this frequency is not constant. More information is
  40. available in @cite{Power ISA 2.06b - Book II - Section 5.2}.
  41. @end deftypefun
  42. The following functions provide hints about the usage of resources that are
  43. shared with other processors. They can be used, for example, if a program
  44. waiting on a lock intends to divert the shared resources to be used by other
  45. processors. More information is available in @cite{Power ISA 2.06b - Book II -
  46. Section 3.2}.
  47. @deftypefun {void} __ppc_yield (void)
  48. @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
  49. Provide a hint that performance will probably be improved if shared resources
  50. dedicated to the executing processor are released for use by other processors.
  51. @end deftypefun
  52. @deftypefun {void} __ppc_mdoio (void)
  53. @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
  54. Provide a hint that performance will probably be improved if shared resources
  55. dedicated to the executing processor are released until all outstanding storage
  56. accesses to caching-inhibited storage have been completed.
  57. @end deftypefun
  58. @deftypefun {void} __ppc_mdoom (void)
  59. @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
  60. Provide a hint that performance will probably be improved if shared resources
  61. dedicated to the executing processor are released until all outstanding storage
  62. accesses to cacheable storage for which the data is not in the cache have been
  63. completed.
  64. @end deftypefun
  65. @deftypefun {void} __ppc_set_ppr_med (void)
  66. @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
  67. Set the Program Priority Register to medium value (default).
  68. The @dfn{Program Priority Register} (PPR) is a 64-bit register that controls
  69. the program's priority. By adjusting the PPR value the programmer may
  70. improve system throughput by causing the system resources to be used
  71. more efficiently, especially in contention situations.
  72. The three unprivileged states available are covered by the functions
  73. @code{__ppc_set_ppr_med} (medium -- default), @code{__ppc_set_ppc_low} (low)
  74. and @code{__ppc_set_ppc_med_low} (medium low). More information
  75. available in @cite{Power ISA 2.06b - Book II - Section 3.1}.
  76. @end deftypefun
  77. @deftypefun {void} __ppc_set_ppr_low (void)
  78. @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
  79. Set the Program Priority Register to low value.
  80. @end deftypefun
  81. @deftypefun {void} __ppc_set_ppr_med_low (void)
  82. @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
  83. Set the Program Priority Register to medium low value.
  84. @end deftypefun
  85. Power ISA 2.07 extends the priorities that can be set to the Program Priority
  86. Register (PPR). The following functions implement the new priority levels:
  87. very low and medium high.
  88. @deftypefun {void} __ppc_set_ppr_very_low (void)
  89. @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
  90. Set the Program Priority Register to very low value.
  91. @end deftypefun
  92. @deftypefun {void} __ppc_set_ppr_med_high (void)
  93. @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
  94. Set the Program Priority Register to medium high value. The medium high
  95. priority is privileged and may only be set during certain time intervals by
  96. problem-state programs. If the program priority is medium high when the time
  97. interval expires or if an attempt is made to set the priority to medium high
  98. when it is not allowed, the priority is set to medium.
  99. @end deftypefun
  100. @node RISC-V
  101. @appendixsec RISC-V-specific Facilities
  102. Cache management facilities specific to RISC-V systems that implement the Linux
  103. ABI are declared in @file{sys/cachectl.h}.
  104. @deftypefun {void} __riscv_flush_icache (void *@var{start}, void *@var{end}, unsigned long int @var{flags})
  105. @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
  106. Enforce ordering between stores and instruction cache fetches. The range of
  107. addresses over which ordering is enforced is specified by @var{start} and
  108. @var{end}. The @var{flags} argument controls the extent of this ordering, with
  109. the default behavior (a @var{flags} value of 0) being to enforce the fence on
  110. all threads in the current process. Setting the
  111. @code{SYS_RISCV_FLUSH_ICACHE_LOCAL} bit allows users to indicate that enforcing
  112. ordering on only the current thread is necessary. All other flag bits are
  113. reserved.
  114. @end deftypefun
  115. @node X86
  116. @appendixsec X86-specific Facilities
  117. Facilities specific to X86 that are not specific to a particular
  118. operating system are declared in @file{sys/platform/x86.h}.
  119. @deftypefun {const struct cpuid_feature *} __x86_get_cpuid_feature_leaf (unsigned int @var{leaf})
  120. @safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
  121. Return a pointer to x86 CPU feature structure used by query macros for x86
  122. CPU feature @var{leaf}.
  123. @end deftypefun
  124. @deftypefn Macro int CPU_FEATURE_PRESENT (@var{name})
  125. This macro returns a nonzero value (true) if the processor has the feature
  126. @var{name}.
  127. @end deftypefn
  128. @deftypefn Macro int CPU_FEATURE_ACTIVE (@var{name})
  129. This macro returns a nonzero value (true) if the processor has the feature
  130. @var{name} and the feature is active. There may be other preconditions,
  131. like sufficient stack space or further setup for AMX, which must be
  132. satisfied before the feature can be used.
  133. @end deftypefn
  134. The supported processor features are:
  135. @itemize @bullet
  136. @item
  137. @code{ACPI} -- Thermal Monitor and Software Controlled Clock Facilities.
  138. @item
  139. @code{ADX} -- ADX instruction extensions.
  140. @item
  141. @code{APIC} -- APIC On-Chip.
  142. @item
  143. @code{AES} -- The AES instruction extensions.
  144. @item
  145. @code{AESKLE} -- AES Key Locker instructions are enabled by OS.
  146. @item
  147. @code{AMD_IBPB} -- Indirect branch predictor barrier (IBPB) for AMD cpus.
  148. @item
  149. @code{AMD_IBRS} -- Indirect branch restricted speculation (IBPB) for AMD cpus.
  150. @item
  151. @code{AMD_SSBD} -- Speculative Store Bypass Disable (SSBD) for AMD cpus.
  152. @item
  153. @code{AMD_STIBP} -- Single thread indirect branch predictors (STIBP) for AMD cpus.
  154. @item
  155. @code{AMD_VIRT_SSBD} -- Speculative Store Bypass Disable (SSBD) for AMD cpus (older systems).
  156. @item
  157. @code{AMX_BF16} -- Tile computational operations on bfloat16 numbers.
  158. @item
  159. @code{AMX_COMPLEX} -- Tile computational operations on complex FP16 numbers.
  160. @item
  161. @code{AMX_INT8} -- Tile computational operations on 8-bit numbers.
  162. @item
  163. @code{AMX_FP16} -- Tile computational operations on FP16 numbers.
  164. @item
  165. @code{AMX_TILE} -- Tile architecture.
  166. @item
  167. @code{APX_F} -- The APX instruction extensions.
  168. @item
  169. @code{ARCH_CAPABILITIES} -- IA32_ARCH_CAPABILITIES MSR.
  170. @item
  171. @code{ArchPerfmonExt} -- Architectural Performance Monitoring Extended
  172. Leaf (EAX = 23H).
  173. @item
  174. @code{AVX} -- The AVX instruction extensions.
  175. @item
  176. @code{AVX10} -- The AVX10 instruction extensions.
  177. @item
  178. @code{AVX10_XMM} -- Whether AVX10 includes xmm registers.
  179. @item
  180. @code{AVX10_YMM} -- Whether AVX10 includes ymm registers.
  181. @item
  182. @code{AVX10_ZMM} -- Whether AVX10 includes zmm registers.
  183. @item
  184. @code{AVX2} -- The AVX2 instruction extensions.
  185. @item
  186. @code{AVX_IFMA} -- The AVX-IFMA instruction extensions.
  187. @item
  188. @code{AVX_NE_CONVERT} -- The AVX-NE-CONVERT instruction extensions.
  189. @item
  190. @code{AVX_VNNI} -- The AVX-VNNI instruction extensions.
  191. @item
  192. @code{AVX_VNNI_INT8} -- The AVX-VNNI-INT8 instruction extensions.
  193. @item
  194. @code{AVX512_4FMAPS} -- The AVX512_4FMAPS instruction extensions.
  195. @item
  196. @code{AVX512_4VNNIW} -- The AVX512_4VNNIW instruction extensions.
  197. @item
  198. @code{AVX512_BF16} -- The AVX512_BF16 instruction extensions.
  199. @item
  200. @code{AVX512_BITALG} -- The AVX512_BITALG instruction extensions.
  201. @item
  202. @code{AVX512_FP16} -- The AVX512_FP16 instruction extensions.
  203. @item
  204. @code{AVX512_IFMA} -- The AVX512_IFMA instruction extensions.
  205. @item
  206. @code{AVX512_VBMI} -- The AVX512_VBMI instruction extensions.
  207. @item
  208. @code{AVX512_VBMI2} -- The AVX512_VBMI2 instruction extensions.
  209. @item
  210. @code{AVX512_VNNI} -- The AVX512_VNNI instruction extensions.
  211. @item
  212. @code{AVX512_VP2INTERSECT} -- The AVX512_VP2INTERSECT instruction
  213. extensions.
  214. @item
  215. @code{AVX512_VPOPCNTDQ} -- The AVX512_VPOPCNTDQ instruction extensions.
  216. @item
  217. @code{AVX512BW} -- The AVX512BW instruction extensions.
  218. @item
  219. @code{AVX512CD} -- The AVX512CD instruction extensions.
  220. @item
  221. @code{AVX512ER} -- The AVX512ER instruction extensions.
  222. @item
  223. @code{AVX512DQ} -- The AVX512DQ instruction extensions.
  224. @item
  225. @code{AVX512F} -- The AVX512F instruction extensions.
  226. @item
  227. @code{AVX512PF} -- The AVX512PF instruction extensions.
  228. @item
  229. @code{AVX512VL} -- The AVX512VL instruction extensions.
  230. @item
  231. @code{BMI1} -- BMI1 instructions.
  232. @item
  233. @code{BMI2} -- BMI2 instructions.
  234. @item
  235. @code{BUS_LOCK_DETECT} -- Bus lock debug exceptions.
  236. @item
  237. @code{CLDEMOTE} -- CLDEMOTE instruction.
  238. @item
  239. @code{CLFLUSHOPT} -- CLFLUSHOPT instruction.
  240. @item
  241. @code{CLFSH} -- CLFLUSH instruction.
  242. @item
  243. @code{CLWB} -- CLWB instruction.
  244. @item
  245. @code{CMOV} -- Conditional Move instructions.
  246. @item
  247. @code{CMPCCXADD} -- CMPccXADD instruction.
  248. @item
  249. @code{CMPXCHG16B} -- CMPXCHG16B instruction.
  250. @item
  251. @code{CNXT_ID} -- L1 Context ID.
  252. @item
  253. @code{CORE_CAPABILITIES} -- IA32_CORE_CAPABILITIES MSR.
  254. @item
  255. @code{CX8} -- CMPXCHG8B instruction.
  256. @item
  257. @code{DCA} -- Data prefetch from a memory mapped device.
  258. @item
  259. @code{DE} -- Debugging Extensions.
  260. @item
  261. @code{DEPR_FPU_CS_DS} -- Deprecates FPU CS and FPU DS values.
  262. @item
  263. @code{DS} -- Debug Store.
  264. @item
  265. @code{DS_CPL} -- CPL Qualified Debug Store.
  266. @item
  267. @code{DTES64} -- 64-bit DS Area.
  268. @item
  269. @code{EIST} -- Enhanced Intel SpeedStep technology.
  270. @item
  271. @code{ENQCMD} -- Enqueue Stores instructions.
  272. @item
  273. @code{ERMS} -- Enhanced REP MOVSB/STOSB.
  274. @item
  275. @code{F16C} -- 16-bit floating-point conversion instructions.
  276. @item
  277. @code{FMA} -- FMA extensions using YMM state.
  278. @item
  279. @code{FMA4} -- FMA4 instruction extensions.
  280. @item
  281. @code{FPU} -- X87 Floating Point Unit On-Chip.
  282. @item
  283. @code{FSGSBASE} -- RDFSBASE/RDGSBASE/WRFSBASE/WRGSBASE instructions.
  284. @item
  285. @code{FSRCS} -- Fast Short REP CMP and SCA.
  286. @item
  287. @code{FSRM} -- Fast Short REP MOV.
  288. @item
  289. @code{FSRS} -- Fast Short REP STO.
  290. @item
  291. @code{FXSR} -- FXSAVE and FXRSTOR instructions.
  292. @item
  293. @code{FZLRM} -- Fast Zero-Length REP MOV.
  294. @item
  295. @code{GFNI} -- GFNI instruction extensions.
  296. @item
  297. @code{HLE} -- HLE instruction extensions.
  298. @item
  299. @code{HTT} -- Max APIC IDs reserved field is Valid.
  300. @item
  301. @code{HRESET} -- History reset.
  302. @item
  303. @code{HYBRID} -- Hybrid processor.
  304. @item
  305. @code{IBRS_IBPB} -- Indirect branch restricted speculation (IBRS) and
  306. the indirect branch predictor barrier (IBPB).
  307. @item
  308. @code{IBT} -- Intel Indirect Branch Tracking instruction extensions.
  309. @item
  310. @code{INVARIANT_TSC} -- Invariant TSC.
  311. @item
  312. @code{INVPCID} -- INVPCID instruction.
  313. @item
  314. @code{KL} -- AES Key Locker instructions.
  315. @item
  316. @code{L1D_FLUSH} -- IA32_FLUSH_CMD MSR.
  317. @item
  318. @code{LA57} -- 57-bit linear addresses and five-level paging.
  319. @item
  320. @code{LAHF64_SAHF64} -- LAHF/SAHF available in 64-bit mode.
  321. @item
  322. @code{LAM} -- Linear Address Masking.
  323. @item
  324. @code{LASS} -- Linear Address Space Separation.
  325. @item
  326. @code{LBR} -- Architectural LBR.
  327. @item
  328. @code{LM} -- Long mode.
  329. @item
  330. @code{LWP} -- Lightweight profiling.
  331. @item
  332. @code{LZCNT} -- LZCNT instruction.
  333. @item
  334. @code{MCA} -- Machine Check Architecture.
  335. @item
  336. @code{MCE} -- Machine Check Exception.
  337. @item
  338. @code{MD_CLEAR} -- MD_CLEAR.
  339. @item
  340. @code{MMX} -- Intel MMX Technology.
  341. @item
  342. @code{MONITOR} -- MONITOR/MWAIT instructions.
  343. @item
  344. @code{MOVBE} -- MOVBE instruction.
  345. @item
  346. @code{MOVDIRI} -- MOVDIRI instruction.
  347. @item
  348. @code{MOVDIR64B} -- MOVDIR64B instruction.
  349. @item
  350. @code{MPX} -- Intel Memory Protection Extensions.
  351. @item
  352. @code{MSR} -- Model Specific Registers RDMSR and WRMSR instructions.
  353. @item
  354. @code{MSRLIST} -- RDMSRLIST/WRMSRLIST instructions and IA32_BARRIER
  355. MSR.
  356. @item
  357. @code{MTRR} -- Memory Type Range Registers.
  358. @item
  359. @code{NX} -- No-execute page protection.
  360. @item
  361. @code{OSPKE} -- OS has set CR4.PKE to enable protection keys.
  362. @item
  363. @code{OSXSAVE} -- The OS has set CR4.OSXSAVE[bit 18] to enable
  364. XSETBV/XGETBV instructions to access XCR0 and to support processor
  365. extended state management using XSAVE/XRSTOR.
  366. @item
  367. @code{PAE} -- Physical Address Extension.
  368. @item
  369. @code{PAGE1GB} -- 1-GByte page.
  370. @item
  371. @code{PAT} -- Page Attribute Table.
  372. @item
  373. @code{PBE} -- Pending Break Enable.
  374. @item
  375. @code{PCID} -- Process-context identifiers.
  376. @item
  377. @code{PCLMULQDQ} -- PCLMULQDQ instruction.
  378. @item
  379. @code{PCONFIG} -- PCONFIG instruction.
  380. @item
  381. @code{PDCM} -- Perfmon and Debug Capability.
  382. @item
  383. @code{PGE} -- Page Global Bit.
  384. @item
  385. @code{PKS} -- Protection keys for supervisor-mode pages.
  386. @item
  387. @code{PKU} -- Protection keys for user-mode pages.
  388. @item
  389. @code{POPCNT} -- POPCNT instruction.
  390. @item
  391. @code{PREFETCHW} -- PREFETCHW instruction.
  392. @item
  393. @code{PREFETCHWT1} -- PREFETCHWT1 instruction.
  394. @item
  395. @code{PREFETCHI} -- PREFETCHIT0/1 instructions.
  396. @item
  397. @code{PSE} -- Page Size Extension.
  398. @item
  399. @code{PSE_36} -- 36-Bit Page Size Extension.
  400. @item
  401. @code{PSN} -- Processor Serial Number.
  402. @item
  403. @code{PTWRITE} -- PTWRITE instruction.
  404. @item
  405. @code{RAO_INT} -- RAO-INT instructions.
  406. @item
  407. @code{RDPID} -- RDPID instruction.
  408. @item
  409. @code{RDRAND} -- RDRAND instruction.
  410. @item
  411. @code{RDSEED} -- RDSEED instruction.
  412. @item
  413. @code{RDT_A} -- Intel Resource Director Technology (Intel RDT) Allocation
  414. capability.
  415. @item
  416. @code{RDT_M} -- Intel Resource Director Technology (Intel RDT) Monitoring
  417. capability.
  418. @item
  419. @code{RDTSCP} -- RDTSCP instruction.
  420. @item
  421. @code{RTM} -- RTM instruction extensions.
  422. @item
  423. @code{RTM_ALWAYS_ABORT} -- Transactions always abort, making RTM unusable.
  424. @item
  425. @code{RTM_FORCE_ABORT} -- TSX_FORCE_ABORT MSR.
  426. @item
  427. @code{SDBG} -- IA32_DEBUG_INTERFACE MSR for silicon debug.
  428. @item
  429. @code{SEP} -- SYSENTER and SYSEXIT instructions.
  430. @item
  431. @code{SERIALIZE} -- SERIALIZE instruction.
  432. @item
  433. @code{SGX} -- Intel Software Guard Extensions.
  434. @item
  435. @code{SGX_KEYS} -- Attestation Services for SGX.
  436. @item
  437. @code{SGX_LC} -- SGX Launch Configuration.
  438. @item
  439. @code{SHA} -- SHA instruction extensions.
  440. @item
  441. @code{SHSTK} -- Intel Shadow Stack instruction extensions.
  442. @item
  443. @code{SMAP} -- Supervisor-Mode Access Prevention.
  444. @item
  445. @code{SMEP} -- Supervisor-Mode Execution Prevention.
  446. @item
  447. @code{SMX} -- Safer Mode Extensions.
  448. @item
  449. @code{SS} -- Self Snoop.
  450. @item
  451. @code{SSBD} -- Speculative Store Bypass Disable (SSBD).
  452. @item
  453. @code{SSE} -- Streaming SIMD Extensions.
  454. @item
  455. @code{SSE2} -- Streaming SIMD Extensions 2.
  456. @item
  457. @code{SSE3} -- Streaming SIMD Extensions 3.
  458. @item
  459. @code{SSE4_1} -- Streaming SIMD Extensions 4.1.
  460. @item
  461. @code{SSE4_2} -- Streaming SIMD Extensions 4.2.
  462. @item
  463. @code{SSE4A} -- SSE4A instruction extensions.
  464. @item
  465. @code{SSSE3} -- Supplemental Streaming SIMD Extensions 3.
  466. @item
  467. @code{STIBP} -- Single thread indirect branch predictors (STIBP).
  468. @item
  469. @code{SVM} -- Secure Virtual Machine.
  470. @item
  471. @code{SYSCALL_SYSRET} -- SYSCALL/SYSRET instructions.
  472. @item
  473. @code{TBM} -- Trailing bit manipulation instructions.
  474. @item
  475. @code{TM} -- Thermal Monitor.
  476. @item
  477. @code{TM2} -- Thermal Monitor 2.
  478. @item
  479. @code{TRACE} -- Intel Processor Trace.
  480. @item
  481. @code{TSC} -- Time Stamp Counter. RDTSC instruction.
  482. @item
  483. @code{TSC_ADJUST} -- IA32_TSC_ADJUST MSR.
  484. @item
  485. @code{TSC_DEADLINE} -- Local APIC timer supports one-shot operation
  486. using a TSC deadline value.
  487. @item
  488. @code{TSXLDTRK} -- TSXLDTRK instructions.
  489. @item
  490. @code{UINTR} -- User interrupts.
  491. @item
  492. @code{UMIP} -- User-mode instruction prevention.
  493. @item
  494. @code{VAES} -- VAES instruction extensions.
  495. @item
  496. @code{VME} -- Virtual 8086 Mode Enhancements.
  497. @item
  498. @code{VMX} -- Virtual Machine Extensions.
  499. @item
  500. @code{VPCLMULQDQ} -- VPCLMULQDQ instruction.
  501. @item
  502. @code{WAITPKG} -- WAITPKG instruction extensions.
  503. @item
  504. @code{WBNOINVD} -- WBINVD/WBNOINVD instructions.
  505. @item
  506. @code{WIDE_KL} -- AES wide Key Locker instructions.
  507. @item
  508. @code{WRMSRNS} -- WRMSRNS instruction.
  509. @item
  510. @code{X2APIC} -- x2APIC.
  511. @item
  512. @code{XFD} -- Extended Feature Disable (XFD).
  513. @item
  514. @code{XGETBV_ECX_1} -- XGETBV with ECX = 1.
  515. @item
  516. @code{XOP} -- XOP instruction extensions.
  517. @item
  518. @code{XSAVE} -- The XSAVE/XRSTOR processor extended states feature, the
  519. XSETBV/XGETBV instructions, and XCR0.
  520. @item
  521. @code{XSAVEC} -- XSAVEC instruction.
  522. @item
  523. @code{XSAVEOPT} -- XSAVEOPT instruction.
  524. @item
  525. @code{XSAVES} -- XSAVES/XRSTORS instructions.
  526. @item
  527. @code{XTPRUPDCTRL} -- xTPR Update Control.
  528. @end itemize
  529. You could query if a processor supports @code{AVX} with:
  530. @smallexample
  531. #include <sys/platform/x86.h>
  532. int
  533. avx_present (void)
  534. @{
  535. return CPU_FEATURE_PRESENT (AVX);
  536. @}
  537. @end smallexample
  538. and if @code{AVX} is active and may be used with:
  539. @smallexample
  540. #include <sys/platform/x86.h>
  541. int
  542. avx_active (void)
  543. @{
  544. return CPU_FEATURE_ACTIVE (AVX);
  545. @}
  546. @end smallexample