diff options
author | Vladimir Serbinenko <phcoder@gmail.com> | 2014-08-23 01:08:09 +0200 |
---|---|---|
committer | Vladimir Serbinenko <phcoder@gmail.com> | 2014-11-26 23:18:47 +0100 |
commit | 6ead253fbd39ef8f4a09795d8d921960e2498a7e (patch) | |
tree | 1211b4726c557b45699a1eaf3a0f2dec2e567256 /src | |
parent | 46a86f284fe30b9fd6c5709a6c57408766d1c05a (diff) | |
download | coreboot-6ead253fbd39ef8f4a09795d8d921960e2498a7e.tar.xz |
Export board-status info.
Rather than hunting version across compile tree in board_status,
export it by coreboot itself.
Change-Id: I7f055e6fc077134001ebdb11df7381bbdc71a1fc
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/6747
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/include/boot/coreboot_tables.h | 8 | ||||
-rw-r--r-- | src/include/version.h | 1 | ||||
-rw-r--r-- | src/lib/coreboot_table.c | 10 | ||||
-rw-r--r-- | src/lib/version.c | 1 |
4 files changed, 20 insertions, 0 deletions
diff --git a/src/include/boot/coreboot_tables.h b/src/include/boot/coreboot_tables.h index 19fc10cb4f..3dc8fb6d25 100644 --- a/src/include/boot/coreboot_tables.h +++ b/src/include/boot/coreboot_tables.h @@ -140,6 +140,14 @@ struct lb_string { uint8_t string[0]; }; +#define LB_TAG_VERSION_TIMESTAMP 0x0026 +struct lb_timestamp { + uint32_t tag; + uint32_t size; + uint32_t timestamp; +}; + + /* 0xe is taken by v3 */ #define LB_TAG_SERIAL 0x000f diff --git a/src/include/version.h b/src/include/version.h index 250cb27ea1..2a70842d9c 100644 --- a/src/include/version.h +++ b/src/include/version.h @@ -9,6 +9,7 @@ extern const char mainboard_part_number[]; extern const char coreboot_version[]; extern const char coreboot_extra_version[]; extern const char coreboot_build[]; +extern const unsigned int coreboot_version_timestamp; /* When coreboot was compiled */ extern const char coreboot_compile_time[]; diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c index 8d8d970d2c..12090dc76d 100644 --- a/src/lib/coreboot_table.c +++ b/src/lib/coreboot_table.c @@ -298,6 +298,15 @@ static void lb_strings(struct lb_header *header) } +static void lb_record_version_timestamp(struct lb_header *header) +{ + struct lb_timestamp *rec; + rec = (struct lb_timestamp *)lb_new_record(header); + rec->tag = LB_TAG_VERSION_TIMESTAMP; + rec->size = sizeof(*rec); + rec->timestamp = coreboot_version_timestamp; +} + void __attribute__((weak)) lb_board(struct lb_header *header) { /* NOOP */ } static struct lb_forward *lb_forward(struct lb_header *header, struct lb_header *next_header) @@ -409,6 +418,7 @@ unsigned long write_coreboot_table( /* Record our various random string information */ lb_strings(head); + lb_record_version_timestamp(head); /* Record our framebuffer */ lb_framebuffer(head); diff --git a/src/lib/version.c b/src/lib/version.c index eb5bbb8351..19c14c625a 100644 --- a/src/lib/version.c +++ b/src/lib/version.c @@ -35,6 +35,7 @@ const char mainboard_part_number[] = CONFIG_MAINBOARD_PART_NUMBER; const char coreboot_version[] = COREBOOT_VERSION; const char coreboot_extra_version[] = COREBOOT_EXTRA_VERSION; const char coreboot_build[] = COREBOOT_BUILD; +const unsigned int coreboot_version_timestamp = COREBOOT_VERSION_TIMESTAMP; const char coreboot_compile_time[] = COREBOOT_COMPILE_TIME; const char coreboot_compile_by[] = COREBOOT_COMPILE_BY; |