Re: HP9000 K-Series support, howto and diffs
Jochen Kunz <[email protected]> Fri, 31 Oct 2003 21:40:46 +0100
| Newsgroups | gmane.os.openbsd.hppa |
|---|---|
| Message-ID | <20031031204046.GG2865021@MrPomeroy2> |
On 2003.10.31 18:21 Hellmuth Michaelis wrote:
> At http://www.kts.org/hm/download/openbsd-hppa/k220-openbsd-34.txt
> i have made available what i have right now.
Verry interresting. I haven't checked it all in detail. I had a closer
look to your modifications to autoconf.c, pdc_scanbus() in particular. I
did some work on the corresponding code in NetBSD/hp700 some days ago. I
found a similar solution. I use two different algorithems depending on
the machine type. One to use PDC_TYPE_MEMMAP and one for
PDC_TYPE_SYSMAP.
From your k220-openbsd-34.txt:
- fix the double detection of cards. this is because cards are visible
at several locations on the main bus _and_ below bus converters.
imo the only way to do this is to create a database of found cards
referenced by their path (i.e. 10/12/6) at autoconf time and ignore
double detected cards at the same path
I had the same problem. When my code worked well on the B132L, several
devices where double detected on the 715/100XC. (My code at that time
was basicly the OpenBSD pdc_scanbus()) I fond that this is caused by
different semantics of the device path parameter to PDC_TYPE_MEMMAP and
PDC_TYPE_SYSMAP. Maybe you can look at the NetBSD code. It is not in the
CVS, you can get a diff or full soure from
http://www.unixag-kl.fh-kl.de/~jkunz/NetBSD/hp700/
I got the different semantics of the device path parameter from the
Linux code in linux-2.4.18/arch/parisc/kernel/inventory.c function
really_do_oldhw_inventory(). There are two comments descibing the device
path handling.
It seams that OpenBSD solved the double detection problem on
PDC_TYPE_MEMMAP machines with the introduction of locators for device
attachments and nailing down the devices in the kernel config file. I
was able to avoid this with my code. In fact, the way the current
OpenBSD code handles the device path with PDC_TYPE_MEMMAP is plain
false. (To my limited knowledge.)
But the K220 uses PDC_TYPE_SYSMAP and also sufferes from the double
detection problem. I see you implemented an algorithem similar to the
one from the PDC manual. I simply steped through all module indexes...
(See my code.)
Did you test your code on a B or C class machine?
--
tschüß,
Jochen
Homepage: http://www.unixag-kl.fh-kl.de/~jkunz/