Package: linux
Version: 4.19.37

A kernel panic occurs when attempting to boot Debian 10.1.0
(32-bit) on an Intel Atom C3958 processor.
https://ark.intel.com/content/www/us/en/ark/products/97927/intel-atom-processor-c3958-16m-cache-up-to-2-0-ghz.html

The hardware I'm using is this board: https://www.dfi.com/product/index/149 
(rev 3),
with carrier board https://www.dfi.com/product/index/223 (rev 3.0).

When booting the system, the following panic occurs:

[    2.457743] Kernel panic - not syncing: BIOS has enabled x2apic but kernel 
doesn't support x2apic, please disable x2apic in BIOS.
[    2.457743]
[    2.457743] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.0-6-686-pae #1 
Debian 4.19.67-2+deb10u1
[    2.457743] Hardware name:  /DV970, BIOS B193.25A 03/25/2019
[    2.457743] Call Trace:
[    2.457743]  dump_stack+0x58/0x7e
[    2.457743]  ? apic_verify+0xab/0xab
[    2.457743]  panic+0x94/0x1e0
[    2.457743]  ? apic_verify+0xab/0xab
[    2.457743]  ? apic_verify+0xab/0xab
[    2.457743]  validate_x2apic+0x4d/0x4f
[    2.457743]  do_one_initcall+0x42/0x19a
[    2.457743]  ? proc_register+0xab/0x110
[    2.457743]  ? proc_create_seq_private+0x3e/0x40
[    2.457743]  ? init_mm_internals+0x181/0x18b
[    2.457743]  kernel_init_freeable+0xb0/0x1e0
[    2.457743]  ? rest_init+0x8a/0x8a
[    2.457743]  kernel_init+0xd/0xea
[    2.457743]  ret_from_fork+0x2e/0x38
[    2.457743] ---[ end Kernel panic - not syncing: BIOS has enabled x2apic but 
kernel doesn't support x2apic, please disable x2apic in BIOS.
[    2.457743]  ]---


There is no option to disable APIC in the board BIOS.
When attempting to boot without APIC enabled, the panic still occurs:

[    0.202575] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.19.0-6-686-pae 
root=UUID=3d4351e7-53e9-4d65-8a81-c205f3cd7a6e ro quiet console=tty 
console=ttyS1,115200 noapic nox2apic noioapic debug apic=debug show_lapic=all
...
[    2.944990] Kernel panic - not syncing: BIOS has enabled x2apic but kernel 
doesn't support x2apic, please disable x2apic in BIOS.
[    2.944990]
[    2.944990] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.0-6-686-pae #1 
Debian 4.19.67-2+deb10u1
[    2.944990] Hardware name:  /DV970, BIOS B193.25A 03/25/2019
[    2.944990] Call Trace:
[    2.944990]  dump_stack+0x58/0x7e
[    2.944990]  ? apic_verify+0xab/0xab
[    2.944990]  panic+0x94/0x1e0
[    2.944990]  ? apic_verify+0xab/0xab
[    2.944990]  ? apic_verify+0xab/0xab
[    2.944990]  validate_x2apic+0x4d/0x4f
[    2.944990]  do_one_initcall+0x42/0x19a
[    2.944990]  ? proc_register+0xab/0x110
[    2.944990]  ? proc_create_seq_private+0x3e/0x40
[    2.944990]  ? init_mm_internals+0x181/0x18b
[    2.944990]  kernel_init_freeable+0xb0/0x1e0
[    2.944990]  ? rest_init+0x8a/0x8a
[    2.944990]  kernel_init+0xd/0xea
[    2.944990]  ret_from_fork+0x2e/0x38
[    2.944990] ---[ end Kernel panic - not syncing: BIOS has enabled x2apic but 
kernel doesn't support x2apic, please disable x2apic in BIOS.
[    2.944990]  ]---


When booting with the kernel parameters
"acpi=off noapic nosmp forcepae", the panic message changes:

