From 53eccc0a3db06ff39c1b8f784b8732b7260aeb43 Mon Sep 17 00:00:00 2001 From: Mikhail Zaslonko Date: Thu, 4 May 2023 10:38:55 +0200 Subject: [PATCH] zipl/boot: Update struct os_info with new OS_INFO_FLAGS_ENTRY MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduce new os_info flags entry pointing to the field with bit flags. The flag OS_INFO_FLAG_REIPL_CLEAR indicates that 'clear' sysfs attribute has been set on a panicked system. Signed-off-by: Mikhail Zaslonko Reviewed-by: Marc Hartmayer Signed-off-by: Jan Höppner --- include/boot/os_info.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/boot/os_info.h b/include/boot/os_info.h index 65a6d0c1..d2605297 100644 --- a/include/boot/os_info.h +++ b/include/boot/os_info.h @@ -19,9 +19,13 @@ #define OS_INFO_MAGIC 0x4f53494e464f535aULL /* OSINFOSZ */ #define OS_INFO_CSUM_SIZE (sizeof(struct os_info) - offsetof(struct os_info, version_major)) +#define OS_INFO_FLAGS_ENTRY_SIZE (sizeof(unsigned long)) #define OS_INFO_VMCOREINFO 0 #define OS_INFO_REIPL_BLOCK 1 +#define OS_INFO_FLAGS_ENTRY 2 + +#define OS_INFO_FLAG_REIPL_CLEAR (1UL << 0) struct os_info_entry { uint64_t addr; @@ -36,8 +40,8 @@ struct os_info { uint16_t version_minor; uint64_t crashkernel_addr; uint64_t crashkernel_size; - struct os_info_entry entry[2]; - uint8_t reserved[4024]; + struct os_info_entry entry[3]; + uint8_t reserved[4004]; } __packed; /*