2 API for SMBIOS Plug and Play functions, access to SMBIOS table and structures.
4 Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _LIB_SMBIOS_VIEW_H
16 #define _LIB_SMBIOS_VIEW_H
18 #include "LibSmbios.h"
20 #define DMI_SUCCESS 0x00
21 #define DMI_UNKNOWN_FUNCTION 0x81
22 #define DMI_FUNCTION_NOT_SUPPORTED 0x82
23 #define DMI_INVALID_HANDLE 0x83
24 #define DMI_BAD_PARAMETER 0x84
25 #define DMI_INVALID_SUBFUNCTION 0x85
26 #define DMI_NO_CHANGE 0x86
27 #define DMI_ADD_STRUCTURE_FAILED 0x87
28 #define DMI_READ_ONLY 0x8D
29 #define DMI_LOCK_NOT_SUPPORTED 0x90
30 #define DMI_CURRENTLY_LOCKED 0x91
31 #define DMI_INVALID_LOCK 0x92
33 #define INVALIDE_HANDLE (UINT16) (-1)
35 #define EFI_SMBIOSERR(val) EFIERR (0x30000 | val)
37 #define EFI_SMBIOSERR_FAILURE EFI_SMBIOSERR (1)
38 #define EFI_SMBIOSERR_STRUCT_NOT_FOUND EFI_SMBIOSERR (2)
39 #define EFI_SMBIOSERR_TYPE_UNKNOWN EFI_SMBIOSERR (3)
40 #define EFI_SMBIOSERR_UNSUPPORTED EFI_SMBIOSERR (4)
54 SMBIOS_STRUCTURE_TABLE
**pEntryPointStructure
58 LibSmbiosGetStructHead (
59 SMBIOS_STRUCTURE_POINTER
*pHead
64 OUT CHAR8
*dmiBIOSRevision
,
65 OUT UINT16
*NumStructures
,
66 OUT UINT16
*StructureSize
,
67 OUT UINT32
*dmiStorageBase
,
68 OUT UINT16
*dmiStorageSize
73 Get SMBIOS Information.
76 dmiBIOSRevision - Revision of the SMBIOS Extensions.
77 NumStructures - Max. Number of Structures the BIOS will return.
78 StructureSize - Size of largest SMBIOS Structure.
79 dmiStorageBase - 32-bit physical base address for memory mapped SMBIOS data.
80 dmiStorageSize - Size of the memory-mapped SMBIOS data.
83 DMI_SUCCESS - successful.
84 DMI_FUNCTION_NOT_SUPPORTED - Does not support SMBIOS calling interface capability.
87 LibGetSmbiosStructure (
88 IN OUT UINT16
*Handle
,
95 Get SMBIOS structure given the Handle,copy data to the Buffer,Handle is then the next.
98 Handle: - 0x0: get the first structure
99 - Others: get a certain structure according to this value.
100 Buffter: - contains the pointer to the caller's memory buffer.
103 DMI_SUCCESS - Buffer contains the required structure data
104 - Handle is updated with next structure handle or 0xFFFF(end-of-list).
105 DMI_INVALID_HANDLE - Buffer not contain the requiring structure data
106 - Handle is updated with next structure handle or 0xFFFF(end-of-list).
109 SmbiosGetPendingString (
110 IN SMBIOS_STRUCTURE_POINTER
*Smbios
,
111 IN UINT16 StringNumber
,
116 SmbiosCheckStructure (
117 IN SMBIOS_STRUCTURE_POINTER
*Smbios