diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2008-02-26 23:38:01 -0500 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2008-02-26 23:38:01 -0500 |
commit | 7bde0285e50e3903e38dd9e6fd59ea4a98f41079 (patch) | |
tree | d2f1642ba2d5345ea66a54f1aade40791ce15cee /src/arch/x86/mmaped_ipr.hh | |
parent | 8c0baf2ce478b16d351feb1f0ce147049f3a04f6 (diff) | |
download | gem5-7bde0285e50e3903e38dd9e6fd59ea4a98f41079.tar.xz |
X86: Get PCI config space to work, and adjust address space prefix numbering scheme.
--HG--
extra : convert_revision : 2b382f478ee8cde3a35aa4c105196f200bc7afa6
Diffstat (limited to 'src/arch/x86/mmaped_ipr.hh')
-rw-r--r-- | src/arch/x86/mmaped_ipr.hh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/arch/x86/mmaped_ipr.hh b/src/arch/x86/mmaped_ipr.hh index 9184ec4dc..36c0baaca 100644 --- a/src/arch/x86/mmaped_ipr.hh +++ b/src/arch/x86/mmaped_ipr.hh @@ -64,6 +64,7 @@ * ISA-specific helper functions for memory mapped IPR accesses. */ +#include "arch/x86/miscregs.hh" #include "config/full_system.hh" #include "cpu/base.hh" #include "cpu/thread_context.hh" @@ -88,8 +89,13 @@ namespace X86ISA #if !FULL_SYSTEM panic("Shouldn't have a memory mapped register in SE\n"); #else - xc->setMiscReg(pkt->getAddr() / sizeof(MiscReg), - gtoh(pkt->get<uint64_t>())); + MiscRegIndex index = (MiscRegIndex)(pkt->getAddr() / sizeof(MiscReg)); + if (index == MISCREG_PCI_CONFIG_ADDRESS) { + xc->setMiscReg(index, gtoh(pkt->get<uint32_t>())); + } else { + xc->setMiscReg(pkt->getAddr() / sizeof(MiscReg), + gtoh(pkt->get<uint64_t>())); + } #endif return xc->getCpuPtr()->ticks(1); } |