Skip to content

Commit f2a30a9

Browse files
author
stefanct
committed
Add a bunch of new/tested stuff and various small changes 25.
Tested mainboards: OK: - ASRock Fatal1ty 970 Performance and P4i65G Reported by anonymous email message ID: [email protected] The latter actually had a tested board enable already. Flash chips: - Eon EN25Q128 to PREW (+PREW) Reported by Adrian Graham - GigaDevice GD25VQ41B to PREW (+PREW) Reported by David Hendricks - Winbond W39V040FB to PREW (+EW) Reported by fjed on IRC Miscellaneous: - Change PCI IDs of "MS-6577 (Xenon)" board enable. The previous IDs contained the on-board display adapter which is disabled when a dedicated graphics card is installed. - Add a note to the README how to overcome the clang warning if only a single programmer is enabled. - Fix some typo and manpage problems found by lintian - r1920 introduced some explicit calls to pkg-config instead of $(PKG_CONFIG). This patch corrects that. - Make MS-7094 (K8T Neo2-F V2.0) board enable less contestable. Previous PCI IDs were board-specific but ot the other of devices that could be disabled by the firmware or that vary among hardware revions. There are no good alternatives available. However, since we always have a DMI decoder available now, we can use non-board-specific devices without taking risks. Thanks to Uwe Hermann for reporting and testing. - Some other small changes to clean up whitespace and fix some warnings from Debian's lintian. Signed-off-by: Stefan Tauner <[email protected]> Acked-by: Stefan Tauner <[email protected]> Acked-by: Carl-Daniel Hailfinger <[email protected]>
1 parent ac76fb9 commit f2a30a9

9 files changed

+85
-75
lines changed

Makefile

+17-17
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ UNSUPPORTED_FEATURES += CONFIG_PONY_SPI=yes
314314
else
315315
override CONFIG_PONY_SPI = no
316316
endif
317-
# Dediprog, USB-Blaster, PICkit2, CH341A and FT2232 are not supported with libpayload (missing libusb support)
317+
# Dediprog, USB-Blaster, PICkit2, CH341A and FT2232 are not supported with libpayload (missing libusb support).
318318
ifeq ($(CONFIG_DEDIPROG), yes)
319319
UNSUPPORTED_FEATURES += CONFIG_DEDIPROG=yes
320320
else
@@ -661,22 +661,22 @@ override CONFIG_CH341A_SPI = no
661661
override CONFIG_DEDIPROG = no
662662
endif
663663
ifeq ($(CONFIG_ENABLE_LIBPCI_PROGRAMMERS), no)
664-
override CONFIG_INTERNAL = no
665-
override CONFIG_NIC3COM = no
666-
override CONFIG_GFXNVIDIA = no
667-
override CONFIG_SATASII = no
668-
override CONFIG_ATAHPT = no
669-
override CONFIG_ATAVIA = no
670-
override CONFIG_ATAPROMISE = no
671-
override CONFIG_IT8212 = no
672-
override CONFIG_DRKAISER = no
673-
override CONFIG_NICREALTEK = no
674-
override CONFIG_NICNATSEMI = no
675-
override CONFIG_NICINTEL = no
676-
override CONFIG_NICINTEL_SPI = no
677-
override CONFIG_NICINTEL_EEPROM = no
678-
override CONFIG_OGP_SPI = no
679-
override CONFIG_SATAMV = no
664+
override CONFIG_INTERNAL = no
665+
override CONFIG_NIC3COM = no
666+
override CONFIG_GFXNVIDIA = no
667+
override CONFIG_SATASII = no
668+
override CONFIG_ATAHPT = no
669+
override CONFIG_ATAVIA = no
670+
override CONFIG_ATAPROMISE = no
671+
override CONFIG_IT8212 = no
672+
override CONFIG_DRKAISER = no
673+
override CONFIG_NICREALTEK = no
674+
override CONFIG_NICNATSEMI = no
675+
override CONFIG_NICINTEL = no
676+
override CONFIG_NICINTEL_SPI = no
677+
override CONFIG_NICINTEL_EEPROM = no
678+
override CONFIG_OGP_SPI = no
679+
override CONFIG_SATAMV = no
680680
endif
681681

682682
# Bitbanging SPI infrastructure, default off unless needed.

README

+6
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,12 @@ Processor architecture dependent features:
136136
use port-based I/O which is not directly available on non-x86. Those
137137
programmers will be disabled automatically if you run "make".
138138

139+
Compiler quirks:
140+
141+
If you are using clang and if you want to enable only one driver, you may hit an
142+
overzealous compiler warning from clang. Compile with "make WARNERROR=no" to
143+
force it to continue and enjoy.
144+
139145
Installation
140146
------------
141147

board_enable.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2440,9 +2440,9 @@ const struct board_match board_matches[] = {
24402440
{0x8086, 0x7190, 0, 0, 0x8086, 0x7110, 0, 0, "^MS-6163 (i440BX)$", NULL, NULL, P3, "MSI", "MS-6163 (MS-6163 Pro)", 0, OK, intel_piix4_gpo14_raise},
24412441
{0x8086, 0x244b, 0x1462, 0x3910, 0x8086, 0x2442, 0x1462, 0x3910, NULL, NULL, NULL, P3, "MSI", "MS-6391 (845 Pro4)", 0, OK, intel_ich_gpio23_raise},
24422442
{0x1039, 0x0745, 0, 0, 0x1039, 0x0018, 0, 0, "^MS-6561", NULL, NULL, P3, "MSI", "MS-6561 (745 Ultra)", 0, OK, w836xx_memw_enable_2e},
2443-
{0x8086, 0x2560, 0x1462, 0x5770, 0x8086, 0x2562, 0x1462, 0x5778, NULL, NULL, NULL, P3, "MSI", "MS-6577 (Xenon)", 0, OK, w83627hf_gpio25_raise_2e},
2443+
{0x8086, 0x2560, 0x1462, 0x5770, 0x8086, 0x24C3, 0x1462, 0x5770, NULL, NULL, NULL, P3, "MSI", "MS-6577 (Xenon)", 0, OK, w83627hf_gpio25_raise_2e},
24442444
{0x13f6, 0x0111, 0x1462, 0x5900, 0x1106, 0x3177, 0x1106, 0, NULL, NULL, NULL, P3, "MSI", "MS-6590 (KT4 Ultra)", 0, OK, board_msi_kt4v},
2445-
{0x1106, 0x3149, 0x1462, 0x7094, 0x10ec, 0x8167, 0x1462, 0x094c, "^MS-7094$", NULL, NULL, P3, "MSI", "MS-7094 (K8T Neo2-F V2.0)", 0, OK, w83627thf_gpio44_raise_2e},
2445+
{0x1106, 0x0282, 0x1106, 0x0282, 0x1106, 0x3227, 0x1106, 0x3227, "^MS-7094$", NULL, NULL, P3, "MSI", "MS-7094 (K8T Neo2-F V2.0)", 0, OK, w83627thf_gpio44_raise_2e},
24462446
{0x1106, 0x0571, 0x1462, 0x7120, 0x1106, 0x3065, 0x1462, 0x7120, NULL, NULL, NULL, P3, "MSI", "MS-6712 (KT4V)", 0, OK, board_msi_kt4v},
24472447
{0x1106, 0x3148, 0 , 0 , 0x1106, 0x3177, 0 , 0 , NULL, "msi", "ms6787", P3, "MSI", "MS-6787 (P4MAM-V/P4MAM-L)", 0, OK, w836xx_memw_enable_2e},
24482448
{0x8086, 0x24d3, 0x1462, 0x7880, 0x8086, 0x2570, 0, 0, NULL, NULL, NULL, P3, "MSI", "MS-6788-040 (848P NeoV)", 0, OK, intel_ich_gpio32_raise},

flashchips.c

+34-34
Original file line numberDiff line numberDiff line change
@@ -4663,7 +4663,7 @@ const struct flashchip flashchips[] = {
46634663
.page_size = 256,
46644664
/* OTP: 512B total; enter 0x3A */
46654665
.feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP,
4666-
.tested = TEST_UNTESTED,
4666+
.tested = TEST_OK_PREW,
46674667
.probe = probe_spi_rdid,
46684668
.probe_timing = TIMING_ZERO,
46694669
.block_erasers =
@@ -5368,13 +5368,13 @@ const struct flashchip flashchips[] = {
53685368
.probe_timing = TIMING_ZERO,
53695369
.block_erasers =
53705370
{
5371-
{
5372-
.eraseblocks = { {64 * 1024, 8} },
5373-
.block_erase = spi_block_erase_d8,
5374-
}, {
5375-
.eraseblocks = { {512 * 1024, 1} },
5376-
.block_erase = spi_block_erase_c7,
5377-
}
5371+
{
5372+
.eraseblocks = { {64 * 1024, 8} },
5373+
.block_erase = spi_block_erase_d8,
5374+
}, {
5375+
.eraseblocks = { {512 * 1024, 1} },
5376+
.block_erase = spi_block_erase_c7,
5377+
}
53785378
},
53795379
.printlock = spi_prettyprint_status_register_bp2_srwd,
53805380
.unlock = spi_disable_blockprotect_bp2_srwd,
@@ -5399,13 +5399,13 @@ const struct flashchip flashchips[] = {
53995399
.probe_timing = TIMING_ZERO,
54005400
.block_erasers =
54015401
{
5402-
{
5403-
.eraseblocks = { {64 * 1024, 16} },
5404-
.block_erase = spi_block_erase_d8,
5405-
}, {
5406-
.eraseblocks = { {1024 * 1024, 1} },
5407-
.block_erase = spi_block_erase_c7,
5408-
}
5402+
{
5403+
.eraseblocks = { {64 * 1024, 16} },
5404+
.block_erase = spi_block_erase_d8,
5405+
}, {
5406+
.eraseblocks = { {1024 * 1024, 1} },
5407+
.block_erase = spi_block_erase_c7,
5408+
}
54095409
},
54105410
.printlock = spi_prettyprint_status_register_bp2_srwd,
54115411
.unlock = spi_disable_blockprotect_bp2_srwd,
@@ -6382,27 +6382,27 @@ const struct flashchip flashchips[] = {
63826382
.page_size = 256,
63836383
/* OTP: 1536B total; read 0x48, write 0x42, erase 0x44 */
63846384
.feature_bits = FEATURE_WRSR_WREN | FEATURE_OTP | FEATURE_QPI,
6385-
.tested = TEST_UNTESTED,
6385+
.tested = TEST_OK_PREW,
63866386
.probe = probe_spi_rdid,
63876387
.probe_timing = TIMING_ZERO,
6388-
.block_erasers =
6388+
.block_erasers =
63896389
{
6390-
{
6391-
.eraseblocks = { { 4 * 1024, 128} },
6392-
.block_erase = spi_block_erase_20,
6393-
}, {
6394-
.eraseblocks = { { 32 * 1024, 16} },
6395-
.block_erase = spi_block_erase_52,
6396-
}, {
6397-
.eraseblocks = { { 64 * 1024, 8} },
6398-
.block_erase = spi_block_erase_d8,
6399-
}, {
6400-
.eraseblocks = { {512 * 1024, 1} },
6401-
.block_erase = spi_block_erase_60,
6402-
}, {
6403-
.eraseblocks = { {512 * 1024, 1} },
6404-
.block_erase = spi_block_erase_c7,
6405-
}
6390+
{
6391+
.eraseblocks = { { 4 * 1024, 128} },
6392+
.block_erase = spi_block_erase_20,
6393+
}, {
6394+
.eraseblocks = { { 32 * 1024, 16} },
6395+
.block_erase = spi_block_erase_52,
6396+
}, {
6397+
.eraseblocks = { { 64 * 1024, 8} },
6398+
.block_erase = spi_block_erase_d8,
6399+
}, {
6400+
.eraseblocks = { {512 * 1024, 1} },
6401+
.block_erase = spi_block_erase_60,
6402+
}, {
6403+
.eraseblocks = { {512 * 1024, 1} },
6404+
.block_erase = spi_block_erase_c7,
6405+
}
64066406
},
64076407
.printlock = spi_prettyprint_status_register_bp4_srwd,
64086408
.unlock = spi_disable_blockprotect_bp4_srwd, /* TODO: 2nd status reg (read with 0x35) */
@@ -15627,7 +15627,7 @@ const struct flashchip flashchips[] = {
1562715627
.total_size = 512,
1562815628
.page_size = 64 * 1024,
1562915629
.feature_bits = FEATURE_REGISTERMAP | FEATURE_EITHER_RESET,
15630-
.tested = TEST_OK_PR,
15630+
.tested = TEST_OK_PREW,
1563115631
.probe = probe_jedec,
1563215632
.probe_timing = 10,
1563315633
.block_erasers =

flashrom.8.tmpl

+21-17
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
.\" Load the www device when using groff; provide a fallback for groff's MTO macro that formats email addresses.
22
.ie \n[.g] \
33
. mso www.tmac
4-
.el \
5-
. de MTO \\$2 \(la\\$1 \(ra\\$3
4+
.el \{
5+
. de MTO
6+
\\$2 \(la\\$1 \(ra\\$3 \
67
. .
8+
.\}
79
.\" Create wrappers for .MTO and .URL that print only text on systems w/o groff or if not outputting to a HTML
810
.\" device. To that end we need to distinguish HTML output on groff from other configurations first.
911
.nr groffhtml 0
@@ -208,7 +210,7 @@ Please note that MediaWiki output is not compiled in by default.
208210
Specify the programmer device. This is mandatory for all operations
209211
involving any chip access (probe/read/write/...). Currently supported are:
210212
.sp
211-
.BR "* internal" " (default, for in-system flashing in the mainboard)"
213+
.BR "* internal" " (for in-system flashing in the mainboard)"
212214
.sp
213215
.BR "* dummy" " (virtual programmer for testing flashrom)"
214216
.sp
@@ -237,16 +239,10 @@ cards)"
237239
.sp
238240
.BR "* it8212" " (for flash ROMs on ITE IT8212F ATA/RAID controller)"
239241
.sp
240-
.BR "* ft2232_spi" " (for SPI flash ROMs attached to an FT2232/FT4232H/FT232H family \
241-
based USB SPI programmer), including the DLP Design DLP-USB1232H, \
242-
FTDI FT2232H Mini-Module, FTDI FT4232H Mini-Module, openbiosprog-spi, Amontec \
243-
JTAGkey/JTAGkey-tiny/JTAGkey-2, Dangerous Prototypes Bus Blaster, \
244-
Olimex ARM-USB-TINY/-H, Olimex ARM-USB-OCD/-H, TIAO/DIYGADGET USB
245-
Multi-Protocol Adapter (TUMPA), TUMPA Lite, GOEPEL PicoTAP and Google Servo v1/v2.
242+
.BR "* ft2232_spi" " (for SPI flash ROMs attached to an FT2232/FT4232H/FT232H family based USB SPI programmer).
246243
.sp
247244
.BR "* serprog" " (for flash ROMs attached to a programmer speaking serprog, \
248-
including Arduino-based devices as well as various programmers by Urja Rannikko, \
249-
Juhana Helovuo, Stefan Tauner and others)."
245+
including some Arduino-based devices)."
250246
.sp
251247
.BR "* buspirate_spi" " (for SPI flash ROMs attached to a Bus Pirate)"
252248
.sp
@@ -684,13 +680,18 @@ size (padding to 32 kB is required).
684680
.IP
685681
This is the first programmer module in flashrom that does not provide access to NOR flash chips but EEPROMs
686682
mounted on gigabit Ethernet cards based on Intel's 82580 NIC. Because EEPROMs normally do not announce their
687-
size nor allow to be identified, the controller relies on correct size values written to predefined addresses
688-
within the chip. Flashrom follows this scheme but assumes the minimum size of 16 kB (128 kb) if an unprogrammed
689-
EEPROM/card is detected. Intel specifies following EEPROMs to be compatible: Atmel AT25128, AT25256, Micron (ST)
690-
M95128, M95256 and OnSemi (Catalyst) CAT25CS128.
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.
691687
.SS
692688
.BR "ft2232_spi " programmer
693689
.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
694695
An optional parameter specifies the controller
695696
type and channel/interface/port it should support. For that you have to use the
696697
.sp
@@ -736,6 +737,9 @@ syntax.
736737
.SS
737738
.BR "serprog " programmer
738739
.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
739743
A mandatory parameter specifies either a serial device (and baud rate) or an IP/port combination for
740744
communicating with the programmer.
741745
The device/baud combination has to start with
@@ -981,7 +985,7 @@ Please note that the linux_spi driver only works on Linux.
981985
.BR "mstarddc_spi " programmer
982986
.IP
983987
The Display Data Channel (DDC) is an I2C bus present on VGA and DVI connectors, that allows exchanging
984-
informations between a computer and attached displays. Its most common uses are getting display capabilities
988+
information between a computer and attached displays. Its most common uses are getting display capabilities
985989
through EDID (at I2C address 0x50) and sending commands to the display using the DDC/CI protocol (at address
986990
0x37). On displays driven by MSTAR SoCs, it is also possible to access the SoC firmware flash (connected to
987991
the Soc through another SPI bus) using an In-System Programming (ISP) port, usually at address 0x49.
@@ -1016,7 +1020,7 @@ Example that does not reset the display at the end of the operation:
10161020
.sp
10171021
.B " flashrom \-p mstarddc_spi:dev=/dev/i2c-1:49,noreset=1
10181022
.sp
1019-
Please note that sending the reset command is also inhibited in the event an error occured during the operation.
1023+
Please note that sending the reset command is also inhibited if an error occurred during the operation.
10201024
To send the reset command afterwards, you can simply run flashrom once more, in chip probe mode (not specifying
10211025
an operation), without the
10221026
.B noreset

pickit2_spi.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ static int pickit2_shutdown(void *data)
400400

401401
int pickit2_spi_init(void)
402402
{
403-
unsigned int usedevice = 0; // FIXME: allow to select one of multiple devices
403+
unsigned int usedevice = 0; // FIXME: Allow selecting one of multiple devices
404404

405405
uint8_t buf[CMD_LENGTH] = {
406406
CMD_EXEC_SCRIPT,

print.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -490,11 +490,9 @@ int print_supported(void)
490490
case USB:
491491
print_supported_devs(prog, "USB");
492492
break;
493-
#if NEED_PCI == 1
494493
case PCI:
495494
print_supported_devs(prog, "PCI");
496495
break;
497-
#endif
498496
case OTHER:
499497
if (prog.devs.note != NULL) {
500498
msg_ginfo("\nSupported devices for the %s programmer:\n", prog.name);
@@ -571,6 +569,7 @@ const struct board_info boards_known[] = {
571569
B("ASRock", "AMCP7AION-HT", OK, "http://www.asrock.com/nettop/NVIDIA/ION%20330HT/", "Used in ION 330HT(-BD) barebones."),
572570
B("ASRock", "ConRoeXFire-eSATA2", OK, "http://www.asrock.com/mb/overview.asp?model=conroexfire-esata2", NULL),
573571
B("ASRock", "E350M1/USB3", OK, "http://www.asrock.com/mb/overview.asp?model=e350m1/usb3", "Vendor firmware writes to flash at shutdown. This probably corrupts the flash in case you write coreboot while running the vendor firmware. Simply updating the vendor firmware should be fine."),
572+
B("ASRock", "Fatal1ty 970 Performance", OK, "http://www.asrock.com/mb/overview.asp?Model=Fatal1ty%20970%20Performance", "Probing works (Winbond W25Q64, 8192 kB, SPI), but parts of the flash are problematic: descriptor is r/o (conforming to ICH reqs), ME region is locked."),
574573
B("ASRock", "Fatal1ty Z77 Performance", BAD, "http://www.asrock.com/mb/overview.asp?Model=Fatal1ty%20Z77%20Performance", "Probing works (Winbond W25Q64, 8192 kB, SPI), but parts of the flash are problematic: descriptor is r/o (conforming to ICH reqs), ME region is locked."),
575574
B("ASRock", "G31M-GS", OK, "http://www.asrock.com/mb/overview.asp?Model=G31M-GS", NULL),
576575
B("ASRock", "G31M-S rev 2.0", OK, "http://www.asrock.com/mb/overview.asp?model=G31M-S", NULL),
@@ -585,6 +584,7 @@ const struct board_info boards_known[] = {
585584
B("ASRock", "M3A790GXH/128M", OK, "http://www.asrock.com/mb/overview.asp?Model=M3A790GXH/128M", NULL),
586585
B("ASRock", "N61P-S", OK, "http://www.asrock.com/mb/overview.asp?Model=N61P-S", NULL),
587586
B("ASRock", "N68C-S UCC", OK, "http://www.asrock.com/mb/overview.asp?Model=N68C-S%20UCC", NULL),
587+
B("ASRock", "P4i65G", OK, "http://www.asrock.com/mb/overview.asp?Model=P4i65G", NULL),
588588
B("ASRock", "P4i65GV", OK, "http://www.asrock.com/mb/overview.asp?Model=P4i65GV", NULL),
589589
B("ASRock", "Z68 Extreme4", BAD, "http://www.asrock.com/mb/overview.asp?Model=Z68%20Extreme4", "Probing works (Winbond W25Q64, 8192 kB, SPI), but parts of the flash are problematic: descriptor is r/o (conforming to ICH reqs), ME region is locked."),
590590
B("ASUS", "A7N8X Deluxe", OK, "http://www.asus.com/Motherboards/AMD_Socket_A/A7N8X_Deluxe/", NULL),

sb600spi.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ static int handle_imc(struct pci_dev *dev)
512512
msg_pinfo("Writes have been disabled for safety reasons because the presence of the IMC\n"
513513
"was detected and it could interfere with accessing flash memory. Flashrom will\n"
514514
"try to disable it temporarily but even then this might not be safe:\n"
515-
"when it is reenabled and after a reboot it expects to find working code\n"
515+
"when it is re-enabled and after a reboot it expects to find working code\n"
516516
"in the flash and it is unpredictable what happens if there is none.\n"
517517
"\n"
518518
"To be safe make sure that there is a working IMC firmware at the right\n"

util/ich_descriptors_tool/ich_descriptors_tool.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ int main(int argc, char *argv[])
180180
usage(argv, "Could not allocate memory");
181181
lseek(fd, 0, SEEK_SET);
182182
if (len != read(fd, buf, len))
183-
usage(argv, "Seeking to the end of the file failed");
183+
usage(argv, "Reading the descriptor image file failed");
184184
}
185185
printf("The flash image has a size of %d [0x%x] bytes.\n", len, len);
186186
close(fd);

0 commit comments

Comments
 (0)