summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2005-05-22 16:32:02 +0000
committerpeter <peter@FreeBSD.org>2005-05-22 16:32:02 +0000
commit04ce7944600c2c0aa02bcf10d211986a7f19718f (patch)
treebec02a3bd4e66b31336a1a5548d0640d536f7be9 /sys
parent69f95212e70abe4bb94e6a1c634943d99b3089ce (diff)
downloadFreeBSD-src-04ce7944600c2c0aa02bcf10d211986a7f19718f.zip
FreeBSD-src-04ce7944600c2c0aa02bcf10d211986a7f19718f.tar.gz
MFi386: set PMC vector
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/local_apic.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/amd64/amd64/local_apic.c b/sys/amd64/amd64/local_apic.c
index ba7e5e6..4178e6f 100644
--- a/sys/amd64/amd64/local_apic.c
+++ b/sys/amd64/amd64/local_apic.c
@@ -109,7 +109,7 @@ static struct lvt lvts[LVT_MAX + 1] = {
{ 1, 1, 0, 1, APIC_LVT_DM_NMI, 0 }, /* LINT1: NMI */
{ 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_TIMER_INT }, /* Timer */
{ 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */
- { 1, 1, 1, 1, APIC_LVT_DM_FIXED, 0 }, /* PMC */
+ { 1, 1, 0, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */
{ 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT }, /* Thermal */
};
@@ -302,6 +302,11 @@ lapic_setup(void)
/* Program LINT[01] LVT entries. */
lapic->lvt_lint0 = lvt_mode(la, LVT_LINT0, lapic->lvt_lint0);
lapic->lvt_lint1 = lvt_mode(la, LVT_LINT1, lapic->lvt_lint1);
+#ifdef HWPMC_HOOKS
+ /* Program the PMC LVT entry if present. */
+ if (maxlvt >= LVT_PMC)
+ lapic->lvt_pcint = lvt_mode(la, LVT_PMC, lapic->lvt_pcint);
+#endif
/* Program timer LVT and setup handler. */
lapic->lvt_timer = lvt_mode(la, LVT_TIMER, lapic->lvt_timer);
OpenPOWER on IntegriCloud