- Renamed cpu header files

git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1659 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Eric Biederman
2004-10-14 20:13:01 +00:00
parent b84166e8e5
commit c84c1906b7
13 changed files with 522 additions and 0 deletions

30
src/include/cpu/x86/tsc.h Normal file
View File

@ -0,0 +1,30 @@
#ifndef CPU_X86_TSC_H
#define CPU_X86_TSC_H
struct tsc_struct {
unsigned lo;
unsigned hi;
};
typedef struct tsc_struct tsc_t;
static tsc_t rdtsc(void)
{
tsc_t res;
__asm__ __volatile__ (
"rdtsc"
: "=a" (res.lo), "=d"(res.hi) /* outputs */
);
return res;
}
#ifndef ROMCC
static inline unsigned long long rdtscll(void)
{
unsigned long long val;
asm volatile ("rdtsc" : "=A" (val));
return val;
}
#endif
#endif /* CPU_X86_TSC_H */