]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: SmbiosPlatformDxe: move IsEntryPointStructureValid() to Xen.c
authorLaszlo Ersek <lersek@redhat.com>
Sun, 26 Jul 2015 08:02:35 +0000 (08:02 +0000)
committerjljusten <jljusten@Edk2>
Sun, 26 Jul 2015 08:02:35 +0000 (08:02 +0000)
This function is only called from Xen.c, so it should be defined in Xen.c
and have internal linkage (ie. STATIC).

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Cc: Gabriel Somlo <somlo@cmu.edu>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Gabriel Somlo <somlo@cmu.edu>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18039 6f19259b-4bc3-4df7-8a09-765794883524

OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h
OvmfPkg/SmbiosPlatformDxe/Xen.c

index f70db2ff2b35957fd873452737e71214ac7e092c..29948a4b42659517549cb13a86c860fa87b06648 100644 (file)
@@ -64,41 +64,6 @@ STATIC CONST OVMF_TYPE0 mOvmfDefaultType0 = {
 };\r
 \r
 \r
-/**\r
-  Validates the SMBIOS entry point structure\r
-\r
-  @param  EntryPointStructure  SMBIOS entry point structure\r
-\r
-  @retval TRUE   The entry point structure is valid\r
-  @retval FALSE  The entry point structure is not valid\r
-\r
-**/\r
-BOOLEAN\r
-IsEntryPointStructureValid (\r
-  IN SMBIOS_TABLE_ENTRY_POINT  *EntryPointStructure\r
-  )\r
-{\r
-  UINTN                     Index;\r
-  UINT8                     Length;\r
-  UINT8                     Checksum;\r
-  UINT8                     *BytePtr;\r
-\r
-  BytePtr = (UINT8*) EntryPointStructure;\r
-  Length = EntryPointStructure->EntryPointLength;\r
-  Checksum = 0;\r
-\r
-  for (Index = 0; Index < Length; Index++) {\r
-    Checksum = Checksum + (UINT8) BytePtr[Index];\r
-  }\r
-\r
-  if (Checksum != 0) {\r
-    return FALSE;\r
-  } else {\r
-    return TRUE;\r
-  }\r
-}\r
-\r
-\r
 /**\r
   Get SMBIOS record length.\r
 \r
index e2606e1de8cbf0569a92d5954cabb8ac632231e9..6210a56f7539064de38da9d122a2f5b2fac99785 100644 (file)
@@ -51,19 +51,4 @@ GetQemuSmbiosTables (
   VOID\r
   );\r
 \r
-\r
-/**\r
-  Validates the SMBIOS entry point structure\r
-\r
-  @param  EntryPointStructure  SMBIOS entry point structure\r
-\r
-  @retval TRUE   The entry point structure is valid\r
-  @retval FALSE  The entry point structure is not valid\r
-\r
-**/\r
-BOOLEAN\r
-IsEntryPointStructureValid (\r
-  IN SMBIOS_TABLE_ENTRY_POINT  *EntryPointStructure\r
-  );\r
-\r
 #endif\r
index 6a5c3f8b28ff54a080c34c3820ef7ec6756ffab5..3f018d6f5cb93abd5dfd24485e81303ecea9b773 100644 (file)
 #define XEN_SMBIOS_PHYSICAL_ADDRESS       0x000EB000
 #define XEN_SMBIOS_PHYSICAL_END           0x000F0000
 
+/**
+  Validates the SMBIOS entry point structure
+
+  @param  EntryPointStructure  SMBIOS entry point structure
+
+  @retval TRUE   The entry point structure is valid
+  @retval FALSE  The entry point structure is not valid
+
+**/
+STATIC
+BOOLEAN
+IsEntryPointStructureValid (
+  IN SMBIOS_TABLE_ENTRY_POINT  *EntryPointStructure
+  )
+{
+  UINTN                     Index;
+  UINT8                     Length;
+  UINT8                     Checksum;
+  UINT8                     *BytePtr;
+
+  BytePtr = (UINT8*) EntryPointStructure;
+  Length = EntryPointStructure->EntryPointLength;
+  Checksum = 0;
+
+  for (Index = 0; Index < Length; Index++) {
+    Checksum = Checksum + (UINT8) BytePtr[Index];
+  }
+
+  if (Checksum != 0) {
+    return FALSE;
+  } else {
+    return TRUE;
+  }
+}
+
 /**
   Locates the Xen SMBIOS data if it exists