Attention is currently required from: Marc Jones, Martin L Roth, Patrick Rudolph, Jonathan Zhang, Paul Menzel, Rocky Phagura, Jingle Hsu, Angel Pons, Arthur Heymans, Morgan Jang, Kyösti Mälkki.
Johnny Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/49460 )
Change subject: cpu/x86/smm: Enable setting SMM console log level from mainboard ......................................................................
Patch Set 29:
(4 comments)
File src/cpu/x86/Kconfig:
https://review.coreboot.org/c/coreboot/+/49460/comment/2b66ea21_7d8098ae PS28, Line 217: This enables setting SMM console log level from mainboard, it can let : SMM have different log level than other stages for more flexibility.
“from mainboard” is ambiguous for me. Maybe keep using “at runtime”. […]
Done
https://review.coreboot.org/c/coreboot/+/49460/comment/be314e8f_275602f7 PS28, Line 219: certain data that requires searching
I do not know, what you mean here. […]
Rephrased "reading the log level from non-volatile memory such as flash VPD or CMOS is not very ideal to be done in SMM".
File src/cpu/x86/smm/smm_module_handler.c:
https://review.coreboot.org/c/coreboot/+/49460/comment/e321a1e1_e225c8bd PS28, Line 58: return smm_runtime.smm_log_level;
Can’t you do the check in C, and return 0 if `!IS_ENABLED(RUNTIME_CONFIGURABLE_SMM_LOGLEVEL)`?
Do you mean removing the preprocessor at line 55 '#if CONFIG(RUNTIME_CONFIGURABLE_SMM_LOGLEVEL)' and use C instead? That would cause build error "redefinition of 'get_console_loglevel'" when CONSOLE_OVERRIDE_LOGLEVEL is not selected. Or do you mean adding a check in the function? but smm_log_level would be set to 0 in src/cpu/x86/smm/smm_module_loader.c when RUNTIME_CONFIGURABLE_SMM_LOGLEVEL is not selected.
File src/include/cpu/x86/smm.h:
https://review.coreboot.org/c/coreboot/+/49460/comment/667a347f_62db060b PS28, Line 70: u8 smm_log_level;
In `src/console/init.c` `get_log_level()` returns int. […]
Done