[coreboot] [flashrom] emit a warning if first byte of flash is 0x02?

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Mon May 11 23:22:17 CEST 2009

Hi Frieder,

On 11.05.2009 19:44, Frieder Ferlemann wrote:
> I don't know whether this proposal really makes sense
> but 8051 based Embedded Controlers are very likely to
> have 0x02 (the opcode for LJMP) at address 0x0000 and
> at some of its IRQ entry points at address 0x0003 + n*8
> It might be worth warning about because erasing/writing
> the flash while the EC is running might not be a good idea.

Right. How big can n get? I'd simply read address 0x0000 and all IRQ
entry points and check if more than m of them are 0x02.

> This posting was triggered by todays publication of:
> "Flash Programming for Dummies", A book by Carl-Daniel Hailfinger
> which specifically mentions interactions with embedded controlers.


> And a grep for "Embedded" "Controler" "EC" within the
> flashrom sources did not reveal a warning message.

Yes indeed. If you have more ideas about EC detection heuristics, please
tell us. Emitting a warning may be appropriate if we can make reasonably
sure that it won't trigger too many false positives.



More information about the coreboot mailing list