TianoCore EDK2 master
Loading...
Searching...
No Matches
LibSmbiosView.h File Reference

Go to the source code of this file.

Macros

#define DMI_SUCCESS   0x00
 
#define DMI_UNKNOWN_FUNCTION   0x81
 
#define DMI_FUNCTION_NOT_SUPPORTED   0x82
 
#define DMI_INVALID_HANDLE   0x83
 
#define DMI_BAD_PARAMETER   0x84
 
#define DMI_INVALID_SUBFUNCTION   0x85
 
#define DMI_NO_CHANGE   0x86
 
#define DMI_ADD_STRUCTURE_FAILED   0x87
 
#define DMI_READ_ONLY   0x8D
 
#define DMI_LOCK_NOT_SUPPORTED   0x90
 
#define DMI_CURRENTLY_LOCKED   0x91
 
#define DMI_INVALID_LOCK   0x92
 
#define INVALID_HANDLE   (UINT16) (-1)
 
#define EFI_SMBIOSERR(val)   EFIERR (0x30000 | val)
 
#define EFI_SMBIOSERR_FAILURE   EFI_SMBIOSERR (1)
 
#define EFI_SMBIOSERR_STRUCT_NOT_FOUND   EFI_SMBIOSERR (2)
 
#define EFI_SMBIOSERR_TYPE_UNKNOWN   EFI_SMBIOSERR (3)
 
#define EFI_SMBIOSERR_UNSUPPORTED   EFI_SMBIOSERR (4)
 

Functions

EFI_STATUS LibSmbiosInit (VOID)
 
EFI_STATUS LibSmbios64BitInit (VOID)
 
VOID LibSmbiosCleanup (VOID)
 
VOID LibSmbios64BitCleanup (VOID)
 
VOID LibSmbiosGetEPS (OUT SMBIOS_TABLE_ENTRY_POINT **EntryPointStructure)
 
VOID LibSmbios64BitGetEPS (OUT SMBIOS_TABLE_3_0_ENTRY_POINT **EntryPointStructure)
 
CHAR8 * LibGetSmbiosString (IN SMBIOS_STRUCTURE_POINTER *Smbios, IN UINT16 StringNumber)
 
EFI_STATUS LibGetSmbiosStructure (IN OUT UINT16 *Handle, OUT UINT8 **Buffer, OUT UINT16 *Length)
 
EFI_STATUS LibGetSmbios64BitStructure (IN OUT UINT16 *Handle, OUT UINT8 **Buffer, OUT UINT16 *Length)
 

Detailed Description

API for SMBIOS Plug and Play functions, access to SMBIOS table and structures.

Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file LibSmbiosView.h.

Macro Definition Documentation

◆ DMI_ADD_STRUCTURE_FAILED

#define DMI_ADD_STRUCTURE_FAILED   0x87

Definition at line 21 of file LibSmbiosView.h.

◆ DMI_BAD_PARAMETER

#define DMI_BAD_PARAMETER   0x84

Definition at line 18 of file LibSmbiosView.h.

◆ DMI_CURRENTLY_LOCKED

#define DMI_CURRENTLY_LOCKED   0x91

Definition at line 24 of file LibSmbiosView.h.

◆ DMI_FUNCTION_NOT_SUPPORTED

#define DMI_FUNCTION_NOT_SUPPORTED   0x82

Definition at line 16 of file LibSmbiosView.h.

◆ DMI_INVALID_HANDLE

#define DMI_INVALID_HANDLE   0x83

Definition at line 17 of file LibSmbiosView.h.

◆ DMI_INVALID_LOCK

#define DMI_INVALID_LOCK   0x92

Definition at line 25 of file LibSmbiosView.h.

◆ DMI_INVALID_SUBFUNCTION

#define DMI_INVALID_SUBFUNCTION   0x85

Definition at line 19 of file LibSmbiosView.h.

◆ DMI_LOCK_NOT_SUPPORTED

#define DMI_LOCK_NOT_SUPPORTED   0x90

Definition at line 23 of file LibSmbiosView.h.

◆ DMI_NO_CHANGE

#define DMI_NO_CHANGE   0x86

Definition at line 20 of file LibSmbiosView.h.

◆ DMI_READ_ONLY

#define DMI_READ_ONLY   0x8D

Definition at line 22 of file LibSmbiosView.h.

◆ DMI_SUCCESS

#define DMI_SUCCESS   0x00

Definition at line 14 of file LibSmbiosView.h.

◆ DMI_UNKNOWN_FUNCTION

#define DMI_UNKNOWN_FUNCTION   0x81

Definition at line 15 of file LibSmbiosView.h.

◆ EFI_SMBIOSERR

#define EFI_SMBIOSERR (   val)    EFIERR (0x30000 | val)

Definition at line 29 of file LibSmbiosView.h.

◆ EFI_SMBIOSERR_FAILURE

#define EFI_SMBIOSERR_FAILURE   EFI_SMBIOSERR (1)

Definition at line 31 of file LibSmbiosView.h.

◆ EFI_SMBIOSERR_STRUCT_NOT_FOUND

#define EFI_SMBIOSERR_STRUCT_NOT_FOUND   EFI_SMBIOSERR (2)

Definition at line 32 of file LibSmbiosView.h.

◆ EFI_SMBIOSERR_TYPE_UNKNOWN

