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