Man page fixes:
- Add dummy programmer flash chip emulation
- Add satamv programmer
- Merge it87spi programmer into internal section
- Correct formatting of pci= parameter
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Index: flashrom-manpage_dummy_satamv_it87spi/flashrom.8
===================================================================
--- flashrom-manpage_dummy_satamv_it87spi/flashrom.8 (Revision 1380)
+++ flashrom-manpage_dummy_satamv_it87spi/flashrom.8 (Arbeitskopie)
@@ -168,7 +168,7 @@
.sp
.BR "* internal" " (default, for in-system flashing in the mainboard)"
.sp
-.BR "* dummy" " (just prints all operations and accesses)"
+.BR "* dummy" " (prints all operations and accesses, can emulate flash chips)"
.sp
.BR "* nic3com" " (for flash ROMs on 3COM network cards)"
.sp
@@ -192,9 +192,6 @@
.sp
.BR "* atahpt" " (for flash ROMs on Highpoint ATA/RAID controllers)"
.sp
-.BR "* it87spi" " (for flash ROMs behind an ITE IT87xx Super I/O LPC/SPI \
-translation unit)"
-.sp
.BR "* ft2232_spi" " (for SPI flash ROMs attached to an FT2232/FT4232H family \
based USB SPI programmer)"
.sp
@@ -286,17 +283,17 @@
.B " flashrom \-p internal:boardmismatch=force"
.sp
If your mainboard uses an ITE IT87 series Super I/O for LPC<->SPI flash bus
-translation, flashrom should autodetect that configuration. You can use the
+translation, flashrom should autodetect that configuration. If you want to
+set the I/O base port of the IT87 series SPI controller manually instead of
+using the value provided by the BIOS, use the
.sp
.B " flashrom \-p internal:it87spiport=portnum"
.sp
-syntax as explained in the
-.B it87spi
-programmer section to use a non-default port for controlling the IT87 series
-Super I/O. In the unlikely case flashrom doesn't detect an active
-IT87 LPC<->SPI bridge, you can try to force recognition by using the
-.B it87spi
-programmer.
+syntax where
+.B portnum
+is the I/O port number (must be a multiple of 8). In the unlikely case
+flashrom doesn't detect an active IT87 LPC<->SPI bridge, please send a bug
+report so we can diagnose the problem.
.sp
Using flashrom on laptops is dangerous and may easily make your hardware
unusable (see also the
@@ -322,7 +319,9 @@
.BR "dummy " programmer
An optional parameter specifies the bus types it
should support. For that you have to use the
-.B "flashrom \-p dummy:bus=[type[+type[+type]]]"
+.sp
+.B " flashrom \-p dummy:bus=[type[+type[+type]]]"
+.sp
syntax where
.B type
can be
@@ -332,6 +331,51 @@
.sp
Example:
.B "flashrom \-p dummy:bus=lpc+fwh"
+.sp
+The dummy programmer supports flash chip emulation for automated self-tests
+without hardware access. If you want to emulate a flash chip, use the
+.sp
+.B " flashrom \-p dummy:emulate=chip"
+.sp
+syntax where
+.B chip
+is one of the following chips (please specify only the chip name, not the
+vendor):
+.sp
+.RB "* ST " M25P10.RES " SPI flash chip (RES, page write)"
+.sp
+.RB "* SST " SST25VF040.REMS " SPI flash chip (REMS, byte write)"
+.sp
+.RB "* SST " SST25VF032B " SPI flash chip (RDID, AAI write)"
+.sp
+Example:
+.B "flashrom -p dummy:emulate=SST25VF040.REMS"
+.sp
+If you use flash chip emulation, flash image persistence is available as well
+by using the
+.sp
+.B " flashrom \-p dummy:emulate=chip,image=image.rom"
+.sp
+syntax where
+.B image.rom
+is the file where the simulated chip contents are read on flashrom startup and
+where the chip contents on flashrom shutdown are written to.
+.sp
+Example:
+.B "flashrom -p dummy:emulate=M25P10.RES,image=dummy.bin"
+.sp
+If you use SPI flash chip emulation for a chip which supports SPI page write
+with the default opcode, you can set the maximum allowed write chunk size with
+the
+.sp
+.B " flashrom \-p dummy:emulate=chip,spi_write_256_chunksize=size"
+.sp
+syntax where
+.B size
+is the number of bytes (min. 1, max. 256).
+.sp
+Example:
+.B "flashrom -p dummy:emulate=M25P10.RES,spi_write_256_chunksize=5"
.TP
.BR "nic3com" , " nicrealtek" , " nicsmc1211" , " nicnatsemi" , " nicintel\
" , " nicintel_spi" , " gfxnvidia" , " ogp_spi" , " drkaiser" , " satasii\
@@ -339,7 +383,9 @@
These programmers have an option to specify the PCI address of the card
your want to use, which must be specified if more than one card supported
by the selected programmer is installed in your system. The syntax is
-.BR "flashrom \-p xxxx:pci=bb:dd.f" ,
+.sp
+.BR " flashrom \-p xxxx:pci=bb:dd.f" ,
+.sp
where
.B xxxx
is the name of the programmer
@@ -353,19 +399,6 @@
Example:
.B "flashrom \-p nic3com:pci=05:04.0"
.TP
-.BR "it87spi " programmer
-An optional
-.B it87spiport
-parameter sets the I/O base port of the IT87 series SPI controller
-interface to the port specified in the parameter instead of using the port
-address set by the BIOS. For that you have to use the
-.sp
-.B " flashrom \-p it87spi:it87spiport=portnum"
-.sp
-syntax where
-.B portnum
-is an I/O port number which must be a multiple of 8.
-.TP
.BR "ft2232_spi " programmer
An optional parameter specifies the controller
type and interface/port it should support. For that you have to use the
@@ -487,9 +520,6 @@
needs raw memory access, PCI configuration space access, raw I/O port
access (x86) and MSR access (x86).
.sp
-.B it87spi
-needs raw I/O port access (x86).
-.sp
.BR nic3com ", " nicrealtek ", " nicsmc1211 " and " nicnatsemi "
need PCI configuration space read access and raw I/O port access.
.sp
@@ -505,6 +535,10 @@
.B satasii
needs PCI configuration space read access and raw memory access.
.sp
+.B satamv
+needs PCI configuration space read access, raw I/O port access and raw memory
+access.
+.sp
.B serprog
needs TCP access to the network or userspace access to a serial port.
.sp
@@ -517,8 +551,8 @@
.B dummy
needs no access permissions at all.
.sp
-.BR internal ", " it87spi ", " nic3com ", " nicrealtek ", " nicsmc1211 ", "
-.BR nicnatsemi ", " "gfxnvidia" ", " drkaiser ", " satasii " and " atahpt
+.BR internal ", " nic3com ", " nicrealtek ", " nicsmc1211 ", " nicnatsemi ", "
+.BR gfxnvidia" ", " drkaiser ", " satasii ", " satamv " and " atahpt
have to be run as superuser/root, and need additional raw access permission.
.sp
.BR serprog ", " buspirate_spi ", " dediprog " and " ft2232_spi
--
http://www.hailfinger.org/
Author: hailfinger
Date: Sun Jul 24 20:41:13 2011
New Revision: 1383
URL: http://flashrom.org/trac/flashrom/changeset/1383
Log:
Man page fixes:
- Finish dummy programmer description
- Add satamv programmer
- Merge it87spi programmer into internal section
- Cosmetics
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Acked-by: Uwe Hermann <uwe(a)hermann-uwe.de>
Modified:
trunk/flashrom.8
Modified: trunk/flashrom.8
==============================================================================
--- trunk/flashrom.8 Sun Jul 24 18:30:31 2011 (r1382)
+++ trunk/flashrom.8 Sun Jul 24 20:41:13 2011 (r1383)
@@ -168,7 +168,7 @@
.sp
.BR "* internal" " (default, for in-system flashing in the mainboard)"
.sp
-.BR "* dummy" " (just prints all operations and accesses)"
+.BR "* dummy" " (virtual programmer for testing flashrom)"
.sp
.BR "* nic3com" " (for flash ROMs on 3COM network cards)"
.sp
@@ -192,9 +192,6 @@
.sp
.BR "* atahpt" " (for flash ROMs on Highpoint ATA/RAID controllers)"
.sp
-.BR "* it87spi" " (for flash ROMs behind an ITE IT87xx Super I/O LPC/SPI \
-translation unit)"
-.sp
.BR "* ft2232_spi" " (for SPI flash ROMs attached to an FT2232/FT4232H family \
based USB SPI programmer)"
.sp
@@ -286,17 +283,17 @@
.B " flashrom \-p internal:boardmismatch=force"
.sp
If your mainboard uses an ITE IT87 series Super I/O for LPC<->SPI flash bus
-translation, flashrom should autodetect that configuration. You can use the
+translation, flashrom should autodetect that configuration. If you want to
+set the I/O base port of the IT87 series SPI controller manually instead of
+using the value provided by the BIOS, use the
.sp
.B " flashrom \-p internal:it87spiport=portnum"
.sp
-syntax as explained in the
-.B it87spi
-programmer section to use a non-default port for controlling the IT87 series
-Super I/O. In the unlikely case flashrom doesn't detect an active
-IT87 LPC<->SPI bridge, you can try to force recognition by using the
-.B it87spi
-programmer.
+syntax where
+.B portnum
+is the I/O port number (must be a multiple of 8). In the unlikely case
+flashrom doesn't detect an active IT87 LPC<->SPI bridge, please send a bug
+report so we can diagnose the problem.
.sp
Using flashrom on laptops is dangerous and may easily make your hardware
unusable (see also the
@@ -320,9 +317,18 @@
dumb idea.
.TP
.BR "dummy " programmer
+The dummy programmer operates on a buffer in memory only. It provides a safe
+and fast way to test various aspects of flashrom and is mainly used in
+development and while debugging.
+.sp
+It is able to emulate some chips to a certain degree (basic
+identify/read/erase/write operations work).
+.sp
An optional parameter specifies the bus types it
should support. For that you have to use the
-.B "flashrom \-p dummy:bus=[type[+type[+type]]]"
+.sp
+.B " flashrom \-p dummy:bus=[type[+type[+type]]]"
+.sp
syntax where
.B type
can be
@@ -332,6 +338,52 @@
.sp
Example:
.B "flashrom \-p dummy:bus=lpc+fwh"
+.sp
+The dummy programmer supports flash chip emulation for automated self-tests
+without hardware access. If you want to emulate a flash chip, use the
+.sp
+.B " flashrom \-p dummy:emulate=chip"
+.sp
+syntax where
+.B chip
+is one of the following chips (please specify only the chip name, not the
+vendor):
+.sp
+.RB "* ST " M25P10.RES " SPI flash chip (RES, page write)"
+.sp
+.RB "* SST " SST25VF040.REMS " SPI flash chip (REMS, byte write)"
+.sp
+.RB "* SST " SST25VF032B " SPI flash chip (RDID, AAI write)"
+.sp
+Example:
+.B "flashrom -p dummy:emulate=SST25VF040.REMS"
+.sp
+If you use flash chip emulation, flash image persistence is available as well
+by using the
+.sp
+.B " flashrom \-p dummy:emulate=chip,image=image.rom"
+.sp
+syntax where
+.B image.rom
+is the file where the simulated chip contents are read on flashrom startup and
+where the chip contents on flashrom shutdown are written to.
+.sp
+Example:
+.B "flashrom -p dummy:emulate=M25P10.RES,image=dummy.bin"
+.sp
+If you use SPI flash chip emulation for a chip which supports SPI page write
+with the default opcode, you can set the maximum allowed write chunk size with
+the
+.sp
+.B " flashrom \-p dummy:emulate=chip,spi_write_256_chunksize=size"
+.sp
+syntax where
+.B size
+is the number of bytes (min. 1, max. 256).
+.sp
+Example:
+.sp
+.B " flashrom -p dummy:emulate=M25P10.RES,spi_write_256_chunksize=5"
.TP
.BR "nic3com" , " nicrealtek" , " nicsmc1211" , " nicnatsemi" , " nicintel\
" , " nicintel_spi" , " gfxnvidia" , " ogp_spi" , " drkaiser" , " satasii\
@@ -339,7 +391,9 @@
These programmers have an option to specify the PCI address of the card
your want to use, which must be specified if more than one card supported
by the selected programmer is installed in your system. The syntax is
-.BR "flashrom \-p xxxx:pci=bb:dd.f" ,
+.sp
+.BR " flashrom \-p xxxx:pci=bb:dd.f" ,
+.sp
where
.B xxxx
is the name of the programmer
@@ -353,19 +407,6 @@
Example:
.B "flashrom \-p nic3com:pci=05:04.0"
.TP
-.BR "it87spi " programmer
-An optional
-.B it87spiport
-parameter sets the I/O base port of the IT87 series SPI controller
-interface to the port specified in the parameter instead of using the port
-address set by the BIOS. For that you have to use the
-.sp
-.B " flashrom \-p it87spi:it87spiport=portnum"
-.sp
-syntax where
-.B portnum
-is an I/O port number which must be a multiple of 8.
-.TP
.BR "ft2232_spi " programmer
An optional parameter specifies the controller
type and interface/port it should support. For that you have to use the
@@ -487,9 +528,6 @@
needs raw memory access, PCI configuration space access, raw I/O port
access (x86) and MSR access (x86).
.sp
-.B it87spi
-needs raw I/O port access (x86).
-.sp
.BR nic3com ", " nicrealtek ", " nicsmc1211 " and " nicnatsemi "
need PCI configuration space read access and raw I/O port access.
.sp
@@ -505,6 +543,10 @@
.B satasii
needs PCI configuration space read access and raw memory access.
.sp
+.B satamv
+needs PCI configuration space read access, raw I/O port access and raw memory
+access.
+.sp
.B serprog
needs TCP access to the network or userspace access to a serial port.
.sp
@@ -517,8 +559,8 @@
.B dummy
needs no access permissions at all.
.sp
-.BR internal ", " it87spi ", " nic3com ", " nicrealtek ", " nicsmc1211 ", "
-.BR nicnatsemi ", " "gfxnvidia" ", " drkaiser ", " satasii " and " atahpt
+.BR internal ", " nic3com ", " nicrealtek ", " nicsmc1211 ", " nicnatsemi ", "
+.BR gfxnvidia ", " drkaiser ", " satasii ", " satamv " and " atahpt
have to be run as superuser/root, and need additional raw access permission.
.sp
.BR serprog ", " buspirate_spi ", " dediprog " and " ft2232_spi
Hi,
there are so many features I wanted to have in flashrom 0.9.4, but
delaying the release further is not going to help anyone.
Stefan Tauner probably has a few odd fixes in his queue, and I'm trying
to find an acceptable fix for a segfault, and to spot the logic
inversion which makes the write failure recovery code spit out the wrong
message. I found a (corruption) bug in ICH IDSEL handling, need to post
that fix and get it tested.
Anything else we need for 0.9.4?
Do we have any other unmerged bugfixes?
Doc fixes? The man page is missing some features.
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
On Sat, 23 Jul 2011 12:58:19 -0400
Bryan Moore <moore.bryan(a)gmail.com> wrote:
> I'm just starting to consider flashing my EeePC 1005HA's BIOS on Ubuntu
> Oneiric, so I installed flashrom and ran it, but can't make heads-or-tails
> of the output; I also can't find any sensible information in the FAQ or
> anywhere else on the web. Help?
>
> flashrom output:
>
> > Found chipset "Intel ICH7M", enabling flash write... OK.
> > This chipset supports the following protocols: FWH.
> > No EEPROM/flash device found.
> > Note: flashrom can never write if the flash chip isn't found automatically.
hello bryan!
well the message "No EEPROM/flash device found." is the most important
thing there. flashrom can not detect any flash chip (which holds the
bios/firmware code).
there can be multiple reasons for that, but all the details do not
really matter. it boils down to the fact, that laptops are harder to
support in flashrom than desktop boards. you can read about a few of the
details here: http://flashrom.org/Laptops
we recommend to not try to update the bios of laptops, but use the
vendor tools instead.
--
Kind regards/Mit freundlichen Grüßen, Stefan Tauner
Am 24.07.2011 00:49 schrieb Stefan Tauner:
> intel document 307013 (ICH7 datasheet) section 21.1.9 does only define
> PBR[0] (at SPIBAR + 60h) to PBR[2] (SPIBAR + 68h). SPIBAR + 6Ch and following
> are not defined, but we were printing them as PBR[3] anyway. i could not find
> any references to PBR[3] in documentation of other related chips (NM10,
> atom e6xx) either, hence kill it.
>
> Signed-off-by: Stefan Tauner <stefan.tauner(a)student.tuwien.ac.at>
>
Good spotting.
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
Author: stefanct
Date: Sun Jul 24 17:34:56 2011
New Revision: 1381
URL: http://flashrom.org/trac/flashrom/changeset/1381
Log:
ichspi.c: do not print PBR[3] for ICH7 because it does not exist
intel document 307013 (ICH7 datasheet) section 21.1.9 does only
define PBR[0] (at SPIBAR + 60h) to PBR[2] (SPIBAR + 68h). SPIBAR + 6Ch
and following are not defined, but we were printing them as PBR[3]
anyway. i could not find any references to PBR[3] in documentation of
other related chips (NM10, atom e6xx) either, hence kill it.
Signed-off-by: Stefan Tauner <stefan.tauner(a)student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006(a)gmx.net>
Modified:
trunk/ichspi.c
Modified: trunk/ichspi.c
==============================================================================
--- trunk/ichspi.c Thu Jul 21 23:21:04 2011 (r1380)
+++ trunk/ichspi.c Sun Jul 24 17:34:56 2011 (r1381)
@@ -1263,7 +1263,7 @@
mmio_readl(ich_spibar + 0x58));
msg_pdbg("0x5c: 0x%08x (OPMENU+4)\n",
mmio_readl(ich_spibar + 0x5c));
- for (i = 0; i < 4; i++) {
+ for (i = 0; i < 3; i++) {
int offs;
offs = 0x60 + (i * 4);
msg_pdbg("0x%02x: 0x%08x (PBR%d)\n", offs,