i82094aa.cc (6138:6cbdd76b93db) i82094aa.cc (6139:2bfd792b1cc0)
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;

--- 24 unchanged lines hidden (view full) ---

33#include "dev/x86/i82094aa.hh"
34#include "dev/x86/i8259.hh"
35#include "mem/packet.hh"
36#include "mem/packet_access.hh"
37#include "sim/system.hh"
38
39X86ISA::I82094AA::I82094AA(Params *p) : PioDevice(p), IntDev(this),
40 latency(p->pio_latency), pioAddr(p->pio_addr),
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;

--- 24 unchanged lines hidden (view full) ---

33#include "dev/x86/i82094aa.hh"
34#include "dev/x86/i8259.hh"
35#include "mem/packet.hh"
36#include "mem/packet_access.hh"
37#include "sim/system.hh"
38
39X86ISA::I82094AA::I82094AA(Params *p) : PioDevice(p), IntDev(this),
40 latency(p->pio_latency), pioAddr(p->pio_addr),
41 extIntPic(p->external_int_pic)
41 extIntPic(p->external_int_pic), lowestPriorityOffset(0)
42{
43 // This assumes there's only one I/O APIC in the system
44 initialApicId = id = p->apic_id;
45 assert(id <= 0xf);
46 arbId = id;
47 regSel = 0;
48 RedirTableEntry entry = 0;
49 entry.mask = 1;

--- 134 unchanged lines hidden (view full) ---

184 localApics.find(i);
185 assert(localApicIt != localApics.end());
186 Interrupts *localApic = localApicIt->second;
187 if ((localApic->readReg(APIC_LOGICAL_DESTINATION) >> 24) &
188 message.destination) {
189 apics.push_back(localApicIt->first);
190 }
191 }
42{
43 // This assumes there's only one I/O APIC in the system
44 initialApicId = id = p->apic_id;
45 assert(id <= 0xf);
46 arbId = id;
47 regSel = 0;
48 RedirTableEntry entry = 0;
49 entry.mask = 1;

--- 134 unchanged lines hidden (view full) ---

184 localApics.find(i);
185 assert(localApicIt != localApics.end());
186 Interrupts *localApic = localApicIt->second;
187 if ((localApic->readReg(APIC_LOGICAL_DESTINATION) >> 24) &
188 message.destination) {
189 apics.push_back(localApicIt->first);
190 }
191 }
192 if (message.deliveryMode == DeliveryMode::LowestPriority) {
193 panic("Lowest priority delivery mode is not implemented.\n");
192 if (message.deliveryMode == DeliveryMode::LowestPriority &&
193 apics.size()) {
194 // The manual seems to suggest that the chipset just does
195 // something reasonable for these instead of actually using
196 // state from the local APIC. We'll just rotate an offset
197 // through the set of APICs selected above.
198 uint64_t modOffset = lowestPriorityOffset % apics.size();
199 lowestPriorityOffset++;
200 ApicList::iterator apicIt = apics.begin();
201 while (modOffset--) {
202 apicIt++;
203 assert(apicIt != apics.end());
204 }
205 int selected = *apicIt;
206 apics.clear();
207 apics.push_back(selected);
194 }
195 }
196 intPort->sendMessage(apics, message,
197 sys->getMemoryMode() == Enums::timing);
198 }
199}
200
201void

--- 27 unchanged lines hidden ---
208 }
209 }
210 intPort->sendMessage(apics, message,
211 sys->getMemoryMode() == Enums::timing);
212 }
213}
214
215void

--- 27 unchanged lines hidden ---