Bug #2409

assertion "cpuid < ncpus" failed in ioapic_abi_legacy_intr_config on Pentium 4

Added by davshao about 2 years ago. Updated about 2 years ago.

Status:ClosedStart date:08/24/2012
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

Using i386 through dcece5c7521207769edc2756956f76ef8b485ce1 mutex.9: Misc updates and minor improvements,
problem has existed a while on Pentium 4, Asus P4B266 motherboard, since lapic overhaul,
required to
set hw.apic_io_enable=0
for without have kernel panic, partial trace:

powerspec 2 supports D0 D1 D2 D3 current D0
map[10]: type Memory, range 32, base 0xdd800000, size 12, enabled
pcib2: requested memory range 0xdd800000-0xdd800fff: good
pcib2: matched entry for 2.4.INTB
pcib2: slot 4 INTB hardwired to IRQ 22
panic: assertion "cpuid < ncpus" failed in ioapic_abi_legacy_intr_config at
/usr/src/platform/pc32/apic/ioapic_abi.c:921
cpuid = 0
Trace beginning at frame 0xc0f485a4
panic(ffffffff,0,c07a6724,c0f485d8,c0939900) at panic+0x1a8 0xc03d32b0
panic(c07a6724,c07dcbc1,c0869f0f,c0869730,399,0,0,0,1d,16,1,c0f4863d,a) at panic+0x1a8 0xc03d32b0
ioapic_abi_legacy_intr_config(16,2,2,c0f48648,c03f1d8e) at ioapic_abi_legacy_intr_config+0x23a 0xc0769fca
nexus_config_intr
bus_generic_config_intr
bus_generic_config_intr
bus_generic_config_intr
bus_generic_config_intr
bus_generic_config_intr
acpi_pcib_route_interrupt
acpi_pcib_pci_route_interrupt
pci_assign_interrupt_method
pci_assign_interrupt
pci_add_resources
pci_add_child
pci_add_children
acpi_pci_attach
device_doattach
device_probe_and_attach
bus_generic_attach
acpi_pcib_attach
acpi_pcib_pci_attach
device_doattach
device_probe_and_attach
bus_generic_attach
acpi_pci_attach
device_doattach
device_probe_and_attach
bus_generic_attach
acpi_pcib_attach
acpi_pcib_acpi_attach
device_doattach
device_probe_and_attach
bus_generic_attach
acpi_attach
device_doattach
device_probe_and_attach
bus_generic_attach
nexus_attach
device_doattach
device_probe_and_attach
root_bus_configure
configure(0,f44c00,f44c00,f5500,f55000) at configure+0xb 0xc074ecd0
mi_startup(f44000,0,0,0,0) at mi_startup+0x89 0xc03a9930
begin() at begin+0x42 0xc016a68b
Debugger("panic")

CPU0 stopping CPUs: 0x00000000
stopped
Stopped at Debugger+0x3f: movb $0,in_Debugger.4994

History

#1 Updated by sepherosa about 2 years ago

On Sat, Aug 25, 2012 at 1:28 AM, David Shao via Redmine
<> wrote:
>
> Issue #2409 has been reported by David Shao.
>
> ----------------------------------------
> Bug #2409: assertion "cpuid < ncpus" failed in ioapic_abi_legacy_intr_config on Pentium 4
> http://bugs.dragonflybsd.org/issues/2409
>
> Author: David Shao
> Status: New
> Priority: Normal
> Assignee:
> Category:
> Target version:
>
>
> Using i386 through dcece5c7521207769edc2756956f76ef8b485ce1 mutex.9: Misc updates and minor improvements,
> problem has existed a while on Pentium 4, Asus P4B266 motherboard, since lapic overhaul,
> required to
> set hw.apic_io_enable=0
> for without have kernel panic, partial trace:
>
> powerspec 2 supports D0 D1 D2 D3 current D0
> map[10]: type Memory, range 32, base 0xdd800000, size 12, enabled
> pcib2: requested memory range 0xdd800000-0xdd800fff: good
> pcib2: matched entry for 2.4.INTB
> pcib2: slot 4 INTB hardwired to IRQ 22
> panic: assertion "cpuid < ncpus" failed in ioapic_abi_legacy_intr_config at

I will take care of it. There are at least two cases I am going to address:
- ACPI PRT's source index is GSI not IRQ, though under most cases they are same
- Guard against wrong GSI in ACPI PRT

Best Regards,
sephe

