Subject: NetBSD with IVS support

From: [email-masked] (Dave Blaszyk)

I have started work on adding support for IVS controllers for NetBSD,
I have looked at the other SCSI support files for GVP and A2091.  I have
a vague idea on how to start.  I have contacted IVS and they are willing
to help me add support for there controllers.  

I would like some pointers from fellow NetBSD'ers on how to proceed in
correctly setting up the Amiga side of the development environment.  I know
you need gcc-2.x.x and other support tools, that I already have, but what else?

As far as adding IVS support, I was just going to clone one of the existing
drivers, as oppossed to making them more general.  I will look at that later.
I would like some pointers on how to proceed, what to look for, possible tips
and suggestions are welcome!  I have never really hacked on a Unix kernel,
but I welcome the learning experience. :-)

On the BSD side, I have everything setup as in the INSTALL document.  One
quick question, do you really need 1M of Chip Ram?  I believe that I have
read this...  If so, can I just buy a new Agnus chip?  I would assume so,
I have an old A2000, that needs some serious upgrading.  Maybe a Retina
board and Sony monitor would be a good first step.

Sorry if some of this is rambling, but I am getting a little excited on
being able to run NetBSD on my Vector card.  I am new to the hardware
hacking world, but will work very hard to add IVS support.

Happy Hacking,
-dvb-
      /-//   \\-\Dave Blaszyk	e-mail	: [email-masked]
     /-//\   /\\-\(716) 253-7953  mail	: Eastman Kodak
  ///d// \\v// \\b\\\   		  C Plant, Bldg. 10 MC 39011
  \\\//   \//   \\///			  Rochester, New York 14620

---

From: [email-masked] (Markus Wild)

> to help me add support for there controllers.  

IVS? Is this one 5380 based? If yes, you should perhaps take a look at the
mac scsi-driver, that one is 5380 based as well.

> you need gcc-2.x.x and other support tools, that I already have, but what else?

Best idea probably is to just try to compile, and add tools as you see you
need them.

> drivers, as oppossed to making them more general.  I will look at that later.

Sigh.. one day we'll all make a better world and write a new scsi driver ok...?

> quick question, do you really need 1M of Chip Ram?  I believe that I have

Eh, yep.. the kernel is copied to chipmem for booting purposes, and current
kernels are all > 512k. If you're seriously into kernel hacking, you could 
try to develop a different booting scheme, but I guess that's not going to
be exactly trivial...

> hacking world, but will work very hard to add IVS support.

Cool, good luck!

-Markus
-- 
CHUUG/EUnet Switzerland				Markus Wild
Zweierstrasse 35	Tel: +41 1 291 45 80	[email-masked]
CH-8004 Zuerich		Fax: +41 1 291 46 42	S=mw;P=EUnet;A=EUnet;C=CH

---

From: [email-masked]

> try to develop a different booting scheme, but I guess that's not going to

Hmm, I have no idea how the bsd boot works, but from what I remember when
I did the Amiga Unix boot code, the bootstrap loader copies itself to
chipram and then loads the unix image into fastram.  Once the unix image
is relocated it then copies it to it's run location in fastram, using
a copy from either the head or the tail of the unix image, depending
upon whether the image is moving down or up in memory, respectively.
Why does bsd require the kernel to be bin chip ram?

-Fred

---

From: [email-masked] (Markus Wild)

> Why does bsd require the kernel to be bin chip ram?

I knew how AmigaUnix booting worked, and I didn't like the fact that the
kernel either had to be linked to a particular fastmem start address, or
had to be relocated after loading. I therefore decided to have the kernel
start at KVA=0, and during the bootstrap process map KVA=KPA, ie. load
the kernel into chipmem (start at address 0), then as part of the setup
process copy the (absolutely linked) kernel image over into the first part
of present fastmem, pointing the MMU tables at this region, and remapping
it back to KVA 0. That way, we only need one kernel for all imaginable
system configurations, and it doesn't have to be relocated at startup.

The drawback of this approach is that it requires the whole kernel to fit
into chipmem, I accepted this.

BTW: use of transparent translation register would make it incompatible
     to '20 equipped amigas.

-Markus

---

From: "Hamish (H.I.) Macdonald" <[email-masked]>

>>>>> Fred Fish wrote:

>>>>> On Mon Oct 25 20:21:00 1993,
>>>>> [email-masked] wrote:

mw> I knew how AmigaUnix booting worked, and I didn't like the fact
mw> that the kernel either had to be linked to a particular fastmem
mw> start address, or had to be relocated after loading. I therefore
mw> decided to have the kernel start at KVA=0, and during the
mw> bootstrap process map KVA=KPA.

What I do with Linux/68k is have a chip ram bootloader load and move
the kernel (linked at 0xC0000000 for bizarre historical reasons) to
the start of FAST ram.  The bootloader then jumps to the start of FAST
ram.  The initial code in the kernel is position independent, and sets
up the initial kernel virtual address space.  It has to be a bit
clever to make sure that there is an identity mapping in the virtual
address space of the initial part of FAST ram that is being executed.
After enabling translation, it jumps into the C startup in the kernel
virtual address space (somewhere past 0xC0000000).

No relocation required.  No linking to a particular fastmem address
required.  No huge amount of chipram required.