On 19.07.10 02:59, Christos Zoulas wrote: > Module Name: src > Committed By: christos > Date: Mon Jul 19 00:59:32 UTC 2010 > > Modified Files: > src/sys/dev/acpi: acpi_cpu.c acpi_cpu.h acpi_cpu_cstate.c > > Log Message: > XXX: If this is not correct, revert or fix. > This makes my laptop boot instead of panic: > > panic: kernel diagnostic assertion "native_idle != NULL" failed: file > "../../../../arch/x86/acpi/acpi_cpu_md.c", line 155 > fatal breakpoint trap in supervisor mode > type 1 code 0 rip ffffffff8022e4ad cs 8 rflags 246 cr2 0 cpl 0 rsp > ffff80004c37db10 > > trace > breakpoint() at netbsd:breakpoint+0x5 > panic() at netbsd:panic+0x2ba > kern_assert() at netbsd:kern_assert+0x2d > acpicpu_md_idle_stop() at netbsd:acpicpu_md_idle_stop+0x62 > acpicpu_cstate_callback() at netbsd:acpicpu_cstate_callback+0x34 > sysmon_task_queue_thread() at netbsd:sysmon_task_queue_thread+0x41 > > 1. ACPI seems to define cpuids 1..n; we define 0..n-1. Adjust for that > 2. My laptop is dual core, but ACPI reports 4 cpu nodes. Instead of > attaching the unmatched ones, make the match fail. Do we want to > attach and do nothing instead? > 3. Create a flag, and only set it after we are completely initialized, > so the sysmon thread does not try to access unitialized state.
This change let's my laptop panic: panic: kernel diagnostic assertion "id != 0" failed: file "sys/dev/acpi/acpi_cpu.c", line 274 db{0}> bt breakpoint+0x5 panic+0x2ba kern_assert+0x2d acpicpu_id+0x69 acpicpu_match+0x5a mapply+0x41