Re: 2.6.9-rc4 No local APIC present or hardware disabled

From: Mikael Pettersson
Date: Fri Oct 15 2004 - 08:59:43 EST


Maciej W. Rozycki writes:
> @@ -667,7 +667,7 @@ static int __init detect_init_APIC (void
> u32 h, l, features;
> extern void get_cpu_vendor(struct cpuinfo_x86*);
>
> - /* Disabled by DMI scan or kernel option? */
> + /* Disabled by kernel option? */
> if (enable_local_apic < 0)
> return -1;
>

DMI scan may still be relevant. Previously we used it to
override the default force-enable policy. Now we may still
need it to force-disable the lapic on systems that boot with
it enabled but malfunction if it's used. (I don't know of
any, but given BIOS history, they aren't impossible.)
So the comment doesn't need to change.

> @@ -681,8 +681,7 @@ static int __init detect_init_APIC (void
> break;
> goto no_apic;
> case X86_VENDOR_INTEL:
> - if (boot_cpu_data.x86 == 6 ||
> - (boot_cpu_data.x86 == 15 && (cpu_has_apic || enable_local_apic > 0)) ||
> + if (boot_cpu_data.x86 == 6 || boot_cpu_data.x86 == 15 ||
> (boot_cpu_data.x86 == 5 && cpu_has_apic))
> break;
> goto no_apic;

Looks Ok

> @@ -692,15 +691,20 @@ static int __init detect_init_APIC (void
>
> if (!cpu_has_apic) {
> /*
> - * Over-ride BIOS and try to enable LAPIC
> - * only if "lapic" specified
> + * Over-ride BIOS and try to enable the local
> + * APIC only if "lapic" specified.
> */
> - if (enable_local_apic != 1)
> - goto no_apic;
> + if (enable_local_apic <= 0) {
> + printk("Not enabling local APIC "
> + "because of frequent BIOS bugs\n");
> + printk("You can enable it with \"lapic\"\n");
> + return -1;

I agree with Alan that accusing the BIOS of being buggy is unwarranted.
The text should just state the obvious:

The local APIC was disabled by the BIOS.
You can enable it with "lapic".

> + }
> /*
> * Some BIOSes disable the local APIC in the
> * APIC_BASE MSR. This can only be done in
> - * software for Intel P6 and AMD K7 (Model > 1).
> + * software for Intel P6, Intel P4 and AMD K7
> + * (Model > 1).

To implicitly include P4 and K8, just change this to:
Intel P6 and later, and AMD K7 (Model > 1) and later

/Mikael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/