Hello Nico,
On Tuesday, March 29th, 2022 at 1:55 PM, Nico Huber wrote:
how did you confirm that it's correct? If you have a reference image, you can also run `ich_descriptors_tool` on it. If it doesn't see a descriptor, there probably is none.
Reading the chip will produce an image with identical SHA-256 hash everytime. I assumed that if the connection was flaky or other problems, this would not be the case. Running ich_descriptors_tool on the dumped image, indeed reveal that there is no descriptor:
The flash image has a size of 16777216 [0x1000000] bytes. Image not in descriptor mode.
However, the motherboard I'm working on is unbootable, so it could be that the dump is correct, but firmware in chip is very corrupted. Running strings on the dumped image also prints many readable strings e.g.:
Intel(R) Core(TM) i7 Intel(R) Xeon(R) Intel(R) Corporation EFI_LOAD_ERROR EFI_INVALID_PARAMETER EFI_UNSUPPORTED #PF - Page-Fault #GP - General Protection #SS - Stack Fault Fault
The valid firmware image I'm trying to write (firmware.bin) does contain a descriptor:
The flash image has a size of 16777216 [0x1000000] bytes. Assuming chipset '100 series Sunrise Point'. === Content Section === FLVALSIG 0x0ff0a55a FLMAP0 0x00040003 FLMAP1 0x5a100208 FLMAP2 0x00310330
--- Details --- NR (Number of Regions): 10 FRBA (Flash Region Base Address): 0x040 ...
The chipset is the 200-series "Union Lake", as not currently supported by the ich_descriptor_tool, but apart from that, everything looks fine.
Right now it occurs to me that I have misunderstood the --ifd flag. Just reading the output of --help, I assumed that the descriptor was read from the firmware image, but manpage says "...The on-chip descriptor will be read and used to generate the layout." Yikes, that won't work if the descriptor is corrupted on-chip.
I only wanted to flash fd, bios and me region to avoid overwriting correct MAC address in gbe region. Of course this could also be corrupted on-chip, but I would like to give it a try before overwriting everything.
The ifdtool from coreboot has a --layout flag that I can run on the firmware image and generate a layout file, that I think flashrom can use with the --layout option. Then I only need to change --ifd to --layout layoutfile.txt and maybe it will work...
Annoyingly, I can't try this right away as the system is located in a remote location, so I will have to travel first. But does the above sound as a plausible reason for the problem?
Best regards, Pete Smith