1/* 2 * Copyright (c) 2008 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 16 unchanged lines hidden (view full) --- 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * Authors: Gabe Black 29 */ 30 31#include "config/full_system.hh" 32 |
33#include "arch/x86/interrupts.hh" |
34#include "arch/x86/intmessage.hh" |
35#include "cpu/base.hh" |
36#include "debug/I82094AA.hh" 37#include "dev/x86/i82094aa.hh" 38#include "dev/x86/i8259.hh" 39#include "mem/packet.hh" 40#include "mem/packet_access.hh" 41#include "sim/system.hh" 42 43X86ISA::I82094AA::I82094AA(Params *p) : PioDevice(p), --- 121 unchanged lines hidden (view full) --- 165{ 166 DPRINTF(I82094AA, "Received interrupt %d.\n", line); 167 assert(line < TableSize); 168 RedirTableEntry entry = redirTable[line]; 169 if (entry.mask) { 170 DPRINTF(I82094AA, "Entry was masked.\n"); 171 return; 172 } else { |
173 TriggerIntMessage message = 0; 174 message.destination = entry.dest; 175 if (entry.deliveryMode == DeliveryMode::ExtInt) { 176 assert(extIntPic); 177 message.vector = extIntPic->getVector(); 178 } else { 179 message.vector = entry.vector; 180 } --- 13 unchanged lines hidden (view full) --- 194 for (int i = 0; i < numContexts; i++) { 195 apics.push_back(i); 196 } 197 } else { 198 apics.push_back(message.destination); 199 } 200 } else { 201 for (int i = 0; i < numContexts; i++) { |
202 Interrupts *localApic = sys->getThreadContext(i)-> 203 getCpuPtr()->getInterruptController(); |
204 if ((localApic->readReg(APIC_LOGICAL_DESTINATION) >> 24) & 205 message.destination) { |
206 apics.push_back(localApic->getInitialApicId()); |
207 } 208 } 209 if (message.deliveryMode == DeliveryMode::LowestPriority && 210 apics.size()) { 211 // The manual seems to suggest that the chipset just does 212 // something reasonable for these instead of actually using 213 // state from the local APIC. We'll just rotate an offset 214 // through the set of APICs selected above. --- 6 unchanged lines hidden (view full) --- 221 } 222 int selected = *apicIt; 223 apics.clear(); 224 apics.push_back(selected); 225 } 226 } 227 intPort->sendMessage(apics, message, 228 sys->getMemoryMode() == Enums::timing); |
229 } 230} 231 232void 233X86ISA::I82094AA::raiseInterruptPin(int number) 234{ 235 assert(number < TableSize); 236 if (!pinStates[number]) --- 4 unchanged lines hidden (view full) --- 241void 242X86ISA::I82094AA::lowerInterruptPin(int number) 243{ 244 assert(number < TableSize); 245 pinStates[number] = false; 246} 247 248void |
249X86ISA::I82094AA::serialize(std::ostream &os) 250{ 251 uint64_t* redirTableArray = (uint64_t*)redirTable; 252 SERIALIZE_SCALAR(regSel); 253 SERIALIZE_SCALAR(initialApicId); 254 SERIALIZE_SCALAR(id); 255 SERIALIZE_SCALAR(arbId); 256 SERIALIZE_SCALAR(lowestPriorityOffset); --- 25 unchanged lines hidden --- |