Attention is currently required from: Marc Jones, Patrick Rudolph, Jonathan Zhang, Johnny Lin, Rocky Phagura, Jingle Hsu, Angel Pons, Arthur Heymans, Morgan Jang, Kyösti Mälkki. Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/49460 )
Change subject: cpu/x86/smm: Add log_level that can be overridden for SMM log level ......................................................................
Patch Set 9:
(2 comments)
Commit Message:
https://review.coreboot.org/c/coreboot/+/49460/comment/7e87d9ec_4697336f PS9, Line 16: for SMM. I couldn't find any discussion about this issue. Sorry if I just missed it somewhere else.
Please provide more details. For instance, is it too much time for every SMI? or is it generally too much time, even if you'd only query VPD once during boot in SMM?
Patchset:
PS9: I don't understand why OVERRIDE_CONSOLE_LOGLEVEL is used to guard here. Your VPD/SMM situation is not the only reason why it might be set. So guarding or not, you'd add the code for builds that wouldn't make use of it. That you need the `weak` declaration makes that obvious.
There's a lot of #if in .c files, please avoid that.
But maybe first, we should talk about your requirements; see inline comment. Probably a dumb question: Can't you just cache the loglevel in your get_console_loglevel() after its first invocation? Then the VPD code would only run once. Is that bad already?
If you really need to pass the loglevel from ramstage, I think you should do either of these two:
o Make passing the loglevel to SMM an option for everyone. Without the need for additional code.
o Use a generic mechanism to pass board-specific information into SMM. That it's about the console shouldn't be visible to the SMM-loader code.
But don't mix these things.