Thank you Peter for the details. Yes it is identifying it as opaque flash chip. We are able to completely read it but erase fails. 

I have unloaded the intel spi driver and added a support in flashrom for intel denverton. I could see still it identify as opaque flash chip. 

I understood from the logs of flashrom that SMM protection is enabled. Working on it to disable it. 

Thanks 
Balaji 

On Fri, Oct 16, 2020 at 8:11 AM Peter Stuge <peter@stuge.se> wrote:
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
_______________________________________________
coreboot mailing list -- coreboot@coreboot.org
To unsubscribe send an email to coreboot-leave@coreboot.org
--
Thanks,
Balaji
+1-319-573-9768