10-18 Vol. 3A
ADVANCED PROGRAMMABLE INTERRUPT CONTROLLER (APIC)
•
Writes to the IA32_TSC_DEADLINE MSR are not serialized. Therefore, system software should not use WRMSR
to the IA32_TSC_DEADLINE MSR as a serializing instruction. Read and write accesses to the
IA32_TSC_DEADLINE and other MSR registers will occur in program order.
•
Software can disarm the timer at any time by writing 0 to the IA32_TSC_DEADLINE MSR.
•
If timer is armed, software can change the deadline (forward or backward) by writing a new value to the
IA32_TSC_DEADLINE MSR.
•
If software disarms the timer or postpones the deadline, race conditions may result in the delivery of a spurious
timer interrupt. Software is expected to detect such spurious interrupts by checking the current value of the
time-stamp counter to confirm that the interrupt was desired.
3
•
In xAPIC mode (in which the local-APIC registers are memory-mapped), software must order the memory-
mapped write to the LVT entry that enables TSC-deadline mode and any subsequent WRMSR to the
IA32_TSC_DEADLINE MSR. Software can assure proper ordering by executing the MFENCE instruction after the
memory-mapped write and before any WRMSR. (In x2APIC mode, the WRMSR instruction is used to write to
the LVT entry. The processor ensures the ordering of this write and any subsequent WRMSR to the deadline; no
fencing is required.)
10.5.5
Local Interrupt Acceptance
When a local interrupt is sent to the processor core, it is subject to the acceptance criteria specified in the interrupt
acceptance flow chart in Figure 10-17. If the interrupt is accepted, it is logged into the IRR register and handled by
the processor according to its priority (see Section 10.8.4, “Interrupt Acceptance for Fixed Interrupts”). If the
interrupt is not accepted, it is sent back to the local APIC and retried.
10.6 ISSUING
INTERPROCESSOR
INTERRUPTS
The following sections describe the local APIC facilities that are provided for issuing interprocessor interrupts (IPIs)
from software. The primary local APIC facility for issuing IPIs is the interrupt command register (ICR). The ICR can
be used for the following functions:
•
To send an interrupt to another processor.
•
To allow a processor to forward an interrupt that it received but did not service to another processor for
servicing.
•
To direct the processor to interrupt itself (perform a self interrupt).
•
To deliver special IPIs, such as the start-up IPI (SIPI) message, to other processors.
Interrupts generated with this facility are delivered to the other processors in the system through the system bus
(for Pentium 4 and Intel Xeon processors) or the APIC bus (for P6 family and Pentium processors). The ability for a
processor to send a lowest priority IPI is model specific and should be avoided by BIOS and operating system soft-
ware.
10.6.1
Interrupt Command Register (ICR)
The interrupt command register (ICR) is a 64-bit
4
local APIC register (see Figure 10-12) that allows software
running on the processor to specify and send interprocessor interrupts (IPIs) to other processors in the system.
To send an IPI, software must set up the ICR to indicate the type of IPI message to be sent and the destination
processor or processors. (All fields of the ICR are read-write by software with the exception of the delivery status
field, which is read-only.) The act of writing to the low doubleword of the ICR causes the IPI to be sent.
3. If the logical processor is in VMX non-root operation, a read of the time-stamp counter (using either RDMSR, RDTSC, or RDTSCP) may
not return the actual value of the time-stamp counter; see Chapter 27 of the Intel® 64 and IA-32 Architectures Software Devel-
oper’s Manual, Volume 3C. It is the responsibility of software operating in VMX root operation to coordinate the virtualization of the
time-stamp counter and the IA32_TSC_DEADLINE MSR.
4. In XAPIC mode the ICR is addressed as two 32-bit registers, ICR_LOW (FFE0 0300H) and ICR_HIGH (FFE0 0310H).