- Panic up front if a kernel does not include 'device atpic' and an
APIC is not found. - Don't panic if lapic_enable_cmc() is called and the APIC is not enabled. This can happen due to booting a kernel with APIC disabled on a CPU that supports CMCI. - Wrap a long line.
This commit is contained in:
parent
9e30e6dee9
commit
8fef42c511
@ -34,6 +34,7 @@
|
|||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__FBSDID("$FreeBSD$");
|
__FBSDID("$FreeBSD$");
|
||||||
|
|
||||||
|
#include "opt_atpic.h"
|
||||||
#include "opt_hwpmc_hooks.h"
|
#include "opt_hwpmc_hooks.h"
|
||||||
#include "opt_kdtrace.h"
|
#include "opt_kdtrace.h"
|
||||||
|
|
||||||
@ -308,7 +309,8 @@ lapic_create(u_int apic_id, int boot_cpu)
|
|||||||
lapics[apic_id].la_ioint_irqs[APIC_TIMER_INT - APIC_IO_INTS] =
|
lapics[apic_id].la_ioint_irqs[APIC_TIMER_INT - APIC_IO_INTS] =
|
||||||
IRQ_TIMER;
|
IRQ_TIMER;
|
||||||
#ifdef KDTRACE_HOOKS
|
#ifdef KDTRACE_HOOKS
|
||||||
lapics[apic_id].la_ioint_irqs[IDT_DTRACE_RET - APIC_IO_INTS] = IRQ_DTRACE_RET;
|
lapics[apic_id].la_ioint_irqs[IDT_DTRACE_RET - APIC_IO_INTS] =
|
||||||
|
IRQ_DTRACE_RET;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -890,6 +892,10 @@ lapic_enable_cmc(void)
|
|||||||
{
|
{
|
||||||
u_int apic_id;
|
u_int apic_id;
|
||||||
|
|
||||||
|
#ifdef DEV_ATPIC
|
||||||
|
if (lapic == NULL)
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
apic_id = PCPU_GET(apic_id);
|
apic_id = PCPU_GET(apic_id);
|
||||||
KASSERT(lapics[apic_id].la_present,
|
KASSERT(lapics[apic_id].la_present,
|
||||||
("%s: missing APIC %u", __func__, apic_id));
|
("%s: missing APIC %u", __func__, apic_id));
|
||||||
@ -1286,6 +1292,9 @@ apic_init(void *dummy __unused)
|
|||||||
if (best_enum == NULL) {
|
if (best_enum == NULL) {
|
||||||
if (bootverbose)
|
if (bootverbose)
|
||||||
printf("APIC: Could not find any APICs.\n");
|
printf("APIC: Could not find any APICs.\n");
|
||||||
|
#ifndef DEV_ATPIC
|
||||||
|
panic("running without device atpic requires a local APIC");
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user