From patchwork Wed Sep 3 13:36:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 196 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756906631; bh=yUwFpTmnOcZbPy4n6QT5Yb+h3fJU3Ig9Ues543lsmjU=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=wyiM7scaWSznMrxrpleQID7YXyCF+E+iNYBclK+t15aDKuHG65e7S7LG/pS3P0U+Y WHsIRvCbrE3rHJGl2YMSt7p0hPa7yOC+HCCflxd5Ud2mBTzG5rDyCzu+sYvLlWvwmm CKRBVdb/sfSXhrnMVH1YoDXtobqLsdOyz7M7xbiOYLhUz/lC4BqLZUgsE572EEMXck 9AFsQ7ELth9eGCeDgZBPI37sEXTlynF7tjT1P7uPcCbBnBAHBP6uLC+ZWIyCLPFoDN svrakeyqwhwtWNdqXSMimyr8it6z3tJY9twJDQdrsHD9EvPbF5aRUw7aP9X+BVtKGx 0jQtM02I7aaCQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D4B8E67909 for ; Wed, 3 Sep 2025 07:37:11 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Y9h8RaJXR-1U for ; Wed, 3 Sep 2025 07:37:11 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756906631; bh=yUwFpTmnOcZbPy4n6QT5Yb+h3fJU3Ig9Ues543lsmjU=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=wyiM7scaWSznMrxrpleQID7YXyCF+E+iNYBclK+t15aDKuHG65e7S7LG/pS3P0U+Y WHsIRvCbrE3rHJGl2YMSt7p0hPa7yOC+HCCflxd5Ud2mBTzG5rDyCzu+sYvLlWvwmm CKRBVdb/sfSXhrnMVH1YoDXtobqLsdOyz7M7xbiOYLhUz/lC4BqLZUgsE572EEMXck 9AFsQ7ELth9eGCeDgZBPI37sEXTlynF7tjT1P7uPcCbBnBAHBP6uLC+ZWIyCLPFoDN svrakeyqwhwtWNdqXSMimyr8it6z3tJY9twJDQdrsHD9EvPbF5aRUw7aP9X+BVtKGx 0jQtM02I7aaCQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BEEAA678F3 for ; Wed, 3 Sep 2025 07:37:11 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756906629; bh=ouA4CyTJ+SHE6jXQcLIjdKynuIUGzylGHbO4xCz2+iU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vpO21cwA0/N0NgaxKXLfI1VaRCYHJUMj7CrxoRmiWGz6UMjSElF4Jsdgp5SPzkWPb Yy+qUygQp90mgW9oF5Y0q8lOc8bXTufuKX2Hukm52hu+pJYmr7BcE8bUWGznEtTeGJ 5AkDpGftzZza7ot/KGPafCa8GWnWvtq8juiu1HlTKt+CFggz+25mC0Nk/NnKSRq11M tuL/o1Fw3sQdaoqNykdWfoutFeJVwXnYeubGqLgKfqpSCBcKykBvbGdEeLRTUo1JUb TBXa2bfYfJKM9CCAGD2PZxh8lhGTPmPro+7c8Q0DO9qLCF/1K2L+Pbl7CODQqArdId cQf+mgqWue/hQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A0705678B2; Wed, 3 Sep 2025 07:37:09 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id 1PcRit07gnlL; Wed, 3 Sep 2025 07:37:09 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1756906625; bh=yLB+Hou+fxMhWBTm42bPg70OtYwhXm5ywIOhtQsTMRI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wA7mR79pwDXTFDZDzwAPGIB9wtohoqeb58SVxPm4d9nYvXm9lZfUBayBPsS/4WUlS Z/DYWCmw+VYQtpn7GRRpFTaFzl6POMo45myp5NrlcUSlXg0cQtMjKRJvxAHRyn+T/O u0ebdsYC8nGMmLE8hPLIzWRBTisEP8WDorMk/ibYYzlYxH2SYAIKnEl0f7K53BIQu3 RORKYtM2QutO+d2H5o1J+7VojV4zl41DYQBbB8BEjeUENNqZqbaI8Yv+co7dfu3D9z +YFy3mtoKe6DpRcKi9d7dqo/wKSmZu1bxZuVNeelQ6j0YfIndfuW9KcTNdZT43birh NTgb5khb5vbeQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 34F735FCF5; Wed, 3 Sep 2025 07:37:05 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Wed, 3 Sep 2025 07:36:07 -0600 Message-ID: <20250903133639.3235920-8-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250903133639.3235920-1-sjg@u-boot.org> References: <20250903133639.3235920-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: SM65RFRBAMKUEZK6KLUMKMXOO4QI3BRQ X-Message-ID-Hash: SM65RFRBAMKUEZK6KLUMKMXOO4QI3BRQ X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass , Claude X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 07/25] smbios: Improve comments for entry-point structures List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Add comments for smbios_entry and update those for smbios3_entry to follow kerneldoc style. Co-developed-by: Claude Signed-off-by: Simon Glass --- include/smbios.h | 47 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/include/smbios.h b/include/smbios.h index 96202f9a1c8..8073364cb04 100644 --- a/include/smbios.h +++ b/include/smbios.h @@ -60,6 +60,28 @@ struct str_lookup_table { const char *str; }; +/** + * struct smbios_entry - SMBIOS 2.1 (32-bit) Entry Point structure + * + * This structure represents the SMBIOS Entry Point as defined in the + * SMBIOS specification version 2.1+. It serves as the starting point + * for locating SMBIOS tables in system memory. + * + * @anchor: Entry Point Structure anchor string "_SM_" + * @checksum: Checksum of the Entry Point Structure + * @length: Length of the Entry Point Structure, formatted area + * @major_ver: Major version of the SMBIOS specification implemented + * @minor_ver: Minor version of the SMBIOS specification implemented + * @max_struct_size: Size of the largest SMBIOS structure + * @entry_point_rev: Entry Point Structure Revision implemented + * @formatted_area: Reserved formatted area, set to 0 + * @intermediate_anchor: Intermediate Entry Point Structure anchor "_DMI_" + * @intermediate_checksum: Checksum of intermediate Entry Point Structure + * @struct_table_length: Total length in bytes of SMBIOS Structure Table + * @struct_table_address: 32-bit physical starting address of table + * @struct_count: Total number of SMBIOS structures present in the table + * @bcd_rev: BCD revision of the SMBIOS specification (e.g. 0x21 for v2.1) + */ struct __packed smbios_entry { u8 anchor[4]; u8 checksum; @@ -79,27 +101,32 @@ struct __packed smbios_entry { /** * struct smbios3_entry - SMBIOS 3.0 (64-bit) Entry Point structure + * + * This structure represents the SMBIOS 3.0+ Entry Point as defined in the + * SMBIOS specification version 3.0+. It provides 64-bit addressing support + * and serves as the starting point for locating SMBIOS tables in memory. + * + * @anchor: Entry Point Structure anchor string "_SM3_" + * @checksum: Checksum of the Entry Point Structure + * @length: Length of the Entry Point Structure + * @major_ver: Major version of the SMBIOS specification implemented + * @minor_ver: Minor version of the SMBIOS specification implemented + * @doc_rev: Revision of the SMBIOS specification document + * @entry_point_rev: Revision of the Entry Point Structure + * @reserved: Reserved field, must be 0 + * @table_maximum_size: Maximum size of SMBIOS Structure Table + * @struct_table_address: 64-bit physical starting address of table */ struct __packed smbios3_entry { - /** @anchor: anchor string */ u8 anchor[5]; - /** @checksum: checksum of the entry point structure */ u8 checksum; - /** @length: length of the entry point structure */ u8 length; - /** @major_ver: major version of the SMBIOS specification */ u8 major_ver; - /** @minor_ver: minor version of the SMBIOS specification */ u8 minor_ver; - /** @docrev: revision of the SMBIOS specification */ u8 doc_rev; - /** @entry_point_rev: revision of the entry point structure */ u8 entry_point_rev; - /** @reserved: reserved */ u8 reserved; - /** maximum size of SMBIOS table */ u32 table_maximum_size; - /** @struct_table_address: 64-bit physical starting address */ u64 struct_table_address; };