Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
The first post of this thread is a WikiPost and can be edited by anyone with the appropiate permissions. Your edits will be public.
So, the additional ram was really only useful to me when I used that RAM disk as a scratch drive for Photoshop.
Yeah I think RAM disks are the primary usecase. Unless you have a really specific workload I don't see much purpose in having that much RAM. I haven't upgraded my G5 Quad beyond 8 GB for that reason. OS X never uses more than a couple GB at a time. Even compiling a UXP web browser on Linux with -j4 only requires ~6 GB of RAM.....
 
Unfortunately, it seems not. The PowerBook G4 seems to refer to the Northbridge as 'I2' (I see where they got the 'U3' from now) and accroding to it, it's an ASIC: its description says "IC,ASIC,I2,REV1.2,NB/SB,974 BGA". The Power Book G4 logic board photos that I could find show an IC makred "CP4514B2 343S0211-A (c)2002 APPLE" seemingly produced or designed by Agere Systems (I mean, their logo is on it, sooo). I've tried googling parts and combinations of the markings, but found no datasheet. Sadge.

Apple Hardware Developer Notes at:
https://leopard-adc.pepas.com/documentation/Hardware/hardware2.html#//apple_ref/doc/uid/TP40000979

This is from the GitHub repository at:
https://github.com/cellularmitosis/ADC-reference-library-2009-july

The developer notes are in that repository at:
https://github.com/cellularmitosis/...e/main/documentation/Hardware/Developer_Notes

Which Power Book G4 are we talking about? The info I asked for would help.

romidentity.cpp of dingusppc maps New World Mac model identifiers to code names based on info from firmware updaters or later Open Firmware dumps. For example, PowerBook5,9 is Q41C.
https://github.com/joevt/dingusppc/blob/master/machines/romidentity.cpp

One of the PowerBook G4 developer notes in HTML format has a file named Q41c:
https://leopard-adc.pepas.com/docum.../17inchPowerBookG4/0Preface/Q41c_preface.html

The corresponding PDF linked from that HTML page has a block diagram showing the memory controller is named "Intrepid 2".

I haven't seen Intrepid 2 documentation.

The Intrepid ERS (posted in DingusPPC discord) says this:

5.3.3.12 Physical Bank Boundary Registers​

There are a total of eight boundary address registers pairs, each pair designates a single physical bank. These registers should be programmed based on the size and type of the memory used in the system. The content of the first register represents the lower address boundary of the first bank that corresponds to CS0_. The content of the second register represents the lower address boundary of the second bank that corresponds to CS2_, and also represents the upper boundary of bank 0. Each register contains three mode bits that represent one of eight types of memory supported by the controller. The memory banks have to be contiguous and the content of the last register represents the lower boundary of the last bank with the upper boundary fixed at (2GB-1).
Each boundary register is bits 1-9 of a 32-bit address. That's PPC bit ordering. It's bits 30-22 using Intel/Motorola bit ordering.
These bits: 0x7FC00000. That gives them a resolution of 0x400000 = 4 MiB.
Bit 31 cannot be specified so you can't assign RAM above 2 GiB.
 
Which Power Book G4 are we talking about? The info I asked for would help.

I think we're talking about the last two PowerBook models to ever be made, A1138 and A1139, seemingly affectionately called 'DLSD' for their Double-Layer SuperDrive.

I don't own a PowerBook G4, though, so I can't really help here, unfortunately.

That said, though, stellar job on finding all the info!
 
Apple Hardware Developer Notes at:
https://leopard-adc.pepas.com/documentation/Hardware/hardware2.html#//apple_ref/doc/uid/TP40000979

This is from the GitHub repository at:
https://github.com/cellularmitosis/ADC-reference-library-2009-july

The developer notes are in that repository at:
https://github.com/cellularmitosis/...e/main/documentation/Hardware/Developer_Notes

Which Power Book G4 are we talking about? The info I asked for would help.

romidentity.cpp of dingusppc maps New World Mac model identifiers to code names based on info from firmware updaters or later Open Firmware dumps. For example, PowerBook5,9 is Q41C.
https://github.com/joevt/dingusppc/blob/master/machines/romidentity.cpp

One of the PowerBook G4 developer notes in HTML format has a file named Q41c:
https://leopard-adc.pepas.com/docum.../17inchPowerBookG4/0Preface/Q41c_preface.html

