Subject: Re: debugging
To: None <>
From: Michael L. Hitch <>
List: amiga-dev
Date: 03/17/1994 20:01:14
On Mar 17,  3:51pm, newsham@uhunix.uhcc.Hawaii.Edu wrote:
> Ok..  debugging the kernel at early stages of booting up.  I'm
> having problems with this.  Exactly how early can I use the
> printf instruction?  These go to the console I assume (or do
> they go to the serial line?).

  The printf can't be used until the console has been initialized.
That won't be until main() is called.  The copyright message is
printed right after the console init routine is called.

> I looked at rollcolor().  This looks like it should be callable
> as soon as the base register is set up in amiga_init.c.  The
> format is just rollcolor(0x0r0g0b); right?

  Nope, it's rollcolor(0xrgb), the Amiga only has 4 bits per color.
It's callable anytime, except for a short window between the time
the MMU is turned on and when CUSTOMbase is changed to the virtual
address.  (CUSTOMbase is initialized to the physical address, so
can be used anytime up until the MMU is enabled.  Shortly after the
MMU is enabled, CUSTOMbase is updated to the virtual address.)

> I put some rollcolor statements in my kernel and it didn't hit
> any of them (at least I got no color changes).  There was at least
> one that was after the base register was set up and before my
> modded code was hit so it should have reached at least that far.

  Rollcolor should work OK.  It worked the last time I used it, and
Eduardo Horvath was using it recently trying to debug why his kernel
wouldn't boot.


Michael L. Hitch			INTERNET:
Computer Consultant			BITNET:  OSYMH@MTSUNIX1.BITNET
Office of Systems and Computing Services
Montana State University	Bozeman, MT	USA