bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

oskit-mach won't boot


From: Igor Khavkine
Subject: oskit-mach won't boot
Date: Sat, 26 May 2001 18:57:04 -0400
User-agent: Mutt/1.3.17i

I've just pulled the oskit-mach source from CVS build it and tried to
boot it. Unfortunately, it didn't work. That wasn't totally unexpected
given my rotten luck with trying new kernels.

Once the boot process gets to a certain point the computer just
restarts. That means it's some sort of unhandled fault.

I've managed to track down the problem to spl0() (defined in
i386/i386/spl.S). Here's how it happens:
main -> setup_main -> cpu_launch_first_thread ->
  load_context -> Load_context -> Thread_continue ->
        thread_continue -> spl0

And then the computer just restarts. spl0() is an assembly routine
that means I can't just put debug printf's in the middle of it, like
I didn in other places along the way. And after looking at the code
I fail to see where the problem could lie. (Partly because my
assembly skills are rather limited.)

Any input and suggestions are very welcome.

Igor

P.S.: I came up with a new way to provide debug information while booting
the kernel. "Debug by ear," just define these simple routines somewhere
and whenever debug_beep() is used, it produces a PC speaker sound
and a short delay.

void volatile spin_loop (unsigned long n) {
  unsigned long i;
  for (i=0; i<n; i++)
    asm volatile ("nop");
}

void debug_beep () {
  int a;
  outb (0x43, 0xb6);
  /* these two bytes represent the frequency of the sound (or its inverse) */
  outb (0x42, 54); /* hi byte */
  outb (0x42, 124); /* low bytes */
  a = inb (0x61);
  a |= 3;
  outb (0x61, a);
  spin_loop (1<<27);
  a &= ~3;
  outb (0x61, a);
  spin_loop (1<<27);
}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]