Subject: Re: OFW and shark
To: None <leo@marco.de>
From: Chris G. Demetriou <cgd@netbsd.org>
List: port-arm32
Date: 06/14/1999 19:05:52
[ i've had this mail in my todo queue for 4 months, but didn't have
time to play around with the necessary bits to make sure i was giving
you the right answer until now... 8-)

Matthias Pfaller <leo@dachau.marco.de> writes:
> I noticed that the interrupts property for /isa/parallel is wrong.
> So I tried:
> 
> 	dev /isa/parallel
> 	7 1 encode-intr " interrupts" property
> 
> but when I do a .properties after this, I still get "7 3" for the
> interrupts property.
> 
> 	" interrupts" delete-property
> 
> deletes the interrupts property as expected. What do I have to do to
> make this work?

Actually, if you do:

	dev /isa/parallel
	7 1 encode-intr " interrupts" property

then .properties i'd expect you'd see "7 1" (until you reset the
firmware 8-).  e.g.:

ok .properties
model                    NSM,PC87307
reg                      00000001 00000378 00000004 
compatible               pnpPNP,401
device_type              parallel
name                     parallel
interrupts               00000007 
                         00000003 
ok 7 1 encode-intr " interrupts" property
ok .properties
model                    NSM,PC87307
reg                      00000001 00000378 00000004 
compatible               pnpPNP,401
device_type              parallel
name                     parallel
interrupts               00000007 
                         00000001 

Note that 'resetting the firmware' can happen as a result of saying
'boot' after you've halted from a kernel run, if i recall correctly.
8-)


If you put that (and only that) into your nvramrc, then it won't
work.  One clue you might notice is that if you've got a serial
console, at boot-up the shark'd say:

<buffer@f70eb0d7>:4: V|wll ?
DNARD Rev. 5, xx:xx:xx:xx:xx:xx , 32 MB memory
Open Firmware , Built August 28, 1997 14:47:54
Copyright 1997 FirmWorks  All Rights Reserved

Note the error/garbage before the "DNARD" line.

What you really need for an nvramrc mod is:

	\ do the initializations that normally happen after nvramrc.
	\ doing them by hand will keep them from happening later
	probe-all
	install-console banner

	\ fix the parallel port's interrupt property.
	dev /isa/parallel
	7 1 encode-intr " interrupts" property
	unselect-dev


FWIW, i often tend to say:

	" /isa/parallel" select-dev

instead of

	dev /isa/parallel

but either should work.


Is the 7/1 interrupt property for the parallel port correct?  I'll add
this bit to the helpful hints+tips i'm working on...



cgd
-- 
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.