intdev.cc (6064:46d327d42036) intdev.cc (6138:6cbdd76b93db)
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;

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

26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * Authors: Gabe Black
29 */
30
31#include "dev/x86/intdev.hh"
32
33void
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;

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

26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * Authors: Gabe Black
29 */
30
31#include "dev/x86/intdev.hh"
32
33void
34X86ISA::IntDev::IntPort::sendMessage(TriggerIntMessage message, bool timing)
34X86ISA::IntDev::IntPort::sendMessage(ApicList apics,
35 TriggerIntMessage message, bool timing)
35{
36{
36 if (DeliveryMode::isReserved(message.deliveryMode)) {
37 fatal("Tried to use reserved delivery mode %d\n",
38 message.deliveryMode);
39 } else if (DTRACE(IntDev)) {
40 DPRINTF(IntDev, "Delivery mode is: %s.\n",
41 DeliveryMode::names[message.deliveryMode]);
42 DPRINTF(IntDev, "Vector is %#x.\n", message.vector);
43 }
44 if (message.destMode == 0) {
45 DPRINTF(IntDev,
46 "Sending interrupt to APIC ID %d.\n", message.destination);
47 PacketPtr pkt = buildIntRequest(message.destination, message);
48 if (timing) {
37 ApicList::iterator apicIt;
38 for (apicIt = apics.begin(); apicIt != apics.end(); apicIt++) {
39 PacketPtr pkt = buildIntRequest(*apicIt, message);
40 if (timing)
49 sendMessageTiming(pkt, latency);
41 sendMessageTiming(pkt, latency);
50 } else {
42 else
51 sendMessageAtomic(pkt);
43 sendMessageAtomic(pkt);
52 }
53 } else {
54 DPRINTF(IntDev, "Sending interrupts to APIC IDs:"
55 "%s%s%s%s%s%s%s%s\n",
56 bits((int)message.destination, 0) ? " 0": "",
57 bits((int)message.destination, 1) ? " 1": "",
58 bits((int)message.destination, 2) ? " 2": "",
59 bits((int)message.destination, 3) ? " 3": "",
60 bits((int)message.destination, 4) ? " 4": "",
61 bits((int)message.destination, 5) ? " 5": "",
62 bits((int)message.destination, 6) ? " 6": "",
63 bits((int)message.destination, 7) ? " 7": ""
64 );
65 uint8_t dests = message.destination;
66 uint8_t id = 0;
67 while(dests) {
68 if (dests & 0x1) {
69 PacketPtr pkt = buildIntRequest(id, message);
70 if (timing)
71 sendMessageTiming(pkt, latency);
72 else
73 sendMessageAtomic(pkt);
74 }
75 dests >>= 1;
76 id++;
77 }
78 }
79}
80
81X86ISA::IntSourcePin *
82X86IntSourcePinParams::create()
83{
84 return new X86ISA::IntSourcePin(this);
85}

--- 12 unchanged lines hidden ---
44 }
45}
46
47X86ISA::IntSourcePin *
48X86IntSourcePinParams::create()
49{
50 return new X86ISA::IntSourcePin(this);
51}

--- 12 unchanged lines hidden ---