summaryrefslogtreecommitdiff
path: root/src/include/cpu/p5/cpuid.h
blob: b8ffc88a848da69c5ab8d83b1544af0bd224dbbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef CPU_P5_CPUID_H
#define CPU_P5_CPUID_H

int mtrr_check(void);
void display_cpuid(void);

/*
 *      Generic CPUID function. copied from Linux kernel headers
 */

static inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx)
{
        __asm__("pushl %%ebx\n\t"
		"cpuid\n\t"
		"movl	%%ebx, %%esi\n\t"
		"popl	%%ebx\n\t"
                : "=a" (*eax),
                  "=S" (*ebx),
                  "=c" (*ecx),
                  "=d" (*edx)
                : "a" (op)
                : "cc");
}

#endif /* CPU_P5_CPUID_H */