how to use spi flash BIOS/Host firmware??

Milton Miller II miltonm at us.ibm.com
Wed Sep 11 07:46:23 AEST 2019


On September 10, 2019, Byron <ouyangxuan10 at 163.com> wrote:

>Dear all,
>
>    I want to ask a question about how to spi driver flash host/bios
>firmware? I don't want use mtd mode flash it, because the mtd mode
>need read spi-id when BMC load spi driver, may be it is risky, it
>need switch the  system spi to BMC when the host running, It may
>break host startup. Do we have other solutions to solve this problem?
>

Indeed, we did have some initial hand-off issues especially as the 
Linux kernel spi nor layer matured.  Over time the assumptions that 
the bios had that the chip would be set to 4-byte addressing by 
default were not met by the kernel driver which switched to using 
4-byte specific read and write commands.

You probably have a few options:

If you host is read-only, you can allocate a block of dram 
and point the lpc window to the dram.  The aspeed lpc 
controller drivers has ioctl calls for this.

If you host is directly connected to the chip and you are 
using the spi mode mux, then you would need to handshake 
with your bios.

If your host is using lpc to the aspeed chip and programming 
the controller directly, you probably have given full overtake 
of your bmc to the host.

In Openpower systems, we have implemented a protocol to map 
sections of the SPI rom into memory, and use IPMI messages 
to page in and out windows from this access window in memory 
to the backing SPI chip. We also have a method.

If you are not using an aspeed bmc soc, some of these details
may be different in your system.

>thanks,
>Byron 
>

I hope this can give you some thoughts to pursue.
milton



More information about the openbmc mailing list