[coreboot] flashrom OPCODES for SPI

Николай Николаев evrinoma at gmail.com
Wed Dec 12 07:38:10 CET 2012


Sorry i can't find flashrom mailing list, maybe you help me.

i'm trying to reprogram spi chip with bios. My sdk-board is consist from
motherboard and especial board. Motherboard has own flash bios chip like a
mx25l6405 and chip SPI interface QM67. Especial board has a spi flash chip
sst25vf016. Used jumpers i'm easy select flash bios chip for programming,
and i select chip sst25vf016. Chip set QM67 is locked to change value
registers opcodes and preop codes. This is codes value match with mx25l6405
codes. And i can't reprogram selected chip, because opcodes select chip
didn't match with opcodes stored in QM67. In function
spi_write_status_register Flashrom source code algorithm  trying change
mode spi status register to write by sending unlock command  JEDEC_WRSR and
JEDEC_EWSR = 0x50. But preop codes register have a value JEDEC_WREN=0x06,
and don't have a value JEDEC_EWSR=0x50. And STATUS register can't be
unlocked, if i change value JEDEC_EWSR on 0x06 (chip sst25vf016 support
this code) the STATUS register is unlock successful.  And now we have a
read and erase function but function write doesn't work, because algorithm
use default_spi_write_aai function. That function use opcode
JEDEC_AAI_WORD_PROGRAMM but opcodes and preopcodes registers doesn't have
this code and we can't write new bios image in flash. But if we will be use
function spi_chip_write_1 we successful write our image into flash
chip sst25vf016.

What you think about, if we exclude some parameters from structure FLASHCTX
(like a feature_bits) and add array of OPCODES (with real opcodes for real
chip) and add function to detect access opcodes for used chips?

sorry for my English

with best regard Nikolay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20121212/722f357f/attachment.html>

More information about the coreboot mailing list