Subject: Re: incorrect prom code
To: None <port-alpha@netbsd.org>
From: Ross Harvey <ross@teraflop.com>
List: port-alpha
Date: 10/01/1998 14:47:23
> From: David Seifert <seifert@sequent.com>
>
> The prom interface code appears to be somewhat bogus.
>
> As Allen pointed out, prom_open() in prom.c returns 32 bits
> of the 64 that the SRM callback returns.  Prom_init() in if_prom.c
> then pretends that prom_open() returned the entire 64 bits.

Right, that code needs to be untangled a bit. Either it shouldn't expect
so much status, or it should use the dispatch callback directly, or the
interface should inherit all the status bits. (Add an error interface...
etc.)

I'll fix it.

> Also, it appears that the code thinks that the 64 bit value returned
> from the SRM always has the same format. (the u struct in prom_return_t
> in prom.h)  Different callbacks return different formats, according to
> the Alpha AXP Architecture Reference Manual.

The book sometimes lumps the device-specific status in with the invariant
bit <63> error return and the structure follows the book, right. A couple
of access macros might be called for here.


  --Ross Harvey