]>
Commit | Line | Data |
---|---|---|
5d73d92f | 1 | /** @file\r |
2 | API for SMBIOS Plug and Play functions, access to SMBIOS table and structures.\r | |
3 | \r | |
4 | Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.<BR>\r | |
5 | This program and the accompanying materials\r | |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef _LIB_SMBIOS_VIEW_H\r | |
16 | #define _LIB_SMBIOS_VIEW_H\r | |
17 | \r | |
18 | #include "LibSmbios.h"\r | |
19 | \r | |
20 | #define DMI_SUCCESS 0x00\r | |
21 | #define DMI_UNKNOWN_FUNCTION 0x81\r | |
22 | #define DMI_FUNCTION_NOT_SUPPORTED 0x82\r | |
23 | #define DMI_INVALID_HANDLE 0x83\r | |
24 | #define DMI_BAD_PARAMETER 0x84\r | |
25 | #define DMI_INVALID_SUBFUNCTION 0x85\r | |
26 | #define DMI_NO_CHANGE 0x86\r | |
27 | #define DMI_ADD_STRUCTURE_FAILED 0x87\r | |
28 | #define DMI_READ_ONLY 0x8D\r | |
29 | #define DMI_LOCK_NOT_SUPPORTED 0x90\r | |
30 | #define DMI_CURRENTLY_LOCKED 0x91\r | |
31 | #define DMI_INVALID_LOCK 0x92\r | |
32 | \r | |
33 | #define INVALIDE_HANDLE (UINT16) (-1)\r | |
34 | \r | |
35 | #define EFI_SMBIOSERR(val) EFIERR (0x30000 | val)\r | |
36 | \r | |
37 | #define EFI_SMBIOSERR_FAILURE EFI_SMBIOSERR (1)\r | |
38 | #define EFI_SMBIOSERR_STRUCT_NOT_FOUND EFI_SMBIOSERR (2)\r | |
39 | #define EFI_SMBIOSERR_TYPE_UNKNOWN EFI_SMBIOSERR (3)\r | |
40 | #define EFI_SMBIOSERR_UNSUPPORTED EFI_SMBIOSERR (4)\r | |
41 | \r | |
42 | EFI_STATUS\r | |
43 | LibSmbiosInit (\r | |
44 | VOID\r | |
45 | );\r | |
46 | \r | |
47 | VOID\r | |
48 | LibSmbiosCleanup (\r | |
49 | VOID\r | |
50 | );\r | |
51 | \r | |
52 | VOID\r | |
53 | LibSmbiosGetEPS (\r | |
54 | SMBIOS_STRUCTURE_TABLE **pEntryPointStructure\r | |
55 | );\r | |
56 | \r | |
57 | VOID\r | |
58 | LibSmbiosGetStructHead (\r | |
59 | SMBIOS_STRUCTURE_POINTER *pHead\r | |
60 | );\r | |
61 | \r | |
62 | EFI_STATUS\r | |
63 | LibGetSmbiosInfo (\r | |
64 | OUT CHAR8 *dmiBIOSRevision,\r | |
65 | OUT UINT16 *NumStructures,\r | |
66 | OUT UINT16 *StructureSize,\r | |
67 | OUT UINT32 *dmiStorageBase,\r | |
68 | OUT UINT16 *dmiStorageSize\r | |
69 | );\r | |
70 | \r | |
71 | /*++\r | |
72 | Description:\r | |
73 | Get SMBIOS Information.\r | |
74 | \r | |
75 | Arguments:\r | |
76 | dmiBIOSRevision - Revision of the SMBIOS Extensions.\r | |
77 | NumStructures - Max. Number of Structures the BIOS will return.\r | |
78 | StructureSize - Size of largest SMBIOS Structure.\r | |
79 | dmiStorageBase - 32-bit physical base address for memory mapped SMBIOS data.\r | |
80 | dmiStorageSize - Size of the memory-mapped SMBIOS data.\r | |
81 | \r | |
82 | Returns:\r | |
83 | DMI_SUCCESS - successful.\r | |
84 | DMI_FUNCTION_NOT_SUPPORTED - Does not support SMBIOS calling interface capability.\r | |
85 | **/\r | |
86 | EFI_STATUS\r | |
87 | LibGetSmbiosStructure (\r | |
88 | IN OUT UINT16 *Handle,\r | |
89 | IN OUT UINT8 *Buffer,\r | |
90 | OUT UINT16 *Length\r | |
91 | );\r | |
92 | \r | |
93 | /*++\r | |
94 | Description:\r | |
95 | Get SMBIOS structure given the Handle,copy data to the Buffer,Handle is then the next.\r | |
96 | \r | |
97 | Arguments:\r | |
98 | Handle: - 0x0: get the first structure\r | |
99 | - Others: get a certain structure according to this value.\r | |
100 | Buffter: - contains the pointer to the caller's memory buffer.\r | |
101 | \r | |
102 | Returns:\r | |
103 | DMI_SUCCESS - Buffer contains the required structure data\r | |
104 | - Handle is updated with next structure handle or 0xFFFF(end-of-list).\r | |
105 | DMI_INVALID_HANDLE - Buffer not contain the requiring structure data\r | |
106 | - Handle is updated with next structure handle or 0xFFFF(end-of-list).\r | |
107 | **/\r | |
108 | VOID\r | |
109 | SmbiosGetPendingString (\r | |
110 | IN SMBIOS_STRUCTURE_POINTER *Smbios,\r | |
111 | IN UINT16 StringNumber,\r | |
112 | OUT CHAR8 *Buffer\r | |
113 | );\r | |
114 | \r | |
115 | EFI_STATUS\r | |
116 | SmbiosCheckStructure (\r | |
117 | IN SMBIOS_STRUCTURE_POINTER *Smbios\r | |
118 | );\r | |
119 | \r | |
120 | #endif\r |