Subject: Re: Utility chip sio's on 4xx (more stories)
To: mike smith <miff@spam.frisbee.net.au>
From: Michael Joosten <joost@c-lab.de>
List: port-hp300
Date: 03/20/1997 22:02:09
Ho, so somebody else has had more time I ...

I've even tried to reengineer the hardware. Pin 3 of the DB25 goes (on a 400t
!) to chip UY10, pin 6, a hex RS232 converter (3 in, 3 out), whose output (pin
11) is connected to the 16550 and the Frodo. The output, though seems to go
through some wired-or to pin 14, and then via pin 3 to DB25/pin 2. It is
possible to wrie into dca addressland and get characters through while using
Frodo port 1 as console (Domain/OS monitor mode).

>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

According from the labels in /sau12/domain.map (Domain/OS 10.3), there is
really no 2681 anymore, the DN3000/4000 SAUs have explicit SIO_2681 labels, but
not SAU12/11 (for 400t/433t). What is the difference between 8250 and 16650 -
is it just some sort of 16450 , without fifos?

Fifos: I can also recall having seen in an old archive of comp.sys.hp a
refernece from some HP emplyee claiming that this chip has fifos. And even the
strings in apollo_pci.o (HPUX module) claim that. But who knows...

This is what I extracted from the archives:
>>>>>>
The higher speeds, FIFO and CTS/RTS flow control apply to the first (select
code 9) serial port on all Model 400 machines including 425t, but excluding
the new 425e.  This type port, based on the Ns16550, has not been fully
characterized at high speeds on a busy system.

The other two ports (select codes 5 & 6) have the characteristics of the
older Apollo DN-series ports; the 425e has only this type of port.  Although
this port has some buffer, it lacks CTS/RTS and has a fairly low max bps
rate (perhaps 38,400).  I have no further data on it.

Regards,                                              Hewlett-Packard
Bob Niland      Internet: rjn@FC.HP.COM               3404 East Harmony Road
                UUCP: [hplabs|hpfcse]!hpfcrjn!rjn     Ft Collins CO 80525-9599
The 425e's three serial ports are the Apollo DN-series flavor, like the two
extra ports on the other 400s.  The first port (select code 9) is Apollo-
style, and is NOT based on the Ns16550 used in the other 400s.  Each has a
max bit rate of 19200, no RTS, and an in/out FIFO of 1/8 bytes.  They may
not be suitable for "high speed" modems.

Carl Heinzl <carl@Cayman.COM> writes:
------
David> 2. Do you have to use the HP keyboard with HP-UX, and the Apollo
David> keyboard with Domain/OS, or can you use either one for either OS?

