Revision: 18039
http://sourceforge.net/p/edk2/code/18039
Author: jljusten
Date: 2015-07-26 08:02:35 +0000 (Sun, 26 Jul 2015)
Log Message:
-----------
OvmfPkg: SmbiosPlatformDxe: move IsEntryPointStructureValid() to Xen.c
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 <[email protected]>
Cc: Wei Liu <[email protected]>
Cc: Gabriel Somlo <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <[email protected]>
Reviewed-by: Wei Liu <[email protected]>
Acked-by: Gabriel Somlo <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Modified Paths:
--------------
trunk/edk2/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
trunk/edk2/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h
trunk/edk2/OvmfPkg/SmbiosPlatformDxe/Xen.c
Modified: trunk/edk2/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c
===================================================================
--- trunk/edk2/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c 2015-07-26
08:02:29 UTC (rev 18038)
+++ trunk/edk2/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c 2015-07-26
08:02:35 UTC (rev 18039)
@@ -65,41 +65,6 @@
/**
- 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
-
-**/
-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;
- }
-}
-
-
-/**
Get SMBIOS record length.
@param SmbiosTable SMBIOS pointer.
Modified: trunk/edk2/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h
===================================================================
--- trunk/edk2/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h 2015-07-26
08:02:29 UTC (rev 18038)
+++ trunk/edk2/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h 2015-07-26
08:02:35 UTC (rev 18039)
@@ -51,19 +51,4 @@
VOID
);
-
-/**
- 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
-
-**/
-BOOLEAN
-IsEntryPointStructureValid (
- IN SMBIOS_TABLE_ENTRY_POINT *EntryPointStructure
- );
-
#endif
Modified: trunk/edk2/OvmfPkg/SmbiosPlatformDxe/Xen.c
===================================================================
--- trunk/edk2/OvmfPkg/SmbiosPlatformDxe/Xen.c 2015-07-26 08:02:29 UTC (rev
18038)
+++ trunk/edk2/OvmfPkg/SmbiosPlatformDxe/Xen.c 2015-07-26 08:02:35 UTC (rev
18039)
@@ -22,6 +22,41 @@
#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
@return SMBIOS_TABLE_ENTRY_POINT Address of Xen SMBIOS data
------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits