svn commit: r215528 - in stable/7/sys: amd64/amd64 i386/i386
John Baldwin
jhb at FreeBSD.org
Fri Nov 19 16:26:51 UTC 2010
Author: jhb
Date: Fri Nov 19 16:26:51 2010
New Revision: 215528
URL: http://svn.freebsd.org/changeset/base/215528
Log:
MFC 215001:
Only dump the values of the PMC and CMCI local vector table entries on a
local APIC if those LVT entries are valid. This quiets spurious illegal
register local APIC errors during boot on a CPU that doesn't support those
vectors.
Modified:
stable/7/sys/amd64/amd64/local_apic.c
stable/7/sys/i386/i386/local_apic.c
Directory Properties:
stable/7/sys/ (props changed)
stable/7/sys/cddl/contrib/opensolaris/ (props changed)
stable/7/sys/contrib/dev/acpica/ (props changed)
stable/7/sys/contrib/pf/ (props changed)
Modified: stable/7/sys/amd64/amd64/local_apic.c
==============================================================================
--- stable/7/sys/amd64/amd64/local_apic.c Fri Nov 19 16:24:12 2010 (r215527)
+++ stable/7/sys/amd64/amd64/local_apic.c Fri Nov 19 16:26:51 2010 (r215528)
@@ -272,16 +272,21 @@ lapic_create(u_int apic_id, int boot_cpu
void
lapic_dump(const char* str)
{
+ uint32_t maxlvt;
+ maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT;
printf("cpu%d %s:\n", PCPU_GET(cpuid), str);
printf(" ID: 0x%08x VER: 0x%08x LDR: 0x%08x DFR: 0x%08x\n",
lapic->id, lapic->version, lapic->ldr, lapic->dfr);
printf(" lint0: 0x%08x lint1: 0x%08x TPR: 0x%08x SVR: 0x%08x\n",
lapic->lvt_lint0, lapic->lvt_lint1, lapic->tpr, lapic->svr);
- printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pmc: 0x%08x\n",
- lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error,
- lapic->lvt_pcint);
- printf(" cmci: 0x%08x\n", lapic->lvt_cmci);
+ printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x",
+ lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error);
+ if (maxlvt >= LVT_PMC)
+ printf(" pmc: 0x%08x", lapic->lvt_pcint);
+ printf("\n");
+ if (maxlvt >= LVT_CMCI)
+ printf(" cmci: 0x%08x\n", lapic->lvt_cmci);
}
void
Modified: stable/7/sys/i386/i386/local_apic.c
==============================================================================
--- stable/7/sys/i386/i386/local_apic.c Fri Nov 19 16:24:12 2010 (r215527)
+++ stable/7/sys/i386/i386/local_apic.c Fri Nov 19 16:26:51 2010 (r215528)
@@ -276,16 +276,21 @@ lapic_create(u_int apic_id, int boot_cpu
void
lapic_dump(const char* str)
{
+ uint32_t maxlvt;
+ maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT;
printf("cpu%d %s:\n", PCPU_GET(cpuid), str);
printf(" ID: 0x%08x VER: 0x%08x LDR: 0x%08x DFR: 0x%08x\n",
lapic->id, lapic->version, lapic->ldr, lapic->dfr);
printf(" lint0: 0x%08x lint1: 0x%08x TPR: 0x%08x SVR: 0x%08x\n",
lapic->lvt_lint0, lapic->lvt_lint1, lapic->tpr, lapic->svr);
- printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x pmc: 0x%08x\n",
- lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error,
- lapic->lvt_pcint);
- printf(" cmci: 0x%08x\n", lapic->lvt_cmci);
+ printf(" timer: 0x%08x therm: 0x%08x err: 0x%08x",
+ lapic->lvt_timer, lapic->lvt_thermal, lapic->lvt_error);
+ if (maxlvt >= LVT_PMC)
+ printf(" pmc: 0x%08x", lapic->lvt_pcint);
+ printf("\n");
+ if (maxlvt >= LVT_CMCI)
+ printf(" cmci: 0x%08x\n", lapic->lvt_cmci);
}
void
More information about the svn-src-stable-7
mailing list