coreboot-kgpe-d16/src/commonlib
Ricardo Quesada c2cf3946c9 util/elogtool: add tool to print elog events
Add a new tool that that prints elog events.
The tool, as input, accepts either a file with the RW_ELOG contents, or
if the file is not provided it reads the contents of RW_ELOG by calling
the "flashrom" tool.

The tool is based on "mosys eventlog list"[1]. For the moment it only
supports "list", but future commits will add additional functionality.

This commit also adds missing ELOG defines needed for the tool. These
defines are added with the rest of the ELOG defines, in
include/commonlib/bsd/elog.h

The tool is placed inside util/cbfstool. The rationale behind the
decision, is that this tool shares a lot in common with the other tools
located in cbfstool: vboot dependency, shared files like common.o and
valstr.o, and in spirit is similar to some of the tools located in
cbfstool/.

As an example, you call the tool like the following:

$ elogtool list -f rw_elog_dump.bin

[1]: https://chromium.googlesource.com/chromiumos/platform/mosys/+/refs/heads/main/lib/eventlog/elog.c

BUG=b:172210863

Signed-off-by: Ricardo Quesada <ricardoq@google.com>
Change-Id: Ia1fe1c9ed3c4c6bda846055d4b10943b54463935
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56406
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
2021-08-05 22:00:35 +00:00
..
bsd util/elogtool: add tool to print elog events 2021-08-05 22:00:35 +00:00
include/commonlib Move post_codes.h to commonlib/console/ 2021-08-04 15:15:51 +00:00
storage
Makefile.inc Move elog_internal.h to commonlib/bsd/include 2021-08-04 15:15:55 +00:00
cbfs.c commonlib/cbfs.c: Remove unuse <console/console.h> 2021-02-15 10:51:24 +00:00
fsp_relocate.c
iobuf.c
mem_pool.c mem_pool: Track the last two allocations (not just one) 2021-04-06 07:50:05 +00:00
region.c commonlib/region: Turn addrspace_32bit into a more official API 2021-04-21 02:06:26 +00:00
sort.c