ADC Home > Reference Library > Technical Q&As > Hardware & Drivers > Apple Hardware >
|
Q: Can I configure the Power Macintosh system so that the system thinks that there is less physical memory present than there actually is without having to open the system to remove memory sticks. A: For all Power Macintosh systems with Open Firmware, you can implement settings to make the system believe that there is less physical memory than is actually present. This is useful for testing purposes when you don't want to have to physically remove RAM such as on the earlier iMacs or PowerBooks which require disassembly. The simplest method is supported by Mac OS X only. Under Mac OS X, you can use the Terminal application to enter the nvram command and reboot the system. There are additional methods which work within the Open Firmware environment. Using Terminal to Set the Physical Memory Size for Mac OS XThe following instructions works for Mac OS X only. You must have root privileges in order to make this change. You will use the Terminal application to issue the nvram command to set the "boot-arg" environment variable. Follow these steps. Step 1. Launch the Terminal application. The
Terminal application is found at Step 2. Enter the following command
Step 3. Restart the system The above commands implements the An important caveat - the "desired memory size" must be a multiple of 2. If you specify an odd setting of 65, 129, etc, your system may hang during the boot process. If this happens, you will need to "zap PRAM" as described in the next section "Clearing the "maxmem" Setting". Note that you can also implement the Clearing the "maxmem" SettingThe 1. Use the Terminal application to clear the
This command sequence clears the value of
2. You can clear 3. Finally, you can clear the Setting the Physical Memory Size for Mac OS 8/9 and Mac OS X Under Open FirmwareThe following method works for system starts into both Mac OS 8/9 and Mac OS X. To have less physical RAM recognized, you need to delete the existing "reg" property in the memory node and create a replacement property with less memory specified. Follow these instructions. Step 1. Enter Open Firmware. Step 2. Set the current directory to the memory
node.
Step 3. Display the contents of the memory
node.
Remember to include the period character at the beginning of the command. The following are the memory node properties for a PowerBook G3 (FireWire) with a 32M SODIMM in the lower slot and a 128M SODIMM in the upper slot.
Step 4. Identify the "reg" values
The first column is the starting address for the DIMM and the second column is the size of the DIMM - 0x08000000 is equivalent to 128M, 0x02000000 is equivalent to 32M. Note that the memory space always begins at location 0. If you try to set the starting address to an address other than 0, the system may not boot. Case 2 - For a system with only 1 memory DIMM present, you might see
In this case, there is a single DIMM (SODIMM) of 128M memory present. Step 5. Decide how much memory you want the system to think is present. You can only specify the same or less memory than is physically present. Let's assume you want the system to recognize only 32M of the 160M of RAM present in Case 1 above. Step 6. Delete the existing " reg" property.
There is a leading space character in You can verify that the property is gone by
entering the Step 7. Enter in a replacement
In this case, 0 is the memory starting address and 2000000 (32M) is the memory size. Verify that the property is now present with only a
single array entry by using the ".properties" command. You
should now see the following
Step 8. Continue the boot process
Once the Mac OS is active, you can verify that the system now only thinks that there is 32M present. Note that this information is not written to NVRAM. When you reboot the system, the system will recognize the Physical RAM which is present. Another Example Open Firmware ExampleYou may have a system with only one or multiple RAM DIMMs present. For all cases, the generalized command is
where For case 1, if we want the system to think that there is 144M of memory instead of the full 160M, we do the following for step 7. Enter the following for this step.
This creates a Three DIMM Open Firmware ExampleWhether you have one, two or many more DIMMs
present, the same command format is used. You might have a
G4 with three 128M DIMMs installed as displayed using the
The total memory present is 384M. Lets assume that you want to limit the system to recognizing only 320M. For step 7. Enter the following.
2M LimitationWhen specifying the size of memory present, the size must be a multiple of 200000 (or 2M) else the system may hang on start or enter a kernel panic. You cannot specify that the available memory is 65M for example, but you can specify that it is 66M. If you specify an invalid value, you may have to "zap PRAM" as described in the section - "Clearing the "maxmem" Setting". Setting the Physical Memory Size for Mac OS X using "maxmem" in Open FirmwareFor Mac OS X, you can create the To define the Step 1. Enter Open Firmware. Step 2. Enter the following command
Note that there are no "double" quote characters used in this command line as there are when using the Terminal application. Step 3. After the "ok" response, enter
to continue the boot process. The above commands implements the maxmem setting into nonvolatile RAM, which means that the setting is persistent across system restarts. To clear this setting, refer to the options described above in the section "Clearing the "maxmem" Setting". ReferencesTech Note 1061 Fundamentals of Open Firmware, Part I: The User Interface, Part I in the Open Firmware Technote Series Tech Note 2004 Debugging Open Firmware Using Telnet Tech Note 1062 Fundamentals of Open Firmware, Part II: The Device Tree Part II in the Open Firmware Technote Series [Dec 20 2001] |