public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Chang, Abner" <abner.chang@amd.com>
To: Aaron Pop <aaronpop@linux.microsoft.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "michael.d.kinney@intel.com" <michael.d.kinney@intel.com>
Subject: Re: Subject: [PATCH] Modify IPMI_GET_SYSTEM_UUID_RESPONSE to use IPMI_GUID.
Date: Fri, 30 Jun 2023 03:45:58 +0000	[thread overview]
Message-ID: <MN2PR12MB3966E98E33B66369A9167174EA2AA@MN2PR12MB3966.namprd12.prod.outlook.com> (raw)
In-Reply-To: <75d1a49a-1df2-0669-0053-7d91a46d875a@linux.microsoft.com>

[AMD Official Use Only - General]

> -----Original Message-----
> From: Aaron Pop <aaronpop@linux.microsoft.com>
> Sent: Friday, June 30, 2023 4:17 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner <Abner.Chang@amd.com>; michael.d.kinney@intel.com
> Subject: Subject: [PATCH] Modify IPMI_GET_SYSTEM_UUID_RESPONSE to use
> IPMI_GUID.
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> 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 <aaronpop@linux.microsoft.com>
> ---
>   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.<BR>
>     Copyright (C) 2023 Advanced Micro Devices, Inc. All rights reserved.<BR>
>     Copyright (c) 2023, Ampere Computing LLC. All rights reserved.<BR>
> +  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;
>
Hi Aaron,
Thanks for this contribution.
Due to the return value is in EFI_GUID format as the UEFI friendly implementation, we have to convert IPMI_GUID to EFI_GUID as a return value.

Thanks
Abner

>   //
> --
> 2.41.0.windows.1


      reply	other threads:[~2023-06-30  3:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-29 20:16 Subject: [PATCH] Modify IPMI_GET_SYSTEM_UUID_RESPONSE to use IPMI_GUID Aaron Pop
2023-06-30  3:45 ` Chang, Abner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MN2PR12MB3966E98E33B66369A9167174EA2AA@MN2PR12MB3966.namprd12.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox