interrupts.hh (5810:606de5b3d116) interrupts.hh (6041:949a8304e7f9)
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 *

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

186 BaseCPU *cpu;
187
188 public:
189 /*
190 * Params stuff.
191 */
192 typedef X86LocalApicParams Params;
193
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 *

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

186 BaseCPU *cpu;
187
188 public:
189 /*
190 * Params stuff.
191 */
192 typedef X86LocalApicParams Params;
193
194 void
195 setCPU(BaseCPU * newCPU)
196 {
197 cpu = newCPU;
198 }
194 void setCPU(BaseCPU * newCPU);
199
200 void
201 setClock(Tick newClock)
202 {
203 clock = newClock;
204 }
205
206 const Params *

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

220 triggerTimerInterrupt()
221 {
222 LVTEntry entry = regs[APIC_LVT_TIMER];
223 if (!entry.masked)
224 requestInterrupt(entry.vector, entry.deliveryMode, entry.trigger);
225 return entry.periodic;
226 }
227
195
196 void
197 setClock(Tick newClock)
198 {
199 clock = newClock;
200 }
201
202 const Params *

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

216 triggerTimerInterrupt()
217 {
218 LVTEntry entry = regs[APIC_LVT_TIMER];
219 if (!entry.masked)
220 requestInterrupt(entry.vector, entry.deliveryMode, entry.trigger);
221 return entry.periodic;
222 }
223
228 void addressRanges(AddrRangeList &range_list)
229 {
230 range_list.clear();
231 range_list.push_back(RangeEx(x86LocalAPICAddress(0, 0),
232 x86LocalAPICAddress(0, 0) + PageBytes));
233 }
224 void addressRanges(AddrRangeList &range_list);
225 void getIntAddrRange(AddrRangeList &range_list);
234
226
235 void getIntAddrRange(AddrRangeList &range_list)
236 {
237 range_list.clear();
238 range_list.push_back(RangeEx(x86InterruptAddress(0, 0),
239 x86InterruptAddress(0, 0) + PhysAddrAPICRangeSize));
240 }
241
242 Port *getPort(const std::string &if_name, int idx = -1)
243 {
244 if (if_name == "int_port")
245 return intPort;
246 return BasicPioDevice::getPort(if_name, idx);
247 }
248
249 /*

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

257 {
258 regs[reg] = val;
259 }
260
261 /*
262 * Constructor.
263 */
264
227 Port *getPort(const std::string &if_name, int idx = -1)
228 {
229 if (if_name == "int_port")
230 return intPort;
231 return BasicPioDevice::getPort(if_name, idx);
232 }
233
234 /*

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

242 {
243 regs[reg] = val;
244 }
245
246 /*
247 * Constructor.
248 */
249
265 Interrupts(Params * p)
266 : BasicPioDevice(p), IntDev(this), latency(p->pio_latency), clock(0),
267 apicTimerEvent(this),
268 pendingSmi(false), smiVector(0),
269 pendingNmi(false), nmiVector(0),
270 pendingExtInt(false), extIntVector(0),
271 pendingInit(false), initVector(0),
272 pendingUnmaskableInt(false)
273 {
274 pioSize = PageBytes;
275 memset(regs, 0, sizeof(regs));
276 //Set the local apic DFR to the flat model.
277 regs[APIC_DESTINATION_FORMAT] = (uint32_t)(-1);
278 ISRV = 0;
279 IRRV = 0;
280 }
250 Interrupts(Params * p);
281
282 /*
283 * Functions for retrieving interrupts for the CPU to handle.
284 */
285
286 bool checkInterrupts(ThreadContext *tc) const;
287 Fault getInterrupt(ThreadContext *tc);
288 void updateIntrInfo(ThreadContext *tc);

--- 43 unchanged lines hidden ---
251
252 /*
253 * Functions for retrieving interrupts for the CPU to handle.
254 */
255
256 bool checkInterrupts(ThreadContext *tc) const;
257 Fault getInterrupt(ThreadContext *tc);
258 void updateIntrInfo(ThreadContext *tc);

--- 43 unchanged lines hidden ---