The corresponding PDF linked from that HTML page has a block diagram showing the memory controller is named "Intrepid 2".

I haven't seen Intrepid 2 documentation.

The Intrepid ERS (posted in DingusPPC discord) says this:

Each boundary register is bits 1-9 of a 32-bit address. That's PPC bit ordering. It's bits 30-22 using Intel/Motorola bit ordering.
These bits: 0x7FC00000. That gives them a resolution of 0x400000 = 4 MiB.
Bit 31 cannot be specified so you can't assign RAM above 2 GiB.
@Nullcaller is correct — mine is the PowerBook5,9 (17” high resolution, dual layer super drive).

I do not have a serial cable but I did manually run your first requested command — it took 32 screenfuls (which I took legible pictures of) even with the high resolution screen.

Is there some particular piece of that output you are interested in? I might be able to attach a compressed file of all of the images if you want the whole set…
 
  • Like
Reactions: Nullcaller
@Nullcaller is correct — mine is the PowerBook5,9 (17” high resolution, dual layer super drive).

I do not have a serial cable but I did manually run your first requested command — it took 32 screenfuls (which I took legible pictures of) even with the high resolution screen.

Is there some particular piece of that output you are interested in? I might be able to attach a compressed file of all of the images if you want the whole set…
Use telnet to capture the info. Connect the G4 to your ethernet network. Use the default IP address of the G4 as the IP address of the telnet server in Open Firmware.
I think I linked to info and examples. Go to the first post at:
https://forums.macrumors.com/thread...l-work-in-a-beige-power-macintosh-g3.2303689/
Search for telnet. Click on the links.
 
  • Like
Reactions: Nullcaller
Took me a bit to figure out that I actually had to use quotes and an io command at the end of the OpenFirmware telnet command.

That was quite the copy/paste session! It is more than possible I goofed somewhere in that process so if anything looks odd it is quite likely my fault.

I've attached the output of that command as a text file.

Do I need to download your lspci utility to one of my HFS+ volumes in order to use it from OpenFirmware?
 

Attachments

  • Like
Reactions: Nullcaller
That was quite the copy/paste session!

You did great! But if you do anything like that in the future, then you should know that, in Linux or macOS, you can actually log the output of any command-line utility using tee:

Code:
telnet <arguments...> | tee telnet.log

This command launches telnet with your supplied arguments and allows you to still do user input into telnet, but it also logs everything that telnet outputs into telnet.log.

In general, if anything command-line (or even anything computer, to be honest) takes a lot of repeated steps with no creative input from you, there's probably a lazy programmer that thought of a way to automate it 🙂

(And, admittedly, LLMs are usually the best place to learn the way to do it, because an LLM will just spit out what you need to do, no questions asked, and will not insist on a 'proper' way to do it that requires you rethink your whole approach, like StackOverflow tends to do. Latest Claude models will even try and explain what everything means and why it chose a certain way to do stuff, and will elaborate if you ask)
 
  • Like
Reactions: keksikuningas
As a great video game character once said, science isn't about why, it's about why not.

Alright, I've been thinking... When life gives you lemons, don't make lemonade. Make life take the lemons back! Get mad! I don't want your damn lemons, what am I supposed to do with these?! Demand to see life's manager! Make life rue the day it thought it could give me lemons! Do you know who I am? I'm the man that's going to burn your house down! With the lemons! I'm going to get my engineers to invent a combustible lemon that burns your house down!!

...You know the older I get, the more I sympathize with the man.
 
  • Like
Reactions: Nullcaller
That was quite the copy/paste session! It is more than possible I goofed somewhere in that process so if anything looks odd it is quite likely my fault.

I've attached the output of that command as a text file.
The final copy/paste was a single 136K copy, right? You need to make sure your terminal app has a back buffer large enough for all the text.

I think the output looks fine.

It says you have a PowerBook5,9 with Open Firmware 4.9.5f3. I've attached a assembly/Forth listing of a ROM with the same version but it is from a PowerBook5,8 (0x3148.01) so I don't know if it's the same as your ROM because Apple added to its firmware updaters the ability for different Mac models to contain different fcode images since 4.5.5d2. I don't have a firmware updater later than 4.7.1f1 so I can't check if the list of fcode images is different between the PowerBook5,8 and the PowerBook5,9.

I have a 4.9.6f0 ROM dump for a PowerBook5,9 (0x3149.01)

