0 > evaluate lspci
lspci, unknown word, HERE= ff9e72b4
ok
> is the Open Firmware prompt.
Before the prompt is
0 which is the number of items on the Open Firmware stack.
evaluate is documented in the IEEE 1275 Open Firmware spec in short form like this:
evaluate ( ... str len -- ??? )
which means there must be a string address and a string length on the stack.
evaluate will execute the contents of the string. The contents are Forth source code.
... means the evaluated code might use items from the stack.
-- divides the input stack items on the left and the output stack items on the right
??? means that the evaluated code may add items to the stack.
Since you did not give an address to
evaluate, it did not execute the code that adds the
lspci word to the Open Firmware dictionary. So when you tried to use
lspci, it reported
unknown word because the word could not be found in the Open Firmware dictionary.
HERE= ff9e72b4 is the current location of the end of the Open Firmware dictionary.
here increments when you add stuff (words and data and devices and device properties) to the Open Firmware dictionary.
ok means Open Firmware is done evaluating the command line.
0 > load-base load-size evaluate dev agp lspci dev pci1 lspci dev pci2 lspci
config-l@, unknown word, HERE= ff9e737c
ok
This time you give the string address
load-base and string length
load-size so that
evaluate can add lspci to the dictionary.
load-base and
load-size were set by the
load command that you executed earlier.
I'm not sure why you got the
config-l@, unknown word error message. Maybe you're running an older version of lspci for Open Firmware.
0 > load-base load-size evaluate
config-l@, unknown word, HERE= ff9e7444
ok
You definitely are using an older version of lspci for Open Firmware. When evaluated, the new version will only add words to the Open Firmware dictionary. It won't try to execute any words and PCI host words such as
config-l@ are not referenced directly.
0 > dev agp ok
0 > lspci
lspci, unknown word, HERE= ff9e7444
ok
lspci was not loaded to the global word list? Was it loaded to a different device word list? Check
pwd before doing
evaluate? Maybe the old version is setting the current device? Check
pwd after doing
evaluate.
0 > load pci2/ata-6@D/@0:13,\Users\welchsm\lspci load-size=7b8 adler32=9e967ac2
ok
Does this change
pwd?
pwd should respond with
no active package if you're in the global word list context.
Switched it up -- probably not quite right (and I did pci1 twice) but here you go.
I think the output looks correct except for the problems I described above. You did pci1 twice but that's not a problem.
You shouldn't have to do
load-base load-size evaluate for every PCI host if
lspci is properly defined in the global word list but you might need the new version for that to work if the old version is referencing
config-l@ directly.
I've attached the new version. It is preferable to the old version because it will provide info about the size of each BAR for each PCI device.
You want to load the
lspci for Open Firmware.of file (rename it to lspci to replace the old version if you like).
Load it once into the global word list (
unselect-dev before evaluating). Then do lspci for each PCI host.
Update: newer version of lspci for Open Firmware at
https://forums.macrumors.com/thread...gans-to-18gb-and-beyond.2482947/post-34613425.