On Sat, Dec 21, 2019 at 4:58 AM Alexander Bluhm <alexander.bl...@gmx.net> wrote:
>
> On Fri, Dec 20, 2019 at 10:33:02PM -0700, Bobby Johnson wrote:
> > Any clues how I could test further?
>
> The laptop I had hang after printing the enry point.  To debug
> I moved a reset function around to find the final line that is
> executed before the hang.
>
> #include <machine/pio.h>
> void
> cpu_reset(void)
> {
>         outb(0x64, 0xfe);
>         for (volatile long i = 0; i < 100000000; i++);
>         outb(0x64, 0xfe);
>         for (volatile long i = 0; i < 100000000; i++);
>         for (;;)
>                 continue;
> }
>
> As your machine reboots for unknown reason, you have to do it the
> other way around.  Move an endless loop before the instruction that
> causes the reboot to identify the problematic code.
>
> void
> cpu_hang(void)
> {
>         for (;;)
>                 continue;
> }
>
> The problem may be in the boot loader or after jumping into the
> kernel before printing anything.  The reset/hang debugging works
> for both.
>
> Good luck,
>
> bluhm

Thank you!

Earlier I was trying to use printf statements to determine where it
was failing.  With this cpu_hang function I've found that it's booting
further than I realized.  Still troubleshooting to determine where it
is failing.

Reply via email to