MCPcopy Create free account
hub / github.com/coreboot/coreboot / cpuid

Function cpuid

util/amdtool/cpu.c:29–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27int fd_msr;
28
29uint32_t cpuid(uint32_t eax)
30{
31 uint32_t ret;
32
33#if defined(__PIC__) || defined(__DARWIN__) && !defined(__LP64__)
34 asm volatile (
35 "push " BREG "\n\t"
36 "cpuid\n\t"
37 "pop " BREG "\n\t"
38 : "=a" (ret) : "a" (eax) : "%ecx", "%edx"
39 );
40#else
41 asm ("cpuid" : "=a" (ret) : "a" (eax) : "%ebx", "%ecx", "%edx");
42#endif
43
44 return ret;
45}
46
47static inline cpuid_result_t cpuid_ext(uint32_t eax, unsigned int ecx)
48{

Callers 8

print_system_infoFunction · 0.70
is_sme_supportedFunction · 0.70
is_sev_supportedFunction · 0.70
is_sev_es_supportedFunction · 0.70
is_sev_snp_supportedFunction · 0.70
get_cpu_brand_stringFunction · 0.70
print_cpu_featuresFunction · 0.70
print_amd_msrsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected