Attention is currently required from: Anjaneya "Reddy" Chagam, Jonathan Zhang, Johnny Lin.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47006 )
Change subject: mb/ocp/deltalake: Add SMM console log level override
......................................................................
Patch Set 3:
(1 comment)
File src/mainboard/ocp/deltalake/loglevel_vpd.c:
https://review.coreboot.org/c/coreboot/+/47006/comment/0dab655c_5e55688e
PS3, Line 26: int log_level = SMM_LOG_LEVEL_DEFAULT;
:
: if (vpd_get_int(SMM_LOG_LEVEL, VPD_RW_THEN_RO, (int *const) &log_level)) {
: if (log_level < 0 || log_level >= BIOS_NEVER)
: log_level = SMM_LOG_LEVEL_DEFAULT;
: }
: return log_level;
To avoid duplicating code, I would extract the common stuff into a helper function:
static int get_loglevel_from_vpd(const char *const key, const int fallback)
{
int log_level = fallback;
if (vpd_get_int(key, VPD_RW_THEN_RO, &log_level)) {
if (log_level < 0 || log_level >= BIOS_NEVER)
log_level = fallback;
}
return log_level;
}
--
To view, visit
https://review.coreboot.org/c/coreboot/+/47006
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I73afc944fbd6c21e884397f3049bd363e2c1ce2c
Gerrit-Change-Number: 47006
Gerrit-PatchSet: 3
Gerrit-Owner: Johnny Lin
Johnny_Lin@wiwynn.com
Gerrit-Reviewer: Angel Pons
th3fanbus@gmail.com
Gerrit-Reviewer: Anjaneya "Reddy" Chagam
anjaneya.chagam@intel.com
Gerrit-Reviewer: Arthur Heymans
arthur@aheymans.xyz
Gerrit-Reviewer: Jingle Hsu
jingle_hsu@wiwynn.com
Gerrit-Reviewer: Jonathan Zhang
jonzhang@fb.com
Gerrit-Reviewer: Martin Roth
martinroth@google.com
Gerrit-Reviewer: Morgan Jang
Morgan_Jang@wiwynn.com
Gerrit-Reviewer: Patrick Georgi
pgeorgi@google.com
Gerrit-Reviewer: Rocky Phagura
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-Attention: Anjaneya "Reddy" Chagam
anjaneya.chagam@intel.com
Gerrit-Attention: Jonathan Zhang
jonzhang@fb.com
Gerrit-Attention: Johnny Lin
Johnny_Lin@wiwynn.com
Gerrit-Comment-Date: Fri, 15 Jan 2021 10:05:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment