Go to the source code of this file.
◆ _x86_cache_info()
Definition at line 50 of file x86_cpuid_info.c.
57 unsigned int ax, bx, cx, dx;
70 cpuid( ®.e.ax, ®.e.bx, ®.e.dx, ®.e.cx );
72 MEMDBG(
"Vendor: %s\n", ®.vendor[4] );
76 if ( !strncmp(
"GenuineIntel", ®.vendor[4], 12 ) ) {
78 }
else if ( !strncmp(
"AuthenticAMD", ®.vendor[4], 12 ) ) {
81 MEMDBG(
"Unsupported cpu type; Not Intel or AMD x86\n" );
86 MEMDBG(
"Detected L1: %d L2: %d L3: %d\n",
PAPI_mh_level_t level[PAPI_MAX_MEM_HIERARCHY_LEVELS]
static void cpuid(unsigned int *a, unsigned int *b, unsigned int *c, unsigned int *d)
static int init_intel(PAPI_mh_info_t *mh_info, int *levels)
static void init_mem_hierarchy(PAPI_mh_info_t *mh_info)
#define MEMDBG(format, args...)
PAPI_mh_cache_info_t cache[PAPI_MH_MAX_LEVELS]
static int init_amd(PAPI_mh_info_t *mh_info, int *levels)
◆ _x86_detect_hypervisor()
| int _x86_detect_hypervisor |
( |
char * |
vendor_name | ) |
|
Definition at line 1507 of file x86_cpuid_info.c.
1509 unsigned int eax, ebx, ecx, edx;
1510 char hyper_vendor_id[13];
1512 cpuid2(&eax, &ebx, &ecx, &edx,0x1,0);
1514 if (ecx&0x80000000) {
1518 cpuid2(&eax, &ebx, &ecx, &edx, 0x40000000,0);
1519 memcpy(hyper_vendor_id + 0, &ebx, 4);
1520 memcpy(hyper_vendor_id + 4, &ecx, 4);
1521 memcpy(hyper_vendor_id + 8, &edx, 4);
1522 hyper_vendor_id[12] =
'\0';
static void cpuid2(unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx, unsigned int index, unsigned int ecx_in)