Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Mar 1996 13:48:19 -0800 (PST)
From:      "Rodney W. Grimes" <rgrimes@GndRsh.aac.dev.com>
To:        bde@zeta.org.au (Bruce Evans)
Cc:        bde@zeta.org.au, current@freebsd.org
Subject:   Re: booting from sd5 when wd3 is also installed
Message-ID:  <199603132148.NAA15313@GndRsh.aac.dev.com>
In-Reply-To: <199603102053.HAA14288@godzilla.zeta.org.au> from "Bruce Evans" at Mar 11, 96 07:53:04 am

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> >> I haven't decided exactly how to handle these points:
> >> - how sticky should the drive number be?  What is the default drive number
> >>   after 1:sd(0,a)/nonesuch followed by /kernel?
> 
> >IMHO, 0.  Does ``1:?'' or even ``1:xx(y,z)/kernel?'' work?
> 
> I had `1:' by itself working for a while, but decided that it shouldn't
> be so easy to change the BIOS number without changing the unit number,
> so I made `1:' only work with `xx(y,z)'.  `1:xx(y,z)any' should work.
> `xx(y,z)any' works the same as now - the BIOS drive number is set to
> match `y'.  This isn't the best behaviour (you often want to keep the
> BIOS boot drive number and change the FreeBSD unit number) but it is
> required for compatibility and is the best behaviour for changing the
> drive type from fd to sd.

Agreed.

> >I can't test them, but have a small nit I found doing a visual over the
> >context diff.... ohh... and can you bounds check the BIOS drive number
> 
> Thanks.
> 
> >against the number of drives reported by the BIOS, I seem to recall
> >an infinite error loop if you did something like wd(1,a)/kernel with
> >only one BIOS drive.
> 
> It's still easy to get these.  I got a lot when I forgot to subtract
> '0' from the drive number :-).

:-).  The code needs a lot of error handling added to it.  Many of the
BIOS calls do not even check for an error return, or at least they
haven't in the past.

> Does the BIOS report the number of drives reliably?  The byte at
> physical 0x475 seems to correctly give the total number of non-floppy
> drives here (not the number of wd drives like I once thought).

As far as I have been able to check the byte at 0x475 is accurate, that
is what the 3rd party BIOS's like Adaptec and NCR are munging when they
add the drives via hooking INT 13, etc.  There is also a BIOS call that
should return this value, but I forget what one it is.

> BTW there is a bug in `gdb -k /kernel /dev/mem': gdb loops internally
> for `p/x *(int *)0xf0000475'; it ignores ^C but can be suspended.

:-(.


-- 
Rod Grimes                                      rgrimes@gndrsh.aac.dev.com
Accurate Automation Company                 Reliable computers for FreeBSD



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603132148.NAA15313>