diff options
author | jhb <jhb@FreeBSD.org> | 2003-07-23 18:59:38 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2003-07-23 18:59:38 +0000 |
commit | 1ab48551b3699374e93b8f727bf39421c0d1c294 (patch) | |
tree | 85a308169dcfff4163e126e505354143e586fe70 /sys | |
parent | 5116362d0f6aa837d6c352524103bd0f10a379d3 (diff) | |
download | FreeBSD-src-1ab48551b3699374e93b8f727bf39421c0d1c294.zip FreeBSD-src-1ab48551b3699374e93b8f727bf39421c0d1c294.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/include/apicreg.h | 1 | ||||
-rw-r--r-- | sys/i386/i386/mpapic.c | 4 | ||||
-rw-r--r-- | sys/i386/include/apic.h | 1 | ||||
-rw-r--r-- | sys/i386/include/apicreg.h | 1 |
4 files changed, 5 insertions, 2 deletions
diff --git a/sys/amd64/include/apicreg.h b/sys/amd64/include/apicreg.h index c47e1db..6e6d260 100644 --- a/sys/amd64/include/apicreg.h +++ b/sys/amd64/include/apicreg.h @@ -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 diff --git a/sys/i386/i386/mpapic.c b/sys/i386/i386/mpapic.c index 5d5e3b7..beba318 100644 --- a/sys/i386/i386/mpapic.c +++ b/sys/i386/i386/mpapic.c @@ -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 */ diff --git a/sys/i386/include/apic.h b/sys/i386/include/apic.h index c47e1db..6e6d260 100644 --- a/sys/i386/include/apic.h +++ b/sys/i386/include/apic.h @@ -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 diff --git a/sys/i386/include/apicreg.h b/sys/i386/include/apicreg.h index c47e1db..6e6d260 100644 --- a/sys/i386/include/apicreg.h +++ b/sys/i386/include/apicreg.h @@ -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 |