
118
P A R T I
C O N N E C T I N G T H E B O A R D
As an example, the following lines entered into
config.txt
will give the BCM2835 a small
boost of 0.05 V to 1.25 V and the memory chip a bigger boost of 0.1 V to 1.3 V:
over_voltage=2
over_voltage_sdram=4
As with other settings, deleting the lines from
config.txt
or deleting the file itself will
return things to normal. Unlike the other settings in this section, however, the evidence will
remain in the form of a blown fuse in the BCM2835, rendering the Pi’s warranty null and
void even after the default settings are restored.
Disabling L2 Cache
The Pi’s BCM2835 SoC processor has 128 KB of
Layer 2 cache memory
onboard. Although
this memory is small, it’s extremely fast. It’s used to temporarily store—or
cache—
data
and instructions between the slower main memory and the processor itself to improve
performance.
Because of the BCM2835’s origins as a multimedia processor targeted at set-top boxes, this
L2 cache is designed to be used by the GPU portion of the chip alone. Unlike a traditional
processor, the CPU doesn’t have any L2 cache of its own.
Using
config.txt
, you can tell the BCM2835 to allow or disallow its CPU portion access to
the L2 cache memory. In some cases, this can improve performance. In other cases it can
harm performance, due to the physical location of the cache being a relatively long distance
away from the CPU section of the chip and closer to the GPU.
Use of the L2 cache memory also requires a Linux distribution that has been compiled with
the cache memory in mind. Raspbian is one such distribution, and comes with the L2 cache
enabled for improved performance. It should be left this way, and only disabled if it causes
problems with alternative operating systems.
To switch the L2 cache off for CPU access, simply add the following line to the
config.txt
file:
disable_l2cache=1
As with all
config.txt
settings, the system must be rebooted before the change will take
place. To enable the CPU’s access to the cache memory, replace the
1
with a
0
.
Summary of Contents for A
Page 1: ......
Page 2: ......
Page 3: ...Raspberry Pi User Guide 2nd Edition...
Page 4: ......
Page 5: ...Raspberry Pi User Guide 2nd Edition Eben Upton and Gareth Halfacree...
Page 10: ......
Page 26: ...R A S P B E R R Y P I U S E R G U I D E S E C O N D E D I T I O N 10...
Page 28: ......
Page 29: ...Chapter 1 Meet the Raspberry Pi...
Page 37: ...Chapter 2 Getting Started with the Raspberry Pi...
Page 56: ......
Page 57: ...Chapter 3 Linux System Administration...
Page 79: ...Chapter 4 Troubleshooting...
Page 89: ...Chapter 5 Network Configuration...
Page 109: ...Chapter 6 The Raspberry Pi Software Configuration Tool...
Page 122: ......
Page 123: ...Chapter 7 Advanced Raspberry Pi Configuration...
Page 140: ......
Page 141: ...Chapter 8 The Pi as a Home Theatre PC...
Page 151: ...Chapter 9 The Pi as a Productivity Machine...
Page 160: ......
Page 161: ...Chapter 10 The Pi as a Web Server...
Page 172: ......
Page 173: ...Chapter 11 An Introduction to Scratch...
Page 189: ...Chapter 12 An Introduction to Python...
Page 216: ......
Page 218: ......
Page 219: ...Chapter 13 Learning to Hack Hardware...
Page 234: ......
Page 235: ...Chapter 14 The GPIO Port...
Page 249: ...Chapter 15 The Raspberry Pi Camera Module...
Page 265: ...Chapter 16 Add on Boards...
Page 280: ......
Page 281: ...Appendix A Python Recipes...
Page 287: ...Appendix B Raspberry Pi Camera Module Quick Reference...
Page 293: ...Appendix C HDMI Display Modes...