Attention is currently required from: Subrata Banik, Tim Wawrzynczak, Angel Pons, EricR Lai. Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/60470 )
Change subject: console: Create helper function to get max console log level ......................................................................
Patch Set 1: Code-Review+1
(4 comments)
Patchset:
PS1: Thanks! Just two minor issues.
File src/console/init.c:
https://review.coreboot.org/c/coreboot/+/60470/comment/a725fc90_5fa5a967 PS1, Line 50: if (console_level == CONSOLE_LOG_NONE) : return BIOS_NEVER; This seems tricky. BIOS_NEVER is actually the highest (above SPEW) level. If you read get_max_console_log_level() as "give me the maximum allowed level", we'd actually say everything up to and including BIOS_NEVER is allowed.
I guess we could drop this and let it run into the return 0 (or -1) at the end?
https://review.coreboot.org/c/coreboot/+/60470/comment/62bbf1c1_a0275e58 PS1, Line 60: return 0; 0 is BIOS_EMERG. If we wanted to forbid all output (IMO valid on this fallback path), we could return -1. WDYT?
File src/include/console/console.h:
https://review.coreboot.org/c/coreboot/+/60470/comment/22dbed10_55479065 PS1, Line 67: static inline int console_log_level(int msg_level) { return 0; } We should have a similar dummy here.