Johnny Lin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/45326 )
Change subject: mb/ocp/deltalake: Select CONSOLE_VPD_OVERRIDE_LOGLEVEL ......................................................................
mb/ocp/deltalake: Select CONSOLE_VPD_OVERRIDE_LOGLEVEL
And set CONSOLE_VPD_DEFAULT_LOGLEVEL to 4 if the VPD variable is not found.
Change-Id: I36d4b01b6fb6acc726749641df089cb3f9a4dc3e Signed-off-by: Johnny Lin johnny_lin@wiwynn.com --- M src/mainboard/ocp/deltalake/Kconfig 1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/45326/1
diff --git a/src/mainboard/ocp/deltalake/Kconfig b/src/mainboard/ocp/deltalake/Kconfig index b229c94..9fab7de 100644 --- a/src/mainboard/ocp/deltalake/Kconfig +++ b/src/mainboard/ocp/deltalake/Kconfig @@ -3,6 +3,7 @@ config BOARD_SPECIFIC_OPTIONS def_bool y select BOARD_ROMSIZE_KB_65536 + select CONSOLE_VPD_OVERRIDE_LOGLEVEL select FSP_CAR select HAVE_ACPI_TABLES select MAINBOARD_USES_FSP2_0 @@ -51,4 +52,8 @@ bool default y
+config CONSOLE_VPD_DEFAULT_LOGLEVEL + int + default 4 + endif # BOARD_OCP_DELTALAKE
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45326 )
Change subject: mb/ocp/deltalake: Select CONSOLE_VPD_OVERRIDE_LOGLEVEL ......................................................................
Patch Set 1: Code-Review+1
Hello build bot (Jenkins), Jonathan Zhang, Jingle Hsu, Angel Pons, Rocky Phagura, Morgan Jang,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45326
to look at the new patch set (#2).
Change subject: mb/ocp/deltalake: Select CONSOLE_VPD_OVERRIDE_LOGLEVEL ......................................................................
mb/ocp/deltalake: Select CONSOLE_VPD_OVERRIDE_LOGLEVEL
Tested=On OCP Delta Lake, loglevel can be changed via VPD.
Change-Id: I36d4b01b6fb6acc726749641df089cb3f9a4dc3e Signed-off-by: Johnny Lin johnny_lin@wiwynn.com --- M src/mainboard/ocp/deltalake/Kconfig 1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/45326/2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45326 )
Change subject: mb/ocp/deltalake: Select CONSOLE_VPD_OVERRIDE_LOGLEVEL ......................................................................
Patch Set 2: Code-Review+2
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45326 )
Change subject: mb/ocp/deltalake: Select CONSOLE_VPD_OVERRIDE_LOGLEVEL ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45326/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/45326/2//COMMIT_MSG@9 PS2, Line 9: loglevel log level
Hello build bot (Jenkins), Jonathan Zhang, Jingle Hsu, Angel Pons, Rocky Phagura, Morgan Jang,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45326
to look at the new patch set (#3).
Change subject: mb/ocp/deltalake: Select CONSOLE_VPD_OVERRIDE_LOGLEVEL ......................................................................
mb/ocp/deltalake: Select CONSOLE_VPD_OVERRIDE_LOGLEVEL
Tested=On OCP Delta Lake, log level can be changed via VPD.
Change-Id: I36d4b01b6fb6acc726749641df089cb3f9a4dc3e Signed-off-by: Johnny Lin johnny_lin@wiwynn.com --- M src/mainboard/ocp/deltalake/Kconfig 1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/45326/3
Johnny Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45326 )
Change subject: mb/ocp/deltalake: Select CONSOLE_VPD_OVERRIDE_LOGLEVEL ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45326/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/45326/2//COMMIT_MSG@9 PS2, Line 9: loglevel
log level
Done
Hello build bot (Jenkins), Jonathan Zhang, Jingle Hsu, Angel Pons, Rocky Phagura, Morgan Jang,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45326
to look at the new patch set (#5).
Change subject: mb/ocp/deltalake: Select CONSOLE_VPD_OVERRIDE_LOGLEVEL ......................................................................
mb/ocp/deltalake: Select CONSOLE_VPD_OVERRIDE_LOGLEVEL
Tested=On OCP Delta Lake, log level can be changed via VPD.
Change-Id: I36d4b01b6fb6acc726749641df089cb3f9a4dc3e Signed-off-by: Johnny Lin johnny_lin@wiwynn.com --- M src/mainboard/ocp/deltalake/Kconfig 1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/45326/5
Hello build bot (Jenkins), Jonathan Zhang, Jingle Hsu, Angel Pons, Rocky Phagura, Morgan Jang,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45326
to look at the new patch set (#6).
Change subject: mb/ocp/deltalake: Override coreboot log level via VPD ......................................................................
mb/ocp/deltalake: Override coreboot log level via VPD
Tested=On OCP Delta Lake, log level can be changed via VPD.
Change-Id: I36d4b01b6fb6acc726749641df089cb3f9a4dc3e Signed-off-by: Johnny Lin johnny_lin@wiwynn.com --- M src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/Makefile.inc A src/mainboard/ocp/deltalake/loglevel_vpd.c 3 files changed, 23 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/45326/6
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Jonathan Zhang, Jingle Hsu, Angel Pons, Rocky Phagura, Morgan Jang,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45326
to look at the new patch set (#9).
Change subject: mb/ocp/deltalake: Override coreboot log level via VPD ......................................................................
mb/ocp/deltalake: Override coreboot log level via VPD
Tested=On OCP Delta Lake, log level can be changed via VPD.
Change-Id: I36d4b01b6fb6acc726749641df089cb3f9a4dc3e Signed-off-by: Johnny Lin johnny_lin@wiwynn.com --- M src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/Makefile.inc A src/mainboard/ocp/deltalake/loglevel_vpd.c 3 files changed, 23 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/45326/9
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Jonathan Zhang, Jingle Hsu, Angel Pons, Rocky Phagura, Morgan Jang,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45326
to look at the new patch set (#10).
Change subject: mb/ocp/deltalake: Override coreboot log level via VPD ......................................................................
mb/ocp/deltalake: Override coreboot log level via VPD
Tested=On OCP Delta Lake, log level can be changed via VPD.
Change-Id: I36d4b01b6fb6acc726749641df089cb3f9a4dc3e Signed-off-by: Johnny Lin johnny_lin@wiwynn.com --- M src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/Makefile.inc A src/mainboard/ocp/deltalake/loglevel_vpd.c 3 files changed, 24 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/45326/10
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Jonathan Zhang, Jingle Hsu, Angel Pons, Rocky Phagura, Morgan Jang,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45326
to look at the new patch set (#11).
Change subject: mb/ocp/deltalake: Override coreboot log level via VPD ......................................................................
mb/ocp/deltalake: Override coreboot log level via VPD
Tested=On OCP Delta Lake, log level can be changed via VPD.
Change-Id: I36d4b01b6fb6acc726749641df089cb3f9a4dc3e Signed-off-by: Johnny Lin johnny_lin@wiwynn.com --- M src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/Makefile.inc A src/mainboard/ocp/deltalake/loglevel_vpd.c M src/mainboard/ocp/deltalake/vpd.h 4 files changed, 25 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/45326/11
Hello build bot (Jenkins), Patrick Georgi, Martin Roth, Jonathan Zhang, Jingle Hsu, Angel Pons, Rocky Phagura, Morgan Jang,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45326
to look at the new patch set (#13).
Change subject: mb/ocp/deltalake: Override coreboot log level via VPD ......................................................................
mb/ocp/deltalake: Override coreboot log level via VPD
Tested=On OCP Delta Lake, log level can be changed via VPD.
Change-Id: I36d4b01b6fb6acc726749641df089cb3f9a4dc3e Signed-off-by: Johnny Lin johnny_lin@wiwynn.com --- M src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/Makefile.inc A src/mainboard/ocp/deltalake/loglevel_vpd.c M src/mainboard/ocp/deltalake/vpd.h 4 files changed, 25 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/45326/13
Jonathan Zhang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45326 )
Change subject: mb/ocp/deltalake: Override coreboot log level via VPD ......................................................................
Patch Set 13: Code-Review+1
Marc Jones has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45326 )
Change subject: mb/ocp/deltalake: Override coreboot log level via VPD ......................................................................
Patch Set 13: Code-Review+2
Hello Marc Jones, build bot (Jenkins), Patrick Georgi, Martin Roth, Jonathan Zhang, Jingle Hsu, Angel Pons, Rocky Phagura, Morgan Jang,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45326
to look at the new patch set (#14).
Change subject: mb/ocp/deltalake: Override coreboot log level via VPD ......................................................................
mb/ocp/deltalake: Override coreboot log level via VPD
Tested=On OCP Delta Lake, log level can be changed via VPD.
Change-Id: I36d4b01b6fb6acc726749641df089cb3f9a4dc3e Signed-off-by: Johnny Lin johnny_lin@wiwynn.com --- M src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/Makefile.inc A src/mainboard/ocp/deltalake/loglevel_vpd.c M src/mainboard/ocp/deltalake/vpd.h 4 files changed, 26 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/45326/14
Hello Marc Jones, build bot (Jenkins), Patrick Georgi, Martin Roth, Jonathan Zhang, Jingle Hsu, Angel Pons, Rocky Phagura, Morgan Jang,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45326
to look at the new patch set (#15).
Change subject: mb/ocp/deltalake: Override coreboot log level via VPD ......................................................................
mb/ocp/deltalake: Override coreboot log level via VPD
Tested=On OCP Delta Lake, log level can be changed via VPD.
Change-Id: I36d4b01b6fb6acc726749641df089cb3f9a4dc3e Signed-off-by: Johnny Lin johnny_lin@wiwynn.com --- M src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/Makefile.inc A src/mainboard/ocp/deltalake/loglevel_vpd.c M src/mainboard/ocp/deltalake/vpd.h 4 files changed, 26 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/45326/15
Jonathan Zhang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45326 )
Change subject: mb/ocp/deltalake: Override coreboot log level via VPD ......................................................................
Patch Set 15: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/45326 )
Change subject: mb/ocp/deltalake: Override coreboot log level via VPD ......................................................................
mb/ocp/deltalake: Override coreboot log level via VPD
Tested=On OCP Delta Lake, log level can be changed via VPD.
Change-Id: I36d4b01b6fb6acc726749641df089cb3f9a4dc3e Signed-off-by: Johnny Lin johnny_lin@wiwynn.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/45326 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Jonathan Zhang jonzhang@fb.com --- M src/mainboard/ocp/deltalake/Kconfig M src/mainboard/ocp/deltalake/Makefile.inc A src/mainboard/ocp/deltalake/loglevel_vpd.c M src/mainboard/ocp/deltalake/vpd.h 4 files changed, 26 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Jonathan Zhang: Looks good to me, approved
diff --git a/src/mainboard/ocp/deltalake/Kconfig b/src/mainboard/ocp/deltalake/Kconfig index ff5599c..bb907f1 100644 --- a/src/mainboard/ocp/deltalake/Kconfig +++ b/src/mainboard/ocp/deltalake/Kconfig @@ -3,6 +3,7 @@ config BOARD_SPECIFIC_OPTIONS def_bool y select BOARD_ROMSIZE_KB_65536 + select CONSOLE_OVERRIDE_LOGLEVEL select HAVE_ACPI_TABLES select MAINBOARD_USES_FSP2_0 select SOC_INTEL_COOPERLAKE_SP diff --git a/src/mainboard/ocp/deltalake/Makefile.inc b/src/mainboard/ocp/deltalake/Makefile.inc index be6af24..e961a34 100644 --- a/src/mainboard/ocp/deltalake/Makefile.inc +++ b/src/mainboard/ocp/deltalake/Makefile.inc @@ -7,6 +7,6 @@
ramstage-y += ramstage.c ipmi.c ramstage-$(CONFIG_HAVE_ACPI_TABLES) += fadt.c - +all-$(CONFIG_CONSOLE_OVERRIDE_LOGLEVEL) += loglevel_vpd.c CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/include CPPFLAGS_common += -I$(CONFIG_FSP_HEADER_PATH) diff --git a/src/mainboard/ocp/deltalake/loglevel_vpd.c b/src/mainboard/ocp/deltalake/loglevel_vpd.c new file mode 100644 index 0000000..3faf37a --- /dev/null +++ b/src/mainboard/ocp/deltalake/loglevel_vpd.c @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <console/console.h> +#include <drivers/vpd/vpd.h> +#include <string.h> + +#include "vpd.h" + +int get_console_loglevel(void) +{ + int log_level = COREBOOT_LOG_LEVEL_DEFAULT; + char val_str[VPD_LEN]; + + if (vpd_gets(COREBOOT_LOG_LEVEL, val_str, VPD_LEN, VPD_RW_THEN_RO)) { + log_level = (int)atol(val_str); + if (log_level < 0 || log_level >= BIOS_NEVER) + log_level = COREBOOT_LOG_LEVEL_DEFAULT; + } + return log_level; +} diff --git a/src/mainboard/ocp/deltalake/vpd.h b/src/mainboard/ocp/deltalake/vpd.h index ae2099d..43070c2 100644 --- a/src/mainboard/ocp/deltalake/vpd.h +++ b/src/mainboard/ocp/deltalake/vpd.h @@ -32,4 +32,8 @@ #define FSP_DCI "fsp_dci_enable" /* 1 or 0: enable or disable DCI */ #define FSP_DCI_DEFAULT 0 /* Default value when the VPD variable is not found */
+/* coreboot log level */ +#define COREBOOT_LOG_LEVEL "coreboot_log_level" +#define COREBOOT_LOG_LEVEL_DEFAULT 4 + #endif