Hello Keno,
On 27.10.21 20:59, Keno Fischer wrote:
I tried to update the BIOS firmware on this board (the GIGABYTE MZ242-G20 in a G292-Z40 chassis) using `flashrom -pinternal`. This did not work, as it failed to find an appropriate erase function. I subsequently re-flashed using the BMC, which recovered the machine. Investigating the .bin files at the various stages, it appears that the erase did actually work, except that regions below 0x01000000
I guess there's the issue, your flash chip is bigger than 16MiB, right? Support for >16MiB is known broken for Zen systems. The review for the commit that added the Zen support[1] mentions low quality of downstream commit messages that led to not knowing why the code was written as it is. So it can't be fixed without the original author looking into it. IMO, it looks borked. Why it was merged in this state is a mystery to me. I tried to get the submitter to look into it without success.
If you want, I could write a patch that you could test? I'd simply remove the inexplicable code. Worth a shot, IMO.
However, without risking to break somebody else's use case there is not much that can be done upstream as AMD doesn't publish datasheets for their chips (better to avoid AMD if one wants free software, IMHO; they release some code from time to time, but they don't support free software developers with the necessary documentation).
Nico
[1] https://review.coreboot.org/c/flashrom/+/44073/comment/98f16693_5ef6976a/