Add a new macro APIC_ICRLO_RESV_MASK that contains all of the reserved

fields in the low 32 bits of the local APIC ICR register.  Use this macro
in place of APIC_RESV2_MASK when masking off existing bits from the ICR
when writing to it to send an IPI.

Tested by:	scottl
This commit is contained in:
John Baldwin 2003-07-23 18:59:38 +00:00
parent 46eb2dfce9
commit 55fb372edd
4 changed files with 5 additions and 2 deletions

View File

@ -288,6 +288,7 @@ typedef struct IOAPIC ioapic_t;
#define APIC_RESV2_MASK 0xfff00000
#define APIC_ICRLO_RESV_MASK (APIC_RESV1_MASK | APIC_RESV2_MASK)
/* fields in ICR_HIGH */
#define APIC_ID_MASK 0xff000000

View File

@ -508,7 +508,7 @@ apic_ipi(int dest_type, int vector, int delivery_mode)
#endif /* DETECT_DEADLOCK */
/* build IRC_LOW */
icr_lo = (lapic.icr_lo & APIC_RESV2_MASK)
icr_lo = (lapic.icr_lo & APIC_ICRLO_RESV_MASK)
| dest_type | delivery_mode | vector;
/* write APIC ICR */
@ -574,7 +574,7 @@ apic_ipi_singledest(int cpu, int vector, int delivery_mode)
lapic.icr_hi = icr_hi;
/* build IRC_LOW */
icr_lo = (lapic.icr_lo & APIC_RESV2_MASK)
icr_lo = (lapic.icr_lo & APIC_ICRLO_RESV_MASK)
| APIC_DEST_DESTFLD | delivery_mode | vector;
/* write APIC ICR */

View File

@ -288,6 +288,7 @@ typedef struct IOAPIC ioapic_t;
#define APIC_RESV2_MASK 0xfff00000
#define APIC_ICRLO_RESV_MASK (APIC_RESV1_MASK | APIC_RESV2_MASK)
/* fields in ICR_HIGH */
#define APIC_ID_MASK 0xff000000

View File

@ -288,6 +288,7 @@ typedef struct IOAPIC ioapic_t;
#define APIC_RESV2_MASK 0xfff00000
#define APIC_ICRLO_RESV_MASK (APIC_RESV1_MASK | APIC_RESV2_MASK)
/* fields in ICR_HIGH */
#define APIC_ID_MASK 0xff000000