I used chipsec to evaluate my hardware.
And I got following report:
[-] Software has write access to SPI flash descriptor
[-] FAILED: SPI flash permissions allow SW to write flash descriptor
I look at the chipsec source code and find that this is read from frap
register(SPIBAR + 50h).
However I can't find the spec how to read the SPI flash descriptor itself.
I find some code from flashrom:
It reads SPI flash descriptor using MMIO, but also I don't know how to
write it.(it has no effect when write to the same register with read).