Carl> I wrote most of the original model 400 prom (from the Apollo side, NOT
Carl> the HP side).  This prom is essentially two separate proms sharing a
Carl> bunch of data and some key drivers (SCSI and ENET).  When I left
Carl> Apollo, you HAD to switch keyboards.  The prom could recognize either
Carl> keyboard (otherwise you'd never be able to switch modes), but the OS's
Carl> did not recognize the other kybd.

David> 3. What if the Apollo is on the token ring?  What happens when you
David> boot it on HP-UX?  Does it just ignore the card/ring interface AND
David> not mess up RING traffic either?

Carl> HPUX does NOT provide access over the ATR.  You must use ethernet as
Carl> the network of choice with HPUX (often pronounced h-puckes).

David> 4. Do you have to change the MD level information, or can you just 
David> specify the disk to boot off of above?  What does the MD level 
David> (re)-configuration do? 

Carl> You must change the MD level configuration.  You CANNOT just specify
Carl> the disk to boot off of.  The reconfiguration simply saves a bit off
Carl> in EEprom somewhere that causes a vastly different amount of prom
Carl> software to be run.  I cannot speak for the HP part of the prom, but
Carl> when running in the Apollo part of the prom, it knows about the disk
Carl> format, etc and knows how to load the OS into memory either from the
Carl> disk or across the network.  These things are done differently from
Carl> HPUX since the file structure is different.
Dennis Kallelis <kallelis_d@apollo.com> writes:
------
Dennis> I am part owner of the 400 series bootroms, and I can answer your
question
Dennis> on booting hpux or domain os.  All of this is covered in your service
manual.

Dennis> The bootrom accept both keyboards, and they can both be connected 
Dennis> at the same time.  Just use only one, you can not use both together.
Dennis> And turn your mouse upsidedown so the the shaking of the desk does not
Dennis> send signals in.  Once signals come in from both keyboards the bootrom
Dennis> turns into a veggie.

Dennis> First, depending on how old your model is, you can have different
Dennis> boot features.

Dennis> At your MD prompt in service mode, do a reset 

Dennis> >RE

Dennis> What is the rev returned ?

Dennis> ------------------------------------------------------------------
Dennis> If the MD rev is greater than 1.95 it is simple.  Else see part II
Dennis> ------------------------------------------------------------------
Dennis> To make your machine an hp-ux boot path type at the md

Dennis> >HP                (or you can type hpux)

Dennis> It will automatically boot hp-ux every time from now on.

Dennis> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dennis> If you are in HP-UX mode and you want your machine to boot
Dennis> Domain OS do the following:

Dennis> At power up time tap tap tap on the space bar of your keyboard.
Dennis> the machine will halt the boot process of hp-ux after completion
Dennis> of the video test.  The bottom left screen will say something to
Dennis> the effect of "hit reset to restart, system search mode "  You
Dennis> will see a "?" on the right bottom corner.  Type "DOM" for domain/
Dennis> os, and the machine will switch over to domain/os mode. Note if
Dennis> the machine is in service mode at the time, you will have to hit 
Dennis> "return" several times to get to the MD.  If you are in normal mode
Dennis> the machine will try to boot domain os.  Note also that hp-ux mode
Dennis> does not recognize the service mode switch.  Tapping the space bar
Dennis> is it's service mode indicator.                                   

Dennis> ------------------------------------------------------------------
Dennis> If the MD rev is less than 1.95 
Dennis> ------------------------------------------------------------------
Dennis> To make your machine an hp-ux boot path type at the md

Dennis> >CF                (for config)

Dennis> Select boot option, 
Dennis> hpux, 
Dennis> permanent. (temporary might work for you too)
Dennis> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dennis> If you are in HP-UX mode and you want your machine to boot
Dennis> Domain OS do the following:

Dennis> At power up time tap tap tap on the space bar of your keyboard.
Dennis> the machine will halt the boot process of hp-ux after completion
Dennis> of the video test.  The bottom left screen will say something to
Dennis> the effect of "hit reset to restart, system search mode "  You
Dennis> will see a "?" on the right bottom corner.  Type "C" for config
Dennis> and pick the  boot path option
Dennis> domain/os
Dennis> permanent

Dennis> same as above ...

Dennis> =================================================================

Dennis> note that CF works in all revs.  HP and DOM commands are easier.


<<<<<<
Perhaps it is possible to ask these persons if they still have some vague ideas
about the Frodo chip.....

Together with the hint (finally! I asked for more than a year for this info...)
that it is located DIO + 0x1c000, I'm able to write into its registers and get
stuff written on the line, great! So, its hardware/physical address is at 
0x41c000.

> 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

Indeed. The map file of Domain/OS says (written from notices, can't find the
file now or is at home on a diskette):
7FBA8000	UTILITY_CHIP
    8000	SIO_0
    8020	SIO_1
    8040	SIO_2
    8060	SIO_3
    80A0	TIMER
    80C0	UTIL_PIO
    80C0	MMU_ISR (?? NOT SURE ??)
    80E0	UTIL_PIC 

So, there is a timer, a PIO (who knows what for ?) and the interrupt control
register. The timer apparently works liek a timer: once you write something
into it, it counts:

D 41C0A0 41C0AF
   41C0A0: 74FF 91FF DAFF A3FF F3FF 63FF 00FF 00FF 

>D 41C0A0 41C0AF
   41C0A0: 98FF 66FF 56FF D2FF 57FF FCFF 00FF 00FF 

>D 41C0A0 41C0AF
   41C0A0: 04FF 94FF BAFF 1DFF ACFF 42FF 00FF 00FF 

What surprises me bit is that the old DN3000/400 boards have a also a 6840 as
timer chip, but here it seems that even regs 0&1 are timer readouts, wereas
regs 7&8 are rather latches (you read back what you wrote in). Thought that reg
0&1 are control regs for 6840 ?!

>Interesting; the boot messages imply that Frodo is at 41, but 
>scanning over the DIO 'hole' at boot time doesn't get a response
>either.  Weird.
 
This is the most misleading info: officially, 'at 41' cannot exist, as internal
DIO has only 32 slots, and DIIO for framebuffers counts from 128. And right,
there is no response because it is not ampped at all, even for the Domain
monitor.

The port cannot identify itself just as other HP cards (or better pseuso
cards), as the do not have the special space in the first 16 bytes of their
address space, as the dca, SCSI and lance devices have (though they are
builtin). Perhaps just testing for a writable address somewhere might be
enough? 


> clock frequency
Perhaps reengineer? It is  prob. not more than 19200 baud possible, together
with the divider table hopefully in apollo_pci.o one could perhaps deduce the
proper clock freq.

>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

I was also begining to do just that half a year ago, but b*shit projects came
upon me... I also uncovered that 0x2021c0e0 was hardcoded in the object and
accessed by movp insns, but my question about that address in this mailing list
fell on dumb ears. Pity. I'd like to see your disassembly, though. I
reassembled the symbol table and fed the code in a Sun3 adb, but did not
annotate the code so far - just hunting for interesting functions.

Driver ideas: As I said, Domain/OS seems to address the Frodo ports just as
16550. So, nothing seems to prohibit us to reuse all the dca code.

What is open is how to integrate this into the boot code and to check for the
proper console. The later seems to be recorded in the monitors EEPROM. Or one
could ceck for soem response of the HIL keyboard and the Domain/OS keybord. For
the latter, I'm not sure how to do that. There is a reset line for this, and
it's bidirectional. Leonard N. Zubkoff <lnz@dandelion.com> some time ago posted
in comp.sys.apollo that he used 'his' old Domain keybaord with some software
with Linux/PC and a SparcStation. Perhaps he can give us his code or hints how
to switch between raw key events, mouse reports and ASCII. Looks like the
default after reset is just ASCII keyboard plus stuff once the mouse is moved.

Finally ! the stone is rolling !     Michael