diff options
author | Bjoern A. Zeeb <baz21@cam.ac.uk> | 2016-05-19 15:19:35 -0500 |
---|---|---|
committer | Bjoern A. Zeeb <baz21@cam.ac.uk> | 2016-05-19 15:19:35 -0500 |
commit | 5fa6b68981dd8566bc2808a309f34d40186a74cf (patch) | |
tree | cc02381547ae0cc970cf0b9131e3c2edf7efe38e /src/arch | |
parent | ce610dcab118fe2ae907854429725a4c169cfd56 (diff) | |
download | gem5-5fa6b68981dd8566bc2808a309f34d40186a74cf.tar.xz |
x86, dev: properly space the APIC registers
Registers are 0x10 and not 0x8 apart. The latter leads to invalid
calculations of index in array which in turn means that we will not
find the interrupt we were looking (been notified) for in the OS.
Committed by Jason Lowe-Power <power.jg@gmail.com>
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/x86/interrupts.cc | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/src/arch/x86/interrupts.cc b/src/arch/x86/interrupts.cc index 1f7002ebe..10387c07a 100644 --- a/src/arch/x86/interrupts.cc +++ b/src/arch/x86/interrupts.cc @@ -112,58 +112,34 @@ decodeAddr(Addr paddr) regNum = APIC_SPURIOUS_INTERRUPT_VECTOR; break; case 0x100: - case 0x108: case 0x110: - case 0x118: case 0x120: - case 0x128: case 0x130: - case 0x138: case 0x140: - case 0x148: case 0x150: - case 0x158: case 0x160: - case 0x168: case 0x170: - case 0x178: - regNum = APIC_IN_SERVICE((paddr - 0x100) / 0x8); + regNum = APIC_IN_SERVICE((paddr - 0x100) / 0x10); break; case 0x180: - case 0x188: case 0x190: - case 0x198: case 0x1A0: - case 0x1A8: case 0x1B0: - case 0x1B8: case 0x1C0: - case 0x1C8: case 0x1D0: - case 0x1D8: case 0x1E0: - case 0x1E8: case 0x1F0: - case 0x1F8: - regNum = APIC_TRIGGER_MODE((paddr - 0x180) / 0x8); + regNum = APIC_TRIGGER_MODE((paddr - 0x180) / 0x10); break; case 0x200: - case 0x208: case 0x210: - case 0x218: case 0x220: - case 0x228: case 0x230: - case 0x238: case 0x240: - case 0x248: case 0x250: - case 0x258: case 0x260: - case 0x268: case 0x270: - case 0x278: - regNum = APIC_INTERRUPT_REQUEST((paddr - 0x200) / 0x8); + regNum = APIC_INTERRUPT_REQUEST((paddr - 0x200) / 0x10); break; case 0x280: regNum = APIC_ERROR_STATUS; |