For a Mac OS X utility to grab the ROM contents, search for "rom dump" in the first post of this thread and click on "Mac OS X":
https://forums.macrumors.com/thread...l-work-in-a-beige-power-macintosh-g3.2303689/

Do I need to download your lspci utility to one of my HFS+ volumes in order to use it from OpenFirmware?
In Open Firmware, you can load Open Firmware code from disk using the load command if you know the device path, partition number, and file path. For Forth text files, the requirement is that the contents begin with a Forth comment like this \ (backslash followed by a space).

Or you can just paste the text into telnet since your PowerBook doesn't have a serial port connection that supports the dl command.

When pasting text into the Open Firmware command line, you have to paste the text slowly, 14 characters at a time, because Open Firmware will through away characters if they are received too quickly. I use the telnet connection feature of Serial.app. It has Pacing options in the Terminal settings. I set Line Delay and Character Delay to 0.005s each before doing a paste.
 

Attachments

It took me a while to complete because I copied one screen at a time (paging through with the space bar) and thus didn’t run out of buffer. Using a tee command as suggested above would have just pulled from stdout and would have both skipped the buffer and the time consuming approach I took.

So you want the ROM contents? I’ll see about dumping it.

What is the simplest way to determine the drive and partition designation for OpenFirmware?
 
What is the simplest way to determine the drive and partition designation for OpenFirmware?
diskutil list in Mac OS X.

I have a list-partitions command for Open Firmware but you would have to paste it in or load it from disk.

You can try the dir command on every partition number until it shows the directory that you are looking for.
Partition numbers are specified in decimal.

So you want the ROM contents? I’ll see about dumping it.
Yes, please. I'll take anything that's not listed in the List of Open Firmware versions at:
https://forums.macrumors.com/thread...l-work-in-a-beige-power-macintosh-g3.2303689/
Also looking for a PowerBook 5300 ROM (checksum 852CFBDF)

From your device tree, it looks like you might have a disk at
/pci@f4000000/ata-6@d/disk@0
The devalias for that disk is hd

So something like this might work:
dir hd:0,\

The colon separates the Open Firmware device path from the Open Firmware device parameters.
The parameters are separated by a ,
The first parameter is the partition number in decimal. An Apple Partition Map formated disk with Mac OS 9 drivers may have the first usable partition at number 9.
The second parameter is the file system path. Since Open Firmware uses / in the device path, \ is used in the file system path.
\ points to the root directory.
\\ points to the blessed system folder.
\\\ might point to the alternate blessed system folder.
Separate folders with \
Use %## to escape special characters (where ## is a hex ascii number). e.g. %20 is a space character.
 
  • Like
Reactions: Amethyst1
I tried your utility from 10.6.8 but it did not name the file with the firmware version so I tried again from 10.4.11 and got the same result. Perhaps I was supposed to run the utility from the command line instead of double clicking to launch a Terminal window?

Regardless, I have named each one consistent with the OS under which it was produced and attached them here. If you need me to run this a different way let me know and I'll give it another go.
 

Attachments

I tried your utility from 10.6.8 but it did not name the file with the firmware version so I tried again from 10.4.11 and got the same result. Perhaps I was supposed to run the utility from the command line instead of double clicking to launch a Terminal window?

Regardless, I have named each one consistent with the OS under which it was produced and attached them here. If you need me to run this a different way let me know and I'll give it another go.
The output from 10.4 has zero size. Something didn't work.
The output from 10.6 is ok.
Were they from the same Mac? Only one dump per Mac is necessary.

Your model is 0x3149.01 PowerBook5,9. Of the 21 fcode drivers, 3 are for model code named Q41C.
The dump I provided was for 0x3148.01 PowerBook5,8. Of the 21 fcode drivers, 3 are for model code named Q16C.
They share the first 18 drivers. The 3 differing drivers have minor differences between the two models.
See the BBEdit worksheet file for the list of drivers.

There's some minor differences in nvram and config but that's to be expected even for Macs of the same model. There first 128 bytes of the config are the same per model. The next 128 bytes may have unique information such as Ethernet MAC address. Documentation exists describing the config block. It controls some CPU, RAM, and PCI info, etc.
 

Attachments

Yes, both rom dumps were performed on the same machine. The 10.4.11 one was the same size as the 10.6.8 dump but my copy to the latter’s install location failed due to permissions and I did not notice before attaching — sorry!

Did you find anything useful related to RAM addressing?

