diff mbox series

[v2,09/16] x86: coreboot: Show the BIOS date

Message ID 20210424045627.313802-8-sjg@chromium.org
State New
Delegated to: Bin Meng
Headers show
Series misc: Some more misc patches | expand

Commit Message

Simon Glass April 24, 2021, 4:56 a.m. UTC
The BIOS version may not be present, e.g. on a Chrome OS build. Add the
BIOS date as well, so we get some sort of indication of coreboot's
vintage.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2:
- Reorder declaration and use bios_date for the variable name

 board/coreboot/coreboot/coreboot.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Bin Meng May 10, 2021, 3:09 a.m. UTC | #1
On Sat, Apr 24, 2021 at 12:57 PM Simon Glass <sjg@chromium.org> wrote:
>
> The BIOS version may not be present, e.g. on a Chrome OS build. Add the
> BIOS date as well, so we get some sort of indication of coreboot's
> vintage.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v2:
> - Reorder declaration and use bios_date for the variable name
>
>  board/coreboot/coreboot/coreboot.c | 3 +++
>  1 file changed, 3 insertions(+)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
diff mbox series

Patch

diff --git a/board/coreboot/coreboot/coreboot.c b/board/coreboot/coreboot/coreboot.c
index 175d3ce691a..11294d6e870 100644
--- a/board/coreboot/coreboot/coreboot.c
+++ b/board/coreboot/coreboot/coreboot.c
@@ -37,6 +37,7 @@  int show_board_info(void)
 		goto fallback;
 
 	const char *bios_ver = smbios_string(bios, t0->bios_ver);
+	const char *bios_date = smbios_string(bios, t0->bios_release_date);
 	const char *model = smbios_string(system, t1->product_name);
 	const char *manufacturer = smbios_string(system, t1->manufacturer);
 
@@ -46,6 +47,8 @@  int show_board_info(void)
 	printf("Vendor: %s\n", manufacturer);
 	printf("Model: %s\n", model);
 	printf("BIOS Version: %s\n", bios_ver);
+	if (bios_date)
+		printf("BIOS date: %s\n", bios_date);
 
 	return 0;