diff options
author | Vasily Gorbik <gor@linux.ibm.com> | 2024-11-20 20:10:50 +0100 |
---|---|---|
committer | Alexander Gordeev <agordeev@linux.ibm.com> | 2025-01-26 17:24:00 +0100 |
commit | 816b5feaed13946b06fb7c63b7343fbfd83e520f (patch) | |
tree | fd7562acfb4851bcfa741ad0463002a60d11bc29 /arch/s390/include/asm/boot_data.h | |
parent | bbbaf061237dbf5817a46f2e209a663750277e3b (diff) |
s390/boot: Introduce ring buffer for boot messages
Collect all boot messages into a ring buffer independent of the current
log level. This allows to retain all boot-time messages, which is
particularly useful for analyzing early crashes.
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/boot_data.h')
-rw-r--r-- | arch/s390/include/asm/boot_data.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/s390/include/asm/boot_data.h b/arch/s390/include/asm/boot_data.h index f7eed27b3220..2cc35e968ff5 100644 --- a/arch/s390/include/asm/boot_data.h +++ b/arch/s390/include/asm/boot_data.h @@ -15,4 +15,17 @@ extern unsigned long ipl_cert_list_size; extern unsigned long early_ipl_comp_list_addr; extern unsigned long early_ipl_comp_list_size; +extern char boot_rb[PAGE_SIZE * 2]; +extern size_t boot_rb_off; + +#define boot_rb_foreach(cb) \ + do { \ + size_t off = boot_rb_off + strlen(boot_rb + boot_rb_off) + 1; \ + size_t len; \ + for (; off < sizeof(boot_rb) && (len = strlen(boot_rb + off)); off += len + 1) \ + cb(boot_rb + off); \ + for (off = 0; off < boot_rb_off && (len = strlen(boot_rb + off)); off += len + 1) \ + cb(boot_rb + off); \ + } while (0) + #endif /* _ASM_S390_BOOT_DATA_H */ |