Johnny Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45134 )
Change subject: lib: Add config MAINBOARD_OPTIONS for getting options from mainboard ......................................................................
Patch Set 12:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45134/12/src/include/option.h File src/include/option.h:
https://review.coreboot.org/c/coreboot/+/45134/12/src/include/option.h@25 PS12, Line 25: mainboard_get_option
I guess I don't completely understand what the mainboard_get_option is supposed to be. […]
The purpose of the change was to integrate getting debug log level from a mainboard defined function with get_option() API, so a generic mainboard_get_option() was added in get_option(). But if it makes more sense to make it specific to the method of getting the option, I can revert mainboard_get_option and only focus on the console log level part. Something like below: console/init.c static void init_log_level(void) { int debug_level = CONFIG_DEFAULT_CONSOLE_LOGLEVEL; if(CONFIG(CONSOLE_OVERRIDE_LOGLEVEL)) debug_level = get_console_loglevel(); else get_option(&debug_level, "debug_level");
set_log_level(debug_level); } To limit the scope of this change I am leaning toward this direction, to integrate into get_option requires more discussion.