[coreboot] Intel PCH: When is the code for SPI flash reading used?

Aaron Durbin adurbin at google.com
Fri May 5 05:05:26 CEST 2017


On Thu, May 4, 2017 at 4:16 PM, Marek Behun <kabel at blackhole.sk> wrote:
> Hello,
>
> is the code for SPI flash reading (from src/drivers/spi/spi_flash.c)
> used at all? From what I understood when reading Intel PCH datasheets,
> the SPI controller alone reads the whole BIOS. Is this wrong? Does the
> SPI controller read only the bootblock (on ThinkPad X230, for example),
> and the bootblock then reads the rest?
>

It is for certain platforms. But for the boot spi on Intel machine's
that's all abstracted away. If you look at spi_flash_probe() there's a
call to spi_flash_programmer_probe() which does a magic binding of a
spi flash that allows these specialized spi flash controllers on
chipsets like Intel's to provide the spi flash implementation. More
generic spi controllers with a spi flash hanging off of them would use
the code you are likely referring to. If you were talking about the
memory mapped reading of spi flash in the CPU's address space that's
all done within the hardware proper responding to the CPU's memory
read transaction.

> Thank you.
>
> Marek
>
> --
> coreboot mailing list: coreboot at coreboot.org
> https://mail.coreboot.org/mailman/listinfo/coreboot



More information about the coreboot mailing list