> /usr/src/platform/pc32/apic/ioapic_abi.c:921
> cpuid = 0
> Trace beginning at frame 0xc0f485a4
> panic(ffffffff,0,c07a6724,c0f485d8,c0939900) at panic+0x1a8 0xc03d32b0
> panic(c07a6724,c07dcbc1,c0869f0f,c0869730,399,0,0,0,1d,16,1,c0f4863d,a) at panic+0x1a8 0xc03d32b0
> ioapic_abi_legacy_intr_config(16,2,2,c0f48648,c03f1d8e) at ioapic_abi_legacy_intr_config+0x23a 0xc0769fca
> nexus_config_intr
> bus_generic_config_intr
> bus_generic_config_intr
> bus_generic_config_intr
> bus_generic_config_intr
> bus_generic_config_intr
> acpi_pcib_route_interrupt
> acpi_pcib_pci_route_interrupt
> pci_assign_interrupt_method
> pci_assign_interrupt
> pci_add_resources
> pci_add_child
> pci_add_children
> acpi_pci_attach
> device_doattach
> device_probe_and_attach
> bus_generic_attach
> acpi_pcib_attach
> acpi_pcib_pci_attach
> device_doattach
> device_probe_and_attach
> bus_generic_attach
> acpi_pci_attach
> device_doattach
> device_probe_and_attach
> bus_generic_attach
> acpi_pcib_attach
> acpi_pcib_acpi_attach
> device_doattach
> device_probe_and_attach
> bus_generic_attach
> acpi_attach
> device_doattach
> device_probe_and_attach
> bus_generic_attach
> nexus_attach
> device_doattach
> device_probe_and_attach
> root_bus_configure
> configure(0,f44c00,f44c00,f5500,f55000) at configure+0xb 0xc074ecd0
> mi_startup(f44000,0,0,0,0) at mi_startup+0x89 0xc03a9930
> begin() at begin+0x42 0xc016a68b
> Debugger("panic")
>
> CPU0 stopping CPUs: 0x00000000
> stopped
> Stopped at Debugger+0x3f: movb $0,in_Debugger.4994
>
>
> --
> You have received this notification because you have either subscribed to it, or are involved in it.
> To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account

--
Tomorrow Will Never Die

#2 Updated by sepherosa about 2 years ago

On Sat, Aug 25, 2012 at 1:28 AM, David Shao via Redmine
<> wrote:
>
> Issue #2409 has been reported by David Shao.
>
> ----------------------------------------
> Bug #2409: assertion "cpuid < ncpus" failed in ioapic_abi_legacy_intr_config on Pentium 4
> http://bugs.dragonflybsd.org/issues/2409
>
> Author: David Shao
> Status: New
> Priority: Normal
> Assignee:
> Category:
> Target version:
>
>
> Using i386 through dcece5c7521207769edc2756956f76ef8b485ce1 mutex.9: Misc updates and minor improvements,
> problem has existed a while on Pentium 4, Asus P4B266 motherboard, since lapic overhaul,
> required to
> set hw.apic_io_enable=0
> for without have kernel panic, partial trace:
>
> powerspec 2 supports D0 D1 D2 D3 current D0
> map[10]: type Memory, range 32, base 0xdd800000, size 12, enabled
> pcib2: requested memory range 0xdd800000-0xdd800fff: good
> pcib2: matched entry for 2.4.INTB
> pcib2: slot 4 INTB hardwired to IRQ 22
> panic: assertion "cpuid < ncpus" failed in ioapic_abi_legacy_intr_config at
> /usr/src/platform/pc32/apic/ioapic_abi.c:921
> cpuid = 0
> Trace beginning at frame 0xc0f485a4
> panic(ffffffff,0,c07a6724,c0f485d8,c0939900) at panic+0x1a8 0xc03d32b0
> panic(c07a6724,c07dcbc1,c0869f0f,c0869730,399,0,0,0,1d,16,1,c0f4863d,a) at panic+0x1a8 0xc03d32b0
> ioapic_abi_legacy_intr_config(16,2,2,c0f48648,c03f1d8e) at ioapic_abi_legacy_intr_config+0x23a 0xc0769fca

BTW, could you give the output of:
acpidump -t

Best Regards,
sephe

> nexus_config_intr
> bus_generic_config_intr
> bus_generic_config_intr
> bus_generic_config_intr
> bus_generic_config_intr
> bus_generic_config_intr
> acpi_pcib_route_interrupt
> acpi_pcib_pci_route_interrupt
> pci_assign_interrupt_method
> pci_assign_interrupt
> pci_add_resources
> pci_add_child
> pci_add_children
> acpi_pci_attach
> device_doattach
> device_probe_and_attach
> bus_generic_attach
> acpi_pcib_attach
> acpi_pcib_pci_attach
> device_doattach
> device_probe_and_attach
> bus_generic_attach
> acpi_pci_attach
> device_doattach
> device_probe_and_attach
> bus_generic_attach
> acpi_pcib_attach
> acpi_pcib_acpi_attach
> device_doattach
> device_probe_and_attach
> bus_generic_attach
> acpi_attach
> device_doattach
> device_probe_and_attach
> bus_generic_attach
> nexus_attach
> device_doattach
> device_probe_and_attach
> root_bus_configure
> configure(0,f44c00,f44c00,f5500,f55000) at configure+0xb 0xc074ecd0
> mi_startup(f44000,0,0,0,0) at mi_startup+0x89 0xc03a9930
> begin() at begin+0x42 0xc016a68b
> Debugger("panic")
>
> CPU0 stopping CPUs: 0x00000000
> stopped
> Stopped at Debugger+0x3f: movb $0,in_Debugger.4994
>
>
> --
> You have received this notification because you have either subscribed to it, or are involved in it.
> To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account

