Subject: Re: Slightly off-topic: Anyone know OpenBoot cmds for PCI access
To: None <port-sparc@netbsd.org>
From: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
List: port-sparc
Date: 05/18/2004 21:10:34
On Tue, May 18, 2004 at 11:54:47 -0400, Steven Grunza wrote:
> I'm trying to read and write data to/from my PCI device at offset 0x24 from
> BAR3. I can find the address of BAR2 with the Sun OpenBoot command:
>
> show-pci-configs
>
> and then look for my device and vendor ID's. In this particular case BAR3
> is reported as 114000 so my desired access is to memory at 0x114024.
>
> How do I read from a "pointer" in Forth? In C I would simply do the
> following:
[...]
> How would I do something similar in Forth / OpenBoot prom? Thanks for any
> help. I'm working through some Forth primer's and tutorials but they don't
> seem to cover this situation.
There are probably convenience words defined in the the OFW. Use
"sifting" and "see" to look around. E.g.
ok sifting pci
... [list of words that contain "pci" in the word name]
ok see pci-ba3!
... [forth or assembler text of the word definition]
SY, Uwe
--
uwe@ptc.spbu.ru | Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/ | Ist zu Grunde gehen