]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmulatorPkg/MiscSubClassPlatformDxe/MiscPortInternalConnectorDesignatorFunction.c
According to PI errata 0000654 and 000811, we need use 0xFFFE to instead of 0 for...
[mirror_edk2.git] / EmulatorPkg / MiscSubClassPlatformDxe / MiscPortInternalConnectorDesignatorFunction.c
index 89c88159135b7ff35403c281c83c171e6161d51c..3242fe342eef2646b4fcd18f4377e6dbadadc6f3 100644 (file)
@@ -1,19 +1,19 @@
 /*++\r
\r
-Copyright (c) 2006 - 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
+\r
+Copyright (c) 2006 - 2011, 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
 \r
 Module Name:\r
 \r
   MiscPortInternalConnectorDesignatorFunction.c\r
-  \r
-Abstract: \r
+\r
+Abstract:\r
 \r
   This driver parses the mMiscSubclassDataTable structure and reports\r
   any generated data to the DataHub.\r
@@ -69,7 +69,7 @@ Returns:
 {\r
   CHAR8                                        *OptionalStrStart;\r
   UINTN                                        InternalRefStrLen;\r
-  UINTN                                        ExternalRefStrLen;  \r
+  UINTN                                        ExternalRefStrLen;\r
   EFI_STRING                                   InternalRef;\r
   EFI_STRING                                   ExternalRef;\r
   STRING_REF                                   TokenForInternal;\r
@@ -78,7 +78,7 @@ Returns:
   SMBIOS_TABLE_TYPE8                           *SmbiosRecord;\r
   EFI_SMBIOS_HANDLE                            SmbiosHandle;\r
   EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR  *ForType8InputData;\r
-  \r
+\r
   ForType8InputData = (EFI_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR *)RecordData;\r
   //\r
   // First check for invalid parameters.\r
@@ -89,8 +89,8 @@ Returns:
 \r
   TokenForInternal = 0;\r
   TokenForExternal = 0;\r
-  \r
-  switch (ForType8InputData->PortInternalConnectorDesignator) { \r
+\r
+  switch (ForType8InputData->PortInternalConnectorDesignator) {\r
 \r
     case STR_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR:\r
       TokenForInternal = STRING_TOKEN (STR_MISC_PORT_INTERNAL_CONNECTOR_DESIGNATOR);\r
@@ -147,13 +147,13 @@ Returns:
   //\r
   // Make handle chosen by smbios protocol.add automatically.\r
   //\r
-  SmbiosRecord->Hdr.Handle = 0;  \r
+  SmbiosRecord->Hdr.Handle = 0;\r
   SmbiosRecord->InternalReferenceDesignator = 1;\r
   SmbiosRecord->InternalConnectorType = (UINT8)ForType8InputData->PortInternalConnectorType;\r
   SmbiosRecord->ExternalReferenceDesignator = 2;\r
   SmbiosRecord->ExternalConnectorType = (UINT8)ForType8InputData->PortExternalConnectorType;\r
   SmbiosRecord->PortType = (UINT8)ForType8InputData->PortType;\r
-  \r
+\r
   OptionalStrStart = (CHAR8 *)(SmbiosRecord + 1);\r
   UnicodeStrToAsciiStr(InternalRef, OptionalStrStart);\r
   UnicodeStrToAsciiStr(ExternalRef, OptionalStrStart + InternalRefStrLen + 1);\r
@@ -161,13 +161,8 @@ Returns:
   //\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
 }\r