diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2008-02-26 23:39:53 -0500 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2008-02-26 23:39:53 -0500 |
commit | 43ecce5fda625e057724d10e087180b02d027ca0 (patch) | |
tree | 2984a0315219c95b6aa6d9f06e4ad026e3090514 /src/arch/x86/mmaped_ipr.hh | |
parent | 98d2ca403e859f289e6d637a2179e62728370d5f (diff) | |
download | gem5-43ecce5fda625e057724d10e087180b02d027ca0.tar.xz |
X86: Put in initial implementation of the local APIC.
--HG--
extra : convert_revision : 1708a93d96b819e64ed456c75dbb5325ac8114a8
Diffstat (limited to 'src/arch/x86/mmaped_ipr.hh')
-rw-r--r-- | src/arch/x86/mmaped_ipr.hh | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/arch/x86/mmaped_ipr.hh b/src/arch/x86/mmaped_ipr.hh index 36c0baaca..eda85c084 100644 --- a/src/arch/x86/mmaped_ipr.hh +++ b/src/arch/x86/mmaped_ipr.hh @@ -78,7 +78,15 @@ namespace X86ISA #if !FULL_SYSTEM panic("Shouldn't have a memory mapped register in SE\n"); #else - pkt->set(xc->readMiscReg(pkt->getAddr() / sizeof(MiscReg))); + MiscRegIndex index = (MiscRegIndex)(pkt->getAddr() / sizeof(MiscReg)); + if (index == MISCREG_PCI_CONFIG_ADDRESS || + (index >= MISCREG_APIC_START && + index <= MISCREG_APIC_END)) { + pkt->set((uint32_t)(xc->readMiscReg(pkt->getAddr() / + sizeof(MiscReg)))); + } else { + pkt->set(xc->readMiscReg(pkt->getAddr() / sizeof(MiscReg))); + } #endif return xc->getCpuPtr()->ticks(1); } @@ -90,7 +98,9 @@ namespace X86ISA panic("Shouldn't have a memory mapped register in SE\n"); #else MiscRegIndex index = (MiscRegIndex)(pkt->getAddr() / sizeof(MiscReg)); - if (index == MISCREG_PCI_CONFIG_ADDRESS) { + if (index == MISCREG_PCI_CONFIG_ADDRESS || + (index >= MISCREG_APIC_START && + index <= MISCREG_APIC_END)) { xc->setMiscReg(index, gtoh(pkt->get<uint32_t>())); } else { xc->setMiscReg(pkt->getAddr() / sizeof(MiscReg), |