[flashrom] [PATCH] revamp the warning of failing to set BIOS write enable in enable_flash_ich

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Wed Sep 14 00:27:47 CEST 2011


Am 20.06.2011 15:15 schrieb Stefan Tauner:
> and if we are at it... shouldn't we tell the user, that writes will
> most probably fail in cases where we could not enable bios writes?

Ah, you assume that this is an interface similar to SPI where commands
exist. That is not the case.
Parallel/LPC/FWH flash uses normal reads/writes as commands, and the
state machine inside the flash chip decides whether a write is indeed a
write of the flash chip or rather a command sent to the flash chip. Due
to that, a Parallel/LPC/FWH programmer with disabled write can't even
probe because the probe function uses writes which are treated as
commands by the chip.
If you want an appropriate warning, it should be something like this:
"Could not enable full flash access on chipset FOO. flashrom may be
unable to find the flash chip and/or write to it."


> e.g. the dell optiplex in the "It is hard to report a bug...."-thread:
> BIOS Lock Enable: enabled, BIOS Write Enable: disabled, BIOS_CNTL is 0x2
> tried to set 0xdc to 0x3 on ICH8/ICH8R failed (WARNING ONLY)
>
> as far as i understand this, an SMI is triggered and in this case the
> SMM prohibits us from setting the BIOS WE bit, but this may not be
> always the case. is there a way around it? i don't know enough about SMM
> to be sure if that's correct.
>
> in any case we won't be able to erase/write if the WE bit is not set and
> we should indicate this clearly to the user imho. what do you think?

Sure, warning the user is good. But please consider the problems
outlined above.


Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/





More information about the flashrom mailing list