[edk2-devel] 回复: [PATCH 1/2] MdePkg/IndustryStandard: Add SMBIOS anchor string & length defines.
gaoliming via groups.io
gaoliming=byosoft.com.cn at groups.io
Thu May 4 07:53:17 UTC 2023
Giri:
> -----ÓʼþÔ¼þ-----
> ·¢¼þÈË: Giri Mudusuru <girim at apple.com>
> ·¢ËÍʱ¼ä: 2023Äê4ÔÂ29ÈÕ 2:53
> ÊÕ¼þÈË: devel at edk2.groups.io
> ³ËÍ: Giri Mudusuru <girim at apple.com>; Michael D Kinney
> <michael.d.kinney at intel.com>; Liming Gao <gaoliming at byosoft.com.cn>;
> Zhiguang Liu <zhiguang.liu at intel.com>; Andrew Fish <afish at apple.com>
> Ö÷Ìâ: [PATCH 1/2] MdePkg/IndustryStandard: Add SMBIOS anchor string &
> length defines.
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3805
>
> Add SMBIOS spec defined anchor strings & length defines.
>
> - '_SM_' chapter 5.2.1 SMBIOS 2.1 (32-bit) Entry Point
> - '_SM3_' chapter 5.2.2 SMBIOS 3.0 (64-bit) Entry Point
>
> Cc: Michael D Kinney <michael.d.kinney at intel.com>
> Cc: Liming Gao <gaoliming at byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu at intel.com>
> Cc: Andrew Fish <afish at apple.com>
> Signed-off-by: Giri Mudusuru <girim at apple.com>
> ---
> MdePkg/Include/IndustryStandard/SmBios.h | 22
> ++++++++++++++++++++--
> 1 file changed, 20 insertions(+), 2 deletions(-)
>
> diff --git a/MdePkg/Include/IndustryStandard/SmBios.h
> b/MdePkg/Include/IndustryStandard/SmBios.h
> index 9cbdec1182..4c560e758b 100644
> --- a/MdePkg/Include/IndustryStandard/SmBios.h
> +++ b/MdePkg/Include/IndustryStandard/SmBios.h
> @@ -48,6 +48,24 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
> //
>
> #define SMBIOS_3_0_TABLE_MAX_LENGTH 0xFFFFFFFF
>
>
>
> +///
>
> +/// Reference SMBIOS 3.4, chapter 5.2.1 SMBIOS 2.1 (32-bit) Entry Point
>
> +/// Table 1 â?SMBIOS 2.1 (32-bit) Entry Point structure, offset 00h
>
Please fix the non-ascii char here.
> +/// _SM_, specified as four ASCII characters (5F 53 4D 5F).
>
> +///@{
>
> +#define SMBIOS_ANCHOR_STRING "_SM_"
>
> +#define SMBIOS_ANCHOR_STRING_LENGTH 4
>
> +///@}
>
> +
>
> +///
>
> +/// Reference SMBIOS 3.4, chapter 5.2.2 SMBIOS 3.0 (64-bit) Entry Point
>
> +/// Table 2 â?SMBIOS 3.0 (64-bit) Entry Point structure, offset 00h
Please fix the non-ascii char here.
Thanks
Liming
>
> +/// _SM3_, specified as five ASCII characters (5F 53 4D 33 5F).
>
> +///@{
>
> +#define SMBIOS_3_0_ANCHOR_STRING "_SM3_"
>
> +#define SMBIOS_3_0_ANCHOR_STRING_LENGTH 5
>
> +///@}
>
> +
>
> //
>
> // SMBIOS type macros which is according to SMBIOS 3.3.0 specification.
>
> //
>
> @@ -138,7 +156,7 @@ typedef UINT16 SMBIOS_HANDLE;
> ///
>
> #pragma pack(1)
>
> typedef struct {
>
> - UINT8 AnchorString[4];
>
> + UINT8 AnchorString[SMBIOS_ANCHOR_STRING_LENGTH];
>
> UINT8 EntryPointStructureChecksum;
>
> UINT8 EntryPointLength;
>
> UINT8 MajorVersion;
>
> @@ -155,7 +173,7 @@ typedef struct {
> } SMBIOS_TABLE_ENTRY_POINT;
>
>
>
> typedef struct {
>
> - UINT8 AnchorString[5];
>
> + UINT8 AnchorString[SMBIOS_3_0_ANCHOR_STRING_LENGTH];
>
> UINT8 EntryPointStructureChecksum;
>
> UINT8 EntryPointLength;
>
> UINT8 MajorVersion;
>
> --
> 2.39.2 (Apple Git-144)
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103974): https://edk2.groups.io/g/devel/message/103974
Mute This Topic: https://groups.io/mt/98679668/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list