lkml.org 
[lkml]   [1996]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectrdmsr/wrmsr error

> gcc -D__KERNEL__ -I/usr/src/linux-2.0.25/include -Wall -Wstrict-prototypes
> -O2 -fomit-frame-pointer -fno-strength-reduce -pipe -m486 -DCPU=486 -c -o
> time.o time.c
> {standard input}: Assembler messages:
> {standard input}:768: Error: no such 386 instruction: `rdmsr'
> {standard input}:770: Error: no such 386 instruction: `wrmsr'
> make[1]: *** [time.o] Error 1
> make[1]: Leaving directory /usr/src/linux-2.0.25/arch/i386/kernel'

I took a quick look at time.c, (at the following code)

if (x86_capability & 16) {
do_gettimeoffset = do_fast_gettimeoffset;

if( strcmp( x86_vendor_id, "AuthenticAMD" ) == 0 ) {
if( x86 == 5 ) {
if( x86_model == 0 ) {
/* turn on cycle counters during power down */
__asm__ __volatile__ (" movl $0x83, %%ecx \n \
rdmsr \n \
orl $1,%%eax \n \
wrmsr \n "
: : : "ax", "cx", "dx" );
udelay(500);
}
}
}

/* read Pentium cycle counter */
__asm__(".byte 0x0f,0x31"
:"=a" (init_timer_cc.low),
"=d" (init_timer_cc.high));
irq0.handler = pentium_timer_interrupt;
}



I don't have my intel assembler reference manuals near me, but if someone
could just look up the actual byte code for rdmsr, and wrmsr, we should
just replace the offending instructions with appropriate ".byte ......" instructions,
like the on use to read the pendium cycle counter. Yes?

David Dyck



\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.034 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site