public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch][edk2-platforms/devel-MinnowBoardMax-UDK2017] Generate UUID
@ 2018-09-13  3:31 Guo, Mang
  0 siblings, 0 replies; only message in thread
From: Guo, Mang @ 2018-09-13  3:31 UTC (permalink / raw)
  To: edk2-devel@lists.01.org; +Cc: Wei, David

Correct one field of UUID.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Guo Mang <mang.guo@intel.com>
CC: David Wei <david.wei@intel.com>
---
 .../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 = (UINT32) StrHexToUint64 (Uuid);
     ForType1InputData->SystemUuid.Data2 = (UINT16) StrHexToUint64 (Uuid + 9);
     ForType1InputData->SystemUuid.Data3 = (UINT16) StrHexToUint64 (Uuid + 14);
-    ForType1InputData->SystemUuid.Data4[0] = (UINT8) StrHexToUint64 (Uuid + 19);
+    ForType1InputData->SystemUuid.Data4[0] = (UINT8) (StrHexToUint64 (Uuid + 19) >> 8);
     ForType1InputData->SystemUuid.Data4[1] = (UINT8) StrHexToUint64 (Uuid + 21);
     TempData = StrHexToUint64 (Uuid + 24);
     for(Index = sizeof(ForType1InputData->SystemUuid.Data4)/sizeof(UINT8); Index > 2; Index--) {
       ForType1InputData->SystemUuid.Data4[Index-1] = (UINT8) TempData;
       TempData = TempData >> 8;
     }
-
-    ForType1InputData->SystemUuid.Data4[0] = (UINT8) StrHexToUint64 (Uuid + 19);
-
-    } else if (MacAddressString != NULL) {
-      ForType1InputData->SystemUuid.Data1 = (UINT32)MacAddressString [0] + (((UINT32)MacAddressString [1]) << 16);
-      ForType1InputData->SystemUuid.Data2 = (UINT16)MacAddressString [2];
-      ForType1InputData->SystemUuid.Data3 = (UINT16)MacAddressString [3];
-      ForType1InputData->SystemUuid.Data4[0] = (UINT8)MacAddressString [4];
-      ForType1InputData->SystemUuid.Data4[1] = (UINT8)(MacAddressString [5]);
-      ForType1InputData->SystemUuid.Data4[2] = (UINT8)MacAddressString [6];
-      ForType1InputData->SystemUuid.Data4[3] = (UINT8)(MacAddressString [7]);
-      ForType1InputData->SystemUuid.Data4[4] = (UINT8)(MacAddressString [8]);
-      ForType1InputData->SystemUuid.Data4[5] = (UINT8)(MacAddressString [9]);
-      ForType1InputData->SystemUuid.Data4[6] = (UINT8)(MacAddressString [10]);
-      ForType1InputData->SystemUuid.Data4[7] = (UINT8)(MacAddressString [11]);
+  } else if (MacAddressString != NULL) {
+    ForType1InputData->SystemUuid.Data1 = (UINT32)MacAddressString [0] + (((UINT32)MacAddressString [1]) << 16);
+    ForType1InputData->SystemUuid.Data2 = (UINT16)MacAddressString [2];
+    ForType1InputData->SystemUuid.Data3 = (UINT16)MacAddressString [3];
+    ForType1InputData->SystemUuid.Data4[0] = (UINT8)MacAddressString [4];
+    ForType1InputData->SystemUuid.Data4[1] = (UINT8)(MacAddressString [5]);
+    ForType1InputData->SystemUuid.Data4[2] = (UINT8)MacAddressString [6];
+    ForType1InputData->SystemUuid.Data4[3] = (UINT8)(MacAddressString [7]);
+    ForType1InputData->SystemUuid.Data4[4] = (UINT8)(MacAddressString [8]);
+    ForType1InputData->SystemUuid.Data4[5] = (UINT8)(MacAddressString [9]);
+    ForType1InputData->SystemUuid.Data4[6] = (UINT8)(MacAddressString [10]);
+    ForType1InputData->SystemUuid.Data4[7] = (UINT8)(MacAddressString [11]);
   }
 
   CopyMem ((UINT8 *) (&SmbiosRecord->Uuid),&ForType1InputData->SystemUuid,16);
 
 
-
   SmbiosRecord->WakeUpType = (UINT8)ForType1InputData->SystemWakeupType;
 
   OptionalStrStart = (CHAR8 *)(SmbiosRecord + 1);
-- 
2.10.1.windows.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-09-13  3:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-13  3:31 [Patch][edk2-platforms/devel-MinnowBoardMax-UDK2017] Generate UUID Guo, Mang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox