mail.coreboot.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
List overview
Download
flashrom
December 2011
----- 2024 -----
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
flashrom@flashrom.org
45 participants
143 discussions
Start a n
N
ew thread
Patches + RFC: Deal with locked ICH flash descriptor regions transparently
by David Hendricks
03 Dec '11
03 Dec '11
The following patches (attached and in-lined below) add support for "graceful" handling of certain errors and in particular the read/write errors that occur on newer Intel chipsets. With a little work, it could be extended to handle SPI hardware write protection schema, too. Note: I think we should probably add a "I_want_a_brick" programmer parameter for those daring enough to try this. I suspect certain OEM tools use unknown Mebx commands<
http://support.dell.com/support/edocs/systems/latd630/en/amt/MEBX.htm
>to disable ME read/write protection when they do updates. Perhaps that stuff can be added later as a board_enable thing. The impetus for this is to overcome difficulties in dealing with new Intel platforms which use their flash descriptor layout, like this (using Pontus' H57 verbose output): 0x54: 0x00000000 (FREG0: Flash Descriptor) 0x00000000-0x00000fff is read-only 0x58: 0x07ff0600 (FREG1: BIOS) 0x00600000-0x007fffff is read-write 0x5C: 0x05ff0001 (FREG2: Management Engine) 0x00001000-0x005fffff is locked 0x60: 0x00000fff (FREG3: Gigabit Ethernet) Gigabit Ethernet region is unused. 0x64: 0x00000fff (FREG4: Platform Data) Platform Data region is unused. In this case, the flashrom will abort due to a transaction error when it attempts to read or write offsets 0x001000-0x05fffff, or when it attempt to write new content to 0x000000-0x000fff. With the patches applied, the low-level ICH code will handle all the details of checking the address associated with an opcode against the permissions set in the flash descriptor. If an operation cannot be performed on a given region, an error code is propagated up the stack so that high-level read/write logic can decide to skip that region. As is, the patch will make the high-level logic fill in unreadable regions with 0xff bytes (for reads) and will quietly skip over unwriteable regions (for writes). The biggest downside is, of course, that read/write operations no longer do exactly what one might expect. A full read operation (flashrom -r) will give you a ROM-sized image with 0xff bytes wherever read is forbidden (e.g. where the management engine firmware lives). A full write operation will skip forbidden regions (e.g. flash descriptor and ME) which may leave stuff in an inconsistent and potentially unusable state (thanks, Intel!). Signed-off-by: David Hendricks <dhendrix(a)google.com> 1-3_error_handling_helper_function.diff: Index: flashrom-me/flash.h =================================================================== --- flashrom-me.orig/flash.h +++ flashrom-me/flash.h @@ -226,12 +226,25 @@ int write_buf_to_file(unsigned char *buf #define OK 0 #define NT 1 /* Not tested */ +/* what to do in case of an error */ +enum error_action { + error_fail, /* fail immediately */ + error_ignore, /* non-fatal error; continue */ +}; + /* Something happened that shouldn't happen, but we can go on. */ #define ERROR_NONFATAL 0x100 /* Something happened that shouldn't happen, we'll abort. */ #define ERROR_FATAL -0xee +/* Operation failed due to access restriction set in programmer or flash chip */ +#define ACCESS_DENIED -7 +extern enum error_action access_denied_action; + +/* convenience function for checking return codes */ +extern int ignore_error(int x); + /* cli_output.c */ /* Let gcc and clang check for correct printf-style format strings. */ int print(int type, const char *fmt, ...) __attribute__((format(printf, 2, 3))); Index: flashrom-me/flashrom.c =================================================================== --- flashrom-me.orig/flashrom.c +++ flashrom-me/flashrom.c @@ -42,6 +42,25 @@ const char flashrom_version[] = FLASHROM char *chip_to_probe = NULL; int verbose = 0; +/* error handling stuff */ +enum error_action access_denied_action = error_ignore; + +/* returns boolean (1 if caller should ignore error code, 0 if not) */ +int ignore_error(int err) { + int ret = 0; + + switch(err) { + case ACCESS_DENIED: + if (access_denied_action == error_ignore) + ret = 1; + break; + default: + break; + } + + return ret; +} + static enum programmer programmer = PROGRAMMER_INVALID; static char *programmer_param = NULL; 2-3_update_spi_error_handling.diff: Index: flashrom-me/spi.c =================================================================== --- flashrom-me.orig/spi.c +++ flashrom-me/spi.c @@ -100,25 +100,35 @@ int default_spi_send_multicommand(struct int default_spi_read(struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len) { unsigned int max_data = spi_programmer->max_data_read; + int ret; if (max_data == MAX_DATA_UNSPECIFIED) { msg_perr("%s called, but SPI read chunk size not defined " "on this hardware. Please report a bug at " "flashrom(a)flashrom.org\n", __func__); return 1; } - return spi_read_chunked(flash, buf, start, len, max_data); + rc = spi_read_chunked(flash, buf, start, len, max_data); + /* translate SPI-specific access denied error to generic error */ + if (ret == SPI_ACCESS_DENIED) + rc = ACCESS_DENIED; + return ret; } int default_spi_write_256(struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len) { unsigned int max_data = spi_programmer->max_data_write; + int ret; if (max_data == MAX_DATA_UNSPECIFIED) { msg_perr("%s called, but SPI write chunk size not defined " "on this hardware. Please report a bug at " "flashrom(a)flashrom.org\n", __func__); return 1; } - return spi_write_chunked(flash, buf, start, len, max_data); + ret = spi_write_chunked(flash, buf, start, len, max_data); + /* translate SPI-specific access denied error to generic error */ + if (ret == SPI_ACCESS_DENIED) + ret = ACCESS_DENIED; + return ret; } int spi_chip_read(struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len) Index: flashrom-me/spi.h =================================================================== --- flashrom-me.orig/spi.h +++ flashrom-me/spi.h @@ -125,5 +125,6 @@ #define SPI_INVALID_LENGTH -4 #define SPI_FLASHROM_BUG -5 #define SPI_PROGRAMMER_ERROR -6 +#define SPI_ACCESS_DENIED -7 #endif /* !__SPI_H__ */ Index: flashrom-me/spi25.c =================================================================== --- flashrom-me.orig/spi25.c +++ flashrom-me/spi25.c @@ -916,8 +916,10 @@ int spi_nbyte_program(unsigned int addr, result = spi_send_multicommand(cmds); if (result) { - msg_cerr("%s failed during command execution at address 0x%x\n", - __func__, addr); + if (result != SPI_ACCESS_DENIED) { + msg_cerr("%s failed during command execution at address 0x%x\n", + __func__, addr); + } } return result; } @@ -970,7 +972,7 @@ int spi_nbyte_read(unsigned int address, */ int spi_read_chunked(struct flashchip *flash, uint8_t *buf, unsigned int start, unsigned int len, unsigned int chunksize) { - int rc = 0; + int rc = 0, chunk_status = 0; unsigned int i, j, starthere, lenhere, toread; unsigned int page_size = flash->page_size; @@ -990,12 +992,26 @@ int spi_read_chunked(struct flashchip *f /* Length of bytes in the range in this page. */ lenhere = min(start + len, (i + 1) * page_size) - starthere; for (j = 0; j < lenhere; j += chunksize) { + uint8_t *bytes = buf + starthere - start + j; + toread = min(chunksize, lenhere - j); - rc = spi_nbyte_read(starthere + j, buf + starthere - start + j, toread); - if (rc) - break; + chunk_status = spi_nbyte_read(starthere + j, bytes, toread); + + if (chunk_status) { + if (ignore_error(chunk_status)) { + /* fill this chunk with 0xff bytes and + let caller know about the error */ + memset(bytes, 0xff, toread); + rc = chunk_status; + chunk_status = 0; + continue; + } else { + rc = chunk_status; + break; + } + } } - if (rc) + if (chunk_status) break; } Index: flashrom-me/flashrom.c =================================================================== --- flashrom-me.orig/flashrom.c +++ flashrom-me/flashrom.c @@ -583,6 +583,7 @@ int verify_range(struct flashchip *flash unsigned int i; uint8_t *readbuf = malloc(len); int ret = 0, failcount = 0; + unsigned int chunksize; if (!len) goto out_free; @@ -606,23 +607,35 @@ int verify_range(struct flashchip *flash if (!message) message = "VERIFY"; - ret = flash->read(flash, readbuf, start, len); - if (ret) { - msg_gerr("Verification impossible because read failed " - "at 0x%x (len 0x%x)\n", start, len); - return ret; - } + chunksize = min(flash->page_size, len); + for (i = 0; i < len; i += chunksize) { + int tmp, j; + + tmp = flash->read(flash, readbuf + i, start + i, chunksize); + + if (tmp) { + ret = tmp; + if (ignore_error(tmp)) { + chunksize = min(flash->page_size, len - i); + continue; + } else { + goto out_free; + } + } - for (i = 0; i < len; i++) { - if (cmpbuf[i] != readbuf[i]) { - /* Only print the first failure. */ - if (!failcount++) - msg_cerr("%s FAILED at 0x%08x! " - "Expected=0x%02x, Read=0x%02x,", - message, start + i, cmpbuf[i], - readbuf[i]); + for (j = 0; j < chunksize; j++) { + if (cmpbuf[i + j] != readbuf[i + j]) { + /* Only print the first failure. */ + if (!failcount++) + msg_cerr("%s FAILED at 0x%08x! " + "Expected=0x%02x, Read=0x%02x,", + message, start + i + j, cmpbuf[i + j], + readbuf[j]); + } } + chunksize = min(flash->page_size, len - i); } + if (failcount) { msg_cerr(" failed byte count from 0x%08x-0x%08x: 0x%x\n", start, start + len - 1, failcount); @@ -1057,6 +1070,16 @@ int verify_flash(struct flashchip *flash ret = verify_range(flash, buf, 0, total_size, NULL); + if (ret == ACCESS_DENIED) { + msg_gdbg("Could not fully verify due to access error, "); + if (access_denied_action == error_ignore) { + msg_gdbg("ignoring\n"); + ret = 0; + } else { + msg_gdbg("aborting\n"); + } + } + if (!ret) msg_cinfo("VERIFIED. \n"); @@ -1139,10 +1162,15 @@ int read_flash_to_file(struct flashchip ret = 1; goto out_free; } - if (flash->read(flash, buf, 0, size)) { - msg_cerr("Read operation failed!\n"); - ret = 1; - goto out_free; + + ret = flash->read(flash, buf, 0, size); + if (ret) { + if (ignore_error(ret)) { + ret = 0; + } else { + msg_cerr("Read operation failed!\n"); + goto out_free; + } } ret = write_buf_to_file(buf, size, filename); @@ -1243,8 +1271,14 @@ static int erase_and_write_block_helper( if (need_erase(curcontents, newcontents, len, gran)) { msg_cdbg("E"); ret = erasefn(flash, start, len); - if (ret) + if (ret) { + if (ret == ACCESS_DENIED) + msg_cdbg("D"); + else + msg_cerr("ERASE FAILED!\n"); return ret; + } + if (check_erased_range(flash, start, len)) { msg_cerr("ERASE FAILED!\n"); return -1; @@ -1262,8 +1296,11 @@ static int erase_and_write_block_helper( /* Needs the partial write function signature. */ ret = flash->write(flash, newcontents + starthere, start + starthere, lenhere); - if (ret) + if (ret) { + if (ret == ACCESS_DENIED) + msg_cdbg("D"); return ret; + } starthere += lenhere; skip = 0; } @@ -1284,7 +1321,7 @@ static int walk_eraseregions(struct flas unsigned int len)), void *param1, void *param2) { - int i, j; + int i, j, ret = 0; unsigned int start = 0; unsigned int len; struct block_eraser eraser = flash->block_erasers[erasefunction]; @@ -1300,15 +1337,19 @@ static int walk_eraseregions(struct flas msg_cdbg(", "); msg_cdbg("0x%06x-0x%06x", start, start + len - 1); - if (do_something(flash, start, len, param1, param2, - eraser.block_erase)) { - return 1; + ret = do_something(flash, start, len, param1, param2, + eraser.block_erase); + if (ret) { + if (ignore_error(ret)) + ret = 0; + else + return ret; } start += len; } } msg_cdbg("\n"); - return 0; + return ret; } static int check_block_eraser(const struct flashchip *flash, int k, int log) @@ -1695,7 +1736,7 @@ int doit(struct flashchip *flash, int fo { uint8_t *oldcontents; uint8_t *newcontents; - int ret = 0; + int ret = 0, tmp; unsigned long size = flash->total_size * 1024; if (chip_safety_check(flash, force, read_it, write_it, erase_it, verify_it)) { @@ -1768,10 +1809,15 @@ int doit(struct flashchip *flash, int fo * takes time as well. */ msg_cinfo("Reading old flash chip contents... "); - if (flash->read(flash, oldcontents, 0, size)) { - ret = 1; - msg_cinfo("FAILED.\n"); - goto out; + tmp = flash->read(flash, oldcontents, 0, size); + if (tmp) { + if (ignore_error(tmp)) { + msg_gdbg("ignoring error\n"); + } else { + ret = 1; + msg_cinfo("FAILED.\n"); + goto out; + } } msg_cinfo("done.\n"); 3-3_ichspi_deal_with_locked_regions.diff: Index: flashrom-me/ichspi.c =================================================================== --- flashrom-me.orig/ichspi.c +++ flashrom-me/ichspi.c @@ -983,6 +983,95 @@ static int run_opcode(OPCODE op, uint32_ } } +#define DEFAULT_NUM_FD_REGIONS 5 +static int num_fd_regions; + +const char *const region_names[] = { + "Flash Descriptor", "BIOS", "Management Engine", + "Gigabit Ethernet", "Platform Data" +}; + +enum fd_access_level { + FD_REGION_LOCKED, + FD_REGION_READ_ONLY, + FD_REGION_WRITE_ONLY, + FD_REGION_READ_WRITE, +}; + +struct fd_region_permission { + enum fd_access_level level; + const char *name; +} fd_region_permissions[] = { + /* order corresponds to FRAP bitfield */ + { FD_REGION_LOCKED, "locked" }, + { FD_REGION_READ_ONLY, "read-only" }, + { FD_REGION_WRITE_ONLY, "write-only" }, + { FD_REGION_READ_WRITE, "read-write" }, +}; + +/* FIXME: Replace usage of access_names with the region_access struct */ +const char *const access_names[4] = { + "locked", "read-only", "write-only", "read-write" +}; + +struct fd_region { + const char *name; + struct fd_region_permission *permission; + uint32_t base; + uint32_t limit; +} fd_regions[] = { + /* order corresponds to flash descriptor */ + { .name = "Flash Descriptor" }, + { .name = "BIOS" }, + { .name = "Management Engine" }, + { .name = "Gigabit Ethernet" }, + { .name = "Platform Data" }, +}; + +static int check_fd_permissions(OPCODE *opcode, uint32_t addr, int count) +{ + int i; + uint8_t type = opcode->spi_type; + int ret = 0; + + /* check flash descriptor permissions (if present) */ + for (i = 0; i < num_fd_regions; i++) { + const char *name = fd_regions[i].name; + enum fd_access_level level; + + if ((addr + count - 1 < fd_regions[i].base) || + (addr > fd_regions[i].limit)) + continue; + + if (!fd_regions[i].permission) { + msg_perr("No permissions set for flash region %s\n", + fd_regions[i].name); + break; + } + + level = fd_regions[i].permission->level; + + if (type == SPI_OPCODE_TYPE_READ_WITH_ADDRESS) { + if (level != FD_REGION_READ_ONLY && + level != FD_REGION_READ_WRITE) { + msg_pspew("%s: Cannot read address 0x%08x in " + "region %s\n", __func__,addr,name); + ret = SPI_ACCESS_DENIED; + } + } else if (type == SPI_OPCODE_TYPE_WRITE_WITH_ADDRESS) { + if (level != FD_REGION_WRITE_ONLY && + level != FD_REGION_READ_WRITE) { + msg_pspew("%s: Cannot write to address 0x%08x in" + "region %s\n", __func__,addr,name); + ret = SPI_ACCESS_DENIED; + } + } + break; + } + + return ret; +} + static int ich_spi_send_command(unsigned int writecnt, unsigned int readcnt, const unsigned char *writearr, unsigned char *readarr) { @@ -1045,19 +1134,6 @@ static int ich_spi_send_command(unsigned return SPI_INVALID_LENGTH; } - /* if opcode-type requires an address */ - if (opcode->spi_type == SPI_OPCODE_TYPE_READ_WITH_ADDRESS || - opcode->spi_type == SPI_OPCODE_TYPE_WRITE_WITH_ADDRESS) { - addr = (writearr[1] << 16) | - (writearr[2] << 8) | (writearr[3] << 0); - if (addr < ichspi_bbar) { - msg_perr("%s: Address 0x%06x below allowed " - "range 0x%06x-0xffffff\n", __func__, - addr, ichspi_bbar); - return SPI_INVALID_ADDRESS; - } - } - /* Translate read/write array/count. * The maximum data length is identical for the maximum read length and * for the maximum write length excluding opcode and address. Opcode and @@ -1076,6 +1152,24 @@ static int ich_spi_send_command(unsigned count = readcnt; } + /* if opcode-type requires an address */ + if (opcode->spi_type == SPI_OPCODE_TYPE_READ_WITH_ADDRESS || + opcode->spi_type == SPI_OPCODE_TYPE_WRITE_WITH_ADDRESS) { + addr = (writearr[1] << 16) | + (writearr[2] << 8) | (writearr[3] << 0); + if (addr < ichspi_bbar) { + msg_perr("%s: Address 0x%06x below allowed " + "range 0x%06x-0xffffff\n", __func__, + addr, ichspi_bbar); + return SPI_INVALID_ADDRESS; + } + if (num_fd_regions > 0) { + result = check_fd_permissions(opcode, addr, count); + if (result) + return result; + } + } + result = run_opcode(*opcode, addr, count, data); if (result) { msg_pdbg("Running OPCODE 0x%02x failed ", opcode->opcode); @@ -1421,32 +1515,25 @@ static int ich_spi_send_multicommand(str static void do_ich9_spi_frap(uint32_t frap, int i) { - static const char *const access_names[4] = { - "locked", "read-only", "write-only", "read-write" - }; - static const char *const region_names[5] = { - "Flash Descriptor", "BIOS", "Management Engine", - "Gigabit Ethernet", "Platform Data" - }; - uint32_t base, limit; int rwperms = (((ICH_BRWA(frap) >> i) & 1) << 1) | (((ICH_BRRA(frap) >> i) & 1) << 0); int offset = ICH9_REG_FREG0 + i * 4; uint32_t freg = mmio_readl(ich_spibar + offset); msg_pdbg("0x%02X: 0x%08x (FREG%i: %s)\n", - offset, freg, i, region_names[i]); + offset, freg, i, fd_regions[i].name); - base = ICH_FREG_BASE(freg); - limit = ICH_FREG_LIMIT(freg); - if (base > limit) { + fd_regions[i].base = ICH_FREG_BASE(freg); + fd_regions[i].limit = ICH_FREG_LIMIT(freg) | 0x0fff; + fd_regions[i].permission = &fd_region_permissions[rwperms]; + if (fd_regions[i].base > fd_regions[i].limit) { /* this FREG is disabled */ msg_pdbg("%s region is unused.\n", region_names[i]); return; } - msg_pdbg("0x%08x-0x%08x is %s\n", base, (limit | 0x0fff), - access_names[rwperms]); + msg_pdbg("0x%08x-0x%08x is %s\n", fd_regions[i].base, + fd_regions[i].limit, fd_regions[i].permission->name); } /* In contrast to FRAP and the master section of the descriptor the bits @@ -1460,9 +1547,6 @@ static void do_ich9_spi_frap(uint32_t fr static void prettyprint_ich9_reg_pr(int i) { - static const char *const access_names[4] = { - "locked", "read-only", "write-only", "read-write" - }; uint8_t off = ICH9_REG_PR0 + (i * 4); uint32_t pr = mmio_readl(ich_spibar + off); int rwperms = ICH_PR_PERMS(pr); @@ -1647,6 +1731,7 @@ int ich_init_spi(struct pci_dev *dev, ui ich_init_opcodes(); if (desc_valid) { + num_fd_regions = DEFAULT_NUM_FD_REGIONS; tmp2 = mmio_readw(ich_spibar + ICH9_REG_HSFC); msg_pdbg("0x06: 0x%04x (HSFC)\n", tmp2); prettyprint_ich9_reg_hsfc(tmp2); @@ -1664,15 +1749,15 @@ int ich_init_spi(struct pci_dev *dev, ui msg_pdbg("BRRA 0x%02x\n", ICH_BRRA(tmp)); /* Decode and print FREGx and FRAP registers */ - for (i = 0; i < 5; i++) + for (i = 0; i < num_fd_regions; i++) do_ich9_spi_frap(tmp, i); } /* try to disable PR locks before printing them */ if (!ichspi_lock) - for (i = 0; i < 5; i++) + for (i = 0; i < num_fd_regions; i++) ich9_set_pr(i, 0, 0); - for (i = 0; i < 5; i++) + for (i = 0; i < num_fd_regions; i++) prettyprint_ich9_reg_pr(i); tmp = mmio_readl(ich_spibar + ICH9_REG_SSFS); -- David Hendricks (dhendrix) Systems Software Engineer, Google Inc.
1
0
0
0
[commit] r1471 - trunk
by repository service
02 Dec '11
02 Dec '11
Author: stefanct Date: Fri Dec 2 22:48:17 2011 New Revision: 1471 URL:
http://flashrom.org/trac/flashrom/changeset/1471
Log: Add a bunch of new/tested stuff and various small changes 9 Tested mainboards: OK: - ABIT NF-M2S
http://www.flashrom.org/pipermail/flashrom/2011-October/008155.html
- ASUS P5K-VM
http://www.flashrom.org/pipermail/flashrom/2011-October/008172.html
- ASUS M5A99X EVO
http://www.flashrom.org/pipermail/flashrom/2011-October/008152.html
- ASUS Z8PE-D12
http://www.flashrom.org/pipermail/flashrom/2011-November/008195.html
- PC Engines Alix.2d3
http://www.flashrom.org/pipermail/flashrom/2011-November/008244.html
NOT OK: - ASUS P8H61 PRO
http://www.flashrom.org/pipermail/flashrom/2011-November/008308.html
- ASUS P8P67 (rev. 3.1)
http://www.flashrom.org/pipermail/flashrom/2011-November/008292.html
- MSI MS-7613 (Iona-GL8E)
http://www.flashrom.org/pipermail/flashrom/2011-November/008295.html
- MSI MS-7635 (H55M-ED55)
http://www.flashrom.org/pipermail/flashrom/2011-October/008167.html
- Supermicro X9SCL
http://www.flashrom.org/pipermail/flashrom/2011-November/008254.html
- ZOTAC H67-ITX WiFi
http://paste.flashrom.org/view.php?id=902
Tested flash chips: - mark Pm29F002T as TEST_OK_PREW
http://www.flashrom.org/pipermail/flashrom/2011-October/008171.html
- mark AMIC A49LF040A as TEST_OK_PREW
http://www.flashrom.org/pipermail/flashrom/2011-November/008244.html
- mark Winbond W39V040FC as TEST_OK_PREW
http://www.flashrom.org/pipermail/flashrom/2011-November/008281.html
- source format fixes Signed-off-by: Stefan Tauner <stefan.tauner(a)student.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner(a)student.tuwien.ac.at> Modified: trunk/flashchips.c trunk/print.c Modified: trunk/flashchips.c ============================================================================== --- trunk/flashchips.c Wed Nov 23 10:13:48 2011 (r1470) +++ trunk/flashchips.c Fri Dec 2 22:48:17 2011 (r1471) @@ -1288,7 +1288,7 @@ .total_size = 512, .page_size = 64 * 1024, .feature_bits = FEATURE_REGISTERMAP | FEATURE_EITHER_RESET, - .tested = TEST_OK_PRE, + .tested = TEST_OK_PREW, .probe = probe_jedec, .probe_timing = TIMING_ZERO, /* routine is wrapper to probe_jedec (pm49fl00x.c) */ .block_erasers = @@ -5204,9 +5204,9 @@ .total_size = 256, .page_size = 8 * 1024, .feature_bits = FEATURE_ADDR_2AA | FEATURE_EITHER_RESET, - .tested = TEST_OK_PRE, + .tested = TEST_OK_PREW, .probe = probe_jedec, - .probe_timing = TIMING_FIXME, + .probe_timing = TIMING_FIXME, .block_erasers = { { @@ -8649,7 +8649,7 @@ .total_size = 512, .page_size = 64 * 1024, .feature_bits = FEATURE_REGISTERMAP | FEATURE_EITHER_RESET, - .tested = TEST_UNTESTED, + .tested = TEST_OK_PREW, .probe = probe_jedec, .probe_timing = 10, .block_erasers = @@ -9027,6 +9027,7 @@ .probe = probe_spi_rdid, .write = NULL, }, + { .vendor = "Generic", .name = "unknown SPI chip (REMS)", Modified: trunk/print.c ============================================================================== --- trunk/print.c Wed Nov 23 10:13:48 2011 (r1470) +++ trunk/print.c Fri Dec 2 22:48:17 2011 (r1471) @@ -545,6 +545,7 @@ B("abit", "IS-10", 0, "
http://www.abit.com.tw/page/en/motherboard/motherboard_detail.php?pMODEL_NA…
", "Reported by deejkuba(a)aol.com to flashrom(a)coreboot.org, no public archive. Missing board enable and/or M50FW040 unlocking. May work now."), B("abit", "KN8 Ultra", 1, "
http://www.abit.com.tw/page/en/motherboard/motherboard_detail.php?DEFTITLE=…
", NULL), B("abit", "NF-M2 nView", 1, "
http://www.abit.com.tw/page/en/motherboard/motherboard_detail.php?fMTYPE=So…
", NULL), + B("abit", "NF-M2S", 1, "
http://www.abit.com.tw/page/en/motherboard/motherboard_detail.php?pMODEL_NA…
", NULL), B("abit", "NF7-S", 1, "
http://www.abit.com.tw/page/en/motherboard/motherboard_detail.php?fMTYPE=So…
", NULL), B("abit", "VA6", 1, "
http://www.abit.com.tw/page/en/motherboard/motherboard_detail.php?fMTYPE=Sl…
", NULL), B("abit", "VT6X4", 1, "
http://www.abit.com.tw/page/en/motherboard/motherboard_detail.php?fMTYPE=Sl…
", NULL), @@ -622,6 +623,7 @@ B("ASUS", "M4A79T Deluxe", 1, "
http://www.asus.com/product.aspx?P_ID=lhJiLTN5huPfCVkW
", NULL), B("ASUS", "M4A87TD/USB3", 1, "
http://www.asus.com/product.aspx?P_ID=nlWYrI9wlNIYHAaa
", NULL), B("ASUS", "M4A89GTD PRO", 1, "
http://www.asus.com/product.aspx?P_ID=Gdf0vtpVf72LTYgs
", NULL), + B("ASUS", "M5A99X EVO", 1, "
http://www.asus.com/Motherboards/AMD_AM3Plus/M5A99X_EVO/
", NULL), B("ASUS", "M6Ne", 0, "
http://www.asus.com/Product.aspx?P_ID=IbqN4JCxeRiep4WN
", "Untested board enable."), B("ASUS", "MEW-AM", 0, "ftp://ftp.asus.com.tw/pub/ASUS/mb/sock370/810/mew-am/", "No public report found. Owned by Uwe Hermann <uwe(a)hermann-uwe.de>. May work now."), B("ASUS", "MEW-VM", 0, "
http://www.elhvb.com/mboards/OEM/HP/manual/ASUS%20MEW-VM.htm
", "No public report found. Owned by Uwe Hermann <uwe(a)hermann-uwe.de>. May work now."), @@ -657,8 +659,10 @@ B("ASUS", "P5GDC Deluxe", 1, "
http://www.asus.com/product.aspx?P_ID=AbeoopyNpI2TZixg
", NULL), B("ASUS", "P5GDC-V Deluxe", 1, NULL, NULL), B("ASUS", "P5GD2/C variants", 0, NULL, "Untested board enable."), + B("ASUS", "P5K-VM", 1, "
http://www.asus.com/product.aspx?P_ID=EJybwaQ3J8goocW2
", NULL), B("ASUS", "P5KC", 1, "
http://www.asus.com/product.aspx?P_ID=fFZ8oUIGmLpwNMjj
", NULL), B("ASUS", "P5L-MX", 1, "
http://www.asus.com/product.aspx?P_ID=X70d3NCzH2DE9vWH
", NULL), + B("ASUS", "P5L-VM 1394", 1, "
http://www.asus.com/product.aspx?P_ID=G0BQ4fIXoM1P38TZ
", NULL), B("ASUS", "P5LD2", 0, NULL, "Untested board enable."), B("ASUS", "P5LP-LE (Lithium-UL8E)", 1, "
http://h10025.www1.hp.com/ewfrf/wc/document?docname=c00379616&tmp_task=prod…
", "This is an OEM board from HP."), B("ASUS", "P5LP-LE (Epson OEM)", 1, NULL, "This is an OEM board from Epson (e.g. Endeavor MT7700)."), @@ -677,7 +681,10 @@ B("ASUS", "P7H55-M LX", 0, NULL, "flashrom works correctly, but GbE LAN is nonworking (probably due to a missing/bogus MAC address; see
http://www.flashrom.org/pipermail/flashrom/2011-July/007432.html
and
http://ubuntuforums.org/showthread.php?t=1534389
for a possible workaround)"), B("ASUS", "P8B-E/4L", 0, NULL, "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."), B("ASUS", "P8B WS", 0, NULL, "Probing works (Winbond W25Q32, 4096 kB, SPI), but parts of the flash are problematic: descriptor is r/o (conforming to ICH reqs), ME region is locked."), + B("ASUS", "P8H61 PRO", 0, NULL, "Probing works (Winbond W25Q32, 4096 kB, SPI), but parts of the flash are problematic: descriptor is r/o (conforming to ICH reqs), ME region is locked."), + B("ASUS", "P8P67 (rev. 3.1)", 0, NULL, "Probing works (Macronix MX25L3205, 4096 kB, SPI), but parts of the flash are problematic: descriptor is r/o (conforming to ICH reqs), ME region is locked."), B("ASUS", "Z8NA-D6C", 1, "
http://www.asus.com/product.aspx?P_ID=k81cpN8uEB01BpQ6
", NULL), + B("ASUS", "Z8PE-D12", 1, "
http://www.asus.com/product.aspx?P_ID=z1K4qLpLmyLfwXtw
", NULL), B("BCOM", "WinNET100", 1, "
http://www.coreboot.org/BCOM_WINNET100
", "Used in the IGEL-316 thin client."), B("Biostar", "N68S3+", 1, NULL, NULL), B("Biostar", "M6TBA", 0, "
ftp://ftp.biostar-usa.com/manuals/M6TBA/
", "No public report found. Owned by Uwe Hermann <uwe(a)hermann-uwe.de>. May work now."), @@ -818,7 +825,9 @@ B("MSI", "MS-7529 (G31M3-L(S) V2)", 1, "
http://www.msi.com/product/mb/G31M3-L-V2---G31M3-LS-V2.html
", NULL), B("MSI", "MS-7529 (G31TM-P21)", 1, "
http://www.msi.com/product/mb/G31TM-P21.html
", NULL), B("MSI", "MS-7596 (785GM-E51)", 1, "
http://www.msi.com/product/mb/785GM-E51.html
", NULL), - B("MSI", "MS-7599 (870-C45)", 1, "
http://www.msi.com/product/mb/870-C45.html
", NULL), + B("MSI", "MS-7599 (870-C45)", 1, "
http://www.msi.com/product/mb/870-C45.html
", NULL), + B("MSI", "MS-7613 (Iona-GL8E)", 0, "
http://h10025.www1.hp.com/ewfrf/wc/document?docname=c02014355&lc=en&cc=dk&d…
", "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."), + B("MSI", "MS-7635 (H55M-ED55)", 0, "
http://www.msi.com/product/mb/H55M-ED55.html
", "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."), B("MSI", "MS-7640 (890FXA-GD70)",1, "
http://www.msi.com/product/mb/890FXA-GD70.html
", NULL), B("MSI", "MS-7642 (890GXM-G65)", 1, "
http://www.msi.com/product/mb/890GXM-G65.html
", NULL), B("MSI", "MS-7696 (A75MA-G55)", 1, "
http://www.msi.com/product/mb/A75MA-G55.html
", NULL), @@ -830,6 +839,7 @@ B("PC Engines", "Alix.1c", 1, "
http://pcengines.ch/alix1c.htm
", NULL), B("PC Engines", "Alix.2c2", 1, "
http://pcengines.ch/alix2c2.htm
", NULL), B("PC Engines", "Alix.2c3", 1, "
http://pcengines.ch/alix2c3.htm
", NULL), + B("PC Engines", "Alix.2d3", 1, "
http://pcengines.ch/alix2d3.htm
", NULL), B("PC Engines", "Alix.3c3", 1, "
http://pcengines.ch/alix3c3.htm
", NULL), B("PC Engines", "Alix.3d3", 1, "
http://pcengines.ch/alix3d3.htm
", NULL), B("PC Engines", "WRAP.2E", 1, "
http://pcengines.ch/wrap2e1.htm
", NULL), @@ -863,6 +873,7 @@ B("Supermicro", "X8DTU-F", 1, "
http://www.supermicro.com/products/motherboard/QPI/5500/X8DTU-F.cfm
", NULL), B("Supermicro", "X8SIE(-F)", 0, "
http://www.supermicro.com/products/motherboard/Xeon3000/3400/X8SIE.cfm?IPMI…
", "Requires unlocking the ME although the registers are set up correctly by the descriptor/BIOS already (tested with swseq and hwseq)."), B("Supermicro", "X8STi", 1, "
http://www.supermicro.com/products/motherboard/Xeon3000/X58/X8STi.cfm
", NULL), + B("Supermicro", "X9SCL", 0, "
http://www.supermicro.com/products/motherboard/Xeon/C202_C204/X9SCL.cfm
", "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."), B("T-Online", "S-100", 1, "
http://wiki.freifunk-hannover.de/T-Online_S_100
", NULL), B("Tekram", "P6Pro-A5", 1, "
http://www.motherboard.cz/mb/tekram/P6Pro-A5.htm
", NULL), B("Termtek", "TK-3370 (Rev:2.5B)", 1, NULL, NULL), @@ -911,6 +922,7 @@ B("VIA", "VB700X", 1, "
http://www.via.com.tw/en/products/mainboards/motherboards.jsp?motherboard_i…
", NULL), B("ZOTAC", "Fusion-ITX WiFi (FUSION350-A-E)", 1, NULL, NULL), B("ZOTAC", "GeForce 8200", 1, "
http://pden.zotac.com/index.php?page=shop.product_details&product_id=129&ca…
", NULL), + B("ZOTAC", "H67-ITX WiFi (H67ITX-C-E)", 0, NULL, "Probing works (Winbond W25Q32, 4096 kB, SPI), but parts of the flash are problematic: descriptor is r/o (conforming to ICH reqs), ME region is locked."), B("ZOTAC", "ZBOX HD-ID11", 1, "
http://pdde.zotac.com/index.php?page=shop.product_details&product_id=240&ca…
", NULL), #endif
1
0
0
0
Numonyx M25P40 - erase & write OK
by Nikita Schmidt
02 Dec '11
02 Dec '11
Hello, I have successfully used flashrom to program Numonyx M25P40-VMB6TPB, which identifies itself as an ST M25P40. The report is attached. Nikita
1
0
0
0
← Newer
1
...
12
13
14
15
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Results per page:
10
25
50
100
200