summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYazen Ghannam <yazen.ghannam@amd.com>2026-03-07 17:10:24 +0300
committerBorislav Petkov (AMD) <bp@alien8.de>2026-04-01 21:54:16 +0300
commitbc91133e260c8113c1119073c03b93c12aa41738 (patch)
tree74fdd5508374ea8ec166efaed21fa2e860da79ec /include
parentda55ebe166d71c8c6925c5cfd77fc74bed40aaef (diff)
downloadlinux-bc91133e260c8113c1119073c03b93c12aa41738.tar.xz
x86/CPU/AMD: Print AGESA string from DMI additional information entry
Type 40 entries (Additional Information) are summarized in section 7.41 as part of the SMBIOS specification. Generally, these entries aren't interesting to save. However on some AMD Zen systems, the AGESA version is stored here. This is useful to save to the kernel message logs for debugging. It can be used to cross-reference issues. Implement an iterator for the Additional Information entries. Use this to find and print the AGESA string. Do so in AMD code, since the use case is AMD-specific. [ bp: Match only "AGESA". ] Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Co-developed-by: "Mario Limonciello (AMD)" <superm1@kernel.org> Signed-off-by: "Mario Limonciello (AMD)" <superm1@kernel.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Jean Delvare <jdelvare@suse.de> Link: https://patch.msgid.link/20260307141024.819807-6-superm1@kernel.org
Diffstat (limited to 'include')
-rw-r--r--include/linux/dmi.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/dmi.h b/include/linux/dmi.h
index 2eedf44e6801..c8700e6a694d 100644
--- a/include/linux/dmi.h
+++ b/include/linux/dmi.h
@@ -91,6 +91,21 @@ struct dmi_device {
void *device_data; /* Type specific data */
};
+#define DMI_A_INFO_ENT_MIN_SIZE 0x6
+struct dmi_a_info_entry {
+ u8 length;
+ u16 handle;
+ u8 offset;
+ u8 str_num;
+ u8 value[];
+} __packed;
+
+#define DMI_A_INFO_MIN_SIZE 0xB
+struct dmi_a_info {
+ struct dmi_header header;
+ u8 count;
+} __packed;
+
#ifdef CONFIG_DMI
struct dmi_dev_onboard {
@@ -120,6 +135,7 @@ extern void dmi_memdev_name(u16 handle, const char **bank, const char **device);
extern u64 dmi_memdev_size(u16 handle);
extern u8 dmi_memdev_type(u16 handle);
extern u16 dmi_memdev_handle(int slot);
+const char *dmi_string_nosave(const struct dmi_header *dm, u8 s);
#else
@@ -153,6 +169,8 @@ static inline u8 dmi_memdev_type(u16 handle) { return 0x0; }
static inline u16 dmi_memdev_handle(int slot) { return 0xffff; }
static inline const struct dmi_system_id *
dmi_first_match(const struct dmi_system_id *list) { return NULL; }
+static inline const char *
+ dmi_string_nosave(const struct dmi_header *dm, u8 s) { return ""; }
#endif