Hardware Reference
In-Depth Information
fabrication time, and it's not one that a user can easily hack. Stacking these tiny BGA
units is best done by robots, not clumsy human hands.
Even with the newer 512 MiB of memory, it's a precious resource. Because of how the
BCM2835 system-on-chip works, some of this memory must go to the GPU. You might
have seen this sort of behavior on lower-end GPU cards for x86 computers, which do
not include dedicated on-GPU memory and dedicate some system memory for GPU
usage. The Raspberry Pi firmware allows for you to customize the amount of memory
that is allocated to the GPU.
Before the 512 MiB Raspberry Pi Model B units existed, customizing memory alloca-
tion was accomplished by choosing a start.elf file corresponding to the splits shown
in Table 2-1 .
Table 2-1. Memory allocation on 256 MiB Raspberry Pi Model B
ARM CPU
VIDEOCORE GPU
FILENAME
128 MiB
128 MiB
arm128_start.elf
192 MiB
64 MiB
arm192_start.elf
224 MiB
32 MiB
arm224_start.elf
240 MiB
16 MiB
arm240_start.elf
This worked well when the Raspberry Pi Model B firmware had only one possible
memory size (256 MiB) to support, but when they started producing the 512 MiB
Model B units, this approach no longer made sense. Among other reasons this didn't
work, the most obvious is that twice as many splits are possible on the 512 MiB units
(even if some of them are pretty ludicrous). They also wanted the firmware to be able
to support both units, and the split-out start.elf model was very much hardcoded to
the 256 MiB size.
Allocate Memory with config.txt
The current firmware (necessary for the 512 MiB units) abandons the separate
start.elf file approach and adds support for start.elf to read in a variable ( gpu_mem )
from config.txt that specifies exactly the amount the user wants to allocate to the
GPU in chunks of 16 MiB, with 16 MiB as the minimum and 448 MiB as the maximum.
To set this, open config.txt (on the boot partition of the SD card containing the Rasp-
berry Pi Linux image) in the editor of your choice and use the following syntax (where
value is an integer representing the total MiB to dedicate to the GPU, in chunks of 16
MiB, 16 to 128 MiB):
gpu_mem=(value)
Search WWH ::




Custom Search