aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/arch/x86_64.md
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86_64.md')
-rw-r--r--src/arch/x86_64.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/arch/x86_64.md b/src/arch/x86_64.md
index 56e4f63..0ca18cc 100644
--- a/src/arch/x86_64.md
+++ b/src/arch/x86_64.md
@@ -166,6 +166,17 @@ implemented TSC ticks with a constant frequency.
grep constant_tsc /proc/cpuinfo
```
+## Cpu & hw features - `cpuid`
+```x86asm
+cpuid // in: eax leaf; ecx sub-leaf
+ // out: eax, ebx, ecx, edx (interpreting depends on leaf)
+```
+
+This instruction is used to query for availability of certain
+instructions or hardware details like cache sizes and son on.
+
+An example how to read cpuid leafs is show in [cpuid.c](x86/cpuid/cpuid.c).
+
## [SysV x86_64 ABI][sysvabi]
### Passing arguments to functions