diff options
author | Simon Glass <sjg@chromium.org> | 2023-09-10 13:13:01 -0600 |
---|---|---|
committer | Bin Meng <bmeng@tinylab.org> | 2023-09-22 06:03:46 +0800 |
commit | 7739b2793ba05b2e601d743d7eac9c466fea5864 (patch) | |
tree | 0ca35de9ec341953bd12c2330a5330093982a1e5 /arch/x86/include | |
parent | 35307ba776754aba8fc34b9d17928850c69d4114 (diff) | |
download | u-boot-7739b2793ba05b2e601d743d7eac9c466fea5864.zip u-boot-7739b2793ba05b2e601d743d7eac9c466fea5864.tar.gz u-boot-7739b2793ba05b2e601d743d7eac9c466fea5864.tar.bz2 |
x86: coreboot: Document cbmem console struct
Coreboot changed a few years ago to include an overflow flag. Update the
structure to match this.
This comes from coreboot commit:
6f5ead14b4 ("mb/google/nissa/var/joxer: Update eMMC DLL settings")
Note: There are several implementations of this in coreboot. I have chosen
to follow the one in src/lib/cbmem_console.c
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/coreboot_tables.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/arch/x86/include/asm/coreboot_tables.h b/arch/x86/include/asm/coreboot_tables.h index 4de137f..0dfb64b 100644 --- a/arch/x86/include/asm/coreboot_tables.h +++ b/arch/x86/include/asm/coreboot_tables.h @@ -299,11 +299,24 @@ struct cb_vdat { #define CB_TAG_TIMESTAMPS 0x0016 #define CB_TAG_CBMEM_CONSOLE 0x0017 +#define CBMC_CURSOR_MASK ((1 << 28) - 1) +#define CBMC_OVERFLOW BIT(31) + +/* + * struct cbmem_console - In-memory console buffer for coreboot + * + * Structure describing console buffer. It is overlaid on a flat memory area, + * with body covering the extent of the memory. Once the buffer is full, + * output will wrap back around to the start of the buffer. The high bit of the + * cursor field gets set to indicate that this happened. If the underlying + * storage allows this, the buffer will persist across multiple boots and append + * to the previous log. + */ struct cbmem_console { u32 size; u32 cursor; - char body[0]; -} __packed; + u8 body[0]; +}; #define CB_TAG_MRC_CACHE 0x0018 |