flashrom.8.tmpl 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252
  1. .\" Load the www device when using groff; provide a fallback for groff's MTO macro that formats email addresses.
  2. .ie \n[.g] \
  3. . mso www.tmac
  4. .el \{
  5. . de MTO
  6. \\$2 \(la\\$1 \(ra\\$3 \
  7. . .
  8. .\}
  9. .\" Create wrappers for .MTO and .URL that print only text on systems w/o groff or if not outputting to a HTML
  10. .\" device. To that end we need to distinguish HTML output on groff from other configurations first.
  11. .nr groffhtml 0
  12. .if \n[.g] \
  13. . if "\*[.T]"html" \
  14. . nr groffhtml 1
  15. .\" For code reuse it would be nice to have a single wrapper that gets its target macro as parameter.
  16. .\" However, this did not work out with NetBSD's and OpenBSD's groff...
  17. .de URLB
  18. . ie (\n[groffhtml]==1) \{\
  19. . URL \\$@
  20. . \}
  21. . el \{\
  22. . ie "\\$2"" \{\
  23. . BR "\\$1" "\\$3"
  24. . \}
  25. . el \{\
  26. . RB "\\$2 \(la" "\\$1" "\(ra\\$3"
  27. . \}
  28. . \}
  29. ..
  30. .de MTOB
  31. . ie (\n[groffhtml]==1) \{\
  32. . MTO \\$@
  33. . \}
  34. . el \{\
  35. . ie "\\$2"" \{\
  36. . BR "\\$1" "\\$3"
  37. . \}
  38. . el \{\
  39. . RB "\\$2 \(la" "\\$1" "\(ra\\$3"
  40. . \}
  41. . \}
  42. ..
  43. .TH FLASHROM 8 "" ""
  44. .SH NAME
  45. flashrom \- detect, read, write, verify and erase flash chips
  46. .SH SYNOPSIS
  47. .B flashrom \fR[\fB\-h\fR|\fB\-R\fR|\fB\-L\fR|\fB\-z\fR|\
  48. \fB\-p\fR <programmername>[:<parameters>]
  49. [\fB\-E\fR|\fB\-r\fR <file>|\fB\-w\fR <file>|\fB\-v\fR <file>] \
  50. [\fB\-c\fR <chipname>]
  51. [\fB\-l\fR <file> [\fB\-i\fR <image>]] [\fB\-n\fR] [\fB\-f\fR]]
  52. [\fB\-V\fR[\fBV\fR[\fBV\fR]]] [\fB-o\fR <logfile>]
  53. .SH DESCRIPTION
  54. .B flashrom
  55. is a utility for detecting, reading, writing, verifying and erasing flash
  56. chips. It's often used to flash BIOS/EFI/coreboot/firmware images in-system
  57. using a supported mainboard. However, it also supports various external
  58. PCI/USB/parallel-port/serial-port based devices which can program flash chips,
  59. including some network cards (NICs), SATA/IDE controller cards, graphics cards,
  60. the Bus Pirate device, various FTDI FT2232/FT4232H/FT232H based USB devices, and more.
  61. .PP
  62. It supports a wide range of DIP32, PLCC32, DIP8, SO8/SOIC8, TSOP32, TSOP40,
  63. TSOP48, and BGA chips, which use various protocols such as LPC, FWH,
  64. parallel flash, or SPI.
  65. .SH OPTIONS
  66. .B IMPORTANT:
  67. Please note that the command line interface for flashrom will change before
  68. flashrom 1.0. Do not use flashrom in scripts or other automated tools without
  69. checking that your flashrom version won't interpret options in a different way.
  70. .PP
  71. You can specify one of
  72. .BR \-h ", " \-R ", " \-L ", " \-z ", " \-E ", " \-r ", " \-w ", " \-v
  73. or no operation.
  74. If no operation is specified, flashrom will only probe for flash chips. It is
  75. recommended that if you try flashrom the first time on a system, you run it
  76. in probe-only mode and check the output. Also you are advised to make a
  77. backup of your current ROM contents with
  78. .B \-r
  79. before you try to write a new image. All operations involving any chip access (probe/read/write/...) require the
  80. .B -p/--programmer
  81. option to be used (please see below).
  82. .TP
  83. .B "\-r, \-\-read <file>"
  84. Read flash ROM contents and save them into the given
  85. .BR <file> .
  86. If the file already exists, it will be overwritten.
  87. .TP
  88. .B "\-w, \-\-write <file>"
  89. Write
  90. .B <file>
  91. into flash ROM. This will first automatically
  92. .B erase
  93. the chip, then write to it.
  94. .sp
  95. In the process the chip is also read several times. First an in-memory backup
  96. is made for disaster recovery and to be able to skip regions that are
  97. already equal to the image file. This copy is updated along with the write
  98. operation. In case of erase errors it is even re-read completely. After
  99. writing has finished and if verification is enabled, the whole flash chip is
  100. read out and compared with the input image.
  101. .TP
  102. .B "\-n, \-\-noverify"
  103. Skip the automatic verification of flash ROM contents after writing. Using this
  104. option is
  105. .B not
  106. recommended, you should only use it if you know what you are doing and if you
  107. feel that the time for verification takes too long.
  108. .sp
  109. Typical usage is:
  110. .B "flashrom \-p prog \-n \-w <file>"
  111. .sp
  112. This option is only useful in combination with
  113. .BR \-\-write .
  114. .TP
  115. .B "\-v, \-\-verify <file>"
  116. Verify the flash ROM contents against the given
  117. .BR <file> .
  118. .TP
  119. .B "\-E, \-\-erase"
  120. Erase the flash ROM chip.
  121. .TP
  122. .B "\-V, \-\-verbose"
  123. More verbose output. This option can be supplied multiple times
  124. (max. 3 times, i.e.
  125. .BR \-VVV )
  126. for even more debug output.
  127. .TP
  128. .B "\-c, \-\-chip" <chipname>
  129. Probe only for the specified flash ROM chip. This option takes the chip name as
  130. printed by
  131. .B "flashrom \-L"
  132. without the vendor name as parameter. Please note that the chip name is
  133. case sensitive.
  134. .TP
  135. .B "\-f, \-\-force"
  136. Force one or more of the following actions:
  137. .sp
  138. * Force chip read and pretend the chip is there.
  139. .sp
  140. * Force chip access even if the chip is bigger than the maximum supported \
  141. size for the flash bus.
  142. .sp
  143. * Force erase even if erase is known bad.
  144. .sp
  145. * Force write even if write is known bad.
  146. .TP
  147. .B "\-l, \-\-layout <file>"
  148. Read ROM layout from
  149. .BR <file> .
  150. .sp
  151. flashrom supports ROM layouts. This allows you to flash certain parts of
  152. the flash chip only. A ROM layout file contains multiple lines with the
  153. following syntax:
  154. .sp
  155. .B " startaddr:endaddr imagename"
  156. .sp
  157. .BR "startaddr " "and " "endaddr "
  158. are hexadecimal addresses within the ROM file and do not refer to any
  159. physical address. Please note that using a 0x prefix for those hexadecimal
  160. numbers is not necessary, but you can't specify decimal/octal numbers.
  161. .BR "imagename " "is an arbitrary name for the region/image from"
  162. .BR " startaddr " "to " "endaddr " "(both addresses included)."
  163. .sp
  164. Example:
  165. .sp
  166. 00000000:00008fff gfxrom
  167. 00009000:0003ffff normal
  168. 00040000:0007ffff fallback
  169. .sp
  170. If you only want to update the image named
  171. .BR "normal " "in a ROM based on the layout above, run"
  172. .sp
  173. .B " flashrom \-p prog \-\-layout rom.layout \-\-image normal \-w some.rom"
  174. .sp
  175. To update only the images named
  176. .BR "normal " "and " "fallback" ", run:"
  177. .sp
  178. .B " flashrom \-p prog \-l rom.layout \-i normal -i fallback \-w some.rom"
  179. .sp
  180. Overlapping sections are not supported.
  181. .TP
  182. .B "\-i, \-\-image <imagename>"
  183. Only flash region/image
  184. .B <imagename>
  185. from flash layout.
  186. .TP
  187. .B "\-L, \-\-list\-supported"
  188. List the flash chips, chipsets, mainboards, and external programmers
  189. (including PCI, USB, parallel port, and serial port based devices)
  190. supported by flashrom.
  191. .sp
  192. There are many unlisted boards which will work out of the box, without
  193. special support in flashrom. Please let us know if you can verify that
  194. other boards work or do not work out of the box.
  195. .sp
  196. .B IMPORTANT:
  197. For verification you have
  198. to test an ERASE and/or WRITE operation, so make sure you only do that
  199. if you have proper means to recover from failure!
  200. .TP
  201. .B "\-z, \-\-list\-supported-wiki"
  202. Same as
  203. .BR \-\-list\-supported ,
  204. but outputs the supported hardware in MediaWiki syntax, so that it can be
  205. easily pasted into the
  206. .URLB https://flashrom.org/Supported_hardware "supported hardware wiki page" .
  207. Please note that MediaWiki output is not compiled in by default.
  208. .TP
  209. .B "\-p, \-\-programmer <name>[:parameter[,parameter[,parameter]]]"
  210. Specify the programmer device. This is mandatory for all operations
  211. involving any chip access (probe/read/write/...). Currently supported are:
  212. .sp
  213. .BR "* internal" " (for in-system flashing in the mainboard)"
  214. .sp
  215. .BR "* dummy" " (virtual programmer for testing flashrom)"
  216. .sp
  217. .BR "* nic3com" " (for flash ROMs on 3COM network cards)"
  218. .sp
  219. .BR "* nicrealtek" " (for flash ROMs on Realtek and SMC 1211 network cards)"
  220. .sp
  221. .BR "* nicnatsemi" " (for flash ROMs on National Semiconductor DP838* network \
  222. cards)"
  223. .sp
  224. .BR "* nicintel" " (for parallel flash ROMs on Intel 10/100Mbit network cards)
  225. .sp
  226. .BR "* gfxnvidia" " (for flash ROMs on NVIDIA graphics cards)"
  227. .sp
  228. .BR "* drkaiser" " (for flash ROMs on Dr. Kaiser PC-Waechter PCI cards)"
  229. .sp
  230. .BR "* satasii" " (for flash ROMs on Silicon Image SATA/IDE controllers)"
  231. .sp
  232. .BR "* satamv" " (for flash ROMs on Marvell SATA controllers)"
  233. .sp
  234. .BR "* atahpt" " (for flash ROMs on Highpoint ATA/RAID controllers)"
  235. .sp
  236. .BR "* atavia" " (for flash ROMs on VIA VT6421A SATA controllers)"
  237. .sp
  238. .BR "* atapromise" " (for flash ROMs on Promise PDC2026x ATA/RAID controllers)"
  239. .sp
  240. .BR "* it8212" " (for flash ROMs on ITE IT8212F ATA/RAID controller)"
  241. .sp
  242. .BR "* ft2232_spi" " (for SPI flash ROMs attached to an FT2232/FT4232H/FT232H family based USB SPI programmer).
  243. .sp
  244. .BR "* serprog" " (for flash ROMs attached to a programmer speaking serprog, \
  245. including some Arduino-based devices)."
  246. .sp
  247. .BR "* buspirate_spi" " (for SPI flash ROMs attached to a Bus Pirate)"
  248. .sp
  249. .BR "* dediprog" " (for SPI flash ROMs attached to a Dediprog SF100)"
  250. .sp
  251. .BR "* rayer_spi" " (for SPI flash ROMs attached to a parallel port by one of various cable types)"
  252. .sp
  253. .BR "* pony_spi" " (for SPI flash ROMs attached to a SI-Prog serial port "
  254. bitbanging adapter)
  255. .sp
  256. .BR "* nicintel_spi" " (for SPI flash ROMs on Intel Gigabit network cards)"
  257. .sp
  258. .BR "* ogp_spi" " (for SPI flash ROMs on Open Graphics Project graphics card)"
  259. .sp
  260. .BR "* linux_spi" " (for SPI flash ROMs accessible via /dev/spidevX.Y on Linux)"
  261. .sp
  262. .BR "* usbblaster_spi" " (for SPI flash ROMs attached to an Altera USB-Blaster compatible cable)"
  263. .sp
  264. .BR "* nicintel_eeprom" " (for SPI EEPROMs on Intel Gigabit network cards)"
  265. .sp
  266. .BR "* mstarddc_spi" " (for SPI flash ROMs accessible through DDC in MSTAR-equipped displays)"
  267. .sp
  268. .BR "* pickit2_spi" " (for SPI flash ROMs accessible via Microchip PICkit2)"
  269. .sp
  270. .BR "* ch341a_spi" " (for SPI flash ROMs attached to WCH CH341A)"
  271. .sp
  272. Some programmers have optional or mandatory parameters which are described
  273. in detail in the
  274. .B PROGRAMMER-SPECIFIC INFORMATION
  275. section. Support for some programmers can be disabled at compile time.
  276. .B "flashrom \-h"
  277. lists all supported programmers.
  278. .TP
  279. .B "\-h, \-\-help"
  280. Show a help text and exit.
  281. .TP
  282. .B "\-o, \-\-output <logfile>"
  283. Save the full debug log to
  284. .BR <logfile> .
  285. If the file already exists, it will be overwritten. This is the recommended
  286. way to gather logs from flashrom because they will be verbose even if the
  287. on-screen messages are not verbose and don't require output redirection.
  288. .TP
  289. .B "\-R, \-\-version"
  290. Show version information and exit.
  291. .SH PROGRAMMER-SPECIFIC INFORMATION
  292. Some programmer drivers accept further parameters to set programmer-specific
  293. parameters. These parameters are separated from the programmer name by a
  294. colon. While some programmers take arguments at fixed positions, other
  295. programmers use a key/value interface in which the key and value is separated
  296. by an equal sign and different pairs are separated by a comma or a colon.
  297. .SS
  298. .BR "internal " programmer
  299. .TP
  300. .B Board Enables
  301. .sp
  302. Some mainboards require to run mainboard specific code to enable flash erase
  303. and write support (and probe support on old systems with parallel flash).
  304. The mainboard brand and model (if it requires specific code) is usually
  305. autodetected using one of the following mechanisms: If your system is
  306. running coreboot, the mainboard type is determined from the coreboot table.
  307. Otherwise, the mainboard is detected by examining the onboard PCI devices
  308. and possibly DMI info. If PCI and DMI do not contain information to uniquely
  309. identify the mainboard (which is the exception), or if you want to override
  310. the detected mainboard model, you can specify the mainboard using the
  311. .sp
  312. .B " flashrom \-p internal:mainboard=<vendor>:<board>"
  313. syntax.
  314. .sp
  315. See the 'Known boards' or 'Known laptops' section in the output
  316. of 'flashrom \-L' for a list of boards which require the specification of
  317. the board name, if no coreboot table is found.
  318. .sp
  319. Some of these board-specific flash enabling functions (called
  320. .BR "board enables" )
  321. in flashrom have not yet been tested. If your mainboard is detected needing
  322. an untested board enable function, a warning message is printed and the
  323. board enable is not executed, because a wrong board enable function might
  324. cause the system to behave erratically, as board enable functions touch the
  325. low-level internals of a mainboard. Not executing a board enable function
  326. (if one is needed) might cause detection or erasing failure. If your board
  327. protects only part of the flash (commonly the top end, called boot block),
  328. flashrom might encounter an error only after erasing the unprotected part,
  329. so running without the board-enable function might be dangerous for erase
  330. and write (which includes erase).
  331. .sp
  332. The suggested procedure for a mainboard with untested board specific code is
  333. to first try to probe the ROM (just invoke flashrom and check that it
  334. detects your flash chip type) without running the board enable code (i.e.
  335. without any parameters). If it finds your chip, fine. Otherwise, retry
  336. probing your chip with the board-enable code running, using
  337. .sp
  338. .B " flashrom \-p internal:boardenable=force"
  339. .sp
  340. If your chip is still not detected, the board enable code seems to be broken
  341. or the flash chip unsupported. Otherwise, make a backup of your current ROM
  342. contents (using
  343. .BR \-r )
  344. and store it to a medium outside of your computer, like
  345. a USB drive or a network share. If you needed to run the board enable code
  346. already for probing, use it for reading too.
  347. If reading succeeds and the contens of the read file look legit you can try to write the new image.
  348. You should enable the board enable code in any case now, as it
  349. has been written because it is known that writing/erasing without the board
  350. enable is going to fail. In any case (success or failure), please report to
  351. the flashrom mailing list, see below.
  352. .sp
  353. .TP
  354. .B Coreboot
  355. .sp
  356. On systems running coreboot, flashrom checks whether the desired image matches
  357. your mainboard. This needs some special board ID to be present in the image.
  358. If flashrom detects that the image you want to write and the current board
  359. do not match, it will refuse to write the image unless you specify
  360. .sp
  361. .B " flashrom \-p internal:boardmismatch=force"
  362. .TP
  363. .B ITE IT87 Super I/O
  364. .sp
  365. If your mainboard is manufactured by GIGABYTE and supports DualBIOS it is very likely that it uses an
  366. ITE IT87 series Super I/O to switch between the two flash chips. Only one of them can be accessed at a time
  367. and you can manually select which one to use with the
  368. .sp
  369. .B " flashrom \-p internal:dualbiosindex=chip"
  370. .sp
  371. syntax where
  372. .B chip
  373. is the index of the chip to use (0 = main, 1 = backup). You can check which one is currently selected by
  374. leaving out the
  375. .B chip
  376. parameter.
  377. .sp
  378. If your mainboard uses an ITE IT87 series Super I/O for LPC<->SPI flash bus
  379. translation, flashrom should autodetect that configuration. If you want to
  380. set the I/O base port of the IT87 series SPI controller manually instead of
  381. using the value provided by the BIOS, use the
  382. .sp
  383. .B " flashrom \-p internal:it87spiport=portnum"
  384. .sp
  385. syntax where
  386. .B portnum
  387. is the I/O port number (must be a multiple of 8). In the unlikely case
  388. flashrom doesn't detect an active IT87 LPC<->SPI bridge, please send a bug
  389. report so we can diagnose the problem.
  390. .sp
  391. .TP
  392. .B AMD chipsets
  393. .sp
  394. Beginning with the SB700 chipset there is an integrated microcontroller (IMC) based on the 8051 embedded in
  395. every AMD southbridge. Its firmware resides in the same flash chip as the host's which makes writing to the
  396. flash risky if the IMC is active. Flashrom tries to temporarily disable the IMC but even then changing the
  397. contents of the flash can have unwanted effects: when the IMC continues (at the latest after a reboot) it will
  398. continue executing code from the flash. If the code was removed or changed in an unfortunate way it is
  399. unpredictable what the IMC will do. Therefore, if flashrom detects an active IMC it will disable write support
  400. unless the user forces it with the
  401. .sp
  402. .B " flashrom \-p internal:amd_imc_force=yes"
  403. .sp
  404. syntax. The user is responsible for supplying a suitable image or leaving out the IMC region with the help of
  405. a layout file. This limitation might be removed in the future when we understand the details better and have
  406. received enough feedback from users. Please report the outcome if you had to use this option to write a chip.
  407. .sp
  408. An optional
  409. .B spispeed
  410. parameter specifies the frequency of the SPI bus where applicable (i.e.\& SB600 or later with an SPI flash chip
  411. directly attached to the chipset).
  412. Syntax is
  413. .sp
  414. .B " flashrom \-p internal:spispeed=frequency"
  415. .sp
  416. where
  417. .B frequency
  418. can be
  419. .BR "'16.5\ MHz'" ", " "'22\ MHz'" ", " "'33\ MHz'" ", " "'66\ MHz'" ", " "'100\ MHZ'" ", or " "'800\ kHz'" "."
  420. Support of individual frequencies depends on the generation of the chipset:
  421. .sp
  422. * SB6xx, SB7xx, SP5xxx: from 16.5 MHz up to and including 33 MHz
  423. .sp
  424. * SB8xx, SB9xx, Hudson: from 16.5 MHz up to and including 66 MHz
  425. .sp
  426. * Yangtze (with SPI 100 engine as found in Kabini and Tamesh): all of them
  427. .sp
  428. The default is to use 16.5 MHz and disable Fast Reads.
  429. .TP
  430. .B Intel chipsets
  431. .sp
  432. If you have an Intel chipset with an ICH8 or later southbridge with SPI flash
  433. attached, and if a valid descriptor was written to it (e.g.\& by the vendor), the
  434. chipset provides an alternative way to access the flash chip(s) named
  435. .BR "Hardware Sequencing" .
  436. It is much simpler than the normal access method (called
  437. .BR "Software Sequencing" "),"
  438. but does not allow the software to choose the SPI commands to be sent.
  439. You can use the
  440. .sp
  441. .B " flashrom \-p internal:ich_spi_mode=value"
  442. .sp
  443. syntax where
  444. .BR "value " "can be"
  445. .BR auto ", " swseq " or " hwseq .
  446. By default
  447. .RB "(or when setting " ich_spi_mode=auto )
  448. the module tries to use swseq and only activates hwseq if need be (e.g.\& if
  449. important opcodes are inaccessible due to lockdown; or if more than one flash
  450. chip is attached). The other options (swseq, hwseq) select the respective mode
  451. (if possible).
  452. .sp
  453. ICH8 and later southbridges may also have locked address ranges of different
  454. kinds if a valid descriptor was written to it. The flash address space is then
  455. partitioned in multiple so called "Flash Regions" containing the host firmware,
  456. the ME firmware and so on respectively. The flash descriptor can also specify up
  457. to 5 so called "Protected Regions", which are freely chosen address ranges
  458. independent from the aforementioned "Flash Regions". All of them can be write
  459. and/or read protected individually. If flashrom detects such a lock it will
  460. disable write support unless the user forces it with the
  461. .sp
  462. .B " flashrom \-p internal:ich_spi_force=yes"
  463. .sp
  464. syntax. If this leads to erase or write accesses to the flash it would most
  465. probably bring it into an inconsistent and unbootable state and we will not
  466. provide any support in such a case.
  467. .sp
  468. If you have an Intel chipset with an ICH2 or later southbridge and if you want
  469. to set specific IDSEL values for a non-default flash chip or an embedded
  470. controller (EC), you can use the
  471. .sp
  472. .B " flashrom \-p internal:fwh_idsel=value"
  473. .sp
  474. syntax where
  475. .B value
  476. is the 48-bit hexadecimal raw value to be written in the
  477. IDSEL registers of the Intel southbridge. The upper 32 bits use one hex digit
  478. each per 512 kB range between 0xffc00000 and 0xffffffff, and the lower 16 bits
  479. use one hex digit each per 1024 kB range between 0xff400000 and 0xff7fffff.
  480. The rightmost hex digit corresponds with the lowest address range. All address
  481. ranges have a corresponding sister range 4 MB below with identical IDSEL
  482. settings. The default value for ICH7 is given in the example below.
  483. .sp
  484. Example:
  485. .B "flashrom \-p internal:fwh_idsel=0x001122334567"
  486. .TP
  487. .B Laptops
  488. .sp
  489. Using flashrom on laptops is dangerous and may easily make your hardware
  490. unusable (see also the
  491. .B BUGS
  492. section). The embedded controller (EC) in these
  493. machines often interacts badly with flashing.
  494. More information is
  495. .URLB https://flashrom.org/Laptops "in the wiki" .
  496. For example the EC firmware sometimes resides on the same
  497. flash chip as the host firmware. While flashrom tries to change the contents of
  498. that memory the EC might need to fetch new instructions or data from it and
  499. could stop working correctly. Probing for and reading from the chip may also
  500. irritate your EC and cause fan failure, backlight failure, sudden poweroff, and
  501. other nasty effects. flashrom will attempt to detect if it is running on a
  502. laptop and abort immediately for safety reasons if it clearly identifies the
  503. host computer as one. If you want to proceed anyway at your own risk, use
  504. .sp
  505. .B " flashrom \-p internal:laptop=force_I_want_a_brick"
  506. .sp
  507. We will not help you if you force flashing on a laptop because this is a really
  508. dumb idea.
  509. .sp
  510. You have been warned.
  511. .sp
  512. Currently we rely on the chassis type encoded in the DMI/SMBIOS data to detect
  513. laptops. Some vendors did not implement those bits correctly or set them to
  514. generic and/or dummy values. flashrom will then issue a warning and bail out
  515. like above. In this case you can use
  516. .sp
  517. .B " flashrom \-p internal:laptop=this_is_not_a_laptop"
  518. .sp
  519. to tell flashrom (at your own risk) that it is not running on a laptop.
  520. .SS
  521. .BR "dummy " programmer
  522. .IP
  523. The dummy programmer operates on a buffer in memory only. It provides a safe and fast way to test various
  524. aspects of flashrom and is mainly used in development and while debugging.
  525. It is able to emulate some chips to a certain degree (basic
  526. identify/read/erase/write operations work).
  527. .sp
  528. An optional parameter specifies the bus types it
  529. should support. For that you have to use the
  530. .sp
  531. .B " flashrom \-p dummy:bus=[type[+type[+type]]]"
  532. .sp
  533. syntax where
  534. .B type
  535. can be
  536. .BR parallel ", " lpc ", " fwh ", " spi
  537. in any order. If you specify bus without type, all buses will be disabled.
  538. If you do not specify bus, all buses will be enabled.
  539. .sp
  540. Example:
  541. .B "flashrom \-p dummy:bus=lpc+fwh"
  542. .sp
  543. The dummy programmer supports flash chip emulation for automated self-tests
  544. without hardware access. If you want to emulate a flash chip, use the
  545. .sp
  546. .B " flashrom \-p dummy:emulate=chip"
  547. .sp
  548. syntax where
  549. .B chip
  550. is one of the following chips (please specify only the chip name, not the
  551. vendor):
  552. .sp
  553. .RB "* ST " M25P10.RES " SPI flash chip (128 kB, RES, page write)"
  554. .sp
  555. .RB "* SST " SST25VF040.REMS " SPI flash chip (512 kB, REMS, byte write)"
  556. .sp
  557. .RB "* SST " SST25VF032B " SPI flash chip (4096 kB, RDID, AAI write)"
  558. .sp
  559. .RB "* Macronix " MX25L6436 " SPI flash chip (8192 kB, RDID, SFDP)"
  560. .sp
  561. Example:
  562. .B "flashrom -p dummy:emulate=SST25VF040.REMS"
  563. .TP
  564. .B Persistent images
  565. .sp
  566. If you use flash chip emulation, flash image persistence is available as well
  567. by using the
  568. .sp
  569. .B " flashrom \-p dummy:emulate=chip,image=image.rom"
  570. .sp
  571. syntax where
  572. .B image.rom
  573. is the file where the simulated chip contents are read on flashrom startup and
  574. where the chip contents on flashrom shutdown are written to.
  575. .sp
  576. Example:
  577. .B "flashrom -p dummy:emulate=M25P10.RES,image=dummy.bin"
  578. .TP
  579. .B SPI write chunk size
  580. .sp
  581. If you use SPI flash chip emulation for a chip which supports SPI page write
  582. with the default opcode, you can set the maximum allowed write chunk size with
  583. the
  584. .sp
  585. .B " flashrom \-p dummy:emulate=chip,spi_write_256_chunksize=size"
  586. .sp
  587. syntax where
  588. .B size
  589. is the number of bytes (min.\& 1, max.\& 256).
  590. .sp
  591. Example:
  592. .sp
  593. .B " flashrom -p dummy:emulate=M25P10.RES,spi_write_256_chunksize=5"
  594. .TP
  595. .B SPI blacklist
  596. .sp
  597. To simulate a programmer which refuses to send certain SPI commands to the
  598. flash chip, you can specify a blacklist of SPI commands with the
  599. .sp
  600. .B " flashrom -p dummy:spi_blacklist=commandlist"
  601. .sp
  602. syntax where
  603. .B commandlist
  604. is a list of two-digit hexadecimal representations of
  605. SPI commands. If commandlist is e.g.\& 0302, flashrom will behave as if the SPI
  606. controller refuses to run command 0x03 (READ) and command 0x02 (WRITE).
  607. commandlist may be up to 512 characters (256 commands) long.
  608. Implementation note: flashrom will detect an error during command execution.
  609. .sp
  610. .TP
  611. .B SPI ignorelist
  612. .sp
  613. To simulate a flash chip which ignores (doesn't support) certain SPI commands,
  614. you can specify an ignorelist of SPI commands with the
  615. .sp
  616. .B " flashrom -p dummy:spi_ignorelist=commandlist"
  617. .sp
  618. syntax where
  619. .B commandlist
  620. is a list of two-digit hexadecimal representations of
  621. SPI commands. If commandlist is e.g.\& 0302, the emulated flash chip will ignore
  622. command 0x03 (READ) and command 0x02 (WRITE). commandlist may be up to 512
  623. characters (256 commands) long.
  624. Implementation note: flashrom won't detect an error during command execution.
  625. .sp
  626. .TP
  627. .B SPI status register
  628. .sp
  629. You can specify the initial content of the chip's status register with the
  630. .sp
  631. .B " flashrom -p dummy:spi_status=content"
  632. .sp
  633. syntax where
  634. .B content
  635. is an 8-bit hexadecimal value.
  636. .SS
  637. .BR "nic3com" , " nicrealtek" , " nicnatsemi" , " nicintel", " nicintel_eeprom"\
  638. , " nicintel_spi" , " gfxnvidia" , " ogp_spi" , " drkaiser" , " satasii"\
  639. , " satamv" , " atahpt", " atavia ", " atapromise " and " it8212 " programmers
  640. .IP
  641. These programmers have an option to specify the PCI address of the card
  642. your want to use, which must be specified if more than one card supported
  643. by the selected programmer is installed in your system. The syntax is
  644. .sp
  645. .BR " flashrom \-p xxxx:pci=bb:dd.f" ,
  646. .sp
  647. where
  648. .B xxxx
  649. is the name of the programmer,
  650. .B bb
  651. is the PCI bus number,
  652. .B dd
  653. is the PCI device number, and
  654. .B f
  655. is the PCI function number of the desired device.
  656. .sp
  657. Example:
  658. .B "flashrom \-p nic3com:pci=05:04.0"
  659. .SS
  660. .BR "atavia " programmer
  661. .IP
  662. Due to the mysterious address handling of the VIA VT6421A controller the user can specify an offset with the
  663. .sp
  664. .B " flashrom \-p atavia:offset=addr"
  665. .sp
  666. syntax where
  667. .B addr
  668. will be interpreted as usual (leading 0x (0) for hexadecimal (octal) values, or else decimal).
  669. For more information please see
  670. .URLB https://flashrom.org/VT6421A "its wiki page" .
  671. .SS
  672. .BR "atapromise " programmer
  673. .IP
  674. This programmer is currently limited to 32 kB, regardless of the actual size of the flash chip. This stems
  675. from the fact that, on the tested device (a Promise Ultra100), not all of the chip's address lines were
  676. actually connected. You may use this programmer to flash firmware updates, since these are only 16 kB in
  677. size (padding to 32 kB is required).
  678. .SS
  679. .BR "nicintel_eeprom " programmer
  680. .IP
  681. This is the first programmer module in flashrom that does not provide access to NOR flash chips but EEPROMs
  682. mounted on gigabit Ethernet cards based on Intel's 82580 NIC. Because EEPROMs normally do not announce their
  683. size nor allow themselves to be identified, the controller relies on correct size values written to predefined
  684. addresses within the chip. Flashrom follows this scheme but assumes the minimum size of 16 kB (128 kb) if an
  685. unprogrammed EEPROM/card is detected. Intel specifies following EEPROMs to be compatible:
  686. Atmel AT25128, AT25256, Micron (ST) M95128, M95256 and OnSemi (Catalyst) CAT25CS128.
  687. .SS
  688. .BR "ft2232_spi " programmer
  689. .IP
  690. This module supports various programmers based on FTDI FT2232/FT4232H/FT232H chips including the DLP Design
  691. DLP-USB1232H, openbiosprog-spi, Amontec JTAGkey/JTAGkey-tiny/JTAGkey-2, Dangerous Prototypes Bus Blaster,
  692. Olimex ARM-USB-TINY/-H, Olimex ARM-USB-OCD/-H, OpenMoko Neo1973 Debug board (V2+), TIAO/DIYGADGET USB
  693. Multi-Protocol Adapter (TUMPA), TUMPA Lite, GOEPEL PicoTAP and Google Servo v1/v2.
  694. .sp
  695. An optional parameter specifies the controller
  696. type and channel/interface/port it should support. For that you have to use the
  697. .sp
  698. .B " flashrom \-p ft2232_spi:type=model,port=interface"
  699. .sp
  700. syntax where
  701. .B model
  702. can be
  703. .BR 2232H ", " 4232H ", " 232H ", " jtagkey ", " busblaster ", " openmoko ", " \
  704. arm-usb-tiny ", " arm-usb-tiny-h ", " arm-usb-ocd ", " arm-usb-ocd-h \
  705. ", " tumpa ", " tumpalite ", " picotap ", " google-servo ", " google-servo-v2 \
  706. " or " google-servo-v2-legacy
  707. and
  708. .B interface
  709. can be
  710. .BR A ", " B ", " C ", or " D .
  711. The default model is
  712. .B 4232H
  713. and the default interface is
  714. .BR A .
  715. .sp
  716. If there is more than one ft2232_spi-compatible device connected, you can select which one should be used by
  717. specifying its serial number with the
  718. .sp
  719. .B " flashrom \-p ft2232_spi:serial=number"
  720. .sp
  721. syntax where
  722. .B number
  723. is the serial number of the device (which can be found for example in the output of lsusb -v).
  724. .sp
  725. All models supported by the ft2232_spi driver can configure the SPI clock rate by setting a divisor. The
  726. expressible divisors are all
  727. .B even
  728. numbers between 2 and 2^17 (=131072) resulting in SPI clock frequencies of
  729. 6 MHz down to about 92 Hz for 12 MHz inputs. The default divisor is set to 2, but you can use another one by
  730. specifying the optional
  731. .B divisor
  732. parameter with the
  733. .sp
  734. .B " flashrom \-p ft2232_spi:divisor=div"
  735. .sp
  736. syntax.
  737. .SS
  738. .BR "serprog " programmer
  739. .IP
  740. This module supports all programmers speaking the serprog protocol. This includes some Arduino-based devices
  741. as well as various programmers by Urja Rannikko, Juhana Helovuo, Stefan Tauner, Chi Zhang and many others.
  742. .sp
  743. A mandatory parameter specifies either a serial device (and baud rate) or an IP/port combination for
  744. communicating with the programmer.
  745. The device/baud combination has to start with
  746. .B dev=
  747. and separate the optional baud rate with a colon.
  748. For example
  749. .sp
  750. .B " flashrom \-p serprog:dev=/dev/ttyS0:115200"
  751. .sp
  752. If no baud rate is given the default values by the operating system/hardware will be used.
  753. For IP connections you have to use the
  754. .sp
  755. .B " flashrom \-p serprog:ip=ipaddr:port"
  756. .sp
  757. syntax.
  758. In case the device supports it, you can set the SPI clock frequency with the optional
  759. .B spispeed
  760. parameter. The frequency is parsed as hertz, unless an
  761. .BR M ", or " k
  762. suffix is given, then megahertz or kilohertz are used respectively.
  763. Example that sets the frequency to 2 MHz:
  764. .sp
  765. .B " flashrom \-p serprog:dev=/dev/device:baud,spispeed=2M"
  766. .sp
  767. More information about serprog is available in
  768. .B serprog-protocol.txt
  769. in the source distribution.
  770. .SS
  771. .BR "buspirate_spi " programmer
  772. .IP
  773. A required
  774. .B dev
  775. parameter specifies the Bus Pirate device node and an optional
  776. .B spispeed
  777. parameter specifies the frequency of the SPI bus. The parameter
  778. delimiter is a comma. Syntax is
  779. .sp
  780. .B " flashrom \-p buspirate_spi:dev=/dev/device,spispeed=frequency"
  781. .sp
  782. where
  783. .B frequency
  784. can be
  785. .BR 30k ", " 125k ", " 250k ", " 1M ", " 2M ", " 2.6M ", " 4M " or " 8M
  786. (in Hz). The default is the maximum frequency of 8 MHz.
  787. .sp
  788. An optional pullups parameter specifies the use of the Bus Pirate internal pull-up resistors. This may be
  789. needed if you are working with a flash ROM chip that you have physically removed from the board. Syntax is
  790. .sp
  791. .B " flashrom -p buspirate_spi:pullups=state"
  792. .sp
  793. where
  794. .B state
  795. can be
  796. .BR on " or " off .
  797. More information about the Bus Pirate pull-up resistors and their purpose is available
  798. .URLB "http://dangerousprototypes.com/docs/Practical_guide_to_Bus_Pirate_pull-up_resistors" \
  799. "in a guide by dangerousprototypes" .
  800. Only the external supply voltage (Vpu) is supported as of this writing.
  801. .SS
  802. .BR "pickit2_spi " programmer
  803. .IP
  804. An optional
  805. .B voltage
  806. parameter specifies the voltage the PICkit2 should use. The default unit is Volt if no unit is specified.
  807. You can use
  808. .BR mV ", " millivolt ", " V " or " Volt
  809. as unit specifier. Syntax is
  810. .sp
  811. .B " flashrom \-p pickit2_spi:voltage=value"
  812. .sp
  813. where
  814. .B value
  815. can be
  816. .BR 0V ", " 1.8V ", " 2.5V ", " 3.5V
  817. or the equivalent in mV.
  818. .sp
  819. An optional
  820. .B spispeed
  821. parameter specifies the frequency of the SPI bus. Syntax is
  822. .sp
  823. .B " flashrom \-p pickit2_spi:spispeed=frequency"
  824. .sp
  825. where
  826. .B frequency
  827. can be
  828. .BR 250k ", " 333k ", " 500k " or " 1M "
  829. (in Hz). The default is a frequency of 1 MHz.
  830. .SS
  831. .BR "dediprog " programmer
  832. .IP
  833. An optional
  834. .B voltage
  835. parameter specifies the voltage the Dediprog should use. The default unit is
  836. Volt if no unit is specified. You can use
  837. .BR mV ", " milliVolt ", " V " or " Volt
  838. as unit specifier. Syntax is
  839. .sp
  840. .B " flashrom \-p dediprog:voltage=value"
  841. .sp
  842. where
  843. .B value
  844. can be
  845. .BR 0V ", " 1.8V ", " 2.5V ", " 3.5V
  846. or the equivalent in mV.
  847. .sp
  848. An optional
  849. .B device
  850. parameter specifies which of multiple connected Dediprog devices should be used.
  851. Please be aware that the order depends on libusb's usb_get_busses() function and that the numbering starts
  852. at 0.
  853. Usage example to select the second device:
  854. .sp
  855. .B " flashrom \-p dediprog:device=1"
  856. .sp
  857. An optional
  858. .B spispeed
  859. parameter specifies the frequency of the SPI bus. The firmware on the device needs to be 5.0.0 or newer.
  860. Syntax is
  861. .sp
  862. .B " flashrom \-p dediprog:spispeed=frequency"
  863. .sp
  864. where
  865. .B frequency
  866. can be
  867. .BR 375k ", " 750k ", " 1.5M ", " 2.18M ", " 3M ", " 8M ", " 12M " or " 24M
  868. (in Hz). The default is a frequency of 12 MHz.
  869. .sp
  870. An optional
  871. .B target
  872. parameter specifies which target chip should be used. Syntax is
  873. .sp
  874. .B " flashrom \-p dediprog:target=value"
  875. .sp
  876. where
  877. .B value
  878. can be
  879. .BR 1 " or " 2
  880. to select target chip 1 or 2 respectively. The default is target chip 1.
  881. .SS
  882. .BR "rayer_spi " programmer
  883. .IP
  884. The default I/O base address used for the parallel port is 0x378 and you can use
  885. the optional
  886. .B iobase
  887. parameter to specify an alternate base I/O address with the
  888. .sp
  889. .B " flashrom \-p rayer_spi:iobase=baseaddr"
  890. .sp
  891. syntax where
  892. .B baseaddr
  893. is base I/O port address of the parallel port, which must be a multiple of
  894. four. Make sure to not forget the "0x" prefix for hexadecimal port addresses.
  895. .sp
  896. The default cable type is the RayeR cable. You can use the optional
  897. .B type
  898. parameter to specify the cable type with the
  899. .sp
  900. .B " flashrom \-p rayer_spi:type=model"
  901. .sp
  902. syntax where
  903. .B model
  904. can be
  905. .BR rayer " for the RayeR cable, " byteblastermv " for the Altera ByteBlasterMV, " stk200 " for the Atmel \
  906. STK200/300, " wiggler " for the Macraigor Wiggler, " xilinx " for the Xilinx Parallel Cable III (DLC 5), or" \
  907. " spi_tt" " for SPI Tiny Tools-compatible hardware.
  908. .sp
  909. More information about the RayeR hardware is available at
  910. .nh
  911. .URLB "http://rayer.g6.cz/elektro/spipgm.htm" "RayeR's website" .
  912. The Altera ByteBlasterMV datasheet can be obtained from
  913. .URLB "http://www.altera.co.jp/literature/ds/dsbytemv.pdf" Altera .
  914. For more information about the Macraigor Wiggler see
  915. .URLB "http://www.macraigor.com/wiggler.htm" "their company homepage" .
  916. The schematic of the Xilinx DLC 5 was published in
  917. .URLB "http://www.xilinx.com/support/documentation/user_guides/xtp029.pdf" "a Xilinx user guide" .
  918. .SS
  919. .BR "pony_spi " programmer
  920. .IP
  921. The serial port (like /dev/ttyS0, /dev/ttyUSB0 on Linux or COM3 on windows) is
  922. specified using the mandatory
  923. .B dev
  924. parameter. The adapter type is selectable between SI-Prog (used for
  925. SPI devices with PonyProg 2000) or a custom made serial bitbanging programmer
  926. named "serbang". The optional
  927. .B type
  928. parameter accepts the values "si_prog" (default) or "serbang".
  929. .sp
  930. Information about the SI-Prog adapter can be found at
  931. .URLB "http://www.lancos.com/siprogsch.html" "its website" .
  932. .sp
  933. An example call to flashrom is
  934. .sp
  935. .B " flashrom \-p pony_spi:dev=/dev/ttyS0,type=serbang"
  936. .sp
  937. Please note that while USB-to-serial adapters work under certain circumstances,
  938. this slows down operation considerably.
  939. .SS
  940. .BR "ogp_spi " programmer
  941. .IP
  942. The flash ROM chip to access must be specified with the
  943. .B rom
  944. parameter.
  945. .sp
  946. .B " flashrom \-p ogp_spi:rom=name"
  947. .sp
  948. Where
  949. .B name
  950. is either
  951. .B cprom
  952. or
  953. .B s3
  954. for the configuration ROM and
  955. .B bprom
  956. or
  957. .B bios
  958. for the BIOS ROM. If more than one card supported by the ogp_spi programmer
  959. is installed in your system, you have to specify the PCI address of the card
  960. you want to use with the
  961. .B pci=
  962. parameter as explained in the
  963. .B nic3com et al.\&
  964. section above.
  965. .SS
  966. .BR "linux_spi " programmer
  967. .IP
  968. You have to specify the SPI controller to use with the
  969. .sp
  970. .B " flashrom \-p linux_spi:dev=/dev/spidevX.Y"
  971. .sp
  972. syntax where
  973. .B /dev/spidevX.Y
  974. is the Linux device node for your SPI controller.
  975. .sp
  976. In case the device supports it, you can set the SPI clock frequency with the optional
  977. .B spispeed
  978. parameter. The frequency is parsed as kilohertz.
  979. Example that sets the frequency to 8 MHz:
  980. .sp
  981. .B " flashrom \-p linux_spi:dev=/dev/spidevX.Y,spispeed=8000"
  982. .sp
  983. Please note that the linux_spi driver only works on Linux.
  984. .SS
  985. .BR "mstarddc_spi " programmer
  986. .IP
  987. The Display Data Channel (DDC) is an I2C bus present on VGA and DVI connectors, that allows exchanging
  988. information between a computer and attached displays. Its most common uses are getting display capabilities
  989. through EDID (at I2C address 0x50) and sending commands to the display using the DDC/CI protocol (at address
  990. 0x37). On displays driven by MSTAR SoCs, it is also possible to access the SoC firmware flash (connected to
  991. the Soc through another SPI bus) using an In-System Programming (ISP) port, usually at address 0x49.
  992. This flashrom module allows the latter via Linux's I2C driver.
  993. .sp
  994. .B IMPORTANT:
  995. Before using this programmer, the display
  996. .B MUST
  997. be in standby mode, and only connected to the computer that will run flashrom using a VGA cable, to an
  998. inactive VGA output. It absolutely
  999. .B MUST NOT
  1000. be used as a display during the procedure!
  1001. .sp
  1002. You have to specify the DDC/I2C controller and I2C address to use with the
  1003. .sp
  1004. .B " flashrom \-p mstarddc_spi:dev=/dev/i2c-X:YY"
  1005. .sp
  1006. syntax where
  1007. .B /dev/i2c-X
  1008. is the Linux device node for your I2C controller connected to the display's DDC channel, and
  1009. .B YY
  1010. is the (hexadecimal) address of the MSTAR ISP port (address 0x49 is usually used).
  1011. Example that uses I2C controller /dev/i2c-1 and address 0x49:
  1012. .sp
  1013. .B " flashrom \-p mstarddc_spi:dev=/dev/i2c-1:49
  1014. .sp
  1015. It is also possible to inhibit the reset command that is normally sent to the display once the flashrom
  1016. operation is completed using the optional
  1017. .B noreset
  1018. parameter. A value of 1 prevents flashrom from sending the reset command.
  1019. Example that does not reset the display at the end of the operation:
  1020. .sp
  1021. .B " flashrom \-p mstarddc_spi:dev=/dev/i2c-1:49,noreset=1
  1022. .sp
  1023. Please note that sending the reset command is also inhibited if an error occurred during the operation.
  1024. To send the reset command afterwards, you can simply run flashrom once more, in chip probe mode (not specifying
  1025. an operation), without the
  1026. .B noreset
  1027. parameter, once the flash read/write operation you intended to perform has completed successfully.
  1028. .sp
  1029. Please also note that the mstarddc_spi driver only works on Linux.
  1030. .SS
  1031. .BR "ch341a_spi " programmer
  1032. The WCH CH341A programmer does not support any parameters currently. SPI frequency is fixed at 2 MHz, and CS0 is
  1033. used as per the device.
  1034. .SH EXAMPLES
  1035. To back up and update your BIOS, run
  1036. .sp
  1037. .B flashrom -p internal -r backup.rom -o backuplog.txt
  1038. .br
  1039. .B flashrom -p internal -w newbios.rom -o writelog.txt
  1040. .sp
  1041. Please make sure to copy backup.rom to some external media before you try
  1042. to write. That makes offline recovery easier.
  1043. .br
  1044. If writing fails and flashrom complains about the chip being in an unknown
  1045. state, you can try to restore the backup by running
  1046. .sp
  1047. .B flashrom -p internal -w backup.rom -o restorelog.txt
  1048. .sp
  1049. If you encounter any problems, please contact us and supply
  1050. backuplog.txt, writelog.txt and restorelog.txt. See section
  1051. .B BUGS
  1052. for contact info.
  1053. .SH EXIT STATUS
  1054. flashrom exits with 0 on success, 1 on most failures but with 3 if a call to mmap() fails.
  1055. .SH REQUIREMENTS
  1056. flashrom needs different access permissions for different programmers.
  1057. .sp
  1058. .B internal
  1059. needs raw memory access, PCI configuration space access, raw I/O port
  1060. access (x86) and MSR access (x86).
  1061. .sp
  1062. .B atavia
  1063. needs PCI configuration space access.
  1064. .sp
  1065. .BR nic3com ", " nicrealtek " and " nicnatsemi "
  1066. need PCI configuration space read access and raw I/O port access.
  1067. .sp
  1068. .B atahpt
  1069. needs PCI configuration space access and raw I/O port access.
  1070. .sp
  1071. .BR gfxnvidia ", " drkaiser " and " it8212
  1072. need PCI configuration space access and raw memory access.
  1073. .sp
  1074. .B rayer_spi
  1075. needs raw I/O port access.
  1076. .sp
  1077. .BR satasii ", " nicintel ", " nicintel_eeprom " and " nicintel_spi
  1078. need PCI configuration space read access and raw memory access.
  1079. .sp
  1080. .BR satamv " and " atapromise
  1081. need PCI configuration space read access, raw I/O port access and raw memory
  1082. access.
  1083. .sp
  1084. .B serprog
  1085. needs TCP access to the network or userspace access to a serial port.
  1086. .sp
  1087. .B buspirate_spi
  1088. needs userspace access to a serial port.
  1089. .sp
  1090. .BR ft2232_spi ", " usbblaster_spi " and " pickit2_spi
  1091. need access to the respective USB device via libusb API version 0.1.
  1092. .sp
  1093. .BR ch341a_spi " and " dediprog
  1094. need access to the respective USB device via libusb API version 1.0.
  1095. .sp
  1096. .B dummy
  1097. needs no access permissions at all.
  1098. .sp
  1099. .BR internal ", " nic3com ", " nicrealtek ", " nicnatsemi ", "
  1100. .BR gfxnvidia ", " drkaiser ", " satasii ", " satamv ", " atahpt ", " atavia " and " atapromise
  1101. have to be run as superuser/root, and need additional raw access permission.
  1102. .sp
  1103. .BR serprog ", " buspirate_spi ", " dediprog ", " usbblaster_spi ", " ft2232_spi ", " pickit2_spi " and " \
  1104. ch341a_spi
  1105. can be run as normal user on most operating systems if appropriate device
  1106. permissions are set.
  1107. .sp
  1108. .B ogp
  1109. needs PCI configuration space read access and raw memory access.
  1110. .sp
  1111. On OpenBSD, you can obtain raw access permission by setting
  1112. .B "securelevel=-1"
  1113. in
  1114. .B "/etc/rc.securelevel"
  1115. and rebooting, or rebooting into single user mode.
  1116. .SH BUGS
  1117. Please report any bugs to the
  1118. .MTOB "flashrom@flashrom.org" "flashrom mailing list" .
  1119. .sp
  1120. We recommend to subscribe first at
  1121. .URLB "https://flashrom.org/mailman/listinfo/flashrom" "" .
  1122. .sp
  1123. Many of the developers communicate via the
  1124. .B "#flashrom"
  1125. IRC channel on
  1126. .BR chat.freenode.net .
  1127. If you don't have an IRC client, you can use the
  1128. .URLB http://webchat.freenode.net/?channels=flashrom "freenode webchat" .
  1129. You are welcome to join and ask questions, send us bug and success reports there
  1130. too. Please provide a way to contact you later (e.g.\& a mail address) and be
  1131. patient if there is no immediate reaction. Also, we provide a
  1132. .URLB https://paste.flashrom.org "pastebin service"
  1133. that is very useful when you want to share logs etc.\& without spamming the
  1134. channel.
  1135. .SS
  1136. .B Laptops
  1137. .sp
  1138. Using flashrom on laptops is dangerous and may easily make your hardware
  1139. unusable. flashrom will attempt to detect if it is running on a laptop and abort
  1140. immediately for safety reasons. Please see the detailed discussion of this topic
  1141. and associated flashrom options in the
  1142. .B Laptops
  1143. paragraph in the
  1144. .B internal programmer
  1145. subsection of the
  1146. .B PROGRAMMER-SPECIFIC INFORMATION
  1147. section and the information
  1148. .URLB "https://flashrom.org/Laptops" "in our wiki" .
  1149. .SS
  1150. One-time programmable (OTP) memory and unique IDs
  1151. .sp
  1152. Some flash chips contain OTP memory often denoted as "security registers".
  1153. They usually have a capacity in the range of some bytes to a few hundred
  1154. bytes and can be used to give devices unique IDs etc. flashrom is not able
  1155. to read or write these memories and may therefore not be able to duplicate a
  1156. chip completely. For chip types known to include OTP memories a warning is
  1157. printed when they are detected.
  1158. .sp
  1159. Similar to OTP memories are unique, factory programmed, unforgeable IDs.
  1160. They are not modifiable by the user at all.
  1161. .SH LICENSE
  1162. .B flashrom
  1163. is covered by the GNU General Public License (GPL), version 2. Some files are
  1164. additionally available under any later version of the GPL.
  1165. .SH COPYRIGHT
  1166. .br
  1167. Please see the individual files.
  1168. .SH AUTHORS
  1169. Andrew Morgan
  1170. .br
  1171. Carl-Daniel Hailfinger
  1172. .br
  1173. Claus Gindhart
  1174. .br
  1175. David Borg
  1176. .br
  1177. David Hendricks
  1178. .br
  1179. Dominik Geyer
  1180. .br
  1181. Eric Biederman
  1182. .br
  1183. Giampiero Giancipoli
  1184. .br
  1185. Helge Wagner
  1186. .br
  1187. Idwer Vollering
  1188. .br
  1189. Joe Bao
  1190. .br
  1191. Joerg Fischer
  1192. .br
  1193. Joshua Roys
  1194. .br
  1195. Ky\[:o]sti M\[:a]lkki
  1196. .br
  1197. Luc Verhaegen
  1198. .br
  1199. Li-Ta Lo
  1200. .br
  1201. Mark Marshall
  1202. .br
  1203. Markus Boas
  1204. .br
  1205. Mattias Mattsson
  1206. .br
  1207. Michael Karcher
  1208. .br
  1209. Nikolay Petukhov
  1210. .br
  1211. Patrick Georgi
  1212. .br
  1213. Peter Lemenkov
  1214. .br
  1215. Peter Stuge
  1216. .br
  1217. Reinder E.N. de Haan
  1218. .br
  1219. Ronald G. Minnich
  1220. .br
  1221. Ronald Hoogenboom
  1222. .br
  1223. Sean Nelson
  1224. .br
  1225. Stefan Reinauer
  1226. .br
  1227. Stefan Tauner
  1228. .br
  1229. Stefan Wildemann
  1230. .br
  1231. Stephan Guilloux
  1232. .br
  1233. Steven James
  1234. .br
  1235. Urja Rannikko
  1236. .br
  1237. Uwe Hermann
  1238. .br
  1239. Wang Qingpei
  1240. .br
  1241. Yinghai Lu
  1242. .br
  1243. some others, please see the flashrom svn changelog for details.
  1244. .br
  1245. All still active authors can be reached via
  1246. .MTOB "flashrom@flashrom.org" "the mailing list" .
  1247. .PP
  1248. This manual page was written by
  1249. .MTOB "uwe@hermann-uwe.de" "Uwe Hermann" ,
  1250. Carl-Daniel Hailfinger, Stefan Tauner and others.
  1251. It is licensed under the terms of the GNU GPL (version 2 or later).