| 1 |
========== |
| 2 |
Overview |
| 3 |
========== |
| 4 |
|
| 5 |
Modern mainboards store the BIOS in a reprogrammable flash chip. |
| 6 |
There are hundreds of different flash (`EEPROM <https://en.wikipedia.org/wiki/EEPROM>`_) chips, |
| 7 |
with variables such as memory size, speed, communication bus (Parallel, LPC, FWH, SPI) and packaging to name just a few. |
| 8 |
|
| 9 |
Packaging/housing/form factor |
| 10 |
============================= |
| 11 |
|
| 12 |
DIP32: Dual In-line Package, 32 pins |
| 13 |
------------------------------------ |
| 14 |
|
| 15 |
DIP32 top |
| 16 |
|
| 17 |
.. image:: Dip32_chip.jpg |
| 18 |
:alt: DIP32 top |
| 19 |
|
| 20 |
DIP32 bottom |
| 21 |
|
| 22 |
.. image:: Dip32_chip_back.jpg |
| 23 |
:alt: DIP32 bottom |
| 24 |
|
| 25 |
DIP32 in a socket |
| 26 |
|
| 27 |
.. image:: Dip32_in_socket.jpg |
| 28 |
:alt: DIP32 in a socket |
| 29 |
|
| 30 |
DIP32 socket |
| 31 |
|
| 32 |
.. image:: Empty_dip32_socket.jpg |
| 33 |
:alt: DIP32 socket |
| 34 |
|
| 35 |
DIP32 extractor tool |
| 36 |
|
| 37 |
.. image:: Dip_tool.jpg |
| 38 |
:alt: DIP32 extractor tool |
| 39 |
|
| 40 |
A rectangular black plastic block with 16 pins along each of the two longer sides of the package |
| 41 |
(32 pins in total). DIP32 chips can be socketed which means they are detachable from the mainboard |
| 42 |
using physical force. If they haven't been moved in and out of the socket very much, |
| 43 |
they can appear to be quite difficult to release from the socket. One way to remove a DIP32 chip |
| 44 |
from a socket is by prying a **thin screwdriver** in between the plastic package and the socket, |
| 45 |
along the shorter sides where there are no pins, and then gently bending the screwdriver to push |
| 46 |
the chip upwards, away from the mainboard. Alternate between the two sides to avoid bending the pins, |
| 47 |
and don't touch any of the pins with the screwdriver (search about ESD, electro-static discharge). |
| 48 |
If the chip is **soldered directly to the mainboard**, it has to be desoldered in order to be |
| 49 |
reprogrammed outside the mainboard. If you do this, it's a good idea to |
| 50 |
`solder a socket to the mainboard <http://www.coreboot.org/Soldering_a_socket_on_your_board>`_ instead, |
| 51 |
to ease any future experiments. |
| 52 |
|
| 53 |
PLCC32: Plastic Leaded Chip Carrier, 32 pins |
| 54 |
-------------------------------------------- |
| 55 |
|
| 56 |
PLCC32 top |
| 57 |
|
| 58 |
.. image:: Plcc32_chip.jpg |
| 59 |
:alt: PLCC32 top |
| 60 |
|
| 61 |
PLCC32 botto |
| 62 |
|
| 63 |
.. image:: Plcc32_chip_back.jpg |
| 64 |
:alt: PLCC32 bottom |
| 65 |
|
| 66 |
PLCC32 socket |
| 67 |
|
| 68 |
.. image:: Plcc32_in_socket.jpg |
| 69 |
:alt: PLCC32 socket |
| 70 |
|
| 71 |
PLCC32 in a socket |
| 72 |
|
| 73 |
.. image:: Empty_plcc32_socket.jpg |
| 74 |
:alt: PLCC32 in a socket |
| 75 |
|
| 76 |
Soldered PLCC3 |
| 77 |
|
| 78 |
.. image:: Soldered_plcc32.jpg |
| 79 |
:alt: Soldered PLCC32 |
| 80 |
|
| 81 |
Two soldered PLCC32 |
| 82 |
|
| 83 |
.. image:: Dual_plcc32_soldered.jpg |
| 84 |
:alt: Two soldered PLCC32 |
| 85 |
|
| 86 |
PLCC32 Bios Savior |
| 87 |
|
| 88 |
.. image:: Bios_savior.jpg |
| 89 |
:alt: PLCC32 Bios Savior |
| 90 |
|
| 91 |
PLCC32 Top-Hat-Flash adapte |
| 92 |
|
| 93 |
.. image:: Top_hat_flash.jpeg |
| 94 |
:alt: PLCC32 Top-Hat-Flash adapter |
| 95 |
|
| 96 |
PLCC32 pushpin trick |
| 97 |
|
| 98 |
.. image:: Pushpin_roms_2.jpg |
| 99 |
:alt: PLCC32 pushpin trick |
| 100 |
|
| 101 |
PLCC extractor tool |
| 102 |
|
| 103 |
.. image:: Plcc_tool.jpg |
| 104 |
:alt: PLCC extractor tool |
| 105 |
|
| 106 |
Black plastic block again, but this one is much more square. |
| 107 |
PLCC32 was becoming the standard for mainboards after DIP32 chips because of its smaller physical size. |
| 108 |
PLCC can also be **socketed** or **soldered directly to the mainboard**. |
| 109 |
Socketed PLCC32 chips can be removed using a special PLCC removal tool, |
| 110 |
or using a piece of nylon line tied in a loop around the chip and pulled swiftly straight up, |
| 111 |
or bending/prying using small screwdrivers if one is careful. PLCC32 sockets are often fragile |
| 112 |
so the screwdriver approach is not recommended. While the nylon line method sounds strange it works well. |
| 113 |
Desoldering PLCC32 chips and soldering on a socket can be done using either a desoldering station |
| 114 |
or even just a heat gun. You can also cut the chip with a sharp knife, **but it will be destroyed in the process, of course**. |
| 115 |
|
| 116 |
DIP8: Dual In-line Package, 8 pins |
| 117 |
---------------------------------- |
| 118 |
|
| 119 |
DIP8 top |
| 120 |
|
| 121 |
.. image:: Dip8_chip.jpg |
| 122 |
:alt: DIP8 top |
| 123 |
|
| 124 |
DIP8 bottom |
| 125 |
|
| 126 |
.. image:: Dip8_chip_back.jpg |
| 127 |
:alt: DIP8 bottom |
| 128 |
|
| 129 |
DIP8 in a socket |
| 130 |
|
| 131 |
.. image:: Dip8_in_socket.jpg |
| 132 |
:alt: DIP8 in a socket |
| 133 |
|
| 134 |
DIP8 socket |
| 135 |
|
| 136 |
.. image:: Empty_dip8_socket.jpg |
| 137 |
:alt: DIP8 socket |
| 138 |
|
| 139 |
Most recent boards use DIP8 chips (which always employ the SPI protocol) or SO8/SOIC8 chips (see below). |
| 140 |
DIP8 chips are always **socketed**, and can thus be easily removed (and hot-swapped), |
| 141 |
for example using a small screwdriver. This allows for relatively simple recovery in case of an incorrectly flashed chip. |
| 142 |
|
| 143 |
SO8/SOIC8: Small-Outline Integrated Circuit, 8 pins |
| 144 |
--------------------------------------------------- |
| 145 |
|
| 146 |
Soldered SOIC8 |
| 147 |
|
| 148 |
.. image:: Soic8_chip.jpg |
| 149 |
:alt: Soldered SOIC8 |
| 150 |
|
| 151 |
SOIC8 socket, front, closed |
| 152 |
|
| 153 |
.. image:: Soic8_socket_front_closed.jpg |
| 154 |
:alt: SOIC8 socket, front, closed |
| 155 |
|
| 156 |
SOIC8 socket, half open |
| 157 |
|
| 158 |
.. image:: Soic8_socket_half_opened.jpg |
| 159 |
:alt: SOIC8 socket, half open |
| 160 |
|
| 161 |
SOIC8 socket, open |
| 162 |
|
| 163 |
.. image:: Soic8_socket_open.jpg |
| 164 |
:alt: SOIC8 socket, open |
| 165 |
|
| 166 |
SOIC8 socket, back |
| 167 |
|
| 168 |
.. image:: Soic8_socket_back.jpg |
| 169 |
:alt: SOIC8 socket, back |
| 170 |
|
| 171 |
SOIC8 socket, chip nearby |
| 172 |
|
| 173 |
.. image:: Soic8_socket_with_chip.jpg |
| 174 |
:alt: SOIC8 socket, chip nearby |
| 175 |
|
| 176 |
SOIC8 socket, chip inserted |
| 177 |
|
| 178 |
.. image:: Soic8_socket_with_chip_inserted.jpg |
| 179 |
:alt: SOIC8 socket, chip inserted |
| 180 |
|
| 181 |
Another type of SOIC8 adapter |
| 182 |
|
| 183 |
.. image:: Spi-socket-dscn2913-1024x768.jpg |
| 184 |
:alt: Another type of SOIC8 adapter |
| 185 |
|
| 186 |
Similarly to the DIP8 chips, these always use the SPI protocol. |
| 187 |
However, SO8/SOIC8 chips are most often soldered onto the board directly without a socket. |
| 188 |
In that case a few boards have a header to allow :doc:`in_system`. You can also desolder |
| 189 |
a soldered SO8 chip and solder an SO8 socket/adapter in its place, or build |
| 190 |
a `SOIC-to-DIP adapter <http://blogs.coreboot.org/blog/2013/07/16/gsoc-2013-flashrom-week-4/>`_. |
| 191 |
Some of the cheapest SOIC ZIF sockets are made by `Wieson <https://www.wieson.com/go/en/wieson/index.php?lang=en>`_. |
| 192 |
They have 3 models available - G6179-10(0000), G6179-20(0000) and a 16 pin version named G6179-07(0000). |
| 193 |
They are available for example from `siliconkit <https://siliconkit.com/oc3/>`_, |
| 194 |
`Dediprog <https://www.dediprog.com/>`_, as well as `alibaba <http://alibaba.com/>`_. |
| 195 |
For the usual "BIOS" flash chips you want the G6179-10 model (look also for G6179-100000). |
| 196 |
Dediprog usually has them or similar ones as well but has steep shipping costs and an unpractical minimum order quantity. |
| 197 |
|
| 198 |
TSOP: Thin Small-Outline Package, 32, 40, or 48 pins |
| 199 |
---------------------------------------------------- |
| 200 |
|
| 201 |
Soldered TSOP32 |
| 202 |
|
| 203 |
.. image:: Amd_am29f010_tsop32.jpg |
| 204 |
:alt: Soldered TSOP32 |
| 205 |
|
| 206 |
Soldered TSOP32 |
| 207 |
|
| 208 |
.. image:: Sst_39vf040_tsop32.jpg |
| 209 |
:alt: Soldered TSOP32 |
| 210 |
|
| 211 |
Soldered TSOP40 |
| 212 |
|
| 213 |
.. image:: Soldered_tsop40.jpg |
| 214 |
:alt: Soldered TSOP40 |
| 215 |
|
| 216 |
Soldered TSOP48 |
| 217 |
|
| 218 |
.. image:: Soldered_tsop48.jpg |
| 219 |
:alt: Soldered TSOP48 |
| 220 |
|
| 221 |
TSOPs are often used in embedded systems where size is important and there is no need |
| 222 |
for replacement in the field. It is possible to (de)solder TSOPs by hand, |
| 223 |
but it's not trivial and a reasonable amount of soldering skills are required. |
| 224 |
|
| 225 |
BGA: Ball Grid Array |
| 226 |
-------------------- |
| 227 |
|
| 228 |
BGA package flash |
| 229 |
|
| 230 |
.. image:: Flash-BGA.jpg |
| 231 |
:alt: BGA package flash |
| 232 |
|
| 233 |
BGAs are often used in embedded systems where size is important and there is no need |
| 234 |
for replacement in the field. It is not easily possible to (de)solder BGA by hand. |
| 235 |
|
| 236 |
Communication bus protocol |
| 237 |
========================== |
| 238 |
|
| 239 |
There are four major communication bus protocols for flash chips, |
| 240 |
each with multiple subtle variants in the command set: |
| 241 |
|
| 242 |
* **SPI**: Serial Peripheral Interface, introduced ca. 2006. |
| 243 |
* **Parallel**: The oldest flash bus, phased out on mainboards around 2002. |
| 244 |
* **LPC**: Low Pin Count, a standard introduced ca. 1998. |
| 245 |
* **FWH**: Firmware Hub, a variant of the LPC standard introduced at the same time. |
| 246 |
FWH is a special case variant of LPC with one bit set differently in the memory read/write commands. |
| 247 |
That means some data sheets mention the chips speak LPC although |
| 248 |
they will not respond to regular LPC read/write cycles. |
| 249 |
|
| 250 |
Here's an attempt to create a marketing language -> chip type mapping: |
| 251 |
|
| 252 |
* JEDEC Flash -> Parallel (well, mostly) |
| 253 |
* FWH -> FWH |
| 254 |
* Firmware Hub -> FWH |
| 255 |
* LPC Firmware -> FWH |
| 256 |
* Firmware Memory -> FWH |
| 257 |
* Low Pin Count (if Firmware/FWH is not mentioned) -> LPC |
| 258 |
* LPC (if Firmware is not mentioned) -> LPC |
| 259 |
* Serial Flash -> SPI |
| 260 |
|
| 261 |
SST data sheets have the following conventions: |
| 262 |
|
| 263 |
* LPC Memory Read -> LPC |
| 264 |
* Firmware Memory Read -> FWH |
| 265 |
|
| 266 |
If both are mentioned, the chip supports both. |
| 267 |
|
| 268 |
If you're not sure about whether a device is LPC or FWH, look at the read/write cycle definitions. |
| 269 |
|
| 270 |
FWH |
| 271 |
|
| 272 |
=========== ========== ============== ========================================================== |
| 273 |
Clock Cycle Field Name Field contents Comments |
| 274 |
=========== ========== ============== ========================================================== |
| 275 |
1 START 1101/1110 1101 for READ, 1110 for WRITE. |
| 276 |
2 IDSEL 0000 to 1111 IDSEL value to be shifted out to the chip. |
| 277 |
3-9 IMADDR YYYY The address to be read/written. 7 cycles total == 28 bits. |
| 278 |
10+ ... ... ... |
| 279 |
=========== ========== ============== ========================================================== |
| 280 |
|
| 281 |
LPC |
| 282 |
|
| 283 |
=========== =================== ============== ========================================================== |
| 284 |
Clock Cycle Field Name Field contents Comments |
| 285 |
=========== =================== ============== ========================================================== |
| 286 |
1 START 0000 ... |
| 287 |
2 CYCLETYPE+DIRECTION 010X/011X 010X for READ, 011X for WRITE. X means "reserved". |
| 288 |
3-10 ADDRESS YYYY The address to be read/written. 8 cycles total == 32 bits. |
| 289 |
11+ ... ... ... |
| 290 |
=========== =================== ============== ========================================================== |
| 291 |
|
| 292 |
Generally, a parallel flash chip will not speak any other protocols. |
| 293 |
SPI flash chips also don't speak any other protocols. |
| 294 |
LPC flash chips sometimes speak FWH as well and vice versa, |
| 295 |
but they will not speak any protocols besides LPC/FWH. |
| 296 |
|
| 297 |
Hardware Redundancy |
| 298 |
=================== |
| 299 |
Gigabyte's DualBios: http://www.google.com/patents/US6892323 |
| 300 |
|
| 301 |
ASUS: http://www.google.com/patents/US8015449 |