[PATCH v2 1/7] firmware: dmi: Correct an indexing error in dmi.h

Mario Limonciello (AMD) posted 7 patches 1 month, 3 weeks ago
There is a newer version of this series
[PATCH v2 1/7] firmware: dmi: Correct an indexing error in dmi.h
Posted by Mario Limonciello (AMD) 1 month, 3 weeks ago
The entries later in `enum dmi_entry_type` don't match the SMBIOS
specification.  The entry for type 33: `64-Bit Memory Error Information`
is not present and thus the index for all later entries is incorrect.

Add the missing type 33 entry.

Fixes: 93c890dbe5287 ("firmware: Add DMI entry types to the headers")
Link: https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.4.0a.pdf
Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
---
 include/linux/dmi.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/dmi.h b/include/linux/dmi.h
index 927f8a8b7a1dd..a809b5095c259 100644
--- a/include/linux/dmi.h
+++ b/include/linux/dmi.h
@@ -60,6 +60,7 @@ enum dmi_entry_type {
 	DMI_ENTRY_OOB_REMOTE_ACCESS,
 	DMI_ENTRY_BIS_ENTRY,
 	DMI_ENTRY_SYSTEM_BOOT,
+	DMI_ENTRY_MEMORY_INFO,
 	DMI_ENTRY_MGMT_DEV,
 	DMI_ENTRY_MGMT_DEV_COMPONENT,
 	DMI_ENTRY_MGMT_DEV_THRES,
-- 
2.43.0
Re: [PATCH v2 1/7] firmware: dmi: Correct an indexing error in dmi.h
Posted by Jean Delvare 1 month, 2 weeks ago
Hi Mario,

On Tue, 16 Dec 2025 06:33:48 -0600, Mario Limonciello (AMD) wrote:
> The entries later in `enum dmi_entry_type` don't match the SMBIOS
> specification.  The entry for type 33: `64-Bit Memory Error Information`
> is not present and thus the index for all later entries is incorrect.
> 
> Add the missing type 33 entry.
> 
> Fixes: 93c890dbe5287 ("firmware: Add DMI entry types to the headers")
> Link: https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.4.0a.pdf
> Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>
> Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
> ---
>  include/linux/dmi.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/include/linux/dmi.h b/include/linux/dmi.h
> index 927f8a8b7a1dd..a809b5095c259 100644
> --- a/include/linux/dmi.h
> +++ b/include/linux/dmi.h
> @@ -60,6 +60,7 @@ enum dmi_entry_type {
>  	DMI_ENTRY_OOB_REMOTE_ACCESS,
>  	DMI_ENTRY_BIS_ENTRY,
>  	DMI_ENTRY_SYSTEM_BOOT,
> +	DMI_ENTRY_MEMORY_INFO,
>  	DMI_ENTRY_MGMT_DEV,
>  	DMI_ENTRY_MGMT_DEV_COMPONENT,
>  	DMI_ENTRY_MGMT_DEV_THRES,

Good catch. Do I understand correctly that this does not fix any actual
bug because none of the entry types after DMI_ENTRY_SYSTEM_BOOT was
used in code so far?

As for the name, considering that we used DMI_ENTRY_32_MEM_ERROR for
type 18 (32-Bit Memory Error Information), I believe we should use
DMI_ENTRY_64_MEM_ERROR for type 33 (64-Bit Memory Error Information)
for consistency.

Thanks,
-- 
Jean Delvare
SUSE L3 Support