[coreboot] flashrom SB600 LPC vs SPI, ROM straps
peter at stuge.se
Wed Feb 4 04:40:16 CET 2009
Bao, Zheng wrote:
> This patch is about flashrom running on dbm690t.
> It was sent several months ago and hasn't got any response yet.
Thanks for sending it, and thank you very much for the reminder!
I sometimes forget about patches on the mailing list. Sorry for
> Now it deals with 3 problems.
> 1. Fix the bug that the flashrom would hang if there is not SPI
> chip. A timeout detection was added.
Carl-Daniel confirmed that flashrom hangs while trying to probe for
SPI flash chips, if the system is not using SPI.
> 2. We only access LPC ROM if we boot via LPC ROM. And only SPI ROM
> if we boot via SPI ROM. Doing crossly is not allowed. Anybody
> has better idea?
This is a good idea, but at the moment enable_flash_sb600() in
chipset_enable.c assumes that SB600 is always using SPI.
The best fix for 2. (and I believe it will also fix 1. without the
need for a timeout, but the timeout can be a good idea anyway) is to
make sure that enable_flash_sb600() sets
flashbus = BUS_TYPE_SB600_SPI;
only when SPI is actually used. In that case flashrom will not call
any SB600 SPI functions.
If the enable functions do not set flashbus then flashrom falls back
to assume direct CPU access, which will work correctly.
The SB600 RRG says that the BypassRom bits in FakeAsrEn (0xcd6 0x8f)
will only _override_ the strap setting, so I think that they can not
be used by software to read the ROM straps.
We need another method to find out what was used to boot the system.
The only way to more information that I can find is to read the LPC
ROM Address Range registers in the LPC/ISA bridge, register 0x68 and
test for the special value meaning that the LPC strap is disabled.
RRG page 256.
However: LPC being disabled does not mean that SPI is enabled. The
straps can also be FWH and PCI. How can we read the ROM straps?
> 3. When we read/write SPI, we use memory read/write instead of
> sending SPI command.
Yes, this is a really nice feature of the SB600! :)
More information about the coreboot