[    0.201640] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.19.0-6-686-pae 
root=UUID=3d4351e7-53e9-4d65-8a81-c205f3cd7a6e ro quiet console=tty 
console=ttyS1,115200 debug acpi=off noapic nosmp forcepae
...
[    2.025480] ------------[ cut here ]------------
[    2.030212] kernel BUG at arch/x86/kernel/apic/apic.c:1500!
[    2.035919] invalid opcode: 0000 [#1] SMP NOPTI
[    2.040571] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.19.0-6-686-pae #1 
Debian 4.19.67-2+deb10u1
[    2.049675] Hardware name:  /DV970, BIOS B193.25A 03/25/2019
[    2.055456] EIP: setup_local_APIC+0x4a0/0x510
[    2.059929] Code: 00 eb 84 8d b4 26 00 00 00 00 a1 80 f7 85 c8 ba 00 04 00 
00 8b 48 08 b8 60 03 00 00 e8 41 36 65 00 e9 07 fe ff ff 8d 74 26 00 <0f> 0b 8d 
b6 00 00 00 00 a1 cc 6d a5 c8 0b 05 a4 6e a5 c8 0f 85 8d
[    2.078893] EAX: 00000000 EBX: 00000000 ECX: c8a5fde4 EDX: fffff000
[    2.085276] ESI: c89b6948 EDI: f6ffc568 EBP: c88abf54 ESP: c88abf24
[    2.091665] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00210246
[    2.098573] CR0: 80050033 CR2: ff9ff000 CR3: 08a48000 CR4: 000406b0
[    2.104959] Call Trace:
[    2.107524]  ? vprintk_default+0x17/0x20
[    2.111566]  apic_bsp_setup+0x81/0x97
[    2.115342]  apic_intr_mode_init+0x1a6/0x1ab
[    2.119729]  x86_late_time_init+0x16/0x1d
[    2.123853]  start_kernel+0x3a3/0x45f
[    2.127630]  i386_start_kernel+0xac/0xb0
[    2.131672]  startup_32_smp+0x164/0x168
[    2.135623] Modules linked in:
[    2.138811] ---[ end trace 2d2c9d5d7faf9f9e ]---
[    2.143560] EIP: setup_local_APIC+0x4a0/0x510
[    2.148049] Code: 00 eb 84 8d b4 26 00 00 00 00 a1 80 f7 85 c8 ba 00 04 00 
00 8b 48 08 b8 60 03 00 00 e8 41 36 65 00 e9 07 fe ff ff 8d 74 26 00 <0f> 0b 8d 
b6 00 00 00 00 a1 cc 6d a5 c8 0b 05 a4 6e a5 c8 0f 85 8d
[    2.167032] EAX: 00000000 EBX: 00000000 ECX: c8a5fde4 EDX: fffff000
[    2.173432] ESI: c89b6948 EDI: f6ffc568 EBP: c88abf54 ESP: c8a4fdfc
[    2.179827] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00210246
[    2.186745] CR0: 80050033 CR2: ff9ff000 CR3: 08a48000 CR4: 000406b0
[    2.193150] Kernel panic - not syncing: Attempted to kill the idle task!
[    2.199986] ---[ end Kernel panic - not syncing: Attempted to kill the idle 
task! ]---

I am using Debian GNU/Linux 10.1.0 (i386 netinstall image) from
https://cdimage.debian.org/debian-cd/current/i386/iso-cd/debian-10.1.0-i386-netinst.iso

I am not sure what the cause of the issue is, but I have the following 
suspicions:

        - in /arch/x86/kernel/apic/apic.c, apic_verify(),
      
https://elixir.bootlin.com/linux/v4.19.37/source/arch/x86/kernel/apic/apic.c#L1848,
        appears to be the source of the kernel panic message. There may be an 
issue with the
        MSR reads and bitmasking in the function due to 32- vs 64-bit alignment.

        - There is a question/comment in the linux-4.19.37 code,
      
https://elixir.bootlin.com/linux/v4.19.37/source/arch/x86/kernel/apic/apic.c#L1903,
        which suggests that the "noapic" kernel parameter might not be 
affecting kernel
        behaviour.

Please let me know if there is additional information I can provide.

Regards,

Matt


Reply via email to