From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web11.7448.1688069812372262620 for ; Thu, 29 Jun 2023 13:16:52 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=PHbcKSdo; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: aaronpop@linux.microsoft.com) Received: from [192.168.1.197] (ip72-199-172-9.sd.sd.cox.net [72.199.172.9]) by linux.microsoft.com (Postfix) with ESMTPSA id 949682083967; Thu, 29 Jun 2023 13:16:51 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 949682083967 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1688069811; bh=w7EldyreUHWztJH/10O5n1WuPwwEG7GIS53FQEpF1FY=; h=Date:To:Cc:From:Subject:From; b=PHbcKSdonffRhUIbSHFSPskHTpNuSXuMdJN9qR093mnqtol+DxNbZNeODdhTPPa6t KIZ/+cLduPrBsjWSnshSvpfrKD4EzEfr78s4F57FrxwHhozrp3sTL/lK14zgpLxgow yyIHTbB5tpmItHCANUVvnqg78DMM+s7kNmEYf9Bo= Message-ID: <75d1a49a-1df2-0669-0053-7d91a46d875a@linux.microsoft.com> Date: Thu, 29 Jun 2023 13:16:50 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 To: devel@edk2.groups.io Cc: Abner.Chang@amd.com, michael.d.kinney@intel.com From: "Aaron Pop" Subject: Subject: [PATCH] Modify IPMI_GET_SYSTEM_UUID_RESPONSE to use IPMI_GUID. Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit IPMI specification's Get Device Guid Command says that data is returned in "least signification byte first" and "this is the reverse of convention described in RFC4122". IPMI_GET_SYSTEM_UUID_RESPONSE is defined to use EFI_GUID, which is reverse format of Ipmi specification. Correcting IPMI_GET_SYSTEM_UUID_RESPONSE to use IPMI_GUID. Signed-off-by: Aaron Pop --- MdePkg/Include/IndustryStandard/IpmiNetFnApp.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h b/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h index b6bc91f46c..afdc2dc30b 100644 --- a/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h +++ b/MdePkg/Include/IndustryStandard/IpmiNetFnApp.h @@ -14,6 +14,7 @@ Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.
Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.
Copyright (c) 2023, Ampere Computing LLC. All rights reserved.
+ Copyright (c) Microsoft Corporation. SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -488,9 +489,22 @@ typedef struct { // #define IPMI_APP_GET_SYSTEM_GUID 0x37 +// +// In IPMI, GUID are stored least-significant byte first. +// The order of fields are the reverse of convention described in [RFC4122]. +// Note: This definition is used for both the IPMI_APP_GET_SYSTEM_GUID +// and IPMI_APP_GET_DEVICE_GUID. +// +typedef struct { + UINT8 Data4[8]; + UINT16 Data3; + UINT16 Data2; + UINT32 Data1; +} IPMI_GUID; + typedef struct { - UINT8 CompletionCode; - EFI_GUID SystemUuid; + UINT8 CompletionCode; + IPMI_GUID SystemUuid; } IPMI_GET_SYSTEM_UUID_RESPONSE; // -- 2.41.0.windows.1