TianoCore EDK2 master
Loading...
Searching...
No Matches
LibSmbiosView.c File Reference
#include "UefiShellDebug1CommandsLib.h"
#include <Guid/SmBios.h>
#include "LibSmbiosView.h"
#include "SmbiosView.h"

Go to the source code of this file.

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)
 

Variables

STATIC UINT8 mInit = 0
 
STATIC UINT8 m64Init = 0
 
STATIC SMBIOS_TABLE_ENTRY_POINTmSmbiosTable = NULL
 
STATIC SMBIOS_TABLE_3_0_ENTRY_POINTmSmbios64BitTable = NULL
 
STATIC SMBIOS_STRUCTURE_POINTER m_SmbiosStruct
 
STATIC SMBIOS_STRUCTURE_POINTERmSmbiosStruct = &m_SmbiosStruct
 
STATIC SMBIOS_STRUCTURE_POINTER m_Smbios64BitStruct
 
STATIC SMBIOS_STRUCTURE_POINTERmSmbios64BitStruct = &m_Smbios64BitStruct
 

Detailed Description

API for SMBIOS table.

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

Definition in file LibSmbiosView.c.

Function Documentation

◆ LibGetSmbios64BitStructure()

EFI_STATUS LibGetSmbios64BitStructure ( 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 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 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.

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.

Return values
EFI_SUCCESSSuccessful to init the SMBIOS VIEW Lib.

Definition at line 29 of file LibSmbiosView.c.

Variable Documentation

◆ m64Init

STATIC UINT8 m64Init = 0

Definition at line 15 of file LibSmbiosView.c.

◆ m_Smbios64BitStruct

STATIC SMBIOS_STRUCTURE_POINTER m_Smbios64BitStruct

Definition at line 20 of file LibSmbiosView.c.

◆ m_SmbiosStruct

Definition at line 18 of file LibSmbiosView.c.

◆ mInit

STATIC UINT8 mInit = 0

Definition at line 14 of file LibSmbiosView.c.

◆ mSmbios64BitStruct

STATIC SMBIOS_STRUCTURE_POINTER* mSmbios64BitStruct = &m_Smbios64BitStruct

Definition at line 21 of file LibSmbiosView.c.

◆ mSmbios64BitTable

Definition at line 17 of file LibSmbiosView.c.

◆ mSmbiosStruct

STATIC SMBIOS_STRUCTURE_POINTER* mSmbiosStruct = &m_SmbiosStruct

Definition at line 19 of file LibSmbiosView.c.

◆ mSmbiosTable

Definition at line 16 of file LibSmbiosView.c.