2 * Copyright (c) 2012-2013 ARM Limited
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated
11 * unmodified and in its entirety in all distributions of the software,
12 * modified or unmodified, in source code or in binary form.
14 * Copyright (c) 2008 The Hewlett-Packard Development Company
15 * All rights reserved.
17 * The license below extends only to copyright in the software and shall
18 * not be construed as granting a license to any other intellectual
19 * property including but not limited to intellectual property relating
20 * to a hardware implementation of the functionality of the software
21 * licensed hereunder. You may use the software subject to the license
22 * terms below provided that you ensure that this notice is replicated
23 * unmodified and in its entirety in all distributions of the software,
24 * modified or unmodified, in source code or in binary form.
26 * Redistribution and use in source and binary forms, with or without
27 * modification, are permitted provided that the following conditions are
28 * met: redistributions of source code must retain the above copyright
29 * notice, this list of conditions and the following disclaimer;
30 * redistributions in binary form must reproduce the above copyright
31 * notice, this list of conditions and the following disclaimer in the
32 * documentation and/or other materials provided with the distribution;
33 * neither the name of the copyright holders nor the names of its
34 * contributors may be used to endorse or promote products derived from
35 * this software without specific prior written permission.
37 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
38 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
39 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
40 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
41 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
42 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
43 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
44 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
45 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
46 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
47 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
52 #include "arch/x86/interrupts.hh"
57 #include "arch/x86/intmessage.hh"
58 #include "arch/x86/regs/apic.hh"
59 #include "cpu/base.hh"
60 #include "debug/LocalApic.hh"
61 #include "dev/x86/i82094aa.hh"
62 #include "dev/x86/pc.hh"
63 #include "dev/x86/south_bridge.hh"
64 #include "mem/packet_access.hh"
65 #include "sim/full_system.hh"
66 #include "sim/system.hh"
69 divideFromConf(uint32_t conf
)
71 // This figures out what division we want from the division configuration
72 // register in the local APIC. The encoding is a little odd but it can
73 // be deciphered fairly easily.
74 int shift
= ((conf
& 0x8) >> 1) | (conf
& 0x3);
75 shift
= (shift
+ 1) % 8;
83 decodeAddr(Addr paddr
)
93 regNum
= APIC_VERSION
;
96 regNum
= APIC_TASK_PRIORITY
;
99 regNum
= APIC_ARBITRATION_PRIORITY
;
102 regNum
= APIC_PROCESSOR_PRIORITY
;
108 regNum
= APIC_LOGICAL_DESTINATION
;
111 regNum
= APIC_DESTINATION_FORMAT
;
114 regNum
= APIC_SPURIOUS_INTERRUPT_VECTOR
;
124 regNum
= APIC_IN_SERVICE((paddr
- 0x100) / 0x10);
134 regNum
= APIC_TRIGGER_MODE((paddr
- 0x180) / 0x10);
144 regNum
= APIC_INTERRUPT_REQUEST((paddr
- 0x200) / 0x10);
147 regNum
= APIC_ERROR_STATUS
;
150 regNum
= APIC_INTERRUPT_COMMAND_LOW
;
153 regNum
= APIC_INTERRUPT_COMMAND_HIGH
;
156 regNum
= APIC_LVT_TIMER
;
159 regNum
= APIC_LVT_THERMAL_SENSOR
;
162 regNum
= APIC_LVT_PERFORMANCE_MONITORING_COUNTERS
;
165 regNum
= APIC_LVT_LINT0
;
168 regNum
= APIC_LVT_LINT1
;
171 regNum
= APIC_LVT_ERROR
;
174 regNum
= APIC_INITIAL_COUNT
;
177 regNum
= APIC_CURRENT_COUNT
;
180 regNum
= APIC_DIVIDE_CONFIGURATION
;
183 // A reserved register field.
184 panic("Accessed reserved register field %#x.\n", paddr
);
192 X86ISA::Interrupts::read(PacketPtr pkt
)
194 Addr offset
= pkt
->getAddr() - pioAddr
;
195 // Make sure we're at least only accessing one register.
196 if ((offset
& ~mask(3)) != ((offset
+ pkt
->getSize()) & ~mask(3)))
197 panic("Accessed more than one register at a time in the APIC!\n");
198 ApicRegIndex reg
= decodeAddr(offset
);
199 uint32_t val
= htog(readReg(reg
));
201 "Reading Local APIC register %d at offset %#x as %#x.\n",
203 pkt
->setData(((uint8_t *)&val
) + (offset
& mask(3)));
204 pkt
->makeAtomicResponse();
209 X86ISA::Interrupts::write(PacketPtr pkt
)
211 Addr offset
= pkt
->getAddr() - pioAddr
;
212 // Make sure we're at least only accessing one register.
213 if ((offset
& ~mask(3)) != ((offset
+ pkt
->getSize()) & ~mask(3)))
214 panic("Accessed more than one register at a time in the APIC!\n");
215 ApicRegIndex reg
= decodeAddr(offset
);
216 uint32_t val
= regs
[reg
];
217 pkt
->writeData(((uint8_t *)&val
) + (offset
& mask(3)));
219 "Writing Local APIC register %d at offset %#x as %#x.\n",
220 reg
, offset
, gtoh(val
));
221 setReg(reg
, gtoh(val
));
222 pkt
->makeAtomicResponse();
226 X86ISA::Interrupts::requestInterrupt(uint8_t vector
,
227 uint8_t deliveryMode
, bool level
)
230 * Fixed and lowest-priority delivery mode interrupts are handled
231 * using the IRR/ISR registers, checking against the TPR, etc.
232 * The SMI, NMI, ExtInt, INIT, etc interrupts go straight through.
234 if (deliveryMode
== DeliveryMode::Fixed
||
235 deliveryMode
== DeliveryMode::LowestPriority
) {
236 DPRINTF(LocalApic
, "Interrupt is an %s.\n",
237 DeliveryMode::names
[deliveryMode
]);
238 // Queue up the interrupt in the IRR.
241 if (!getRegArrayBit(APIC_INTERRUPT_REQUEST_BASE
, vector
)) {
242 setRegArrayBit(APIC_INTERRUPT_REQUEST_BASE
, vector
);
244 setRegArrayBit(APIC_TRIGGER_MODE_BASE
, vector
);
246 clearRegArrayBit(APIC_TRIGGER_MODE_BASE
, vector
);
249 } else if (!DeliveryMode::isReserved(deliveryMode
)) {
250 DPRINTF(LocalApic
, "Interrupt is an %s.\n",
251 DeliveryMode::names
[deliveryMode
]);
252 if (deliveryMode
== DeliveryMode::SMI
&& !pendingSmi
) {
253 pendingUnmaskableInt
= pendingSmi
= true;
255 } else if (deliveryMode
== DeliveryMode::NMI
&& !pendingNmi
) {
256 pendingUnmaskableInt
= pendingNmi
= true;
258 } else if (deliveryMode
== DeliveryMode::ExtInt
&& !pendingExtInt
) {
259 pendingExtInt
= true;
260 extIntVector
= vector
;
261 } else if (deliveryMode
== DeliveryMode::INIT
&& !pendingInit
) {
262 pendingUnmaskableInt
= pendingInit
= true;
264 } else if (deliveryMode
== DeliveryMode::SIPI
&&
265 !pendingStartup
&& !startedUp
) {
266 pendingUnmaskableInt
= pendingStartup
= true;
267 startupVector
= vector
;
276 X86ISA::Interrupts::setCPU(BaseCPU
* newCPU
)
279 if (cpu
!= NULL
&& cpu
->cpuId() != newCPU
->cpuId()) {
280 panic("Local APICs can't be moved between CPUs"
281 " with different IDs.\n");
284 initialApicId
= cpu
->cpuId();
285 regs
[APIC_ID
] = (initialApicId
<< 24);
286 pioAddr
= x86LocalAPICAddress(initialApicId
, 0);
291 X86ISA::Interrupts::init()
294 // The local apic must register its address ranges on its pio
295 // port via the basicpiodevice(piodevice) init() function.
298 // The slave port has a range, so inform the connected master.
299 intSlavePort
.sendRangeChange();
300 // If the master port isn't connected, we can't send interrupts anywhere.
301 panic_if(!intMasterPort
.isConnected(),
302 "Int port not connected to anything!");
307 X86ISA::Interrupts::recvMessage(PacketPtr pkt
)
309 Addr offset
= pkt
->getAddr() - x86InterruptAddress(initialApicId
, 0);
310 assert(pkt
->cmd
== MemCmd::WriteReq
);
315 TriggerIntMessage message
= pkt
->getRaw
<TriggerIntMessage
>();
317 "Got Trigger Interrupt message with vector %#x.\n",
320 requestInterrupt(message
.vector
,
321 message
.deliveryMode
, message
.trigger
);
325 panic("Local apic got unknown interrupt message at offset %#x.\n",
329 pkt
->makeAtomicResponse();
335 X86ISA::Interrupts::recvResponse(PacketPtr pkt
)
337 assert(!pkt
->isError());
338 assert(pkt
->cmd
== MemCmd::WriteResp
);
339 if (--pendingIPIs
== 0) {
340 InterruptCommandRegLow low
= regs
[APIC_INTERRUPT_COMMAND_LOW
];
341 // Record that the ICR is now idle.
342 low
.deliveryStatus
= 0;
343 regs
[APIC_INTERRUPT_COMMAND_LOW
] = low
;
345 DPRINTF(LocalApic
, "ICR is now idle.\n");
351 X86ISA::Interrupts::getAddrRanges() const
354 AddrRangeList ranges
;
355 ranges
.push_back(RangeSize(pioAddr
, PageBytes
));
361 X86ISA::Interrupts::getIntAddrRange() const
363 AddrRangeList ranges
;
364 ranges
.push_back(RangeEx(x86InterruptAddress(initialApicId
, 0),
365 x86InterruptAddress(initialApicId
, 0) +
366 PhysAddrAPICRangeSize
));
372 X86ISA::Interrupts::readReg(ApicRegIndex reg
)
374 if (reg
>= APIC_TRIGGER_MODE(0) &&
375 reg
<= APIC_TRIGGER_MODE(15)) {
376 panic("Local APIC Trigger Mode registers are unimplemented.\n");
379 case APIC_ARBITRATION_PRIORITY
:
380 panic("Local APIC Arbitration Priority register unimplemented.\n");
382 case APIC_PROCESSOR_PRIORITY
:
383 panic("Local APIC Processor Priority register unimplemented.\n");
385 case APIC_ERROR_STATUS
:
386 regs
[APIC_INTERNAL_STATE
] &= ~ULL(0x1);
388 case APIC_CURRENT_COUNT
:
390 if (apicTimerEvent
.scheduled()) {
391 // Compute how many m5 ticks happen per count.
392 uint64_t ticksPerCount
= clockPeriod() *
393 divideFromConf(regs
[APIC_DIVIDE_CONFIGURATION
]);
394 // Compute how many m5 ticks are left.
395 uint64_t val
= apicTimerEvent
.when() - curTick();
396 // Turn that into a count.
397 val
= (val
+ ticksPerCount
- 1) / ticksPerCount
;
410 X86ISA::Interrupts::setReg(ApicRegIndex reg
, uint32_t val
)
412 uint32_t newVal
= val
;
413 if (reg
>= APIC_IN_SERVICE(0) &&
414 reg
<= APIC_IN_SERVICE(15)) {
415 panic("Local APIC In-Service registers are unimplemented.\n");
417 if (reg
>= APIC_TRIGGER_MODE(0) &&
418 reg
<= APIC_TRIGGER_MODE(15)) {
419 panic("Local APIC Trigger Mode registers are unimplemented.\n");
421 if (reg
>= APIC_INTERRUPT_REQUEST(0) &&
422 reg
<= APIC_INTERRUPT_REQUEST(15)) {
423 panic("Local APIC Interrupt Request registers "
424 "are unimplemented.\n");
431 // The Local APIC Version register is read only.
433 case APIC_TASK_PRIORITY
:
436 case APIC_ARBITRATION_PRIORITY
:
437 panic("Local APIC Arbitration Priority register unimplemented.\n");
439 case APIC_PROCESSOR_PRIORITY
:
440 panic("Local APIC Processor Priority register unimplemented.\n");
443 // Remove the interrupt that just completed from the local apic state.
444 clearRegArrayBit(APIC_IN_SERVICE_BASE
, ISRV
);
447 case APIC_LOGICAL_DESTINATION
:
448 newVal
= val
& 0xFF000000;
450 case APIC_DESTINATION_FORMAT
:
451 newVal
= val
| 0x0FFFFFFF;
453 case APIC_SPURIOUS_INTERRUPT_VECTOR
:
454 regs
[APIC_INTERNAL_STATE
] &= ~ULL(1 << 1);
455 regs
[APIC_INTERNAL_STATE
] |= val
& (1 << 8);
457 warn("Focus processor checking not implemented.\n");
459 case APIC_ERROR_STATUS
:
461 if (regs
[APIC_INTERNAL_STATE
] & 0x1) {
462 regs
[APIC_INTERNAL_STATE
] &= ~ULL(0x1);
465 regs
[APIC_INTERNAL_STATE
] |= ULL(0x1);
471 case APIC_INTERRUPT_COMMAND_LOW
:
473 InterruptCommandRegLow low
= regs
[APIC_INTERRUPT_COMMAND_LOW
];
474 // Check if we're already sending an IPI.
475 if (low
.deliveryStatus
) {
480 InterruptCommandRegHigh high
= regs
[APIC_INTERRUPT_COMMAND_HIGH
];
481 TriggerIntMessage message
= 0;
482 message
.destination
= high
.destination
;
483 message
.vector
= low
.vector
;
484 message
.deliveryMode
= low
.deliveryMode
;
485 message
.destMode
= low
.destMode
;
486 message
.level
= low
.level
;
487 message
.trigger
= low
.trigger
;
488 std::list
<int> apics
;
489 int numContexts
= sys
->numContexts();
490 switch (low
.destShorthand
) {
492 if (message
.deliveryMode
== DeliveryMode::LowestPriority
) {
493 panic("Lowest priority delivery mode "
494 "IPIs aren't implemented.\n");
496 if (message
.destMode
== 1) {
497 int dest
= message
.destination
;
498 hack_once("Assuming logical destinations are 1 << id.\n");
499 for (int i
= 0; i
< numContexts
; i
++) {
505 if (message
.destination
== 0xFF) {
506 for (int i
= 0; i
< numContexts
; i
++) {
507 if (i
== initialApicId
) {
508 requestInterrupt(message
.vector
,
509 message
.deliveryMode
, message
.trigger
);
515 if (message
.destination
== initialApicId
) {
516 requestInterrupt(message
.vector
,
517 message
.deliveryMode
, message
.trigger
);
519 apics
.push_back(message
.destination
);
526 requestInterrupt(message
.vector
,
527 message
.deliveryMode
, message
.trigger
);
530 requestInterrupt(message
.vector
,
531 message
.deliveryMode
, message
.trigger
);
535 for (int i
= 0; i
< numContexts
; i
++) {
536 if (i
!= initialApicId
) {
543 // Record that an IPI is being sent if one actually is.
545 low
.deliveryStatus
= 1;
546 pendingIPIs
+= apics
.size();
548 regs
[APIC_INTERRUPT_COMMAND_LOW
] = low
;
549 for (auto id
: apics
) {
550 PacketPtr pkt
= buildIntTriggerPacket(id
, message
);
551 intMasterPort
.sendMessage(pkt
, sys
->isTimingMode());
553 newVal
= regs
[APIC_INTERRUPT_COMMAND_LOW
];
557 case APIC_LVT_THERMAL_SENSOR
:
558 case APIC_LVT_PERFORMANCE_MONITORING_COUNTERS
:
563 uint64_t readOnlyMask
= (1 << 12) | (1 << 14);
564 newVal
= (val
& ~readOnlyMask
) |
565 (regs
[reg
] & readOnlyMask
);
568 case APIC_INITIAL_COUNT
:
570 newVal
= bits(val
, 31, 0);
571 // Compute how many timer ticks we're being programmed for.
572 uint64_t newCount
= newVal
*
573 (divideFromConf(regs
[APIC_DIVIDE_CONFIGURATION
]));
574 // Schedule on the edge of the next tick plus the new count.
575 Tick offset
= curTick() % clockPeriod();
577 reschedule(apicTimerEvent
,
578 curTick() + (newCount
+ 1) *
579 clockPeriod() - offset
, true);
582 reschedule(apicTimerEvent
,
583 curTick() + newCount
*
584 clockPeriod(), true);
588 case APIC_CURRENT_COUNT
:
589 //Local APIC Current Count register is read only.
591 case APIC_DIVIDE_CONFIGURATION
:
602 X86ISA::Interrupts::Interrupts(Params
* p
)
604 apicTimerEvent([this]{ processApicTimerEvent(); }, name()),
605 pendingSmi(false), smiVector(0),
606 pendingNmi(false), nmiVector(0),
607 pendingExtInt(false), extIntVector(0),
608 pendingInit(false), initVector(0),
609 pendingStartup(false), startupVector(0),
610 startedUp(false), pendingUnmaskableInt(false),
611 pendingIPIs(0), cpu(NULL
),
612 intSlavePort(name() + ".int_slave", this, this),
613 intMasterPort(name() + ".int_master", this, this, p
->int_latency
),
614 pioDelay(p
->pio_latency
)
616 memset(regs
, 0, sizeof(regs
));
617 //Set the local apic DFR to the flat model.
618 regs
[APIC_DESTINATION_FORMAT
] = (uint32_t)(-1);
625 X86ISA::Interrupts::checkInterrupts(ThreadContext
*tc
) const
627 RFLAGS rflags
= tc
->readMiscRegNoEffect(MISCREG_RFLAGS
);
628 if (pendingUnmaskableInt
) {
629 DPRINTF(LocalApic
, "Reported pending unmaskable interrupt.\n");
634 DPRINTF(LocalApic
, "Reported pending external interrupt.\n");
637 if (IRRV
> ISRV
&& bits(IRRV
, 7, 4) >
638 bits(regs
[APIC_TASK_PRIORITY
], 7, 4)) {
639 DPRINTF(LocalApic
, "Reported pending regular interrupt.\n");
647 X86ISA::Interrupts::checkInterruptsRaw() const
649 return pendingUnmaskableInt
|| pendingExtInt
||
650 (IRRV
> ISRV
&& bits(IRRV
, 7, 4) >
651 bits(regs
[APIC_TASK_PRIORITY
], 7, 4));
655 X86ISA::Interrupts::getInterrupt(ThreadContext
*tc
)
657 assert(checkInterrupts(tc
));
658 // These are all probably fairly uncommon, so we'll make them easier to
660 if (pendingUnmaskableInt
) {
662 DPRINTF(LocalApic
, "Generated SMI fault object.\n");
663 return std::make_shared
<SystemManagementInterrupt
>();
664 } else if (pendingNmi
) {
665 DPRINTF(LocalApic
, "Generated NMI fault object.\n");
666 return std::make_shared
<NonMaskableInterrupt
>(nmiVector
);
667 } else if (pendingInit
) {
668 DPRINTF(LocalApic
, "Generated INIT fault object.\n");
669 return std::make_shared
<InitInterrupt
>(initVector
);
670 } else if (pendingStartup
) {
671 DPRINTF(LocalApic
, "Generating SIPI fault object.\n");
672 return std::make_shared
<StartupInterrupt
>(startupVector
);
674 panic("pendingUnmaskableInt set, but no unmaskable "
675 "ints were pending.\n");
678 } else if (pendingExtInt
) {
679 DPRINTF(LocalApic
, "Generated external interrupt fault object.\n");
680 return std::make_shared
<ExternalInterrupt
>(extIntVector
);
682 DPRINTF(LocalApic
, "Generated regular interrupt fault object.\n");
683 // The only thing left are fixed and lowest priority interrupts.
684 return std::make_shared
<ExternalInterrupt
>(IRRV
);
689 X86ISA::Interrupts::updateIntrInfo(ThreadContext
*tc
)
691 assert(checkInterrupts(tc
));
692 if (pendingUnmaskableInt
) {
694 DPRINTF(LocalApic
, "SMI sent to core.\n");
696 } else if (pendingNmi
) {
697 DPRINTF(LocalApic
, "NMI sent to core.\n");
699 } else if (pendingInit
) {
700 DPRINTF(LocalApic
, "Init sent to core.\n");
703 } else if (pendingStartup
) {
704 DPRINTF(LocalApic
, "SIPI sent to core.\n");
705 pendingStartup
= false;
708 if (!(pendingSmi
|| pendingNmi
|| pendingInit
|| pendingStartup
))
709 pendingUnmaskableInt
= false;
710 } else if (pendingExtInt
) {
711 pendingExtInt
= false;
713 DPRINTF(LocalApic
, "Interrupt %d sent to core.\n", IRRV
);
714 // Mark the interrupt as "in service".
716 setRegArrayBit(APIC_IN_SERVICE_BASE
, ISRV
);
717 // Clear it out of the IRR.
718 clearRegArrayBit(APIC_INTERRUPT_REQUEST_BASE
, IRRV
);
724 X86ISA::Interrupts::serialize(CheckpointOut
&cp
) const
726 SERIALIZE_ARRAY(regs
, NUM_APIC_REGS
);
727 SERIALIZE_SCALAR(pendingSmi
);
728 SERIALIZE_SCALAR(smiVector
);
729 SERIALIZE_SCALAR(pendingNmi
);
730 SERIALIZE_SCALAR(nmiVector
);
731 SERIALIZE_SCALAR(pendingExtInt
);
732 SERIALIZE_SCALAR(extIntVector
);
733 SERIALIZE_SCALAR(pendingInit
);
734 SERIALIZE_SCALAR(initVector
);
735 SERIALIZE_SCALAR(pendingStartup
);
736 SERIALIZE_SCALAR(startupVector
);
737 SERIALIZE_SCALAR(startedUp
);
738 SERIALIZE_SCALAR(pendingUnmaskableInt
);
739 SERIALIZE_SCALAR(pendingIPIs
);
740 SERIALIZE_SCALAR(IRRV
);
741 SERIALIZE_SCALAR(ISRV
);
742 bool apicTimerEventScheduled
= apicTimerEvent
.scheduled();
743 SERIALIZE_SCALAR(apicTimerEventScheduled
);
744 Tick apicTimerEventTick
= apicTimerEvent
.when();
745 SERIALIZE_SCALAR(apicTimerEventTick
);
749 X86ISA::Interrupts::unserialize(CheckpointIn
&cp
)
751 UNSERIALIZE_ARRAY(regs
, NUM_APIC_REGS
);
752 UNSERIALIZE_SCALAR(pendingSmi
);
753 UNSERIALIZE_SCALAR(smiVector
);
754 UNSERIALIZE_SCALAR(pendingNmi
);
755 UNSERIALIZE_SCALAR(nmiVector
);
756 UNSERIALIZE_SCALAR(pendingExtInt
);
757 UNSERIALIZE_SCALAR(extIntVector
);
758 UNSERIALIZE_SCALAR(pendingInit
);
759 UNSERIALIZE_SCALAR(initVector
);
760 UNSERIALIZE_SCALAR(pendingStartup
);
761 UNSERIALIZE_SCALAR(startupVector
);
762 UNSERIALIZE_SCALAR(startedUp
);
763 UNSERIALIZE_SCALAR(pendingUnmaskableInt
);
764 UNSERIALIZE_SCALAR(pendingIPIs
);
765 UNSERIALIZE_SCALAR(IRRV
);
766 UNSERIALIZE_SCALAR(ISRV
);
767 bool apicTimerEventScheduled
;
768 UNSERIALIZE_SCALAR(apicTimerEventScheduled
);
769 if (apicTimerEventScheduled
) {
770 Tick apicTimerEventTick
;
771 UNSERIALIZE_SCALAR(apicTimerEventTick
);
772 if (apicTimerEvent
.scheduled()) {
773 reschedule(apicTimerEvent
, apicTimerEventTick
, true);
775 schedule(apicTimerEvent
, apicTimerEventTick
);
781 X86LocalApicParams::create()
783 return new X86ISA::Interrupts(this);
787 X86ISA::Interrupts::processApicTimerEvent() {
788 if (triggerTimerInterrupt())
789 setReg(APIC_INITIAL_COUNT
, readReg(APIC_INITIAL_COUNT
));