On Thu, Jul 16, 2015 at 12:41:17AM +0200, Laszlo Ersek wrote: > 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.jus...@intel.com> > Cc: Wei Liu <wei.l...@citrix.com> > Cc: Gabriel Somlo <so...@cmu.edu> > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Laszlo Ersek <ler...@redhat.com>
Acked-by: Gabriel Somlo <so...@cmu.edu> > --- > OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h | 15 --------- > OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c | 35 -------------------- > OvmfPkg/SmbiosPlatformDxe/Xen.c | 35 ++++++++++++++++++++ > 3 files changed, 35 insertions(+), 50 deletions(-) > > diff --git a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h > b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h > index e2606e1..6210a56 100644 > --- a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h > +++ b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.h > @@ -51,19 +51,4 @@ GetQemuSmbiosTables ( > 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 > diff --git a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c > b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c > index f70db2f..29948a4 100644 > --- a/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c > +++ b/OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.c > @@ -65,41 +65,6 @@ STATIC CONST OVMF_TYPE0 mOvmfDefaultType0 = { > > > /** > - 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. > diff --git a/OvmfPkg/SmbiosPlatformDxe/Xen.c b/OvmfPkg/SmbiosPlatformDxe/Xen.c > index 6a5c3f8..3f018d6 100644 > --- a/OvmfPkg/SmbiosPlatformDxe/Xen.c > +++ b/OvmfPkg/SmbiosPlatformDxe/Xen.c > @@ -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 > -- > 1.8.3.1 > > ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel