Nico Huber has posted comments on this change. ( https://review.coreboot.org/17953 )
Change subject: Add option to read ROM layout from IFD ......................................................................
Patch Set 13:
(1 comment)
Using 'Flash_Descriptor' works, but still invalid for GbE which after some debugging seems to be absent from the layout struct.
Please paste a full log (taken with `-o logfile`). Which descrip- tor generation is it (in the flash)?
https://review.coreboot.org/#/c/17953/13/ich_descriptors.c File ich_descriptors.c:
PS13, Line 948: min(desc.content.NR + 1, ARRAY_SIZE(regions))
This seems to cause the problem. would i < ARRAY_SIZE(regions) && j < desc.
Um, no... `j` is used to index `layout->entries` and thus definitely must not rely on `desc` (only).
The code looks correct (for pre-Skylake descriptors). Maybe the issue is somewhere else? I might have broken something in read_ich_ descriptors_from_dump()...