summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2008-06-12 00:53:50 -0400
committerGabe Black <gblack@eecs.umich.edu>2008-06-12 00:53:50 -0400
commite9c481ea4ae7d72d6a53bc80c7f867578179f00c (patch)
tree4104fcb8cc8f8f149b0ea8a9b6d365d694ee9c4d
parented23a4970bde6eea4a72aa0e33a87aad5713a427 (diff)
downloadgem5-e9c481ea4ae7d72d6a53bc80c7f867578179f00c.tar.xz
X86: Make the logical destination and destination format work.
-rw-r--r--src/arch/x86/miscregfile.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/arch/x86/miscregfile.cc b/src/arch/x86/miscregfile.cc
index d52d56915..46ee3a7db 100644
--- a/src/arch/x86/miscregfile.cc
+++ b/src/arch/x86/miscregfile.cc
@@ -106,6 +106,8 @@ void MiscRegFile::clear()
{
// Blank everything. 0 might not be an appropriate value for some things.
memset(regVal, 0, NumMiscRegs * sizeof(MiscReg));
+ //Set the local apic DFR to the flat model.
+ regVal[MISCREG_APIC_DESTINATION_FORMAT] = (MiscReg)(-1);
}
MiscReg MiscRegFile::readRegNoEffect(int miscReg)
@@ -151,12 +153,6 @@ MiscReg MiscRegFile::readReg(int miscReg, ThreadContext * tc)
case MISCREG_APIC_EOI:
panic("Local APIC EOI register unimplemented.\n");
break;
- case MISCREG_APIC_LOGICAL_DESTINATION:
- panic("Local APIC Logical Destination register unimplemented.\n");
- break;
- case MISCREG_APIC_DESTINATION_FORMAT:
- panic("Local APIC Destination Format register unimplemented.\n");
- break;
case MISCREG_APIC_ERROR_STATUS:
regVal[MISCREG_APIC_INTERNAL_STATE] &= ~ULL(0x1);
break;
@@ -237,10 +233,10 @@ void MiscRegFile::setReg(int miscReg,
panic("Local APIC EOI register unimplemented.\n");
break;
case MISCREG_APIC_LOGICAL_DESTINATION:
- panic("Local APIC Logical Destination register unimplemented.\n");
+ newVal = val & 0xFF000000;
break;
case MISCREG_APIC_DESTINATION_FORMAT:
- panic("Local APIC Destination Format register unimplemented.\n");
+ newVal = val | 0x0FFFFFFF;
break;
case MISCREG_APIC_SPURIOUS_INTERRUPT_VECTOR:
regVal[MISCREG_APIC_INTERNAL_STATE] &= ~ULL(1 << 1);