Skip to content

Commit

Permalink
MSR BX_DEBUG prints
Browse files Browse the repository at this point in the history
  • Loading branch information
sshwarts committed May 16, 2010
1 parent 4539157 commit 832c449
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cpu/msr.cc
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////
// $Id: msr.cc,v 1.48 2010/04/08 15:50:39 sshwarts Exp $
// $Id: msr.cc,v 1.49 2010/05/16 13:56:22 sshwarts Exp $
/////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2008-2010 Stanislav Shwartsman
Expand Down Expand Up @@ -262,6 +262,8 @@ bx_bool BX_CPP_AttrRegparmN(2) BX_CPU_C::rdmsr(Bit32u index, Bit64u *msr)
return 0; // will result in #GP fault due to unknown MSR
}

BX_DEBUG(("RDMSR: read %08x:%08x from MSR %x", GET32H(val64), GET32L(val64), index));

*msr = val64;
return 1;
}
Expand Down Expand Up @@ -357,6 +359,8 @@ bx_bool BX_CPP_AttrRegparmN(2) BX_CPU_C::wrmsr(Bit32u index, Bit64u val_64)

BX_INSTR_WRMSR(BX_CPU_ID, index, val_64);

BX_DEBUG(("WRMSR: write %08x:%08x to MSR %x", val32_hi, val32_lo, index));

if ((index & 0x3FFFFFFF) >= BX_MSR_MAX_INDEX)
return 0;

Expand Down

0 comments on commit 832c449

Please sign in to comment.