[coreboot-gerrit] Patch merged into coreboot/master: 809aaeb Refactor usage of walkcbfs to permit access to CBFS headers

gerrit at coreboot.org gerrit at coreboot.org
Mon Dec 9 19:56:59 CET 2013


the following patch was just integrated into master:
commit 809aaebd6ba6bec6bc76829d058388c57a32ba6b
Author: Alexandru Gagniuc <mr.nuke.me at gmail.com>
Date:   Sun Dec 8 01:13:43 2013 -0600

    Refactor usage of walkcbfs to permit access to CBFS headers
    
    walkcbfs() is used only with ROMCC. Besides finding stages during the
    bootblock, it's also used when applying microcode updates during the
    bootblock phase. The function used to return only a pointer to the data of
    the CBFS file, while making the header completely inaccessible. Since the
    header contains the length of the CBFS file, the caller did not have a way
    to know how long the data was. Then, other conventions had to be used to
    determine the EOF, which might present problems if the user replaces the
    CBFS file. This is not an issue when jumping to a stage (romstage), but can
    present problems when accessing a microcode file which has not been
    NULL-terminated.
    
    Refactor walkcbfs_asm to return a pointer to the CBFS file header rather
    than the data. Rename walkcbfs() to walkcbfs_head(), and reimplement a new
    walkcbfs() based on walkcbfs_head(). Thus current usage of walkcbfs()
    remains unaffected.
    The code has been verified to run successfully under qemu.
    
    Subsequent patches will change usage of walkcbfs() to walkcbfs_head where
    knowing the length of the data is needed.
    
    Change-Id: I21cbf19e130e1480e2749754e5d5130d36036f8e
    Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>


See http://review.coreboot.org/4504 for details.

-gerrit



More information about the coreboot-gerrit mailing list