Subject: Slightly off-topic: Anyone know OpenBoot cmds for PCI access
To: None <port-sparc@netbsd.org>
From: Steven Grunza <steven_grunza@ieee.org>
List: port-sparc
Date: 05/18/2004 11:54:47
Sorry for the slightly off-topic post.
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:
volatile long unsigned int *ptr;
volatile long unsigned int value;
ptr = (long unsigned int *) 0x114024;
value = *ptr;
printf(" The value is %#x\n", value);
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.
------------------------------------------------------------------
"Unix is user friendly, it's just | Steven Grunza
particular about with whom it | voice: (856) 787 - 2759
makes friends." | fax: (856) 866 - 2033
- Unknown | mailto:steven_grunza@ieee.org
-------------------------------------------------------------------