--- /dev/null
+/** @file\r
+\r
+ Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
+ \r\r
+ This program and the accompanying materials are licensed and made available under\r\r
+ the terms and conditions of the BSD License that accompanies this distribution. \r\r
+ The full text of the license may be found at \r\r
+ http://opensource.org/licenses/bsd-license.php. \r\r
+ \r\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r\r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r\r
+ \r\r
+\r
+\r
+Module Name:\r
+\r
+ SetupFunctions.c\r
+\r
+Abstract:\r
+\r
+Revision History\r
+\r
+--*/\r
+\r
+#include "PlatformSetupDxe.h"\r
+\r
+VOID\r
+AsciiToUnicode (\r
+ IN CHAR8 *AsciiString,\r
+ IN CHAR16 *UnicodeString\r
+ )\r
+{\r
+ UINT8 Index;\r
+\r
+ Index = 0;\r
+ while (AsciiString[Index] != 0) {\r
+ UnicodeString[Index] = (CHAR16)AsciiString[Index];\r
+ Index++;\r
+ }\r
+}\r
+\r
+VOID\r
+SwapEntries (\r
+ IN CHAR8 *Data\r
+ )\r
+{\r
+ UINT16 Index;\r
+ CHAR8 Temp8;\r
+\r
+ Index = 0;\r
+ while (Data[Index] != 0 && Data[Index+1] != 0) {\r
+ Temp8 = Data[Index];\r
+ Data[Index] = Data[Index+1];\r
+ Data[Index+1] = Temp8;\r
+ Index +=2;\r
+ }\r
+\r
+ return;\r
+}\r
+\r
+UINT32\r
+ConvertBase10ToRaw (\r
+ IN EFI_EXP_BASE10_DATA *Data)\r
+{\r
+ UINTN Index;\r
+ UINT32 RawData;\r
+\r
+ RawData = Data->Value;\r
+ for (Index = 0; Index < (UINTN) Data->Exponent; Index++) {\r
+ RawData *= 10;\r
+ }\r
+\r
+ return RawData;\r
+}\r
+\r
+UINT32\r
+ConvertBase2ToRaw (\r
+ IN EFI_EXP_BASE2_DATA *Data)\r
+{\r
+ UINTN Index;\r
+ UINT32 RawData;\r
+\r
+ RawData = Data->Value;\r
+ for (Index = 0; Index < (UINTN) Data->Exponent; Index++) {\r
+ RawData <<= 1;\r
+ }\r
+\r
+ return RawData;\r
+}\r
+\r