Deleted Added
sdiff udiff text old ( 5655:74f76480407f ) new ( 5691:28d6ff8b94e2 )
full compact
1/*
2 * Copyright (c) 2007 The Hewlett-Packard Development Company
3 * All rights reserved.
4 *
5 * Redistribution and use of this software in source and binary forms,
6 * with or without modification, are permitted provided that the
7 * following conditions are met:
8 *

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

74{
75
76class Interrupts : public BasicPioDevice, IntDev
77{
78 protected:
79 // Storage for the APIC registers
80 uint32_t regs[NUM_APIC_REGS];
81
82 /*
83 * Timing related stuff.
84 */
85 Tick latency;
86 Tick clock;
87
88 class ApicTimerEvent : public Event
89 {
90 public:
91 ApicTimerEvent() : Event()
92 {}
93
94 void process()
95 {
96 warn("Local APIC timer event doesn't do anything!\n");
97 }
98 };
99
100 ApicTimerEvent apicTimerEvent;
101
102 /*
103 * A set of variables to keep track of interrupts that don't go through
104 * the IRR.
105 */
106 bool pendingSmi;
107 TriggerIntMessage smiMessage;
108 bool pendingNmi;
109 TriggerIntMessage nmiMessage;
110 bool pendingExtInt;
111 TriggerIntMessage extIntMessage;
112 bool pendingInit;
113 TriggerIntMessage initMessage;
114
115 // This is a quick check whether any of the above (except ExtInt) are set.
116 bool pendingUnmaskableInt;
117
118 /*
119 * IRR and ISR maintenance.
120 */
121 uint8_t IRRV;

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

158 }
159
160 bool
161 getRegArrayBit(ApicRegIndex base, uint8_t vector)
162 {
163 return bits(regs[base + (vector % 32)], vector >> 5);
164 }
165
166 public:
167 /*
168 * Params stuff.
169 */
170 typedef X86LocalApicParams Params;
171
172 void setClock(Tick newClock)
173 {

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

182
183 /*
184 * Functions to interact with the interrupt port from IntDev.
185 */
186 Tick read(PacketPtr pkt);
187 Tick write(PacketPtr pkt);
188 Tick recvMessage(PacketPtr pkt);
189
190 void addressRanges(AddrRangeList &range_list)
191 {
192 range_list.clear();
193 range_list.push_back(RangeEx(x86LocalAPICAddress(0, 0),
194 x86LocalAPICAddress(0, 0) + PageBytes));
195 }
196
197 void getIntAddrRange(AddrRangeList &range_list)

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

220 }
221
222 /*
223 * Constructor.
224 */
225
226 Interrupts(Params * p) : BasicPioDevice(p), IntDev(this),
227 latency(p->pio_latency), clock(0),
228 pendingSmi(false), smiMessage(0),
229 pendingNmi(false), nmiMessage(0),
230 pendingExtInt(false), extIntMessage(0),
231 pendingInit(false), initMessage(0),
232 pendingUnmaskableInt(false)
233 {
234 pioSize = PageBytes;
235 memset(regs, 0, sizeof(regs));
236 //Set the local apic DFR to the flat model.
237 regs[APIC_DESTINATION_FORMAT] = (uint32_t)(-1);
238 ISRV = 0;
239 IRRV = 0;

--- 47 unchanged lines hidden ---