I will attempt to load your lspci utility and record output this evening.
 
@joevt, I hope this is usable. I tried the tee command method of capturing.

I also got the first version of the lspci script loaded which you had specified... which has "dev pci1" at the top. If you want to me try something different just specify what I should run.
 

Attachments

Did you find anything useful related to RAM addressing?
The dump-device-tree output shows the memory controller as a uni-north compatible device.
Code:
/uni-n@f8000000
PROPERTIES:
#address-cells          00000001 
#size-cells             00000001 
compatible              uni-north
device-rev              000000d9 
device_type             memory-controller
model                   AAPL,UniNorth
name                    uni-n
platform-do-fw-linkon-disable /pci@f4000000/firewire@e
                        08000000 00000003 00000080 00000000 ffffffe7 
platform-do-fw-linkon-enable /pci@f4000000/firewire@e
                        08000000 00000003 00000080 00000018 ffffffe7 
reg                     f8000000  01000000

The device-rev value of 0xD9 comes from the 32-bits at at 0xf8000000. Little-endian. Only the low byte is significant.
The first hex digit 0xD is UNType
The second hex digit 9 is RevNum

UniN 1.0
- 0x00..0x04 = ?
- 0x03.. = ?
- 0x05.. = ?

UniN 1.5
- 0x1*

U2
- 0x2* = U2
- 0x22.. = ?

Intrepid
- 0xD* = Intrepid
- 0xD0 = ?
- 0xD8 = I2

So your Intrepid 2 based PowerBook is similar in functionality to the first Intrepid and U2 and UniN.
Although we don't have info for Intrepid 2, it seems very likely that the memory controller has similar limits to Intrepid.
If it was significantly different, it would probably have a different type than 0xD*.
 
@joevt, I hope this is usable. I tried the tee command method of capturing.
I don't like the tee command method of capturing since it captures every output character from Open Firmware including all the VT100 escape characters used for echoing your input. I would have to write a script to process those to create readable output. Or do manual edits like I did in the attached.

What terminal app are you using? It should have a scroll back buffer of a few megabytes or a million lines or whatever. I have Serial.app set to a billion lines. Press Command-K to clear the scroll back buffer occassionally.

Your output is usable but it only has devices from pci1.

I also got the first version of the lspci script loaded which you had specified... which has "dev pci1" at the top. If you want to me try something different just specify what I should run.
I think the lspci script works best when loaded to the global word list. So, unselect-dev should be at the top.
Then you load it like you did and evaluate it like you did to load the lspci word into the Open Firmware dictionary.

Then do lspci for each PCI host controller like this:
Code:
dev agp
lspci
dev pci1
lspci
dev pci2
lspci
 

Attachments

I'm not quite getting it. I replaced "dev pci1" with "unselect-dev" in the script. I was able to load it but then got this:


0 > load-base load-size evaluate lspci
config-l@, unknown word, HERE= ff9e72b4
ok


What am I doing wrong?

Since my MacBook Air M5 doesn't have telnet installed I just ssh'd into my ThinkPad T470S running FreeBSD and telneted to the PowerBook from there.
 
I'm not quite getting it. I replaced "dev pci1" with "unselect-dev" in the script. I was able to load it but then got this:


0 > load-base load-size evaluate lspci
config-l@, unknown word, HERE= ff9e72b4
ok


What am I doing wrong?
Use lspci after using dev to set the active package. Do the commands one at a time in this order.

Code:
load-base load-size evaluate
dev agp
lspci
dev pci1
lspci
dev pci2
lspci
 
Still not working. Tried a few variations:


0 > evaluate lspci
lspci, unknown word, HERE= ff9e72b4
ok
0 > load-base load-size evaluate dev agp lspci dev pci1 lspci dev pci2 lspci
config-l@, unknown word, HERE= ff9e737c
ok
0 > load-base load-size evaluate
config-l@, unknown word, HERE= ff9e7444
ok
0 > dev agp ok
0 > lspci
lspci, unknown word, HERE= ff9e7444
ok
0 > load pci2/ata-6@D/@0:13,\Users\welchsm\lspci load-size=7b8 adler32=9e967ac2
ok
0 > load-base load-size evaluate
config-l@, unknown word, HERE= ff9e750c
ok
0 > load-base load-size evaluate dev agp lspci
config-l@, unknown word, HERE= ff9e75d4
ok
0 >
 
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.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.