]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Compatibility/PiSmbiosRecordOnDataHubSmbiosRecordThunk/Thunk.h
Maintainers.txt: Remove EdkCompatibilityPkg information
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / PiSmbiosRecordOnDataHubSmbiosRecordThunk / Thunk.h
CommitLineData
024b1029 1/** @file\r
2 The common header file for the thunk driver.\r
3 \r
80becbc9 4Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
584d5652 5This program and the accompanying materials\r
024b1029 6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#ifndef _DATAHUB_TO_SMBIOS_THUNK_\r
16#define _DATAHUB_TO_SMBIOS_THUNK_\r
17\r
18#include <FrameworkDxe.h>\r
19#include <IndustryStandard/SmBios.h>\r
20\r
21#include <Guid/EventGroup.h>\r
22#include <Guid/SmBios.h>\r
80becbc9 23#include <Guid/ZeroGuid.h>\r
024b1029 24#include <Protocol/DataHub.h>\r
25#include <Guid/DataHubRecords.h>\r
26#include <Protocol/HiiDatabase.h>\r
27#include <Protocol/Smbios.h>\r
28\r
29#include <Library/BaseLib.h>\r
30#include <Library/PcdLib.h>\r
31#include <Library/DebugLib.h>\r
32#include <Library/UefiLib.h>\r
33#include <Library/HiiLib.h>\r
34#include <Library/BaseMemoryLib.h>\r
35#include <Library/ReportStatusCodeLib.h>\r
36#include <Library/UefiDriverEntryPoint.h>\r
37#include <Library/MemoryAllocationLib.h>\r
38#include <Library/UefiBootServicesTableLib.h>\r
39\r
40//\r
41// Conversion Table that describes the translation method for\r
42// Data Hub Data Records of certain SubClass and RecordNumber\r
43//\r
44typedef enum {\r
26a76fbc
LG
45 BySubclassInstanceSubinstanceProducer,\r
46 BySubClassInstanceProducer,\r
47 MaxLocatingMethod\r
024b1029 48} SMBIOS_STRUCTURE_LOCATING_METHOD;\r
49\r
50typedef enum {\r
26a76fbc
LG
51 RecordDataUnchangedOffsetSpecified,\r
52 ByFunctionWithOffsetSpecified,\r
53 ByFunction,\r
54 ByFunctionWithWholeDataRecord,\r
55 MaxFieldFillingMethod\r
024b1029 56} SMBIOS_FIELD_FILLING_METHOD;\r
57\r
58typedef struct _SMBIOS_STRUCTURE_NODE SMBIOS_STRUCTURE_NODE;\r
59\r
60typedef struct {\r
61 UINT8 Type;\r
62 UINT8 Length;\r
63 UINT16 Handle;\r
64 UINT8 Tailing[2];\r
65} EFI_SMBIOS_TABLE_TYPE127;\r
66\r
67typedef\r
68EFI_STATUS\r
69(*SMBIOS_FIELD_FILLING_FUNCTION) (\r
70 IN OUT SMBIOS_STRUCTURE_NODE * StructureNode,\r
71 IN UINT32 Offset OPTIONAL,\r
72 IN VOID *RecordData,\r
73 IN UINT32 RecordDataSize\r
74 );\r
75\r
76typedef struct {\r
77 //\r
78 // Data Hub Data Record's SubClass and RecordNumber\r
79 //\r
80 EFI_GUID SubClass;\r
81 UINT32 RecordType;\r
82\r
83 //\r
84 // Translation method applied\r
85 //\r
86 UINT8 SmbiosType;\r
87 SMBIOS_STRUCTURE_LOCATING_METHOD StructureLocatingMethod;\r
88 SMBIOS_FIELD_FILLING_METHOD FieldFillingMethod;\r
89 UINT32 FieldOffset;\r
90 SMBIOS_FIELD_FILLING_FUNCTION FieldFillingFunction;\r
91\r
92} SMBIOS_CONVERSION_TABLE_ENTRY;\r
93\r
94//\r
95// SMBIOS_LINK_DATA_FIXUP nodes indicate the Link fields that\r
96// need to be fixed up when creating the resulting Smbios image.\r
97//\r
98#define SMBIOS_LINK_DATA_FIXUP_NODE_SIGNATURE SIGNATURE_32 ('S', 'm', 'l', 'n')\r
99\r
100typedef struct {\r
101\r
102 UINT32 Signature;\r
103 LIST_ENTRY Link;\r
104\r
105 UINT32 Offset;\r
106 UINT8 TargetType;\r
107 EFI_GUID SubClass;\r
108 EFI_INTER_LINK_DATA LinkData;\r
109\r
110} SMBIOS_LINK_DATA_FIXUP_NODE;\r
111\r
112//\r
113// The global Structure List node.\r
114// The Structure List is populated as more and more\r
115// Structures (of various types) are discovered and inserted.\r
116// The nodes in the Structure List will be concatenated\r
117// to form the ultimate SMBIOS table.\r
118//\r
119#define SMBIOS_STRUCTURE_NODE_SIGNATURE SIGNATURE_32 ('S', 'm', 'b', 's')\r
120\r
121struct _SMBIOS_STRUCTURE_NODE {\r
122\r
123 UINT32 Signature;\r
124 LIST_ENTRY Link;\r
125\r
126 //\r
127 // Tags\r
128 //\r
129 EFI_GUID SubClass;\r
130 UINT16 Instance;\r
131 UINT16 SubInstance;\r
132 EFI_GUID ProducerName;\r
133\r
134 //\r
135 // the Smbios structure\r
136 //\r
137 UINT32 StructureSize; // Actual structure size including strings\r
138\r
139 EFI_SMBIOS_TABLE_HEADER *Structure;\r
140 \r
141 \r
142 EFI_SMBIOS_HANDLE SmbiosHandle; // Smbios Handle in SMBIOS database.\r
143 \r
144 EFI_SMBIOS_TYPE SmbiosType;\r
145 \r
146 LIST_ENTRY LinkDataFixup;\r
147 \r
148};\r
149\r
150//\r
151// Smbios type info table. Indicates minimum length\r
152// for each Smbios type as the indicator of the initial size of buffer\r
153// allocated for the structure instance of a specific type.\r
154//\r
155typedef struct {\r
156\r
157 UINT8 Type;\r
158 UINT8 MinLength; // Minimal structure size including\r
159 // TWO trailing bytes of 0x00\r
160 //\r
161 BOOLEAN IsRequired; // Required structure type defined by Smbios Spec\r
162 BOOLEAN IsCreated; // Created in this run\r
163} SMBIOS_TYPE_INFO_TABLE_ENTRY;\r
164\r
165//\r
166// EDK framwork Memory Data hub definition to support EDK/Framework driver.\r
167//\r
168typedef struct {\r
169 STRING_REF MemoryDeviceLocator;\r
170 STRING_REF MemoryBankLocator;\r
171 STRING_REF MemoryManufacturer;\r
172 STRING_REF MemorySerialNumber;\r
173 STRING_REF MemoryAssetTag;\r
174 STRING_REF MemoryPartNumber;\r
175 EFI_INTER_LINK_DATA MemoryArrayLink;\r
176 EFI_INTER_LINK_DATA MemorySubArrayLink;\r
177 UINT16 MemoryTotalWidth;\r
178 UINT16 MemoryDataWidth;\r
179 UINT64 MemoryDeviceSize;\r
180 EFI_MEMORY_FORM_FACTOR MemoryFormFactor;\r
181 UINT8 MemoryDeviceSet;\r
182 EFI_MEMORY_ARRAY_TYPE MemoryType;\r
183 EFI_MEMORY_TYPE_DETAIL MemoryTypeDetail;\r
184 UINT16 MemorySpeed;\r
185 EFI_MEMORY_STATE MemoryState;\r
186 UINT8 MemoryAttributes;\r
187} FRAMEWORK_MEMORY_ARRAY_LINK_DATA;\r
188\r
189typedef struct {\r
190 EFI_MEMORY_ARRAY_LOCATION MemoryArrayLocation;\r
191 EFI_MEMORY_ARRAY_USE MemoryArrayUse;\r
192 EFI_MEMORY_ERROR_CORRECTION MemoryErrorCorrection;\r
193 UINT32 MaximumMemoryCapacity;\r
194 UINT16 NumberMemoryDevices;\r
195} FRAMEWORK_MEMORY_ARRAY_LOCATION_DATA;\r
196\r
197//\r
198// Global variables\r
199//\r
200extern SMBIOS_CONVERSION_TABLE_ENTRY mConversionTable[];\r
201extern SMBIOS_TYPE_INFO_TABLE_ENTRY mTypeInfoTable[];\r
202extern LIST_ENTRY mStructureList;\r
203\r
204//\r
205// Function Prototypes\r
206//\r
207/**\r
208 Smbios data filter function. This function is invoked when there is data records\r
209 available in the Data Hub. \r
210\r
211 @param Event The event that is signaled.\r
212 @param Context not used here.\r
213**/\r
214VOID\r
215EFIAPI\r
216SmbiosDataFilter (\r
217 IN EFI_EVENT Event,\r
218 IN VOID *Context\r
219 );\r
220\r
221//\r
222// Function prototypes\r
223//\r
224/**\r
225 Process a datahub's record and find corresponding translation way to translate\r
226 to SMBIOS record.\r
227 \r
228 @param Record Point to datahub record.\r
229**/\r
230VOID\r
231SmbiosProcessDataRecord (\r
232 IN EFI_DATA_RECORD_HEADER *Record\r
26a76fbc 233 );\r
024b1029 234\r
235/**\r
236 Calculate the minimal length for a SMBIOS type. This length maybe not equal\r
237 to sizeof (SMBIOS_RECORD_STRUCTURE), but defined in conformance chapter in SMBIOS specification.\r
238 \r
239 @param Type SMBIOS's type.\r
240 \r
241 @return the minimal length of a smbios record.\r
242**/\r
243UINT32\r
244SmbiosGetTypeMinimalLength (\r
245 IN UINT8 Type\r
26a76fbc 246 );\r
024b1029 247\r
248/**\r
249 Enlarge the structure buffer of a structure node in SMBIOS database.\r
250 The function maybe lead the structure pointer for SMBIOS record changed.\r
251 \r
252 @param StructureNode The structure node whose structure buffer is to be enlarged.\r
253 @param NewLength The new length of SMBIOS record which does not include unformat area.\r
254 @param OldBufferSize The old size of SMBIOS record buffer.\r
bd1a4d18 255 @param NewBufferSize The new size is targeted for enlarged.\r
024b1029 256 \r
257 @retval EFI_OUT_OF_RESOURCES No more memory to allocate new record\r
258 @retval EFI_SUCCESS Success to enlarge the record buffer size.\r
259**/\r
260EFI_STATUS\r
261SmbiosEnlargeStructureBuffer (\r
262 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
263 UINT8 NewLength,\r
264 UINTN OldBufferSize,\r
265 UINTN NewBufferSize\r
266 );\r
267\r
2788ff51 268/**\r
269 Update the structure buffer of a structure node in SMBIOS database.\r
270 The function lead the structure pointer for SMBIOS record changed.\r
271 \r
272 @param StructureNode The structure node whose structure buffer is to be enlarged.\r
273 @param NewRecord The new SMBIOS record.\r
274 \r
275**/\r
276VOID\r
277SmbiosUpdateStructureBuffer (\r
278 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
279 IN EFI_SMBIOS_TABLE_HEADER *NewRecord\r
280 );\r
281\r
024b1029 282/**\r
26a76fbc
LG
283 Fill a standard Smbios string field. \r
284 \r
285 This function will convert the unicode string to single byte chars, and only\r
286 English language is supported.\r
024b1029 287 This function changes the Structure pointer value of the structure node, \r
288 which should be noted by Caller.\r
289 \r
290 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
291 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
292 @param RecordData RecordData buffer will be filled.\r
293 @param RecordDataSize The size of RecordData buffer.\r
294 \r
295 @retval EFI_INVALID_PARAMETER RecordDataSize is too larger\r
296 @retval EFI_OUT_OF_RESOURCES No memory to allocate new buffer for string\r
297 @retval EFI_SUCCESS Sucess append string for a SMBIOS record.\r
298**/\r
299EFI_STATUS\r
300SmbiosFldString (\r
301 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
302 IN UINT32 Offset,\r
303 IN VOID *RecordData,\r
304 IN UINT32 RecordDataSize\r
26a76fbc 305 );\r
024b1029 306\r
307/**\r
308 Fill the inter link field for a SMBIOS recorder.\r
309 \r
310 Some SMBIOS recorder need to reference the handle of another SMBIOS record. But\r
311 maybe another SMBIOS record has not been added, so put the InterLink request into\r
312 a linked list and the interlink will be fixedup when a new SMBIOS record is added.\r
313 \r
314 @param StructureNode Point to SMBIOS_STRUCTURE_NODE which reference another record's handle\r
315 @param LinkSmbiosNodeOffset The offset in this record for holding the handle of another SMBIOS record\r
316 @param LinkSmbiosType The type of SMBIOS record want to be linked.\r
317 @param InterLink Point to EFI_INTER_LINK_DATA will be put linked list.\r
318 @param SubClassGuid The guid of subclass for linked SMBIOS record.\r
319 \r
320 @retval EFI_SUCESS The linked record is found and no need fixup in future.\r
321 @retval !EFI_SUCESS The linked record can not be found and InterLink is put a fixing-p linked list.\r
322**/\r
323EFI_STATUS\r
324SmbiosFldInterLink (\r
325 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
326 IN UINT16 LinkSmbiosNodeOffset,\r
327 IN UINT8 LinkSmbiosType,\r
328 IN EFI_INTER_LINK_DATA *InterLink,\r
329 IN EFI_GUID *SubClassGuid\r
26a76fbc 330 );\r
024b1029 331\r
332/**\r
333 Find a handle that matches the Link Data and the target Smbios type.\r
334 \r
335 @param TargetType the Smbios type\r
336 @param SubClass the SubClass\r
337 @param LinkData Specifies Instance, SubInstance and ProducerName\r
338 @param Handle the HandleNum found \r
339 \r
340 @retval EFI_NOT_FOUND Can not find the record according to handle\r
341 @retval EFI_SUCCESS Success to find the handle\r
342**/\r
343EFI_STATUS\r
344SmbiosFindHandle (\r
345 IN UINT8 TargetType,\r
346 IN EFI_GUID *SubClass,\r
347 IN EFI_INTER_LINK_DATA *LinkData,\r
348 IN OUT UINT16 *HandleNum\r
26a76fbc 349 );\r
024b1029 350\r
26a76fbc
LG
351/**\r
352 Field Filling Function. Transform an EFI_EXP_BASE10_DATA to a word, with 'Mega'\r
353 as the unit.\r
354 \r
355 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
356 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
357 @param RecordData RecordData buffer will be filled.\r
358 @param RecordDataSize The size of RecordData buffer.\r
359 \r
360 @retval EFI_INVALID_PARAMETER RecordDataSize is invalid. \r
361 @retval EFI_SUCCESS RecordData is successed to be filled into given SMBIOS record.\r
362**/\r
024b1029 363EFI_STATUS\r
364SmbiosFldBase10ToWordWithMega (\r
365 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
366 IN UINT32 Offset,\r
367 IN VOID *RecordData,\r
368 IN UINT32 RecordDataSize\r
26a76fbc 369 );\r
024b1029 370\r
26a76fbc
LG
371/**\r
372 Field Filling Function. Transform an EFI_EXP_BASE2_DATA to a word, with 'Kilo'\r
373 as the unit. Granularity implemented for Cache Size.\r
374 \r
375 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
376 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
377 @param RecordData RecordData buffer will be filled.\r
378 @param RecordDataSize The size of RecordData buffer.\r
379 \r
380 @retval EFI_INVALID_PARAMETER RecordDataSize is invalid. \r
381 @retval EFI_SUCCESS RecordData is successed to be filled into given SMBIOS record.\r
382**/\r
024b1029 383EFI_STATUS\r
384SmbiosFldBase2ToWordWithKilo (\r
385 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
386 IN UINT32 Offset,\r
387 IN VOID *RecordData,\r
388 IN UINT32 RecordDataSize\r
26a76fbc 389 );\r
024b1029 390\r
26a76fbc
LG
391/**\r
392 Field Filling Function: truncate record data to byte and fill in the\r
393 field as indicated by Offset.\r
394 \r
395 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
396 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
397 @param RecordData RecordData buffer will be filled.\r
398 @param RecordDataSize The size of RecordData buffer.\r
399 \r
400 @retval EFI_INVALID_PARAMETER RecordDataSize is invalid. \r
401 @retval EFI_SUCCESS RecordData is successed to be filled into given SMBIOS record.\r
402**/\r
024b1029 403EFI_STATUS\r
404SmbiosFldTruncateToByte (\r
405 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
406 IN UINT32 Offset,\r
407 IN VOID *RecordData,\r
408 IN UINT32 RecordDataSize\r
26a76fbc 409 );\r
024b1029 410\r
26a76fbc
LG
411/**\r
412 Field Filling Function for Processor SubClass record type 6 -- ProcessorID.\r
413 Offset is mandatory.\r
414 \r
415 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
416 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
417 @param RecordData RecordData buffer will be filled.\r
418 @param RecordDataSize The size of RecordData buffer.\r
419 \r
420 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
421**/\r
024b1029 422EFI_STATUS\r
423SmbiosFldProcessorType6 (\r
424 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
425 IN UINT32 Offset,\r
426 IN VOID *RecordData,\r
427 IN UINT32 RecordDataSize\r
26a76fbc 428 );\r
024b1029 429\r
26a76fbc
LG
430/**\r
431 Field Filling Function for Processor SubClass record type 9 -- Voltage.\r
432 Offset is mandatory.\r
433 \r
434 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
435 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
436 @param RecordData RecordData buffer will be filled.\r
437 @param RecordDataSize The size of RecordData buffer.\r
438 \r
439 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
440**/\r
024b1029 441EFI_STATUS\r
442SmbiosFldProcessorType9 (\r
443 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
444 IN UINT32 Offset,\r
445 IN VOID *RecordData,\r
446 IN UINT32 RecordDataSize\r
26a76fbc 447 );\r
024b1029 448\r
26a76fbc
LG
449/**\r
450 Field Filling Function for Processor SubClass record type 17 -- Cache association.\r
451 \r
452 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
453 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
454 @param RecordData RecordData buffer will be filled.\r
455 @param RecordDataSize The size of RecordData buffer.\r
456 \r
457 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
458**/\r
024b1029 459EFI_STATUS\r
460SmbiosFldProcessorType17 (\r
461 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
462 IN UINT32 Offset,\r
463 IN VOID *RecordData,\r
464 IN UINT32 RecordDataSize\r
26a76fbc 465 );\r
024b1029 466\r
26a76fbc
LG
467/**\r
468 Field Filling Function. Transform an EFI_EXP_BASE2_DATA to a word, with 10exp-9\r
469 as the unit.\r
470 \r
471 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
472 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
473 @param RecordData RecordData buffer will be filled.\r
474 @param RecordDataSize The size of RecordData buffer.\r
475 \r
476 @retval EFI_INVALID_PARAMETER RecordDataSize is invalid. \r
477 @retval EFI_SUCCESS RecordData is successed to be filled into given SMBIOS record.\r
478**/\r
024b1029 479EFI_STATUS\r
480SmbiosFldBase10ToByteWithNano (\r
481 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
482 IN UINT32 Offset,\r
483 IN VOID *RecordData,\r
484 IN UINT32 RecordDataSize\r
26a76fbc 485 );\r
024b1029 486\r
26a76fbc
LG
487/**\r
488 Field Filling Function: truncate record data to byte and fill in the\r
489 field as indicated by Offset.\r
490 \r
491 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
492 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
493 @param RecordData RecordData buffer will be filled.\r
494 @param RecordDataSize The size of RecordData buffer.\r
495 \r
496 @retval EFI_INVALID_PARAMETER RecordDataSize is invalid. \r
497 @retval EFI_SUCCESS RecordData is successed to be filled into given SMBIOS record.\r
498**/\r
024b1029 499EFI_STATUS\r
500SmbiosFldTruncateToWord (\r
501 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
502 IN UINT32 Offset,\r
503 IN VOID *RecordData,\r
504 IN UINT32 RecordDataSize\r
26a76fbc
LG
505 );\r
506\r
507/**\r
508 Field Filling Function for Cache SubClass record type 10 -- Cache Config.\r
509 Offset is mandatory\r
024b1029 510\r
26a76fbc
LG
511 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
512 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
513 @param RecordData RecordData buffer will be filled.\r
514 @param RecordDataSize The size of RecordData buffer.\r
515 \r
516 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
517**/\r
024b1029 518EFI_STATUS\r
519SmbiosFldCacheType10 (\r
520 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
521 IN UINT32 Offset,\r
522 IN VOID *RecordData,\r
523 IN UINT32 RecordDataSize\r
26a76fbc 524 );\r
024b1029 525\r
26a76fbc
LG
526/**\r
527 Check if OEM structure has included 2 trailing 0s in data record.\r
528 \r
529 @param RecordData Point to record data will be checked.\r
530 @param RecordDataSize The size of record data.\r
531 \r
532 @retval 0 2 trailing 0s exist in unformatted section\r
533 @retval 1 1 trailing 0 exists at the end of unformatted section\r
534 @retval -1 There is no 0 at the end of unformatted section\r
535**/\r
024b1029 536INT8\r
537SmbiosCheckTrailingZero (\r
538 IN VOID *RecordData,\r
539 IN UINT32 RecordDataSize\r
26a76fbc 540 );\r
024b1029 541\r
26a76fbc
LG
542/**\r
543 Field Filling Function for Cache SubClass record type 5&6 -- Cache SRAM type.\r
544 Offset is mandatory\r
545 \r
546 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
547 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
548 @param RecordData RecordData buffer will be filled.\r
549 @param RecordDataSize The size of RecordData buffer.\r
550 \r
551 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
552**/\r
024b1029 553EFI_STATUS\r
554SmbiosFldCacheType5 (\r
555 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
556 IN UINT32 Offset,\r
557 IN VOID *RecordData,\r
558 IN UINT32 RecordDataSize\r
26a76fbc 559 );\r
024b1029 560\r
26a76fbc
LG
561/**\r
562 Field Filling Function for Memory SubClass record type 2 -- Physical Memory\r
563 Array.\r
564 \r
565 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
566 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
567 @param RecordData RecordData buffer will be filled.\r
568 @param RecordDataSize The size of RecordData buffer.\r
569 \r
570 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
571**/\r
024b1029 572EFI_STATUS\r
573SmbiosFldMemoryType2 (\r
574 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
575 IN UINT32 Offset,\r
576 IN VOID *RecordData,\r
577 IN UINT32 RecordDataSize\r
26a76fbc 578 );\r
024b1029 579\r
26a76fbc
LG
580/**\r
581 Field Filling Function for Memory SubClass record type 3 -\r
582 - Memory Device: SMBIOS Type 17\r
583 \r
584 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
585 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
586 @param RecordData RecordData buffer will be filled.\r
587 @param RecordDataSize The size of RecordData buffer.\r
588 \r
589 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
590**/\r
024b1029 591EFI_STATUS\r
592SmbiosFldMemoryType3 (\r
593 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
594 IN UINT32 Offset,\r
595 IN VOID *RecordData,\r
596 IN UINT32 RecordDataSize\r
26a76fbc 597 );\r
024b1029 598\r
26a76fbc
LG
599/**\r
600 Field Filling Function for Memory SubClass record type 4\r
601 -- Memory Array Mapped Address: SMBIOS Type 19\r
602 \r
603 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
604 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
605 @param RecordData RecordData buffer will be filled.\r
606 @param RecordDataSize The size of RecordData buffer.\r
607 \r
608 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
609**/\r
024b1029 610EFI_STATUS\r
611SmbiosFldMemoryType4 (\r
612 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
613 IN UINT32 Offset,\r
614 IN VOID *RecordData,\r
615 IN UINT32 RecordDataSize\r
26a76fbc 616 );\r
024b1029 617\r
26a76fbc
LG
618/**\r
619 Field Filling Function for Memory SubClass record type 5\r
620 -- Memory Device Mapped Address: SMBIOS Type 20\r
621 \r
622 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
623 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
624 @param RecordData RecordData buffer will be filled.\r
625 @param RecordDataSize The size of RecordData buffer.\r
626 \r
627 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
628**/\r
024b1029 629EFI_STATUS\r
630SmbiosFldMemoryType5 (\r
631 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
632 IN UINT32 Offset,\r
633 IN VOID *RecordData,\r
634 IN UINT32 RecordDataSize\r
26a76fbc 635 );\r
024b1029 636\r
26a76fbc
LG
637/**\r
638 Field Filling Function for Memory SubClass record type 6\r
639 -- Memory Channel Type: SMBIOS Type 37\r
640 \r
641 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
642 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
643 @param RecordData RecordData buffer will be filled.\r
644 @param RecordDataSize The size of RecordData buffer.\r
645 \r
646 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
647**/\r
024b1029 648EFI_STATUS\r
649SmbiosFldMemoryType6 (\r
650 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
651 IN UINT32 Offset,\r
652 IN VOID *RecordData,\r
653 IN UINT32 RecordDataSize\r
26a76fbc 654 );\r
024b1029 655\r
26a76fbc
LG
656/**\r
657 Field Filling Function for Memory SubClass record type 7\r
658 -- Memory Channel Device: SMBIOS Type 37\r
659 \r
660 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
661 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
662 @param RecordData RecordData buffer will be filled.\r
663 @param RecordDataSize The size of RecordData buffer.\r
664 \r
665 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
666**/\r
024b1029 667EFI_STATUS\r
668SmbiosFldMemoryType7 (\r
669 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
670 IN UINT32 Offset,\r
671 IN VOID *RecordData,\r
672 IN UINT32 RecordDataSize\r
26a76fbc 673 );\r
024b1029 674\r
26a76fbc
LG
675/**\r
676 Field Filling Function for Memory SubClass record type 8\r
677 -- Memory Controller information: SMBIOS Type 5\r
678 \r
679 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
680 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
681 @param RecordData RecordData buffer will be filled.\r
682 @param RecordDataSize The size of RecordData buffer.\r
683 \r
684 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
685**/\r
024b1029 686EFI_STATUS\r
687SmbiosFldMemoryType8 (\r
688 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
689 IN UINT32 Offset,\r
690 IN VOID *RecordData,\r
691 IN UINT32 RecordDataSize\r
26a76fbc 692 );\r
024b1029 693\r
26a76fbc
LG
694/**\r
695 Field Filling Function for Memory SubClass record type \r
696 -- Memory 32 Bit Error Information: SMBIOS Type 18\r
697 \r
698 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
699 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
700 @param RecordData RecordData buffer will be filled.\r
701 @param RecordDataSize The size of RecordData buffer.\r
702 \r
703 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
704**/\r
024b1029 705EFI_STATUS\r
706SmbiosFldMemoryType9 (\r
707 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
708 IN UINT32 Offset,\r
709 IN VOID *RecordData,\r
710 IN UINT32 RecordDataSize\r
26a76fbc 711 );\r
024b1029 712\r
26a76fbc
LG
713/**\r
714 Field Filling Function for Memory SubClass record type \r
715 -- Memory 64 Bit Error Information: SMBIOS Type 33\r
716 \r
717 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
718 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
719 @param RecordData RecordData buffer will be filled.\r
720 @param RecordDataSize The size of RecordData buffer.\r
721 \r
722 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
723**/\r
024b1029 724EFI_STATUS\r
725SmbiosFldMemoryType10 (\r
726 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
727 IN UINT32 Offset,\r
728 IN VOID *RecordData,\r
729 IN UINT32 RecordDataSize\r
26a76fbc 730 );\r
024b1029 731\r
26a76fbc
LG
732/**\r
733 Field Filling Function for Misc SubClass record type 0 -- Bios Information.\r
734 \r
735 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
736 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
737 @param RecordData RecordData buffer will be filled.\r
738 @param RecordDataSize The size of RecordData buffer.\r
739 \r
740 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
741**/\r
024b1029 742EFI_STATUS\r
743SmbiosFldMiscType0 (\r
744 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
745 IN UINT32 Offset,\r
746 IN VOID *RecordData,\r
747 IN UINT32 RecordDataSize\r
26a76fbc 748 );\r
024b1029 749\r
26a76fbc
LG
750/**\r
751 Field Filling Function. Transform an EFI_EXP_BASE2_DATA to a byte, with '64k'\r
752 as the unit.\r
753 \r
754 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
755 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
756 @param RecordData RecordData buffer will be filled.\r
757 @param RecordDataSize The size of RecordData buffer.\r
758 \r
759 @retval EFI_INVALID_PARAMETER RecordDataSize is invalid. \r
760 @retval EFI_SUCCESS RecordData is successed to be filled into given SMBIOS record.\r
761**/\r
024b1029 762EFI_STATUS\r
763SmbiosFldBase2ToByteWith64K (\r
764 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
765 IN UINT32 Offset,\r
766 IN VOID *RecordData,\r
767 IN UINT32 RecordDataSize\r
26a76fbc 768 );\r
024b1029 769\r
26a76fbc
LG
770/**\r
771 Field Filling Function for Misc SubClass record type 1 -- System Information.\r
772 \r
773 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
774 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
775 @param RecordData RecordData buffer will be filled.\r
776 @param RecordDataSize The size of RecordData buffer.\r
777 \r
778 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
779**/\r
024b1029 780EFI_STATUS\r
781SmbiosFldMiscType1 (\r
782 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
783 IN UINT32 Offset,\r
784 IN VOID *RecordData,\r
785 IN UINT32 RecordDataSize\r
26a76fbc 786 );\r
024b1029 787\r
26a76fbc
LG
788/**\r
789 Field Filling Function for record type 2 -- Base Board Manufacture.\r
790 \r
791 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
792 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
793 @param RecordData RecordData buffer will be filled.\r
794 @param RecordDataSize The size of RecordData buffer.\r
795 \r
796 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
797**/\r
024b1029 798EFI_STATUS\r
799SmbiosFldMiscType2 (\r
800 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
801 IN UINT32 Offset,\r
802 IN VOID *RecordData,\r
803 IN UINT32 RecordDataSize\r
26a76fbc 804 );\r
024b1029 805\r
26a76fbc
LG
806/**\r
807 Field Filling Function for Misc SubClass record type 3 -\r
808 - System Enclosure or Chassis.\r
809 \r
810 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
811 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
812 @param RecordData RecordData buffer will be filled.\r
813 @param RecordDataSize The size of RecordData buffer.\r
814 \r
815 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
816**/\r
024b1029 817EFI_STATUS\r
818SmbiosFldMiscType3 (\r
819 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
820 IN UINT32 Offset,\r
821 IN VOID *RecordData,\r
822 IN UINT32 RecordDataSize\r
26a76fbc 823 );\r
024b1029 824\r
26a76fbc
LG
825/**\r
826 Field Filling Function for Misc SubClass record type 8 -- Port Connector.\r
827 \r
828 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
829 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
830 @param RecordData RecordData buffer will be filled.\r
831 @param RecordDataSize The size of RecordData buffer.\r
832 \r
833 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
834**/\r
024b1029 835EFI_STATUS\r
836SmbiosFldMiscType8 (\r
837 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
838 IN UINT32 Offset,\r
839 IN VOID *RecordData,\r
840 IN UINT32 RecordDataSize\r
26a76fbc 841 );\r
024b1029 842\r
26a76fbc
LG
843/**\r
844 Field Filling Function for Misc SubClass record type 9 -- System slot.\r
845 \r
846 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
847 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
848 @param RecordData RecordData buffer will be filled.\r
849 @param RecordDataSize The size of RecordData buffer.\r
850 \r
851 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
852**/\r
024b1029 853EFI_STATUS\r
854SmbiosFldMiscType9 (\r
855 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
856 IN UINT32 Offset,\r
857 IN VOID *RecordData,\r
858 IN UINT32 RecordDataSize\r
26a76fbc 859 );\r
024b1029 860\r
26a76fbc
LG
861/**\r
862 Field Filling Function for Misc SubClass record type 10 - Onboard Device.\r
863 \r
864 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
865 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
866 @param RecordData RecordData buffer will be filled.\r
867 @param RecordDataSize The size of RecordData buffer.\r
868 \r
869 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
870**/\r
024b1029 871EFI_STATUS\r
872SmbiosFldMiscType10 (\r
873 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
874 IN UINT32 Offset,\r
875 IN VOID *RecordData,\r
876 IN UINT32 RecordDataSize\r
26a76fbc 877 );\r
024b1029 878\r
26a76fbc
LG
879/**\r
880 Field Filling Function for Misc SubClass record type 11 - OEM Strings.\r
881 \r
882 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
883 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
884 @param RecordData RecordData buffer will be filled.\r
885 @param RecordDataSize The size of RecordData buffer.\r
886 \r
887 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
888**/\r
024b1029 889EFI_STATUS\r
890SmbiosFldMiscType11 (\r
891 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
892 IN UINT32 Offset,\r
893 IN VOID *RecordData,\r
894 IN UINT32 RecordDataSize\r
26a76fbc 895 );\r
024b1029 896\r
26a76fbc
LG
897/**\r
898 Field Filling Function for Misc SubClass record type 12 - System Options.\r
899 \r
900 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
901 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
902 @param RecordData RecordData buffer will be filled.\r
903 @param RecordDataSize The size of RecordData buffer.\r
904 \r
905 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
906**/\r
024b1029 907EFI_STATUS\r
908SmbiosFldMiscType12 (\r
909 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
910 IN UINT32 Offset,\r
911 IN VOID *RecordData,\r
912 IN UINT32 RecordDataSize\r
26a76fbc 913 );\r
024b1029 914\r
26a76fbc
LG
915/**\r
916 Field Filling Function for Misc SubClass record type 13 - BIOS Language.\r
917 \r
918 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
919 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
920 @param RecordData RecordData buffer will be filled.\r
921 @param RecordDataSize The size of RecordData buffer.\r
922 \r
923 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
924**/\r
024b1029 925EFI_STATUS\r
926SmbiosFldMiscType13 (\r
927 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
928 IN UINT32 Offset,\r
929 IN VOID *RecordData,\r
930 IN UINT32 RecordDataSize\r
26a76fbc 931 );\r
024b1029 932\r
26a76fbc
LG
933/**\r
934 Field Filling Function for Misc SubClass record type 14 - System Language String\r
935 Current solution assumes that EFI_MISC_SYSTEM_LANGUAGE_STRINGs are logged with\r
936 their LanguageId having ascending orders.\r
937 \r
938 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
939 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
940 @param RecordData RecordData buffer will be filled.\r
941 @param RecordDataSize The size of RecordData buffer.\r
942 \r
943 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
944**/\r
024b1029 945EFI_STATUS\r
946SmbiosFldMiscType14 (\r
947 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
948 IN UINT32 Offset,\r
949 IN VOID *RecordData,\r
950 IN UINT32 RecordDataSize\r
26a76fbc 951 );\r
024b1029 952\r
26a76fbc
LG
953/**\r
954 Field Filling Function for Misc SubClass record type 15 -- System Event Log.\r
955 \r
956 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
957 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
958 @param RecordData RecordData buffer will be filled.\r
959 @param RecordDataSize The size of RecordData buffer.\r
960 \r
961 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
962**/\r
024b1029 963EFI_STATUS\r
964SmbiosFldMiscType15 (\r
965 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
966 IN UINT32 Offset,\r
967 IN VOID *RecordData,\r
968 IN UINT32 RecordDataSize\r
26a76fbc 969 );\r
024b1029 970\r
26a76fbc
LG
971/**\r
972 Field Filling Function for Misc SubClass record type 21 - Pointing Device.\r
973 \r
974 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
975 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
976 @param RecordData RecordData buffer will be filled.\r
977 @param RecordDataSize The size of RecordData buffer.\r
978 \r
979 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
980**/\r
024b1029 981EFI_STATUS\r
982SmbiosFldMiscType21 (\r
983 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
984 IN UINT32 Offset,\r
985 IN VOID *RecordData,\r
986 IN UINT32 RecordDataSize\r
26a76fbc 987 );\r
024b1029 988\r
989\r
26a76fbc
LG
990/**\r
991 Field Filling Function for Misc SubClass record type 32 -- System Boot Information.\r
992 \r
993 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
994 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
995 @param RecordData RecordData buffer will be filled.\r
996 @param RecordDataSize The size of RecordData buffer.\r
997 \r
998 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
999**/\r
024b1029 1000EFI_STATUS\r
1001SmbiosFldMiscType32 (\r
1002 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
1003 IN UINT32 Offset,\r
1004 IN VOID *RecordData,\r
1005 IN UINT32 RecordDataSize\r
26a76fbc 1006 );\r
024b1029 1007\r
26a76fbc
LG
1008/**\r
1009 Field Filling Function for Misc SubClass record type 38 -- IPMI device info.\r
1010 \r
1011 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
1012 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
1013 @param RecordData RecordData buffer will be filled.\r
1014 @param RecordDataSize The size of RecordData buffer.\r
1015 \r
1016 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
1017**/\r
024b1029 1018EFI_STATUS\r
1019SmbiosFldMiscType38 (\r
1020 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
1021 IN UINT32 Offset,\r
1022 IN VOID *RecordData,\r
1023 IN UINT32 RecordDataSize\r
1024 );\r
1025\r
26a76fbc
LG
1026/**\r
1027 Field Filling Function for Misc SubClass record type 0x80-0xFF -- OEM.\r
1028 \r
1029 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
1030 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
1031 @param RecordData RecordData buffer will be filled.\r
1032 @param RecordDataSize The size of RecordData buffer.\r
1033 \r
1034 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
1035**/\r
024b1029 1036EFI_STATUS\r
1037SmbiosFldMiscTypeOEM (\r
1038 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
1039 IN UINT32 Offset,\r
1040 IN VOID *RecordData,\r
1041 IN UINT32 RecordDataSize\r
26a76fbc 1042 );\r
024b1029 1043\r
26a76fbc
LG
1044/**\r
1045 Field Filling Function for Memory SubClass record type 3 -\r
1046 - Memory Device: SMBIOS Type 6\r
1047 \r
1048 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
1049 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
1050 @param RecordData RecordData buffer will be filled.\r
1051 @param RecordDataSize The size of RecordData buffer.\r
1052 \r
1053 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
1054**/\r
024b1029 1055EFI_STATUS\r
1056SmbiosFldSMBIOSType6 (\r
1057 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
26a76fbc 1058 IN UINT32 Offset,\r
024b1029 1059 IN VOID *RecordData,\r
1060 IN UINT32 RecordDataSize\r
26a76fbc 1061 );\r
024b1029 1062\r
26a76fbc
LG
1063/**\r
1064 Field Filling Function for Misc SubClass record type 22 - Portable Battery.\r
1065 \r
1066 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
1067 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
1068 @param RecordData RecordData buffer will be filled.\r
1069 @param RecordDataSize The size of RecordData buffer.\r
1070 \r
1071 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
1072**/\r
024b1029 1073EFI_STATUS\r
1074SmbiosFldMiscType22 (\r
1075 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
1076 IN UINT32 Offset,\r
1077 IN VOID *RecordData,\r
1078 IN UINT32 RecordDataSize\r
26a76fbc 1079 );\r
024b1029 1080\r
26a76fbc
LG
1081/**\r
1082 Field Filling Function for Misc SubClass record type 22 - Portable Battery.\r
1083 \r
1084 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
1085 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
1086 @param RecordData RecordData buffer will be filled.\r
1087 @param RecordDataSize The size of RecordData buffer.\r
1088 \r
1089 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
1090**/\r
024b1029 1091EFI_STATUS\r
1092SmbiosFldMiscType22 (\r
1093 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
1094 IN UINT32 Offset,\r
1095 IN VOID *RecordData,\r
1096 IN UINT32 RecordDataSize\r
26a76fbc 1097 );\r
024b1029 1098\r
26a76fbc
LG
1099/**\r
1100 Field Filling Function for Misc SubClass record type 23 - System Reset.\r
1101 \r
1102 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
1103 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
1104 @param RecordData RecordData buffer will be filled.\r
1105 @param RecordDataSize The size of RecordData buffer.\r
1106 \r
1107 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
1108**/\r
024b1029 1109EFI_STATUS\r
1110SmbiosFldMiscType23 (\r
1111 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
1112 IN UINT32 Offset,\r
1113 IN VOID *RecordData,\r
1114 IN UINT32 RecordDataSize\r
26a76fbc 1115 );\r
024b1029 1116\r
26a76fbc
LG
1117/**\r
1118 Field Filling Function for Misc SubClass record type 24 - Hardware Security.\r
1119 \r
1120 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
1121 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
1122 @param RecordData RecordData buffer will be filled.\r
1123 @param RecordDataSize The size of RecordData buffer.\r
1124 \r
1125 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
1126**/\r
024b1029 1127EFI_STATUS\r
1128SmbiosFldMiscType24 (\r
1129 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
1130 IN UINT32 Offset,\r
1131 IN VOID *RecordData,\r
1132 IN UINT32 RecordDataSize\r
26a76fbc 1133 );\r
024b1029 1134\r
26a76fbc
LG
1135/**\r
1136 Field Filling Function for Misc SubClass record type 25 - System Power Controls.\r
1137 \r
1138 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
1139 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
1140 @param RecordData RecordData buffer will be filled.\r
1141 @param RecordDataSize The size of RecordData buffer.\r
1142 \r
1143 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
1144**/\r
024b1029 1145EFI_STATUS\r
1146SmbiosFldMiscType25 (\r
1147 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
1148 IN UINT32 Offset,\r
1149 IN VOID *RecordData,\r
1150 IN UINT32 RecordDataSize\r
26a76fbc 1151 );\r
024b1029 1152\r
26a76fbc
LG
1153/**\r
1154 Field Filling Function for Misc SubClass record type 26 - Voltage Probe.\r
1155 \r
1156 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
1157 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
1158 @param RecordData RecordData buffer will be filled.\r
1159 @param RecordDataSize The size of RecordData buffer.\r
1160 \r
1161 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
1162**/\r
024b1029 1163EFI_STATUS\r
1164SmbiosFldMiscType26 (\r
1165 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
1166 IN UINT32 Offset,\r
1167 IN VOID *RecordData,\r
1168 IN UINT32 RecordDataSize\r
26a76fbc 1169 );\r
024b1029 1170\r
26a76fbc
LG
1171/**\r
1172 Field Filling Function for Misc SubClass record type 27 - Cooling Device.\r
1173 \r
1174 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
1175 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
1176 @param RecordData RecordData buffer will be filled.\r
1177 @param RecordDataSize The size of RecordData buffer.\r
1178 \r
1179 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
1180**/\r
024b1029 1181EFI_STATUS\r
1182SmbiosFldMiscType27 (\r
1183 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
1184 IN UINT32 Offset,\r
1185 IN VOID *RecordData,\r
1186 IN UINT32 RecordDataSize\r
26a76fbc 1187 );\r
024b1029 1188\r
26a76fbc
LG
1189/**\r
1190 Field Filling Function for Misc SubClass record type 28 -- Temperature Probe.\r
1191 \r
1192 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
1193 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
1194 @param RecordData RecordData buffer will be filled.\r
1195 @param RecordDataSize The size of RecordData buffer.\r
1196 \r
1197 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
1198**/\r
024b1029 1199EFI_STATUS\r
1200SmbiosFldMiscType28 (\r
1201 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
1202 IN UINT32 Offset,\r
1203 IN VOID *RecordData,\r
1204 IN UINT32 RecordDataSize\r
26a76fbc 1205 );\r
024b1029 1206\r
26a76fbc
LG
1207/**\r
1208 Field Filling Function for Misc SubClass record type 29 -- Electrical Current Probe.\r
1209 \r
1210 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
1211 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
1212 @param RecordData RecordData buffer will be filled.\r
1213 @param RecordDataSize The size of RecordData buffer.\r
1214 \r
1215 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
1216**/\r
024b1029 1217EFI_STATUS\r
1218SmbiosFldMiscType29 (\r
1219 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
1220 IN UINT32 Offset,\r
1221 IN VOID *RecordData,\r
1222 IN UINT32 RecordDataSize\r
26a76fbc 1223 );\r
024b1029 1224\r
26a76fbc
LG
1225/**\r
1226 Field Filling Function for Misc SubClass record type 30 -- Out-of-Band Remote Access.\r
1227 \r
1228 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
1229 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
1230 @param RecordData RecordData buffer will be filled.\r
1231 @param RecordDataSize The size of RecordData buffer.\r
1232 \r
1233 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
1234**/\r
024b1029 1235EFI_STATUS\r
1236SmbiosFldMiscType30 (\r
1237 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
1238 IN UINT32 Offset,\r
1239 IN VOID *RecordData,\r
1240 IN UINT32 RecordDataSize\r
26a76fbc 1241 );\r
024b1029 1242\r
26a76fbc
LG
1243/**\r
1244 Field Filling Function for Misc SubClass record type 34 -- Management Device.\r
1245 \r
1246 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
1247 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
1248 @param RecordData RecordData buffer will be filled.\r
1249 @param RecordDataSize The size of RecordData buffer.\r
1250 \r
1251 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
1252**/\r
024b1029 1253EFI_STATUS\r
1254SmbiosFldMiscType34 (\r
1255 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
0ec4f1cb
SZ
1256 IN UINT32 Offset,\r
1257 IN VOID *RecordData,\r
1258 IN UINT32 RecordDataSize\r
1259 );\r
1260\r
1261/**\r
1262 Field Filling Function for Misc SubClass record type 35 -- Management Device Component.\r
1263 \r
1264 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
1265 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
1266 @param RecordData RecordData buffer will be filled.\r
1267 @param RecordDataSize The size of RecordData buffer.\r
1268 \r
1269 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
1270**/\r
1271EFI_STATUS\r
1272SmbiosFldMiscType35 (\r
1273 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
024b1029 1274 IN UINT32 Offset,\r
1275 IN VOID *RecordData,\r
1276 IN UINT32 RecordDataSize\r
26a76fbc 1277 );\r
024b1029 1278\r
26a76fbc
LG
1279/**\r
1280 Field Filling Function for Misc SubClass record type 36 -- Management Device Threshold.\r
1281 \r
1282 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
1283 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
1284 @param RecordData RecordData buffer will be filled.\r
1285 @param RecordDataSize The size of RecordData buffer.\r
1286 \r
1287 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
1288**/\r
024b1029 1289EFI_STATUS\r
1290SmbiosFldMiscType36 (\r
1291 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
1292 IN UINT32 Offset,\r
1293 IN VOID *RecordData,\r
1294 IN UINT32 RecordDataSize\r
26a76fbc 1295 );\r
024b1029 1296\r
26a76fbc
LG
1297/**\r
1298 Field Filling Function for Misc SubClass record type 38 -- IPMI device info.\r
1299 \r
1300 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
1301 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
1302 @param RecordData RecordData buffer will be filled.\r
1303 @param RecordDataSize The size of RecordData buffer.\r
1304 \r
1305 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
1306**/\r
024b1029 1307EFI_STATUS\r
1308SmbiosFldMiscType38 (\r
1309 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
1310 IN UINT32 Offset,\r
1311 IN VOID *RecordData,\r
1312 IN UINT32 RecordDataSize\r
26a76fbc 1313 );\r
024b1029 1314\r
26a76fbc
LG
1315/**\r
1316 Field Filling Function for Misc SubClass record type 39 -- Power supply.\r
1317 \r
1318 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
1319 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
1320 @param RecordData RecordData buffer will be filled.\r
1321 @param RecordDataSize The size of RecordData buffer.\r
1322 \r
1323 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
1324**/\r
024b1029 1325EFI_STATUS\r
1326SmbiosFldMiscType39 (\r
1327 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
1328 IN UINT32 Offset,\r
1329 IN VOID *RecordData,\r
1330 IN UINT32 RecordDataSize\r
26a76fbc 1331 );\r
024b1029 1332\r
26a76fbc
LG
1333/**\r
1334 Field Filling Function for Misc SubClass record type 127 - End-of-Table.\r
1335 \r
1336 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.\r
1337 @param Offset Offset of SMBIOS record which RecordData will be filled.\r
1338 @param RecordData RecordData buffer will be filled.\r
1339 @param RecordDataSize The size of RecordData buffer.\r
1340 \r
1341 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.\r
1342**/\r
024b1029 1343EFI_STATUS\r
1344SmbiosFldMiscType127 (\r
1345 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,\r
1346 IN UINT32 Offset,\r
1347 IN VOID *RecordData,\r
1348 IN UINT32 RecordDataSize\r
26a76fbc 1349 );\r
024b1029 1350 \r
26a76fbc
LG
1351/**\r
1352 Create a blank smbios record. The datahub record is only a field of smbios record.\r
1353 So before fill any field from datahub's record. A blank smbios record need to be \r
1354 created.\r
1355 \r
1356 @param ProducerHandle The produce handle for a datahub record\r
1357 @param StructureNode Point to SMBIOS_STRUCTURE_NODE\r
1358 \r
1359 @retval EFI_OUT_OF_RESOURCES Fail to allocate memory for new blank SMBIOS record.\r
1360 @retval EFI_SUCCESS Success to create blank smbios record.\r
1361**/\r
024b1029 1362EFI_STATUS\r
1363SmbiosProtocolCreateRecord (\r
1364 IN EFI_HANDLE ProducerHandle, OPTIONAL\r
1365 IN SMBIOS_STRUCTURE_NODE *StructureNode\r
1366 );\r
1367 \r
26a76fbc
LG
1368/**\r
1369 Get pointer of EFI_SMBIOS_PROTOCOL.\r
1370 \r
1371 @return pointer of EFI_SMBIOS_PROTOCOL.\r
1372**/\r
024b1029 1373EFI_SMBIOS_PROTOCOL*\r
1374GetSmbiosProtocol (\r
1375 VOID\r
1376 );\r
1377 \r
26a76fbc
LG
1378/**\r
1379 Get pointer of a SMBIOS record's buffer according to its handle.\r
1380 \r
1381 @param Handle The handle of SMBIOS record want to be searched.\r
1382 @param Type The type of SMBIOS record want to be searched.\r
1383 @param ProducerHandle The producer handle of SMBIOS record.\r
1384 \r
1385 @return EFI_SMBIOS_TABLE_HEADER Point to a SMBIOS record's buffer.\r
1386**/ \r
024b1029 1387EFI_SMBIOS_TABLE_HEADER*\r
1388GetSmbiosBufferFromHandle (\r
1389 IN EFI_SMBIOS_HANDLE Handle,\r
1390 IN EFI_SMBIOS_TYPE Type,\r
1391 IN EFI_HANDLE ProducerHandle OPTIONAL\r
1392 );\r
1393 \r
26a76fbc
LG
1394/**\r
1395\r
1396 Get the full size of smbios structure including optional strings that follow the formatted structure.\r
1397\r
1398 @param Head Pointer to the beginning of smbios structure.\r
1399 @param Size The returned size.\r
1400 @param NumberOfStrings The returned number of optional strings that follow the formatted structure.\r
1401\r
1402 @retval EFI_SUCCESS Size retured in Size.\r
1403 @retval EFI_INVALID_PARAMETER Input smbios structure mal-formed or Size is NULL.\r
1404 \r
1405**/\r
024b1029 1406EFI_STATUS\r
1407EFIAPI\r
1408GetSmbiosStructureSize (\r
1409 IN EFI_SMBIOS_TABLE_HEADER *Head,\r
1410 OUT UINT32 *Size,\r
1411 OUT UINT8 *NumberOfStrings\r
1412 );\r
1413 \r
1414#endif\r