Balaji Sivakumar wrote:
Am working on adding a feature to upgrading the BIOS (complete IFD+ME+Coreboot) using intel-spi driver at the OS level. Able to successfully take the backup full 16MB spi nor flash data which includes IFD+ME+BIOS using flashrom Internal Programmer option and it is identified as Opaque flash chip and using dd command as well.
I believe identified as "Opaque flash chip" means that no positive identification was possible - this means that flashrom is not able to perform all the SPI commands it needs using this programmer method (internal) on this system.
I added a warning message to the flashrom output many years ago when a flash chip could not be positively identified, which said that erase and quite possibly also write can never work unless the chip is correctly identified.
But we are seeing the erase fail through both flashrom and flash_erase utility. I believe it fails to erase at the flash descriptor location.
As far as Read/Write access to the SPI regions, I have enabled the Host CPU BIOS write access and ME Master Access as 0xFFFF through Intel FIT Tool but still not able to erase it and it fails.
Is there anything that could be preventing to enable read/write access to the Intel flash descriptor or any SOC SPI controller protection to access the Flash descriptor?
I guess that since you work on a platform with ME hardware it is not intended to allow what you want to do.
As a first step you could try erasing the BIOS flash region, but I don't think that can work until flashrom successfully identifies the actual flash chip you are using. How to get there is unclear, but do run flashrom with verbose output and see if the OPMENU contains the SPI commands needed to identify, erase and write. I guess it might not.
//Peter