SMBIOS type 0.\r
\r
Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
- This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
\r
@retval EFI_SUCCESS All parameters were valid and *Value & *Exponent have been set.\r
@retval EFI_INVALID_PARAMETER Invalid parameter was found.\r
- \r
+\r
**/\r
-EFI_STATUS \r
+EFI_STATUS\r
GetValueExponentBase2(\r
IN OUT UINTN *Value,\r
OUT UINTN *Exponent\r
if ((Value == NULL) || (Exponent == NULL)) {\r
return EFI_INVALID_PARAMETER;\r
}\r
- \r
+\r
while ((*Value % 2) == 0) {\r
*Value=*Value/2;\r
(*Exponent)++;\r
\r
@param Base2Data Pointer to Base2_Data\r
\r
- @retval EFI_SUCCESS Transform successfully. \r
- @retval EFI_INVALID_PARAMETER Invalid parameter was found. \r
+ @retval EFI_SUCCESS Transform successfully.\r
+ @retval EFI_INVALID_PARAMETER Invalid parameter was found.\r
\r
**/\r
UINT16\r
Base2ToByteWith64KUnit (\r
IN EFI_EXP_BASE2_DATA *Base2Data\r
)\r
-{ \r
+{\r
UINT16 Value;\r
UINT16 Exponent;\r
\r
}\r
\r
Version = (CHAR16 *) PcdGetPtr (PcdFirmwareVersionString);\r
- if (StrLen (Version) > 0) { \r
+ if (StrLen (Version) > 0) {\r
TokenToUpdate = STRING_TOKEN (STR_MISC_BIOS_VERSION);\r
HiiSetString (mHiiHandle, TokenToUpdate, Version, NULL);\r
}\r
- \r
+\r
ReleaseDate = (CHAR16 *) PcdGetPtr (PcdFirmwareReleaseDateString);\r
if (StrLen(ReleaseDate) > 0) {\r
TokenToUpdate = STRING_TOKEN (STR_MISC_BIOS_RELEASE_DATE);\r
if (DateStrLen > SMBIOS_STRING_MAX_LENGTH) {\r
return EFI_UNSUPPORTED;\r
}\r
- \r
+\r
//\r
// Two zeros following the last string.\r
//\r
//\r
// Vendor will be the 1st optional string following the formatted structure.\r
//\r
- SmbiosRecord->Vendor = 1; \r
+ SmbiosRecord->Vendor = 1;\r
//\r
// Version will be the 2nd optional string following the formatted structure.\r
//\r
//\r
// Now we have got the full smbios record, call smbios protocol to add this record.\r
//\r
- SmbiosHandle = 0;\r
- Status = Smbios-> Add(\r
- Smbios, \r
- NULL,\r
- &SmbiosHandle, \r
- (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord\r
- );\r
+ Status = AddSmbiosRecord (Smbios, &SmbiosHandle, (EFI_SMBIOS_TABLE_HEADER *) SmbiosRecord);\r
\r
FreePool(SmbiosRecord);\r
return Status;\r