From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=mang.guo@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 399662112DF43 for ; Wed, 12 Sep 2018 20:31:52 -0700 (PDT) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Sep 2018 20:31:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,367,1531810800"; d="dat'59?scan'59,208,59";a="262157680" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga005.fm.intel.com with ESMTP; 12 Sep 2018 20:31:34 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 12 Sep 2018 20:31:34 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 12 Sep 2018 20:31:34 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.240]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.150]) with mapi id 14.03.0319.002; Thu, 13 Sep 2018 11:31:30 +0800 From: "Guo, Mang" To: "edk2-devel@lists.01.org" CC: "Wei, David" Thread-Topic: [Patch][edk2-platforms/devel-MinnowBoardMax-UDK2017] Generate UUID Thread-Index: AdRLEkJbdbVetl2LScaOd6iWFyPO1A== Date: Thu, 13 Sep 2018 03:31:30 +0000 Message-ID: <22D2C85ED001C54AA20BFE3B0E4751D1526D96B4@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: <22D2C85ED001C54AA20BFE3B0E4751D1526D96B4@SHSMSX103.ccr.corp.intel.com> x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [Patch][edk2-platforms/devel-MinnowBoardMax-UDK2017] Generate UUID X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2018 03:31:52 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Correct one field of UUID. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Guo Mang CC: David Wei --- .../SmBiosMiscDxe/MiscSystemManufacturerFunction.c | 30 ++++++++++--------= ---- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufacturerFunction= .c b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufacturerFunction.c index 26da5ab..1199374 100644 --- a/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufacturerFunction.c +++ b/Vlv2TbltDevicePkg/SmBiosMiscDxe/MiscSystemManufacturerFunction.c @@ -414,34 +414,30 @@ AddSmbiosManuCallback ( ForType1InputData->SystemUuid.Data1 =3D (UINT32) StrHexToUint64 (Uuid)= ; ForType1InputData->SystemUuid.Data2 =3D (UINT16) StrHexToUint64 (Uuid = + 9); ForType1InputData->SystemUuid.Data3 =3D (UINT16) StrHexToUint64 (Uuid = + 14); - ForType1InputData->SystemUuid.Data4[0] =3D (UINT8) StrHexToUint64 (Uui= d + 19); + ForType1InputData->SystemUuid.Data4[0] =3D (UINT8) (StrHexToUint64 (Uu= id + 19) >> 8); ForType1InputData->SystemUuid.Data4[1] =3D (UINT8) StrHexToUint64 (Uui= d + 21); TempData =3D StrHexToUint64 (Uuid + 24); for(Index =3D sizeof(ForType1InputData->SystemUuid.Data4)/sizeof(UINT8= ); Index > 2; Index--) { ForType1InputData->SystemUuid.Data4[Index-1] =3D (UINT8) TempData; TempData =3D TempData >> 8; } - - ForType1InputData->SystemUuid.Data4[0] =3D (UINT8) StrHexToUint64 (Uui= d + 19); - - } else if (MacAddressString !=3D NULL) { - ForType1InputData->SystemUuid.Data1 =3D (UINT32)MacAddressString [0]= + (((UINT32)MacAddressString [1]) << 16); - ForType1InputData->SystemUuid.Data2 =3D (UINT16)MacAddressString [2]= ; - ForType1InputData->SystemUuid.Data3 =3D (UINT16)MacAddressString [3]= ; - ForType1InputData->SystemUuid.Data4[0] =3D (UINT8)MacAddressString [= 4]; - ForType1InputData->SystemUuid.Data4[1] =3D (UINT8)(MacAddressString = [5]); - ForType1InputData->SystemUuid.Data4[2] =3D (UINT8)MacAddressString [= 6]; - ForType1InputData->SystemUuid.Data4[3] =3D (UINT8)(MacAddressString = [7]); - ForType1InputData->SystemUuid.Data4[4] =3D (UINT8)(MacAddressString = [8]); - ForType1InputData->SystemUuid.Data4[5] =3D (UINT8)(MacAddressString = [9]); - ForType1InputData->SystemUuid.Data4[6] =3D (UINT8)(MacAddressString = [10]); - ForType1InputData->SystemUuid.Data4[7] =3D (UINT8)(MacAddressString = [11]); + } else if (MacAddressString !=3D NULL) { + ForType1InputData->SystemUuid.Data1 =3D (UINT32)MacAddressString [0] += (((UINT32)MacAddressString [1]) << 16); + ForType1InputData->SystemUuid.Data2 =3D (UINT16)MacAddressString [2]; + ForType1InputData->SystemUuid.Data3 =3D (UINT16)MacAddressString [3]; + ForType1InputData->SystemUuid.Data4[0] =3D (UINT8)MacAddressString [4]= ; + ForType1InputData->SystemUuid.Data4[1] =3D (UINT8)(MacAddressString [5= ]); + ForType1InputData->SystemUuid.Data4[2] =3D (UINT8)MacAddressString [6]= ; + ForType1InputData->SystemUuid.Data4[3] =3D (UINT8)(MacAddressString [7= ]); + ForType1InputData->SystemUuid.Data4[4] =3D (UINT8)(MacAddressString [8= ]); + ForType1InputData->SystemUuid.Data4[5] =3D (UINT8)(MacAddressString [9= ]); + ForType1InputData->SystemUuid.Data4[6] =3D (UINT8)(MacAddressString [1= 0]); + ForType1InputData->SystemUuid.Data4[7] =3D (UINT8)(MacAddressString [1= 1]); } =20 CopyMem ((UINT8 *) (&SmbiosRecord->Uuid),&ForType1InputData->SystemUuid,= 16); =20 =20 - SmbiosRecord->WakeUpType =3D (UINT8)ForType1InputData->SystemWakeupType; =20 OptionalStrStart =3D (CHAR8 *)(SmbiosRecord + 1); --=20 2.10.1.windows.1