[AMD Official Use Only - General] > -----Original Message----- > From: Aaron Pop <aaron...@linux.microsoft.com> > Sent: Friday, June 30, 2023 4:17 AM > To: devel@edk2.groups.io > Cc: Chang, Abner <abner.ch...@amd.com>; michael.d.kin...@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 <aaron...@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 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106557): https://edk2.groups.io/g/devel/message/106557 Mute This Topic: https://groups.io/mt/99858608/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-