Comments (9)
I've tested v2.0.14 and can confirm it is working. Many thanks!
from cpuid.
@zacaway Are you running in a VM?
from cpuid.
Yes, I am running under Xen.
from cpuid.
It must have a buggy implementation of its cpuid emulation, then.
Is it possible for you to insert this:
@@ -848,6 +858,11 @@ func (c *CPUInfo) cacheSize() {
if typ == 0 {
return
}
+ fmt.Printf("EAX: 0x%08x, EBX: 0x%08x, ECX: 0x%08x; ", eax, ebx, ecx)
+ fmt.Println("type", typ, "size:", size)
+ if i > 100 {
+ return
+ }
switch level {
case 1:
I need a secondary break condition.
The docs specify that EAX low 4==0 bits indicates that there are no more (page 33).
from cpuid.
(I will need the output to look at a fix)
from cpuid.
Hi, here is the output (from running cmd/cpuid/main.go
with that patch):
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
EAX: 0x00004121, EBX: 0x01c0003f, ECX: 0x0000003f; type 1 size: 32768
Name: AMD Ryzen 7 5700G with Radeon Graphics
Vendor String: AuthenticAMD
Vendor ID: AMD
PhysicalCores: 16
Threads Per Core: 2
Logical Cores: 32
CPU Family 25 Model: 80
Features: ADX,AESNI,AVX,AVX2,BMI1,BMI2,CLMUL,CLZERO,CMOV,CMPXCHG8,CX16,ERMS,F16C,FMA3,FXSR,FXSROPT,HTT,HYPERVISOR,LAHF,LZCNT,MMX,MMXEXT,MOVBE,MSR_PAGEFLUSH,NX,OSXSAVE,POPCNT,RDRAND,RDSEED,RDTSCP,SCE,SEV,SEV_64BIT,SEV_ALTERNATIVE,SEV_DEBUGSWAP,SEV_ES,SEV_RESTRICTED,SHA,SME,SSE,SSE2,SSE3,SSE4,SSE42,SSE4A,SSSE3,VTE,X87,XGETBV1,XSAVE,XSAVEC,XSAVEOPT,XSAVES
Microarchitecture level: 3
Cacheline bytes: 64
L1 Instruction Cache: 32768 bytes
L1 Data Cache: 32768 bytes
L2 Cache: 524288 bytes
L3 Cache: -1 bytes
Thanks
from cpuid.
ok, this is buggy, unless you have endless level 1 data cache :)
Seems like it just ignores ECX value given, which should return different cache levels.
from cpuid.
Great, thanks. Yes, I don't think I have an infinite cache unfortunately :)
from cpuid.
Thanks for the help.
You can try the cpuid of the latest release: https://github.com/klauspost/cpuid/releases/tag/v2.0.14 - should catch your case.
I will upstream if you can confirm it works.
from cpuid.
Related Issues (20)
- CPUID and NFD support: AVX_VNNI HOT 9
- Difference in characteristics between lscpu and cpuid go implementation for AMD Ryzen HOT 1
- Provide stepping information for Intel CPU HOT 1
- Possible SCE check issue HOT 13
- Looks at CPUID leaves it should not HOT 5
- L1 icache and dcache on M1 are the same sysctl HOT 1
- Can this package support detecting CPU microarchitecture information? HOT 3
- mac error HOT 1
- Crash Samsung s9 arm64 HOT 1
- invalid operation: 1 << (feat & flagMask) (shift count type FeatureID, must be unsigned integer) HOT 1
- I have one my Windows 10 Pro Physical Desktop Machine, still it's returning true for the call cpuid.CPU.VM() HOT 5
- Spurious debug line: "frequencies(): ..." HOT 1
- CPU.Hz returns 0? HOT 1
- CPU without L3 cache shows -1 bytes of L3 HOT 1
- main.go:7:2: cannot find package "github.com/klauspost/cpuid/v2" in any of: HOT 2
- main.go:7:2: cannot find package "github.com/klauspost/cpuid/v2" in any of: HOT 3
- Can this package support arm linux HOT 1
- Can not compile to amd64 in mac m1 arm HOT 1
- Support for memory encryption cpuids (AMD SME, SEV and Intel TME) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpuid.