The Patch has to be added to the nvramrc. And thereafter a working card with a valid fCode ROM which has 512MBs of memory should show up with the real amount instead of i. e. 256MB? Or has anything to be adjusted in the card's ROM too, as DearthnVader suggests?
The card may need adjustments as well. Basically, you need a card that will work as 512MB in a Power Mac G5, otherwise it won't work in a pre G5.
Still wondering, if NVSTRAP and (in Wiki) so called "Softstraps" are the same thing.
In case: I just compared this area of two different PC-ROMs, one from a 6200 with 256MB and the one of the PNY 6200 which has 512MB of V-Ram. They are completely identical:
Code:
C3C3EFFF 08100000 FFFFFF7F 00000080 2200A5B1
So should be no need to patch anything there?
There may be other areas that need changing.
heres a OF Directory dump from my from my PowerMac3,6 1.42Ghz FW800 MDD hopefully it helps
1:
@DearthnVader already provided an MDD Directory dump, whoops my bad!
OF Dictionary dump is not just the list of words. It's everything that's stored in the Open Firmware dictionary (the compiled code for each word, devices, and properties). The process is described at
#137 and an example is described at
#159 .
I Dont THINK this word is present with the G3 Blue and White either, just trying it at an OF prompt gives me an unknown word, although no telnet package on that so I cant easily make a dump like I have just done with the PM3,6 sadly
I have all the info I need for B&W G3 (I have one) and I'll work on a patch for that.
2: while studying my own dump I noticed that one of the words avliable on the PCI-Bridge I had installed is
alloc-mem-addr without the brackets mind, I dont know if this is the word your looking for if your look for specifically (alloc-mem-addr) as one of the general available words rather then a device specific one?
They are different words.
(alloc-mem-addr)
is in the main list of words. The main pci root device (grackle/macio on Beige G3 with devalias
pci
) has a
alloc-mem-addr
word that calls
(alloc-mem-addr)
.
Here is the info from Beige G3 Open Firmware 2.0f1.
Code:
0 > dev pci ok
0 > see alloc-mem-addr
: alloc-mem-addr
my-addrs ^-7D86A8 ; ok
0 > -7D86A8 (see)
: ^-7D86A8
{1} ^-7F0738 max 1! 0@ ^-7D96C8 @ 3! 1@ ^-7F0F50 0@ ^-7D8700 2! 0@
^-7D96B0 @ 2@ 1@ + u< if
^-7D9280 ^-7D9310 ['] claim-real catch if
2drop 3@ 0@ ^-7D96C8 ! 0
else
else
2! 2@ ^-7D9280 ^-7D9438 2@ ^-7D9280 + 0@ ^-7D96B0 !
then
then
2@ 1@ + 0@ ^-7D96C8 ! 2@ ; ok
0 >
Notice that many of the words are unnamed in 2.0f1, unlike 2.4.
-7D86A8
is for
(alloc-mem-addr)
.
my-addrs
keeps track of the next and max memory addresses.
Code:
0 > my-addrs d# 44 dump
FF833298: 85 00 00 00 FD 00 00 00 00 00 04 00 00 01 00 00 :................:
FF8332A8: 80 00 00 00 FE 00 00 00 FF 8D AF 80 FF 8D AF 00 :................:
FF8332B8: FF 8D B7 40 FF 83 35 A0 FF 83 36 30 :...@..5...60: ok
0 >
The fields of my-addrs are each 4 bytes. The names of the fields are visible in Open Firmware 2.4:
Code:
/n field >as.next-mem-addr
/n field >as.mem-addr-max
/n field >as.next-io-addr
/n field >as.next-bigio-addr
/n field >as.mem-base
/n field >as.io-base
/n field >as.mem-addrs
/n field >as.io-addrs
/n field >as.my-pkgs
/n field >as.'alloc-mem-addr
/n field >as.'alloc-io-addr
It seems that in Open Firmware 2.0f1,
my-addrs.>as.mem-addr-max
is set to cmembase/grackle-base:80000000 + 7d000000 (2000 MB) = fd000000. That means it never experiences the bug that Open Firmware 2.4 and Open Firmware 3 have. That might explain why it contains other incorrect code (I think the
claim-real
call is missing the address value on the stack) - the incorrect code never gets executed so the bug was not discovered.
Incorrect code from Open Firmware 2.0f1:
Code:
if
\
\
\
const_951_h#10000000 \ h#10000000
const_94b_1c \ h#10000000 1c \ there's only 2 numbers here. where's the address?
['] claim-real \ h#10000000 1c 'claim-real.
catch \ error | ... false
The correct code for this part from Open Firmware 2.4:
Code:
if
_my-addrs \ _my-addrs
>as.mem-addr-max \ _my-addrs.>as.mem-addr-max
@ \ @_my-addrs.>as.mem-addr-max
h#10000000 \ @_my-addrs.>as.mem-addr-max h#10000000
0 \ @_my-addrs.>as.mem-addr-max h#10000000 0
['] claim-real \ @_my-addrs.>as.mem-addr-max h#10000000 0 'claim-real
catch \ error | ... false
Are there examples of PCI cards that work on Open Firmware 2.0f1 (early Beige G3) that don't work on Open Firmware 2.4 (later beige G3)?
Open Firmware 2.4 initially allocates only 256 MB so
my-addrs.>as.mem-addr-max
is 80000000 + 10000000 = 90000000. But a 512 MB BAR must begin at a multiple of 512MB (20000000) so
(alloc-mem-addr)
needs to loop 3 times (it allocates 256 MB at a time) - once to get from 90000000 to a0000000, then two more times to allocate the 512MB which should leave
_my-addrs.>as.mem-addr-max
set at c0000000.
Since the incorrect code is never executed and the loop patch is not required, I don't think we need to do anything for Open Firmware 2.0f1 unless there's a problem with it reserving 2000 MB at the start.