david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

fix the rdtsc namimg

This commit is contained in:
Alexey Zaytsev 2008-03-02 05:19:29 +03:00
parent 379c37bafb
commit 1935439f86
4 changed files with 11 additions and 11 deletions

View File

@ -48,7 +48,7 @@ bad_ctc:
} }
static uint32_t clocks_per_second = 0; static uint32_t clocks_per_second = 0;
static tick_t rtdsc_currticks(void) static tick_t rdtsc_currticks(void)
{ {
uint32_t clocks_high, clocks_low; uint32_t clocks_high, clocks_low;
uint32_t currticks; uint32_t currticks;
@ -64,7 +64,7 @@ static tick_t rtdsc_currticks(void)
return currticks; return currticks;
} }
static int rtdsc_ts_init(void) static int rdtsc_ts_init(void)
{ {
struct cpuinfo_x86 cpu_info; struct cpuinfo_x86 cpu_info;
@ -73,19 +73,19 @@ static int rtdsc_ts_init(void)
if (cpu_info.features & X86_FEATURE_TSC) { if (cpu_info.features & X86_FEATURE_TSC) {
clocks_per_second = calibrate_tsc(); clocks_per_second = calibrate_tsc();
if (clocks_per_second) { if (clocks_per_second) {
DBG("RTDSC Ticksource installed. CPU running at %ld Mhz\n", DBG("RDTSC ticksource installed. CPU running at %ld Mhz\n",
clocks_per_second/(1000*1000)); clocks_per_second/(1000*1000));
return 0; return 0;
} }
} }
DBG("RTDSC timer not available on this machine.\n"); DBG("RDTSC ticksource not available on this machine.\n");
return -ENODEV; return -ENODEV;
} }
struct timer rtdsc_ts __timer (01) = { struct timer rdtsc_ts __timer (01) = {
.init = rtdsc_ts_init, .init = rdtsc_ts_init,
.udelay = generic_currticks_udelay, .udelay = generic_currticks_udelay,
.currticks = rtdsc_currticks, .currticks = rdtsc_currticks,
}; };

View File

@ -26,7 +26,7 @@
#define ERRFILE_undionly ( ERRFILE_ARCH | ERRFILE_NET | 0x00030000 ) #define ERRFILE_undionly ( ERRFILE_ARCH | ERRFILE_NET | 0x00030000 )
#define ERRFILE_undirom ( ERRFILE_ARCH | ERRFILE_NET | 0x00040000 ) #define ERRFILE_undirom ( ERRFILE_ARCH | ERRFILE_NET | 0x00040000 )
#define ERRFILE_timer_rtdsc ( ERRFILE_ARCH | ERRFILE_DRIVER | 0x00000000 ) #define ERRFILE_timer_rdtsc ( ERRFILE_ARCH | ERRFILE_DRIVER | 0x00000000 )
#define ERRFILE_timer_bios ( ERRFILE_ARCH | ERRFILE_DRIVER | 0x00010000 ) #define ERRFILE_timer_bios ( ERRFILE_ARCH | ERRFILE_DRIVER | 0x00010000 )
/** @} */ /** @} */

View File

@ -24,7 +24,7 @@
#undef CONSOLE_PC_KBD /* Direct access to PC keyboard */ #undef CONSOLE_PC_KBD /* Direct access to PC keyboard */
#define TIMER_BIOS #define TIMER_BIOS
#define TIMER_RTDSC #define TIMER_RDTSC
/* @END general.h */ /* @END general.h */

View File

@ -82,8 +82,8 @@ REQUIRE_OBJECT ( syslog );
REQUIRE_OBJECT ( timer_bios ); REQUIRE_OBJECT ( timer_bios );
#endif #endif
#ifdef TIMER_RTDSC #ifdef TIMER_RDTSC
REQUIRE_OBJECT ( timer_rtdsc ); REQUIRE_OBJECT ( timer_rdtsc );
#endif #endif
/* /*
* Drag in all requested protocols * Drag in all requested protocols