I have always enabled APIC on my PIII/i810 system, but since upgrading to the latest 2.4.x series kernel dmesg says it's unavailable. Reproducible: Always Steps to Reproduce: 1. emerge gentoo-sources-2.4.22-r1 2. compile kernel 3. reboot Actual Results: Kernel command line: root=/dev/hda3 No local APIC present or hardware disabled Initializing CPU#0 Detected 450.973 MHz processor. Expected Results: Kernel command line: root=/dev/hda3 Local APIC disabled by BIOS -- reenabling. Found and enabled local APIC! Initializing CPU#0 Detected 451.048 MHz processor. emerge info: ============ Portage 2.0.49-r18 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.22-gentoo-r1) ================================================================= System uname: 2.4.22-gentoo-r1 i686 Pentium III (Katmai) Gentoo Base System version 1.4.3.12 distcc 2.11.2 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.3 [enabled] ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer -Wno-deprecated" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distcc fixpackages sandbox" GENTOO_MIRRORS="ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://gentoo.mirrors.pair.com http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="X aalib alsa apm arts avi berkdb bonobo bots cdr crypt cups curl dedicated dga directfb doc dvb dvd encode esd evo faad foomaticdb gb gd gdbm ggi gif gnome gnomedb gphoto2 gpm gtk gtk2 gtkhtml guile i8x0 imlib jack java joystick jpeg kde kerberos krb4 ladcca lcms ldap libg++ libgda libwww mad maildir mbox mikmod mmx mng motif mozilla mpeg nas ncurses nls oci8 odbc offensive ofx oggvorbis openal opengl oss pam pda pdflib perl plotutils png ppds python qt quicktime readline ruby samba scanner sdl slang slp snmp sox spell sqlite sse ssl svga tcltk tcpd tetex tiff truetype type1 usb v4l vim-with-x wmf wxwindows x86 xml xml2 xmms xv xvid zlib"
Created attachment 21685 [details] /usr/src/linux/.config
The latest gentoo-sources (based on 2.4.22) has an updated ACPI patch, and probably has you motherboard in the blacklist. The disabling of the APIC shouldn't cause any problems, but if you want us to look into it send us some more info about your motherboard. lspci, lspci -n, motherboard manuf., model #, bios revision, and anything else about it that you think may be interesting.
Motherboard is an ABIT WB6 with the latest bios rev, dated 2001-01-10. Overview: http://www.abit-usa.com/products/mb/products.php?categories=1&model=96 Manual: http://www.abit-usa.com/downloads/manual/wb6.zip % lspci -n 00:00.0 Class 0600: 8086:7124 (rev 03) 00:01.0 Class 0300: 8086:7125 (rev 03) 00:1e.0 Class 0604: 8086:2418 (rev 02) 00:1f.0 Class 0601: 8086:2410 (rev 02) 00:1f.1 Class 0101: 8086:2411 (rev 02) 00:1f.2 Class 0c03: 8086:2412 (rev 02) 00:1f.5 Class 0401: 8086:2415 (rev 02) 01:01.0 Class 0200: 100b:0020 01:02.0 Class 0100: 1101:9400 (rev 01) % lspci 00:00.0 Host bridge: Intel Corp. 82810E DC-133 GMCH [Graphics Memory Controller Hub] (rev 03) 00:01.0 VGA compatible controller: Intel Corp. 82810E DC-133 CGC [Chipset Graphics Controller] (rev 03) 00:1e.0 PCI bridge: Intel Corp. 82801AA PCI Bridge (rev 02) 00:1f.0 ISA bridge: Intel Corp. 82801AA ISA Bridge (LPC) (rev 02) 00:1f.1 IDE interface: Intel Corp. 82801AA IDE (rev 02) 00:1f.2 USB Controller: Intel Corp. 82801AA USB (rev 02) 00:1f.5 Multimedia audio controller: Intel Corp. 82801AA AC'97 Audio (rev 02) 01:01.0 Ethernet controller: National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller 01:02.0 SCSI storage controller: Initio Corporation INI-940 (rev 01) % lsdev Device DMA IRQ I/O Ports ------------------------------------------------ cascade 4 2 dma 0080-008f dma1 0000-001f dma2 00c0-00df eth0 11 c000-c0ff fpu 00f0-00ff i91u 15 c400-c4ff ide0 14 01f0-01f7 03f6-03f6 f000-f007 Initio c400-c4ff Intel d000-d01f d400-d4ff d400-d4ff d800-d83f d800-d83f f000-f00f Intel 82801AA-ICH 11 keyboard 1 0060-006f National c000-c0ff parport0 3 7 0378-037a 037b-037f 0778-077a PCI 0cf8-0cff pic1 0020-003f pic2 00a0-00bf PS/2 Mouse 12 rtc 8 0070-007f serial 03f8-03ff timer 0 0040-005f usb-uhci 3 d000-d01f vga+ 03c0-03df My motherboard has always been in the ACPI blacklist, which is why ACPI is disabled in .config. However, I'm not certain what that has to do with APIC? APIC is enabled in .config and has always worked with previous kernels -- not a single lockup ever. If it's a code change, that's cool. But, the boot message, "No local APIC present or hardware disabled" seems a bit misleading. Though disabled in BIOS, it is present and has always worked before.
I found the bug. It seems that get_cpu_vendor() is the culprit. It checks the boot_cpu_data.x86_vendor_id field for the CPU vendor and sets the x86_vendor field accordingly. However, the x86_vendor_id field appears to be off by one character and the wrong CPU type is returned. See my attached dmesg output and apic.c diff for details.
Created attachment 21776 [details] arch/i386/kernel/apic.c.diff
Created attachment 21777 [details] dmesg output
boot_cpu_data.x86_vendor_id looks very wrong as is definitely not chopped off by one character as "Intel" is not a vendor ID as you seem to suspect: it's either "GenuineIntel", other valid X86 strings, or else the code picks it up as garbage or an anomaly => thus x86_vendor goes to ID 255 which should equal X86_VENDOR_UNKNOWN. Can you stick that printk code into gentoo-sources-2.4.20 and see what x86_vendor_id you get?
dmesg snippit from 2.4.20-gentoo-r8: Kernel command line: root=/dev/hda3 before get_cpu_vendor() boot_cpu_data.x86_vendor=0 boot_cpu_data.x86_vendor_id=GenuineIntel after get_cpu_vendor() boot_cpu_data.x86_vendor=0 boot_cpu_data.x86_vendor_id=GenuineIntel Local APIC disabled by BIOS -- reenabling. Found and enabled local APIC! Initializing CPU#0 2.4.20 is correct. It seems as though 2.4.22-gentoo-r1 is off by ~8 bytes instead of one. I'll try a vanilla 2.4.22 kernel and see what happens.
It works correctly with a vanilla 2.4.22 kernel. Here's the dmesg snippit with printk's: Kernel command line: root=/dev/hda3 before get_cpu_vendor() boot_cpu_data.x86_vendor=0 boot_cpu_data.x86_vendor_id=GenuineIntel after get_cpu_vendor() boot_cpu_data.x86_vendor=0 boot_cpu_data.x86_vendor_id=GenuineIntel Local APIC disabled by BIOS -- reenabling. Found and enabled local APIC! Initializing CPU#0 The x86_vendor_id is correct with the vanilla kernel. Looks like the gentoo sources are the problem.
I'm having the same problems: lspci 00:00.0 Host bridge: Intel Corp. 82815 815 Chipset Host Bridge and Memory Controller Hub (rev 04) 00:01.0 PCI bridge: Intel Corp. 82815 815 Chipset AGP Bridge (rev 04) 00:1e.0 PCI bridge: Intel Corp. 82801BA/CA/DB/EB PCI Bridge (rev 05) 00:1f.0 ISA bridge: Intel Corp. 82801BA ISA Bridge (LPC) (rev 05) 00:1f.1 IDE interface: Intel Corp. 82801BA IDE U100 (rev 05) 00:1f.2 USB Controller: Intel Corp. 82801BA/BAM USB (Hub #1) (rev 05) 00:1f.3 SMBus: Intel Corp. 82801BA/BAM SMBus (rev 05) 00:1f.4 USB Controller: Intel Corp. 82801BA/BAM USB (Hub #2) (rev 05) 01:00.0 VGA compatible controller: S3 Inc. 86c368 [Trio 3D/2X] (rev 02) 02:03.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10) 02:04.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
Created attachment 21818 [details] 2.4.20-gentoo-r8 boot log
Created attachment 21819 [details] 2.4.22-gentoo-r1 boot log
Can one of you boot into 2.4.22-gentoo and attach your /proc/cpuinfo?
% uname -r 2.4.22-gentoo-r1 % cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 7 model name : Pentium III (Katmai) stepping : 3 cpu MHz : 451.011 cache size : 512 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse bogomips : 892.92
Found the problem, I'm testing a fix right now.
gentoo-sources-2.4.22-r2 is out, the fix is in it.