diff options
author | Martin Roth <gaumless@gmail.com> | 2022-10-14 14:08:22 -0600 |
---|---|---|
committer | Martin Roth <martin.roth@amd.corp-partner.google.com> | 2022-10-28 21:36:02 +0000 |
commit | 7e3c1ced40e83e0a266cde519eea49eab4709807 (patch) | |
tree | 6ecfe2610e38799782a674ed655ba73146a580fe /src/soc/amd/common/block/include | |
parent | f7a09278b65fbfefe2907641788168b05b30e60b (diff) |
soc/amd/common: Add code to print AMD STB to boot log
This allows platforms that support AMD's STB (Smart Trace Buffer) to
print the buffer at various points in the boot process.
The STB is roughly a hardware assisted postcode that captures the
time stamp of when the postcode was added to the buffer. Reading
from the STB clears the data.
Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I8d78c0e86b244f3bd16248edf3850447fb0a9e2c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68543
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Diffstat (limited to 'src/soc/amd/common/block/include')
-rw-r--r-- | src/soc/amd/common/block/include/amdblocks/stb.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/soc/amd/common/block/include/amdblocks/stb.h b/src/soc/amd/common/block/include/amdblocks/stb.h new file mode 100644 index 0000000000..51b01948f8 --- /dev/null +++ b/src/soc/amd/common/block/include/amdblocks/stb.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef AMD_BLOCK_STB_H +#define AMD_BLOCK_STB_H + +#include <types.h> + +#define AMD_STB_PMI_0 0x30600 + +#define AMD_STB_COREBOOT_MARKER 0xBAADF00D + +struct stb_entry_struct { + uint32_t ts; + uint32_t val; +}; + +void write_stb_to_console(void); +void init_spill_buffer(void); +void add_stb_to_timestamp_buffer(void); + +#endif /* AMD_BLOCK_STB_H */ |