On 3 November 2010 08:30, Dan Allen <[email protected]> wrote:
> FreeBSD 8.1-STABLE sometime after 10/28/2010 has caused a fatal boot error on
> my Toshiba U205, 1.8 GHz Core Duo laptop.
>
> Many times every week I sync with STABLE and build everything. I have been
> doing this for years.
>
> I sync'd (via csup) and built on 10/28/2010 and everything was fine.
>
> Then I sync'd yesterday 11/1/2010 and it crashes on boot. The diagnostics
> print out the following:
>
> ---
>
> Fatal trap 18: integer divide fault while in kernel mode
>
> kdb_backtrace
> panic
> trap_fatal
> trap
> calltrap
> topo_probe
> cpu_topo
> smp_topo
> sched_setup
> mi_startup
>
> ---
>
> I reverted at the loader via boot /boot/kernel.old, resync'd today, rebuilt,
> and things are still broken.
>
It's possible in theory to leave cpu_logical as zero in topo_probe_0x4().
So, it makes sense to add some sort of the check.
Index: svn/freebsd/head/sys/amd64/amd64/mp_machdep.c
===================================================================
--- svn/freebsd/head/sys/amd64/amd64/mp_machdep.c (revision 214725)
+++ svn/freebsd/head/sys/amd64/amd64/mp_machdep.c (working copy)
@@ -239,6 +239,8 @@
cpu_logical++;
}
+ if (cpu_logical == 0)
+ cpu_logical = 1; /* XXX max_logical? */
cpu_cores /= cpu_logical;
hyperthreading_cpus = cpu_logical;
}
--
wbr,
pluknet
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[email protected]"