/** @file\r
API for SMBIOS Plug and Play functions, access to SMBIOS table and structures.\r
\r
- Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2005 - 2015, 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
#ifndef _LIB_SMBIOS_VIEW_H_\r
#define _LIB_SMBIOS_VIEW_H_\r
\r
-#include "LibSmbios.h"\r
+#include <IndustryStandard/SmBios.h>\r
\r
#define DMI_SUCCESS 0x00\r
#define DMI_UNKNOWN_FUNCTION 0x81\r
#define DMI_CURRENTLY_LOCKED 0x91\r
#define DMI_INVALID_LOCK 0x92\r
\r
-#define INVALIDE_HANDLE (UINT16) (-1)\r
+#define INVALID_HANDLE (UINT16) (-1)\r
\r
#define EFI_SMBIOSERR(val) EFIERR (0x30000 | val)\r
\r
#define EFI_SMBIOSERR_UNSUPPORTED EFI_SMBIOSERR (4)\r
\r
/**\r
- Init the SMBIOS VIEW API's environment.\r
+ Init the SMBIOS VIEW API's environment for the 32-bit table..\r
\r
@retval EFI_SUCCESS Successful to init the SMBIOS VIEW Lib.\r
**/\r
VOID\r
);\r
\r
+/**\r
+ Init the SMBIOS VIEW API's environment for the 64-bit table..\r
+\r
+ @retval EFI_SUCCESS Successful to init the SMBIOS VIEW Lib.\r
+**/\r
+EFI_STATUS\r
+LibSmbios64BitInit (\r
+ VOID\r
+ );\r
+\r
/**\r
Cleanup the Smbios information.\r
**/\r
VOID\r
);\r
\r
+/**\r
+ Cleanup the Smbios information.\r
+**/\r
+VOID\r
+LibSmbios64BitCleanup (\r
+ VOID\r
+ );\r
+\r
/**\r
Get the entry point structure for the table.\r
\r
**/\r
VOID\r
LibSmbiosGetEPS (\r
- OUT SMBIOS_STRUCTURE_TABLE **EntryPointStructure\r
+ OUT SMBIOS_TABLE_ENTRY_POINT **EntryPointStructure\r
);\r
\r
/**\r
- Get SMBIOS structure given the Handle,copy data to the Buffer,\r
+ Get the entry point structure for the 64-bit table.\r
+\r
+ @param[out] EntryPointStructure The pointer to populate.\r
+**/\r
+VOID\r
+LibSmbios64BitGetEPS (\r
+ OUT SMBIOS_TABLE_3_0_ENTRY_POINT **EntryPointStructure\r
+ );\r
+\r
+/**\r
+ Return SMBIOS string for the given string number.\r
+\r
+ @param[in] Smbios Pointer to SMBIOS structure.\r
+ @param[in] StringNumber String number to return. -1 is used to skip all strings and\r
+ point to the next SMBIOS structure.\r
+\r
+ @return Pointer to string, or pointer to next SMBIOS strcuture if StringNumber == -1\r
+**/\r
+CHAR8*\r
+LibGetSmbiosString (\r
+ IN SMBIOS_STRUCTURE_POINTER *Smbios,\r
+ IN UINT16 StringNumber\r
+ );\r
+\r
+/**\r
+ Get SMBIOS structure for the given Handle,\r
Handle is changed to the next handle or 0xFFFF when the end is\r
reached or the handle is not found.\r
\r
- @param[in,out] Handle 0xFFFF: get the first structure\r
- Others: get a structure according to this value.\r
- @param[in,out] Buffer The pointer to the caller's memory buffer.\r
- @param[out] Length Length of return buffer in bytes.\r
+ @param[in, out] Handle 0xFFFF: get the first structure\r
+ Others: get a structure according to this value.\r
+ @param[out] Buffer The pointer to the pointer to the structure.\r
+ @param[out] Length Length of the structure.\r
\r
- @retval DMI_SUCCESS Buffer contains the required structure data\r
- Handle is updated with next structure handle or\r
+ @retval DMI_SUCCESS Handle is updated with next structure handle or\r
0xFFFF(end-of-list).\r
\r
- @retval DMI_INVALID_HANDLE Buffer not contain the requiring structure data.\r
- Handle is updated with next structure handle or\r
+ @retval DMI_INVALID_HANDLE Handle is updated with first structure handle or\r
0xFFFF(end-of-list).\r
**/\r
EFI_STATUS\r
LibGetSmbiosStructure (\r
IN OUT UINT16 *Handle,\r
- IN OUT UINT8 *Buffer,\r
+ OUT UINT8 **Buffer,\r
OUT UINT16 *Length\r
);\r
\r
/**\r
- Get a string from the smbios information.\r
-\r
- @param[in] Smbios The pointer to the smbios information.\r
- @param[in] StringNumber The index to the string to get.\r
- @param[out] Buffer The buffer to fill with the string when retrieved.\r
-**/\r
-VOID\r
-SmbiosGetPendingString (\r
- IN SMBIOS_STRUCTURE_POINTER *Smbios,\r
- IN UINT16 StringNumber,\r
- OUT CHAR8 *Buffer\r
- );\r
+ Get SMBIOS structure for the given Handle in 64-bit table,\r
+ Handle is changed to the next handle or 0xFFFF when the end is\r
+ reached or the handle is not found.\r
\r
-/**\r
- Check the structure to see if it is legal.\r
+ @param[in, out] Handle 0xFFFF: get the first structure\r
+ Others: get a structure according to this value.\r
+ @param[out] Buffer The pointer to the pointer to the structure.\r
+ @param[out] Length Length of the structure.\r
\r
- @param[in] Smbios - Pointer to the structure that will be checked.\r
+ @retval DMI_SUCCESS Handle is updated with next structure handle or\r
+ 0xFFFF(end-of-list).\r
\r
- @retval DMI_SUCCESS Structure data is legal.\r
- @retval DMI_BAD_PARAMETER Structure data contains bad parameter.\r
+ @retval DMI_INVALID_HANDLE Handle is updated with first structure handle or\r
+ 0xFFFF(end-of-list).\r
**/\r
EFI_STATUS\r
-SmbiosCheckStructure (\r
- IN SMBIOS_STRUCTURE_POINTER *Smbios\r
+LibGetSmbios64BitStructure (\r
+ IN OUT UINT16 *Handle,\r
+ OUT UINT8 **Buffer,\r
+ OUT UINT16 *Length\r
);\r
\r
#endif\r