--
Tomorrow Will Never Die

#3 Updated by sepherosa about 2 years ago

On Sat, Aug 25, 2012 at 1:28 AM, David Shao via Redmine
<> wrote:
>
> Issue #2409 has been reported by David Shao.
>
> ----------------------------------------
> Bug #2409: assertion "cpuid < ncpus" failed in ioapic_abi_legacy_intr_config on Pentium 4
> http://bugs.dragonflybsd.org/issues/2409
>
> Author: David Shao
> Status: New
> Priority: Normal
> Assignee:
> Category:
> Target version:
>
>
> Using i386 through dcece5c7521207769edc2756956f76ef8b485ce1 mutex.9: Misc updates and minor improvements,
> problem has existed a while on Pentium 4, Asus P4B266 motherboard, since lapic overhaul,
> required to
> set hw.apic_io_enable=0
> for without have kernel panic, partial trace:
>
> powerspec 2 supports D0 D1 D2 D3 current D0
> map[10]: type Memory, range 32, base 0xdd800000, size 12, enabled
> pcib2: requested memory range 0xdd800000-0xdd800fff: good
> pcib2: matched entry for 2.4.INTB
> pcib2: slot 4 INTB hardwired to IRQ 22
> panic: assertion "cpuid < ncpus" failed in ioapic_abi_legacy_intr_config at
> /usr/src/platform/pc32/apic/ioapic_abi.c:921
> cpuid = 0
> Trace beginning at frame 0xc0f485a4
> panic(ffffffff,0,c07a6724,c0f485d8,c0939900) at panic+0x1a8 0xc03d32b0
> panic(c07a6724,c07dcbc1,c0869f0f,c0869730,399,0,0,0,1d,16,1,c0f4863d,a) at panic+0x1a8 0xc03d32b0
> ioapic_abi_legacy_intr_config(16,2,2,c0f48648,c03f1d8e) at ioapic_abi_legacy_intr_config+0x23a 0xc0769fca

I have pushed several commits to master, hopefully it could fix the panic.

Best Regards,
sephe

> nexus_config_intr
> bus_generic_config_intr
> bus_generic_config_intr
> bus_generic_config_intr
> bus_generic_config_intr
> bus_generic_config_intr
> acpi_pcib_route_interrupt
> acpi_pcib_pci_route_interrupt
> pci_assign_interrupt_method
> pci_assign_interrupt
> pci_add_resources
> pci_add_child
> pci_add_children
> acpi_pci_attach
> device_doattach
> device_probe_and_attach
> bus_generic_attach
> acpi_pcib_attach
> acpi_pcib_pci_attach
> device_doattach
> device_probe_and_attach
> bus_generic_attach
> acpi_pci_attach
> device_doattach
> device_probe_and_attach
> bus_generic_attach
> acpi_pcib_attach
> acpi_pcib_acpi_attach
> device_doattach
> device_probe_and_attach
> bus_generic_attach
> acpi_attach
> device_doattach
> device_probe_and_attach
> bus_generic_attach
> nexus_attach
> device_doattach
> device_probe_and_attach
> root_bus_configure
> configure(0,f44c00,f44c00,f5500,f55000) at configure+0xb 0xc074ecd0
> mi_startup(f44000,0,0,0,0) at mi_startup+0x89 0xc03a9930
> begin() at begin+0x42 0xc016a68b
> Debugger("panic")
>
> CPU0 stopping CPUs: 0x00000000
> stopped
> Stopped at Debugger+0x3f: movb $0,in_Debugger.4994
>
>
> --
> You have received this notification because you have either subscribed to it, or are involved in it.
> To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account

--
Tomorrow Will Never Die

#4 Updated by davshao about 2 years ago

Using master through commit f3025b16812bc484c7b518058fe2f5324dc310ae
usched_bsd4 - topology sched: go for safe defaults by Alex Hornung,
Sepherosa Ziehau's patches now have the Pentium 4 machine, Asus P4B266 motherboard, successfully booting using default options (ACPI enabled), and the machine is able to use xfce 4 with a ati 9200 graphics card, r200 correctly detected by X.org.

The x86_64 master in Vmware Fusion on the Macbook also successfully boots to a command-line prompt.

Fantastic work, thanks!

#5 Updated by swildner about 2 years ago

  • Status changed from New to Closed

Looks like it's all fixed now in master, closing.

Also available in: Atom PDF