Hi Niko, thank you for looking into this
If the boot_device_ro from mmap_boot.c is being used, I don't see how the flash content gets mapped into top of the 4GB space. In case of Apollo Lake, there is a special implementation. But for the rest of x86 there is nothing. Is there something I missed in the SKL+ specification that says that the BIOS is mapped into memory automatically? For now if I use boot_device_ro as a backing device for MRC reads, I am getting 0xFF all around, resulting in cache slot treated as uninitialized.
PS How should I provide my .config - attachment or inline? ________________________________________ From: Nico Huber nico.h@gmx.de Sent: Tuesday, June 4, 2019 3:33 PM To: Alex Feinman; coreboot@coreboot.org Subject: Re: [coreboot] MRC cache save/readback failure (SKL/KBL)
Hi Alex,
On 04.06.19 22:27, Alex Feinman wrote:
In my Coreboot build (derived from kblrvp configuration) based on 4.9 label I am seeing that MRC test is run on every boot. From what I can tell, what happens is:
- On first boot the MRC cache is not found (correct). MRC test is done
and the MRC cache is saved successfully. If I pull the BIOS image down, I can see valid contents of the MRC cache where they are supposed to be 2) On the second boot MRC verification fails because rdev_mmap does not have .mmap method in the rdev ops. Since this rdev is based on boot_device_rw_nommap, this seems to be both intended and clearly wrong.
this is odd. AFAIK, it should use boot_device_ro (src/arch/x86/ mmap_boot.c).
I'm open to suggestions
Share your code. The FMD format alone provides enough flexibility that it's impossible to tell what could go wrong. Also, your .config might contain some spurious setting (though, I don't see how it could result in using the rdev).
Nico