#define EFI_SMBIOSERR_TYPE_UNKNOWN   EFI_SMBIOSERR (3)

Definition at line 33 of file LibSmbiosView.h.

◆ EFI_SMBIOSERR_UNSUPPORTED

#define EFI_SMBIOSERR_UNSUPPORTED   EFI_SMBIOSERR (4)

Definition at line 34 of file LibSmbiosView.h.

◆ INVALID_HANDLE

#define INVALID_HANDLE   (UINT16) (-1)

Definition at line 27 of file LibSmbiosView.h.

Function Documentation

◆ LibGetSmbios64BitStructure()

EFI_STATUS LibGetSmbios64BitStructure ( IN OUT UINT16 *  Handle,
OUT UINT8 **  Buffer,
OUT UINT16 *  Length 
)

Get SMBIOS structure for the given Handle in 64-bit table, Handle is changed to the next handle or 0xFFFF when the end is reached or the handle is not found.

Parameters
[in,out]Handle0xFFFF: get the first structure Others: get a structure according to this value.
[out]BufferThe pointer to the pointer to the structure.
[out]LengthLength of the structure.
Return values
DMI_SUCCESSHandle is updated with next structure handle or 0xFFFF(end-of-list).
DMI_INVALID_HANDLEHandle is updated with first structure handle or 0xFFFF(end-of-list).

Get SMBIOS structure for the given Handle, Handle is changed to the next handle or 0xFFFF when the end is reached or the handle is not found.

Parameters
[in,out]Handle0xFFFF: get the first structure Others: get a structure according to this value.
[out]BufferThe pointer to the pointer to the structure.
[out]LengthLength of the structure.
Return values
DMI_SUCCESSHandle is updated with next structure handle or 0xFFFF(end-of-list).
DMI_INVALID_HANDLEHandle is updated with first structure handle or 0xFFFF(end-of-list).

Definition at line 321 of file LibSmbiosView.c.

◆ LibGetSmbiosString()

CHAR8 * LibGetSmbiosString ( IN SMBIOS_STRUCTURE_POINTER Smbios,
IN UINT16  StringNumber 
)

Return SMBIOS string for the given string number.

Parameters
[in]SmbiosPointer to SMBIOS structure.
[in]StringNumberString number to return. -1 is used to skip all strings and point to the next SMBIOS structure.
Returns
Pointer to string, or pointer to next SMBIOS strcuture if StringNumber == -1

Definition at line 185 of file LibSmbiosView.c.

◆ LibGetSmbiosStructure()

EFI_STATUS LibGetSmbiosStructure ( IN OUT UINT16 *  Handle,
OUT UINT8 **  Buffer,
OUT UINT16 *  Length 
)

Get SMBIOS structure for the given Handle, Handle is changed to the next handle or 0xFFFF when the end is reached or the handle is not found.

Parameters
[in,out]Handle0xFFFF: get the first structure Others: get a structure according to this value.
[out]BufferThe pointer to the pointer to the structure.
[out]LengthLength of the structure.
Return values
DMI_SUCCESSHandle is updated with next structure handle or 0xFFFF(end-of-list).
DMI_INVALID_HANDLEHandle is updated with first structure handle or 0xFFFF(end-of-list).

Definition at line 247 of file LibSmbiosView.c.

◆ LibSmbios64BitCleanup()

VOID LibSmbios64BitCleanup ( VOID  )

Cleanup the Smbios information.

Definition at line 129 of file LibSmbiosView.c.

◆ LibSmbios64BitGetEPS()

VOID LibSmbios64BitGetEPS ( OUT SMBIOS_TABLE_3_0_ENTRY_POINT **  EntryPointStructure)

Get the entry point structure for the 64-bit table.

Parameters
[out]EntryPointStructureThe pointer to populate.

Get the entry point structure for the table.

Parameters
[out]EntryPointStructureThe pointer to populate.

Definition at line 165 of file LibSmbiosView.c.

◆ LibSmbios64BitInit()

EFI_STATUS LibSmbios64BitInit ( VOID  )

Init the SMBIOS VIEW API's environment for the 64-bit table..

Return values
EFI_SUCCESSSuccessful to init the SMBIOS VIEW Lib.

Init the SMBIOS VIEW API's environment.

Return values
EFI_SUCCESSSuccessful to init the SMBIOS VIEW Lib.

Definition at line 71 of file LibSmbiosView.c.

◆ LibSmbiosCleanup()

VOID LibSmbiosCleanup ( VOID  )

Cleanup the Smbios information.

Definition at line 111 of file LibSmbiosView.c.

◆ LibSmbiosGetEPS()

VOID LibSmbiosGetEPS ( OUT SMBIOS_TABLE_ENTRY_POINT **  EntryPointStructure)

Get the entry point structure for the table.

Parameters
[out]EntryPointStructureThe pointer to populate.

Definition at line 149 of file LibSmbiosView.c.

◆ LibSmbiosInit()

EFI_STATUS LibSmbiosInit ( VOID  )

Init the SMBIOS VIEW API's environment for the 32-bit table..

Return values
EFI_SUCCESSSuccessful to init the SMBIOS VIEW Lib.

Init the SMBIOS VIEW API's environment.

Return values
EFI_SUCCESSSuccessful to init the SMBIOS VIEW Lib.

Definition at line 29 of file LibSmbiosView.c.