coreboot-kgpe-d16/src
Hsuan Ting Chen fec16a3574 util/elogtool: Add support for parsing CrOS diagnostics log
Remove the "_DEPRECATED_" tag from ChromeOS diagnostics event and add a
subtype: "ELOG_CROS_DIAGNOSTICS_LOGS" under it.

The data of "ELOG_CROS_DIAGNOSTICS_LOGS" (0x02) contains:
* An uint8_t of subtype code
* Any number of "ChromeOS diagnostics logs" events

Each "ChromeOS diagnostics log" represents the result of one ChromeOS
diagnostics test run. It is stored within an uint8_t raw[3]:
 * [23:19] = ELOG_CROS_DIAG_TYPE_*
 * [18:16] = ELOG_CROS_DIAG_RESULT_*
 * [15:0]  = Running time in seconds

Also add support for parsing this event. The parser will first calculate
the number of runs it contains, and try to parse the result one by one.

BUG=b:226551117
TEST=Build and boot google/tomato to OS,
localhost ~ # elogtool list
0 | 2022-09-26 04:25:32 | Log area cleared | 186
1 | 2022-09-26 04:25:50 | System boot | 0
2 | 2022-09-26 04:25:50 | Firmware vboot info | boot_mode=Manual recovery
  | recovery_reason=0x2/0 (Recovery button pressed)
  | fw_tried=A | fw_try_count=0 | fw_prev_tried=A
  | fw_prev_result=Unknown
3 | 2022-09-26 04:25:50 | EC Event | Keyboard Recovery
4 | 2022-09-26 04:26:01 | Memory Cache Update | Normal | Success
5 | 2022-09-26 04:26:06 | System boot | 0
6 | 2022-09-26 04:26:07 | Firmware vboot info | boot_mode=Diagnostic
  | fw_tried=A | fw_try_count=0 | fw_prev_tried=A
  | fw_prev_result=Unknown
7 | 2022-09-26 04:26:07 | Diagnostics Mode | Diagnostics Logs
  | type=Memory check (quick), result=Aborted, time=0m0s
  | type=Memory check (full), result=Aborted, time=0m0s
  | type=Storage self-test (extended), result=Aborted, time=0m1s

Change-Id: I02428cd21be2ed797eb7aab45f1ef1d782a9c047
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67834
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-10-14 16:06:39 +00:00
..
acpi treewide: use is_enabled_cpu() on cycles over device list 2022-09-29 16:47:04 +00:00
arch smbios: Add API to generate SMBIOS type 28 Temperature Probe 2022-10-06 18:36:03 +00:00
commonlib util/elogtool: Add support for parsing CrOS diagnostics log 2022-10-14 16:06:39 +00:00
console console/vtxprintf.c: Add <stdarg.h> 2022-10-06 17:00:25 +00:00
cpu cpu/x86/64bit: Fix building with -jx 2022-10-12 12:04:00 +00:00
device device/dram/ddr2: Use 'enum cb_err' instead of 'int' 2022-10-12 13:05:59 +00:00
drivers mb/google/brya/nivviks: Enable ISH driver and firmware name 2022-10-11 14:44:06 +00:00
ec ec/starlabs/merlin: Add EC related files for Alder Lake boards 2022-10-07 22:09:59 +00:00
include device: Drop unused ADL-N UFS PCI Device ID 2022-10-12 23:51:43 +00:00
lib payloads,src: Replace ALIGN(x, a) by ALIGN_UP(x, a) for clarity 2022-10-13 19:14:57 +00:00
mainboard mb/google/rex: Add initial fw config 2022-10-14 16:01:04 +00:00
northbridge payloads,src: Replace ALIGN(x, a) by ALIGN_UP(x, a) for clarity 2022-10-13 19:14:57 +00:00
sbom Add SBOM (Software Bill of Materials) Generation 2022-08-22 14:48:46 +00:00
security security/memory/memory.h: Add <stdbool.h> 2022-10-06 17:01:52 +00:00
soc soc/intel/alderlake: Create helper header file for UFS 2022-10-14 16:04:15 +00:00
southbridge treewide: Use 'fadt->x_pm1a_cnt_blk.addrl = fadt->pm1a_cnt_blk' 2022-10-12 14:18:44 +00:00
superio superio/ite/common/early_serial.c: ite_kill_watchdog: set timeout to 0 2022-08-07 19:54:43 +00:00
vendorcode vc/amd/fsp: Add Morgana FSP vendorcode 2022-10-08 20:58:58 +00:00
Kconfig coreboot: Add support for include-what-you-use 2022-10-11 14:33:28 +00:00