By using gdb, I can debug on QEMU. I can see in bootblock, romstage and postcar,
when USE_OPTION_TABLE is set, the debug_level option is always read, so there
is a cbfs_map_ro() in each stage. The buggy thing is in postcar stage, the cbfs mcache
cannot be found, so its size becomes zero, then all the files in the cbfs cannot be loaded
because of the mcache overflow, which results in failing to load the ramstage.

On Mon, Dec 7, 2020 at 12:18 PM Iru Cai <mytbk920423@gmail.com> wrote:
Confirmed on qemu-i440fx. It's strange that it already has different
behavior in romstage between setting and not setting
USE_OPTION_TABLE. I still don't know what is broken in this commit.

On Sun, Dec 06, 2020 at 11:24:11PM +0100, Merlin Büge wrote:
>
> 9d0cc2aea9 cbfs: Introduce cbfs_ro_map() and cbfs_ro_load()
> https://review.coreboot.org/c/coreboot/+/39306
>


--
My website: https://vimacs.lcpu.club

Please do not send me Microsoft Office/Apple iWork documents. Send OpenDocument instead! http://fsf.org/campaigns/opendocument/