summaryrefslogtreecommitdiff
path: root/src/arch/x86/mmaped_ipr.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-10-12 16:37:55 -0700
committerGabe Black <gblack@eecs.umich.edu>2007-10-12 16:37:55 -0700
commit9498e536c0231b808669f2bacb4c0628d1ec309a (patch)
tree13edd1623e87077269a03b10a37a66bf61f4f969 /src/arch/x86/mmaped_ipr.hh
parent8b35bd6fe79ce069428431a4edbe43b8373f7e87 (diff)
downloadgem5-9498e536c0231b808669f2bacb4c0628d1ec309a.tar.xz
X86: Implement MSR reads and writes and the wrsmr and rdmsr instructions.
There are no priviledge checks, so these instructions will all work in all modes. --HG-- extra : convert_revision : ff893eb569313d8aecbfffb47bcbd1c2d65cd393
Diffstat (limited to 'src/arch/x86/mmaped_ipr.hh')
-rw-r--r--src/arch/x86/mmaped_ipr.hh5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/arch/x86/mmaped_ipr.hh b/src/arch/x86/mmaped_ipr.hh
index 1fef72fa6..c7befa35b 100644
--- a/src/arch/x86/mmaped_ipr.hh
+++ b/src/arch/x86/mmaped_ipr.hh
@@ -76,7 +76,7 @@ namespace X86ISA
#if !FULL_SYSTEM
panic("Shouldn't have a memory mapped register in SE\n");
#else
- panic("Memory mapped registers aren't implemented for x86!\n");
+ pkt->set(xc->readMiscReg(pkt->getAddr() / sizeof(MiscReg)));
#endif
}
@@ -86,7 +86,8 @@ namespace X86ISA
#if !FULL_SYSTEM
panic("Shouldn't have a memory mapped register in SE\n");
#else
- panic("Memory mapped registers aren't implemented for x86!\n");
+ xc->setMiscReg(pkt->getAddr() / sizeof(MiscReg),
+ gtoh(pkt->get<uint64_t>()));
#endif
}
};