Subject: Re: Utility chip sio's on 4xx (more stories)
To: Jason Thorpe <firstname.lastname@example.org>
From: mike smith <email@example.com>
Date: 03/20/1997 01:06:16
Hmm, you're up late 8)
Jason Thorpe wrote:
> You are correct in your assessment, as far as I can tell.
I would hope so. I spent lots of time (once I figured out my
objdump braino) commenting my disassembly of their driver. There are
a few interesting quirks in there. (I will summarise these as soon
as I am sure of them, even if only for posterity. I am concerned that
HP may view my dissection of their driver with disfavour, so I will
refrain from posting it here.)
> actually happens here:
> 0 - Apollo keyboard port
> 1 - first serial port (domain mode) or dca at scode 9 (hpux mode)
> 2 - second serial port
> 3 - third serial port
> to access ports 2 and 3, you must have the special Apollo break-out
> cable plugged into the db25 on the back of the machine (geez, I forget,
> is the 425 a db9 or a db25?)
It's a DB25. HP's support site contains documentation on making the
breakout cable, or you can use one off an old Apollo; the pinouts
are the same.
> Each of the serial ports (including keyboard port) is software
> compatible with the NS16550 (none are compatible with the scn2681
> found on Real Apollos).
I thought that was kinda odd. But the 8250 (I don't think they are
actually 'real' 16550's) is a fairly simple device to emulate; the
2681 is substantially more complex, so it may just have been a
cost tradeoff; the software changes would have been less trauma
than the extra die area.
> The 4 ports live on the "Frodo" utility chip ... The offset of this chip,
> from the start of Internal I/O space is 0x0001c000.
Aha! It has a name and an address. I take it then that the
internal I/O space (at least under HP/UX) is mapped at 0x20200000?
> >From that chip base, there are the following offsets:
> 0 - 0x00000000
> 1 - 0x00000020
> 2 - 0x00000040
> 3 - 0x00000060
There is (must be) a lot more than that in this chip. As already
observed, there is what appears to be a set of interrupt enables
or some similar control bits at 0xe0, and it wouldn't surprise me
if there were a swag more inbetween 0x80 (where port 3 ends) and
there. Any ideas on what they might do?
> It also appears as if ports 2 and 3 are accessable via select codes
> 5 and 6 in HP-UX mode ... HOWEVER! It's worth noting that these
> serial ports do NOT return an ID during the dio device probe!
Interesting; the boot messages imply that Frodo is at 41, but
scanning over the DIO 'hole' at boot time doesn't get a response
> Ports 2 and 3 have only a 1 byte FIFO, whereas port 1 has a 16 byte
> FIFO. I don't know about the keyboard port.
Are you sure about this? At least some of the HP responses on this
subject have claimed that the frodo ports (not to be confused with
the external 16550) have 8-byte rx FIFOs. Certainly the apci
driver attempts to clear both rx and tx fifos when resetting the
> Only port 1 has CTS/RTS flow control. Port 1 is capable of 460.800k
> whereas 2 and 3 are capbable of 38.400k.
Hmm. It would be handy to know the base clock frequency for the frodo
> The break-out cale is HP Cable K2292. Anyone have a wiring diagram?
Ask HP's SupportLine site (support.mayfield.hp.com) for document
number CSCI00000259, which describes the cable in detail.
> > I still haven't been able to find the absolute base address of the ports;
> > if someone with an HP/UX system can send me the /etc/master details for
> > the apci driver I'd be very grateful, as I think that's the key.
> ...the apci driver controls ports 2 and 3. The rs232 driver controls
> port 1 (under HP-UX).
On a 425e, the apci driver handles all of them, as there is no 16550.
> So, the Right Way to handle these is probably to write a "utilchip"
> driver (a child of intio), which then attaches 3 "apci" devices as children
> (could call it "sio", but that is the apollo name for scn2681). A dnkbd
> could attach to the first apci, and apcitty instances could attach to the
> last two. NOTE! PORT 1 SHOULD NOT BE USED IN HP-UX MODE! (At least,
> that's how I understand it...)
This is fine if we find there's more stuff on the frodo, or there's some
way to probe for it, or it turns out that there's only a single
from it and you have to poll it for the interrupting device(s).
If that's _not_ the case, then I would argue that the ports are similar
enough to the dca that we could use the same driver (perhaps stealing
some code from other 8250-family drivers) and have them at the same
level. If it _is_, then I argue that we can hang the dca driver off
the frodo driver as you suggest.
In either case, more details on the frodo part would be Real Handy.
I hate to sound so demanding, but this seems to be as close as anyone
has gotten yet, and I'd really like to see it through 8)
> Jason R. Thorpe firstname.lastname@example.org
Mike Smith *BSD hack Unix hardware collector
The question "why are the fundamental laws of nature mathematical"
invites the trivial response "because we define as fundamental those
laws which are mathematical". Paul Davies, _The_Mind_of_God_