Jonathan Zhang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45134 )
Change subject: console: Override coreboot log level via VPD variable ......................................................................
Patch Set 3: Code-Review+1
Patch Set 3:
Patch Set 3:
Patch Set 2:
Patch Set 2:
Patch Set 2:
I guess this could be moved to some generic location?
Maybe drivers/vpd or src/console and add a new config option for this?
src/console makes more sense to me. The input may be come from VPD, or something else (depending on platform). So:
- Use the CONFIG_DEFAULT_CONSOLE_LOGLEVEL_* as default.
- If CONFIG_CONSOLE_LOGLEVEL_OVERRIDE is defined, call a platform specific function to get the desired log level, and use it.
- Deltalake platform code implements the platform specific function which queries COREBOOT_LOG_LEVEL vpd variable.
CONFIG_CONSOLE_LOGLEVEL_OVERRIDE and CONFIG_DEFAULT_CONSOLE_LOGLEVEL_* are mutual exclusive, so I need to add CONSOLE_VPD_DEFAULT_LOGLEVEL as the fallback default loglevel. Added loglevel_vpd.c to be the general code instead of mainboard-specific implementation per Patrick's request.
We can do this to make them not mutually exclusive, and not to include another Kconfig option:
- Use the CONFIG_DEFAULT_CONSOLE_LOGLEVEL_* as default, if CONFIG_CONSOLE_LOGLEVEL_OVERRIDE is not defined.
- If CONFIG_CONSOLE_LOGLEVEL_OVERRIDE is defined, call a platform specific function to get the desired log level, and use it.
** If the platform specific function does not return a desired log level, fall back to the log level defined by CONFIG_DEFAULT_CONSOLE_LOGLEVEL_*.
- Deltalake platform code implements the platform specific function which queries COREBOOT_LOG_LEVEL vpd variable.
As committed through 4ecd42f9b52cd01b659c, DEFAULT_CONSOLE_LOGLEVEL_* are defined only when CONSOLE_OVERRIDE_LOGLEVEL is not selected. So I agree to add CONSOLE_VPD_DEFAULT_LOGLEVEL as the fallback default log level.