]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Compatibility/PiSmbiosRecordOnDataHubSmbiosRecordThunk/Thunk.h
Update the copyright notice 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 Fill a standard Smbios string field.
269
270 This function will convert the unicode string to single byte chars, and only
271 English language is supported.
272 This function changes the Structure pointer value of the structure node,
273 which should be noted by Caller.
274
275 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
276 @param Offset Offset of SMBIOS record which RecordData will be filled.
277 @param RecordData RecordData buffer will be filled.
278 @param RecordDataSize The size of RecordData buffer.
279
280 @retval EFI_INVALID_PARAMETER RecordDataSize is too larger
281 @retval EFI_OUT_OF_RESOURCES No memory to allocate new buffer for string
282 @retval EFI_SUCCESS Sucess append string for a SMBIOS record.
283 **/
284 EFI_STATUS
285 SmbiosFldString (
286 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
287 IN UINT32 Offset,
288 IN VOID *RecordData,
289 IN UINT32 RecordDataSize
290 );
291
292 /**
293 Fill the inter link field for a SMBIOS recorder.
294
295 Some SMBIOS recorder need to reference the handle of another SMBIOS record. But
296 maybe another SMBIOS record has not been added, so put the InterLink request into
297 a linked list and the interlink will be fixedup when a new SMBIOS record is added.
298
299 @param StructureNode Point to SMBIOS_STRUCTURE_NODE which reference another record's handle
300 @param LinkSmbiosNodeOffset The offset in this record for holding the handle of another SMBIOS record
301 @param LinkSmbiosType The type of SMBIOS record want to be linked.
302 @param InterLink Point to EFI_INTER_LINK_DATA will be put linked list.
303 @param SubClassGuid The guid of subclass for linked SMBIOS record.
304
305 @retval EFI_SUCESS The linked record is found and no need fixup in future.
306 @retval !EFI_SUCESS The linked record can not be found and InterLink is put a fixing-p linked list.
307 **/
308 EFI_STATUS
309 SmbiosFldInterLink (
310 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
311 IN UINT16 LinkSmbiosNodeOffset,
312 IN UINT8 LinkSmbiosType,
313 IN EFI_INTER_LINK_DATA *InterLink,
314 IN EFI_GUID *SubClassGuid
315 );
316
317 /**
318 Find a handle that matches the Link Data and the target Smbios type.
319
320 @param TargetType the Smbios type
321 @param SubClass the SubClass
322 @param LinkData Specifies Instance, SubInstance and ProducerName
323 @param Handle the HandleNum found
324
325 @retval EFI_NOT_FOUND Can not find the record according to handle
326 @retval EFI_SUCCESS Success to find the handle
327 **/
328 EFI_STATUS
329 SmbiosFindHandle (
330 IN UINT8 TargetType,
331 IN EFI_GUID *SubClass,
332 IN EFI_INTER_LINK_DATA *LinkData,
333 IN OUT UINT16 *HandleNum
334 );
335
336 /**
337 Field Filling Function. Transform an EFI_EXP_BASE10_DATA to a word, with 'Mega'
338 as the unit.
339
340 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
341 @param Offset Offset of SMBIOS record which RecordData will be filled.
342 @param RecordData RecordData buffer will be filled.
343 @param RecordDataSize The size of RecordData buffer.
344
345 @retval EFI_INVALID_PARAMETER RecordDataSize is invalid.
346 @retval EFI_SUCCESS RecordData is successed to be filled into given SMBIOS record.
347 **/
348 EFI_STATUS
349 SmbiosFldBase10ToWordWithMega (
350 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
351 IN UINT32 Offset,
352 IN VOID *RecordData,
353 IN UINT32 RecordDataSize
354 );
355
356 /**
357 Field Filling Function. Transform an EFI_EXP_BASE2_DATA to a word, with 'Kilo'
358 as the unit. Granularity implemented for Cache Size.
359
360 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
361 @param Offset Offset of SMBIOS record which RecordData will be filled.
362 @param RecordData RecordData buffer will be filled.
363 @param RecordDataSize The size of RecordData buffer.
364
365 @retval EFI_INVALID_PARAMETER RecordDataSize is invalid.
366 @retval EFI_SUCCESS RecordData is successed to be filled into given SMBIOS record.
367 **/
368 EFI_STATUS
369 SmbiosFldBase2ToWordWithKilo (
370 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
371 IN UINT32 Offset,
372 IN VOID *RecordData,
373 IN UINT32 RecordDataSize
374 );
375
376 /**
377 Field Filling Function: truncate record data to byte and fill in the
378 field as indicated by Offset.
379
380 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
381 @param Offset Offset of SMBIOS record which RecordData will be filled.
382 @param RecordData RecordData buffer will be filled.
383 @param RecordDataSize The size of RecordData buffer.
384
385 @retval EFI_INVALID_PARAMETER RecordDataSize is invalid.
386 @retval EFI_SUCCESS RecordData is successed to be filled into given SMBIOS record.
387 **/
388 EFI_STATUS
389 SmbiosFldTruncateToByte (
390 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
391 IN UINT32 Offset,
392 IN VOID *RecordData,
393 IN UINT32 RecordDataSize
394 );
395
396 /**
397 Field Filling Function for Processor SubClass record type 6 -- ProcessorID.
398 Offset is mandatory.
399
400 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
401 @param Offset Offset of SMBIOS record which RecordData will be filled.
402 @param RecordData RecordData buffer will be filled.
403 @param RecordDataSize The size of RecordData buffer.
404
405 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
406 **/
407 EFI_STATUS
408 SmbiosFldProcessorType6 (
409 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
410 IN UINT32 Offset,
411 IN VOID *RecordData,
412 IN UINT32 RecordDataSize
413 );
414
415 /**
416 Field Filling Function for Processor SubClass record type 9 -- Voltage.
417 Offset is mandatory.
418
419 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
420 @param Offset Offset of SMBIOS record which RecordData will be filled.
421 @param RecordData RecordData buffer will be filled.
422 @param RecordDataSize The size of RecordData buffer.
423
424 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
425 **/
426 EFI_STATUS
427 SmbiosFldProcessorType9 (
428 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
429 IN UINT32 Offset,
430 IN VOID *RecordData,
431 IN UINT32 RecordDataSize
432 );
433
434 /**
435 Field Filling Function for Processor SubClass record type 17 -- Cache association.
436
437 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
438 @param Offset Offset of SMBIOS record which RecordData will be filled.
439 @param RecordData RecordData buffer will be filled.
440 @param RecordDataSize The size of RecordData buffer.
441
442 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
443 **/
444 EFI_STATUS
445 SmbiosFldProcessorType17 (
446 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
447 IN UINT32 Offset,
448 IN VOID *RecordData,
449 IN UINT32 RecordDataSize
450 );
451
452 /**
453 Field Filling Function. Transform an EFI_EXP_BASE2_DATA to a word, with 10exp-9
454 as the unit.
455
456 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
457 @param Offset Offset of SMBIOS record which RecordData will be filled.
458 @param RecordData RecordData buffer will be filled.
459 @param RecordDataSize The size of RecordData buffer.
460
461 @retval EFI_INVALID_PARAMETER RecordDataSize is invalid.
462 @retval EFI_SUCCESS RecordData is successed to be filled into given SMBIOS record.
463 **/
464 EFI_STATUS
465 SmbiosFldBase10ToByteWithNano (
466 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
467 IN UINT32 Offset,
468 IN VOID *RecordData,
469 IN UINT32 RecordDataSize
470 );
471
472 /**
473 Field Filling Function: truncate record data to byte and fill in the
474 field as indicated by Offset.
475
476 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
477 @param Offset Offset of SMBIOS record which RecordData will be filled.
478 @param RecordData RecordData buffer will be filled.
479 @param RecordDataSize The size of RecordData buffer.
480
481 @retval EFI_INVALID_PARAMETER RecordDataSize is invalid.
482 @retval EFI_SUCCESS RecordData is successed to be filled into given SMBIOS record.
483 **/
484 EFI_STATUS
485 SmbiosFldTruncateToWord (
486 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
487 IN UINT32 Offset,
488 IN VOID *RecordData,
489 IN UINT32 RecordDataSize
490 );
491
492 /**
493 Field Filling Function for Cache SubClass record type 10 -- Cache Config.
494 Offset is mandatory
495
496 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
497 @param Offset Offset of SMBIOS record which RecordData will be filled.
498 @param RecordData RecordData buffer will be filled.
499 @param RecordDataSize The size of RecordData buffer.
500
501 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
502 **/
503 EFI_STATUS
504 SmbiosFldCacheType10 (
505 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
506 IN UINT32 Offset,
507 IN VOID *RecordData,
508 IN UINT32 RecordDataSize
509 );
510
511 /**
512 Check if OEM structure has included 2 trailing 0s in data record.
513
514 @param RecordData Point to record data will be checked.
515 @param RecordDataSize The size of record data.
516
517 @retval 0 2 trailing 0s exist in unformatted section
518 @retval 1 1 trailing 0 exists at the end of unformatted section
519 @retval -1 There is no 0 at the end of unformatted section
520 **/
521 INT8
522 SmbiosCheckTrailingZero (
523 IN VOID *RecordData,
524 IN UINT32 RecordDataSize
525 );
526
527 /**
528 Field Filling Function for Cache SubClass record type 5&6 -- Cache SRAM type.
529 Offset is mandatory
530
531 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
532 @param Offset Offset of SMBIOS record which RecordData will be filled.
533 @param RecordData RecordData buffer will be filled.
534 @param RecordDataSize The size of RecordData buffer.
535
536 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
537 **/
538 EFI_STATUS
539 SmbiosFldCacheType5 (
540 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
541 IN UINT32 Offset,
542 IN VOID *RecordData,
543 IN UINT32 RecordDataSize
544 );
545
546 /**
547 Field Filling Function for Memory SubClass record type 2 -- Physical Memory
548 Array.
549
550 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
551 @param Offset Offset of SMBIOS record which RecordData will be filled.
552 @param RecordData RecordData buffer will be filled.
553 @param RecordDataSize The size of RecordData buffer.
554
555 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
556 **/
557 EFI_STATUS
558 SmbiosFldMemoryType2 (
559 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
560 IN UINT32 Offset,
561 IN VOID *RecordData,
562 IN UINT32 RecordDataSize
563 );
564
565 /**
566 Field Filling Function for Memory SubClass record type 3 -
567 - Memory Device: SMBIOS Type 17
568
569 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
570 @param Offset Offset of SMBIOS record which RecordData will be filled.
571 @param RecordData RecordData buffer will be filled.
572 @param RecordDataSize The size of RecordData buffer.
573
574 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
575 **/
576 EFI_STATUS
577 SmbiosFldMemoryType3 (
578 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
579 IN UINT32 Offset,
580 IN VOID *RecordData,
581 IN UINT32 RecordDataSize
582 );
583
584 /**
585 Field Filling Function for Memory SubClass record type 4
586 -- Memory Array Mapped Address: SMBIOS Type 19
587
588 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
589 @param Offset Offset of SMBIOS record which RecordData will be filled.
590 @param RecordData RecordData buffer will be filled.
591 @param RecordDataSize The size of RecordData buffer.
592
593 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
594 **/
595 EFI_STATUS
596 SmbiosFldMemoryType4 (
597 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
598 IN UINT32 Offset,
599 IN VOID *RecordData,
600 IN UINT32 RecordDataSize
601 );
602
603 /**
604 Field Filling Function for Memory SubClass record type 5
605 -- Memory Device Mapped Address: SMBIOS Type 20
606
607 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
608 @param Offset Offset of SMBIOS record which RecordData will be filled.
609 @param RecordData RecordData buffer will be filled.
610 @param RecordDataSize The size of RecordData buffer.
611
612 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
613 **/
614 EFI_STATUS
615 SmbiosFldMemoryType5 (
616 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
617 IN UINT32 Offset,
618 IN VOID *RecordData,
619 IN UINT32 RecordDataSize
620 );
621
622 /**
623 Field Filling Function for Memory SubClass record type 6
624 -- Memory Channel Type: SMBIOS Type 37
625
626 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
627 @param Offset Offset of SMBIOS record which RecordData will be filled.
628 @param RecordData RecordData buffer will be filled.
629 @param RecordDataSize The size of RecordData buffer.
630
631 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
632 **/
633 EFI_STATUS
634 SmbiosFldMemoryType6 (
635 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
636 IN UINT32 Offset,
637 IN VOID *RecordData,
638 IN UINT32 RecordDataSize
639 );
640
641 /**
642 Field Filling Function for Memory SubClass record type 7
643 -- Memory Channel Device: SMBIOS Type 37
644
645 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
646 @param Offset Offset of SMBIOS record which RecordData will be filled.
647 @param RecordData RecordData buffer will be filled.
648 @param RecordDataSize The size of RecordData buffer.
649
650 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
651 **/
652 EFI_STATUS
653 SmbiosFldMemoryType7 (
654 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
655 IN UINT32 Offset,
656 IN VOID *RecordData,
657 IN UINT32 RecordDataSize
658 );
659
660 /**
661 Field Filling Function for Memory SubClass record type 8
662 -- Memory Controller information: SMBIOS Type 5
663
664 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
665 @param Offset Offset of SMBIOS record which RecordData will be filled.
666 @param RecordData RecordData buffer will be filled.
667 @param RecordDataSize The size of RecordData buffer.
668
669 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
670 **/
671 EFI_STATUS
672 SmbiosFldMemoryType8 (
673 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
674 IN UINT32 Offset,
675 IN VOID *RecordData,
676 IN UINT32 RecordDataSize
677 );
678
679 /**
680 Field Filling Function for Memory SubClass record type
681 -- Memory 32 Bit Error Information: SMBIOS Type 18
682
683 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
684 @param Offset Offset of SMBIOS record which RecordData will be filled.
685 @param RecordData RecordData buffer will be filled.
686 @param RecordDataSize The size of RecordData buffer.
687
688 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
689 **/
690 EFI_STATUS
691 SmbiosFldMemoryType9 (
692 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
693 IN UINT32 Offset,
694 IN VOID *RecordData,
695 IN UINT32 RecordDataSize
696 );
697
698 /**
699 Field Filling Function for Memory SubClass record type
700 -- Memory 64 Bit Error Information: SMBIOS Type 33
701
702 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
703 @param Offset Offset of SMBIOS record which RecordData will be filled.
704 @param RecordData RecordData buffer will be filled.
705 @param RecordDataSize The size of RecordData buffer.
706
707 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
708 **/
709 EFI_STATUS
710 SmbiosFldMemoryType10 (
711 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
712 IN UINT32 Offset,
713 IN VOID *RecordData,
714 IN UINT32 RecordDataSize
715 );
716
717 /**
718 Field Filling Function for Misc SubClass record type 0 -- Bios Information.
719
720 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
721 @param Offset Offset of SMBIOS record which RecordData will be filled.
722 @param RecordData RecordData buffer will be filled.
723 @param RecordDataSize The size of RecordData buffer.
724
725 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
726 **/
727 EFI_STATUS
728 SmbiosFldMiscType0 (
729 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
730 IN UINT32 Offset,
731 IN VOID *RecordData,
732 IN UINT32 RecordDataSize
733 );
734
735 /**
736 Field Filling Function. Transform an EFI_EXP_BASE2_DATA to a byte, with '64k'
737 as the unit.
738
739 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
740 @param Offset Offset of SMBIOS record which RecordData will be filled.
741 @param RecordData RecordData buffer will be filled.
742 @param RecordDataSize The size of RecordData buffer.
743
744 @retval EFI_INVALID_PARAMETER RecordDataSize is invalid.
745 @retval EFI_SUCCESS RecordData is successed to be filled into given SMBIOS record.
746 **/
747 EFI_STATUS
748 SmbiosFldBase2ToByteWith64K (
749 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
750 IN UINT32 Offset,
751 IN VOID *RecordData,
752 IN UINT32 RecordDataSize
753 );
754
755 /**
756 Field Filling Function for Misc SubClass record type 1 -- System Information.
757
758 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
759 @param Offset Offset of SMBIOS record which RecordData will be filled.
760 @param RecordData RecordData buffer will be filled.
761 @param RecordDataSize The size of RecordData buffer.
762
763 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
764 **/
765 EFI_STATUS
766 SmbiosFldMiscType1 (
767 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
768 IN UINT32 Offset,
769 IN VOID *RecordData,
770 IN UINT32 RecordDataSize
771 );
772
773 /**
774 Field Filling Function for record type 2 -- Base Board Manufacture.
775
776 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
777 @param Offset Offset of SMBIOS record which RecordData will be filled.
778 @param RecordData RecordData buffer will be filled.
779 @param RecordDataSize The size of RecordData buffer.
780
781 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
782 **/
783 EFI_STATUS
784 SmbiosFldMiscType2 (
785 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
786 IN UINT32 Offset,
787 IN VOID *RecordData,
788 IN UINT32 RecordDataSize
789 );
790
791 /**
792 Field Filling Function for Misc SubClass record type 3 -
793 - System Enclosure or Chassis.
794
795 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
796 @param Offset Offset of SMBIOS record which RecordData will be filled.
797 @param RecordData RecordData buffer will be filled.
798 @param RecordDataSize The size of RecordData buffer.
799
800 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
801 **/
802 EFI_STATUS
803 SmbiosFldMiscType3 (
804 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
805 IN UINT32 Offset,
806 IN VOID *RecordData,
807 IN UINT32 RecordDataSize
808 );
809
810 /**
811 Field Filling Function for Misc SubClass record type 8 -- Port Connector.
812
813 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
814 @param Offset Offset of SMBIOS record which RecordData will be filled.
815 @param RecordData RecordData buffer will be filled.
816 @param RecordDataSize The size of RecordData buffer.
817
818 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
819 **/
820 EFI_STATUS
821 SmbiosFldMiscType8 (
822 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
823 IN UINT32 Offset,
824 IN VOID *RecordData,
825 IN UINT32 RecordDataSize
826 );
827
828 /**
829 Field Filling Function for Misc SubClass record type 9 -- System slot.
830
831 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
832 @param Offset Offset of SMBIOS record which RecordData will be filled.
833 @param RecordData RecordData buffer will be filled.
834 @param RecordDataSize The size of RecordData buffer.
835
836 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
837 **/
838 EFI_STATUS
839 SmbiosFldMiscType9 (
840 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
841 IN UINT32 Offset,
842 IN VOID *RecordData,
843 IN UINT32 RecordDataSize
844 );
845
846 /**
847 Field Filling Function for Misc SubClass record type 10 - Onboard Device.
848
849 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
850 @param Offset Offset of SMBIOS record which RecordData will be filled.
851 @param RecordData RecordData buffer will be filled.
852 @param RecordDataSize The size of RecordData buffer.
853
854 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
855 **/
856 EFI_STATUS
857 SmbiosFldMiscType10 (
858 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
859 IN UINT32 Offset,
860 IN VOID *RecordData,
861 IN UINT32 RecordDataSize
862 );
863
864 /**
865 Field Filling Function for Misc SubClass record type 11 - OEM Strings.
866
867 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
868 @param Offset Offset of SMBIOS record which RecordData will be filled.
869 @param RecordData RecordData buffer will be filled.
870 @param RecordDataSize The size of RecordData buffer.
871
872 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
873 **/
874 EFI_STATUS
875 SmbiosFldMiscType11 (
876 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
877 IN UINT32 Offset,
878 IN VOID *RecordData,
879 IN UINT32 RecordDataSize
880 );
881
882 /**
883 Field Filling Function for Misc SubClass record type 12 - System Options.
884
885 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
886 @param Offset Offset of SMBIOS record which RecordData will be filled.
887 @param RecordData RecordData buffer will be filled.
888 @param RecordDataSize The size of RecordData buffer.
889
890 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
891 **/
892 EFI_STATUS
893 SmbiosFldMiscType12 (
894 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
895 IN UINT32 Offset,
896 IN VOID *RecordData,
897 IN UINT32 RecordDataSize
898 );
899
900 /**
901 Field Filling Function for Misc SubClass record type 13 - BIOS Language.
902
903 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
904 @param Offset Offset of SMBIOS record which RecordData will be filled.
905 @param RecordData RecordData buffer will be filled.
906 @param RecordDataSize The size of RecordData buffer.
907
908 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
909 **/
910 EFI_STATUS
911 SmbiosFldMiscType13 (
912 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
913 IN UINT32 Offset,
914 IN VOID *RecordData,
915 IN UINT32 RecordDataSize
916 );
917
918 /**
919 Field Filling Function for Misc SubClass record type 14 - System Language String
920 Current solution assumes that EFI_MISC_SYSTEM_LANGUAGE_STRINGs are logged with
921 their LanguageId having ascending orders.
922
923 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
924 @param Offset Offset of SMBIOS record which RecordData will be filled.
925 @param RecordData RecordData buffer will be filled.
926 @param RecordDataSize The size of RecordData buffer.
927
928 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
929 **/
930 EFI_STATUS
931 SmbiosFldMiscType14 (
932 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
933 IN UINT32 Offset,
934 IN VOID *RecordData,
935 IN UINT32 RecordDataSize
936 );
937
938 /**
939 Field Filling Function for Misc SubClass record type 15 -- System Event Log.
940
941 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
942 @param Offset Offset of SMBIOS record which RecordData will be filled.
943 @param RecordData RecordData buffer will be filled.
944 @param RecordDataSize The size of RecordData buffer.
945
946 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
947 **/
948 EFI_STATUS
949 SmbiosFldMiscType15 (
950 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
951 IN UINT32 Offset,
952 IN VOID *RecordData,
953 IN UINT32 RecordDataSize
954 );
955
956 /**
957 Field Filling Function for Misc SubClass record type 21 - Pointing Device.
958
959 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
960 @param Offset Offset of SMBIOS record which RecordData will be filled.
961 @param RecordData RecordData buffer will be filled.
962 @param RecordDataSize The size of RecordData buffer.
963
964 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
965 **/
966 EFI_STATUS
967 SmbiosFldMiscType21 (
968 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
969 IN UINT32 Offset,
970 IN VOID *RecordData,
971 IN UINT32 RecordDataSize
972 );
973
974
975 /**
976 Field Filling Function for Misc SubClass record type 32 -- System Boot Information.
977
978 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
979 @param Offset Offset of SMBIOS record which RecordData will be filled.
980 @param RecordData RecordData buffer will be filled.
981 @param RecordDataSize The size of RecordData buffer.
982
983 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
984 **/
985 EFI_STATUS
986 SmbiosFldMiscType32 (
987 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
988 IN UINT32 Offset,
989 IN VOID *RecordData,
990 IN UINT32 RecordDataSize
991 );
992
993 /**
994 Field Filling Function for Misc SubClass record type 38 -- IPMI device info.
995
996 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
997 @param Offset Offset of SMBIOS record which RecordData will be filled.
998 @param RecordData RecordData buffer will be filled.
999 @param RecordDataSize The size of RecordData buffer.
1000
1001 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
1002 **/
1003 EFI_STATUS
1004 SmbiosFldMiscType38 (
1005 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
1006 IN UINT32 Offset,
1007 IN VOID *RecordData,
1008 IN UINT32 RecordDataSize
1009 );
1010
1011 /**
1012 Field Filling Function for Misc SubClass record type 0x80-0xFF -- OEM.
1013
1014 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
1015 @param Offset Offset of SMBIOS record which RecordData will be filled.
1016 @param RecordData RecordData buffer will be filled.
1017 @param RecordDataSize The size of RecordData buffer.
1018
1019 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
1020 **/
1021 EFI_STATUS
1022 SmbiosFldMiscTypeOEM (
1023 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
1024 IN UINT32 Offset,
1025 IN VOID *RecordData,
1026 IN UINT32 RecordDataSize
1027 );
1028
1029 /**
1030 Field Filling Function for Memory SubClass record type 3 -
1031 - Memory Device: SMBIOS Type 6
1032
1033 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
1034 @param Offset Offset of SMBIOS record which RecordData will be filled.
1035 @param RecordData RecordData buffer will be filled.
1036 @param RecordDataSize The size of RecordData buffer.
1037
1038 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
1039 **/
1040 EFI_STATUS
1041 SmbiosFldSMBIOSType6 (
1042 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
1043 IN UINT32 Offset,
1044 IN VOID *RecordData,
1045 IN UINT32 RecordDataSize
1046 );
1047
1048 /**
1049 Field Filling Function for Misc SubClass record type 22 - Portable Battery.
1050
1051 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
1052 @param Offset Offset of SMBIOS record which RecordData will be filled.
1053 @param RecordData RecordData buffer will be filled.
1054 @param RecordDataSize The size of RecordData buffer.
1055
1056 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
1057 **/
1058 EFI_STATUS
1059 SmbiosFldMiscType22 (
1060 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
1061 IN UINT32 Offset,
1062 IN VOID *RecordData,
1063 IN UINT32 RecordDataSize
1064 );
1065
1066 /**
1067 Field Filling Function for Misc SubClass record type 22 - Portable Battery.
1068
1069 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
1070 @param Offset Offset of SMBIOS record which RecordData will be filled.
1071 @param RecordData RecordData buffer will be filled.
1072 @param RecordDataSize The size of RecordData buffer.
1073
1074 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
1075 **/
1076 EFI_STATUS
1077 SmbiosFldMiscType22 (
1078 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
1079 IN UINT32 Offset,
1080 IN VOID *RecordData,
1081 IN UINT32 RecordDataSize
1082 );
1083
1084 /**
1085 Field Filling Function for Misc SubClass record type 23 - System Reset.
1086
1087 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
1088 @param Offset Offset of SMBIOS record which RecordData will be filled.
1089 @param RecordData RecordData buffer will be filled.
1090 @param RecordDataSize The size of RecordData buffer.
1091
1092 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
1093 **/
1094 EFI_STATUS
1095 SmbiosFldMiscType23 (
1096 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
1097 IN UINT32 Offset,
1098 IN VOID *RecordData,
1099 IN UINT32 RecordDataSize
1100 );
1101
1102 /**
1103 Field Filling Function for Misc SubClass record type 24 - Hardware Security.
1104
1105 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
1106 @param Offset Offset of SMBIOS record which RecordData will be filled.
1107 @param RecordData RecordData buffer will be filled.
1108 @param RecordDataSize The size of RecordData buffer.
1109
1110 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
1111 **/
1112 EFI_STATUS
1113 SmbiosFldMiscType24 (
1114 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
1115 IN UINT32 Offset,
1116 IN VOID *RecordData,
1117 IN UINT32 RecordDataSize
1118 );
1119
1120 /**
1121 Field Filling Function for Misc SubClass record type 25 - System Power Controls.
1122
1123 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
1124 @param Offset Offset of SMBIOS record which RecordData will be filled.
1125 @param RecordData RecordData buffer will be filled.
1126 @param RecordDataSize The size of RecordData buffer.
1127
1128 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
1129 **/
1130 EFI_STATUS
1131 SmbiosFldMiscType25 (
1132 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
1133 IN UINT32 Offset,
1134 IN VOID *RecordData,
1135 IN UINT32 RecordDataSize
1136 );
1137
1138 /**
1139 Field Filling Function for Misc SubClass record type 26 - Voltage Probe.
1140
1141 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
1142 @param Offset Offset of SMBIOS record which RecordData will be filled.
1143 @param RecordData RecordData buffer will be filled.
1144 @param RecordDataSize The size of RecordData buffer.
1145
1146 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
1147 **/
1148 EFI_STATUS
1149 SmbiosFldMiscType26 (
1150 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
1151 IN UINT32 Offset,
1152 IN VOID *RecordData,
1153 IN UINT32 RecordDataSize
1154 );
1155
1156 /**
1157 Field Filling Function for Misc SubClass record type 27 - Cooling Device.
1158
1159 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
1160 @param Offset Offset of SMBIOS record which RecordData will be filled.
1161 @param RecordData RecordData buffer will be filled.
1162 @param RecordDataSize The size of RecordData buffer.
1163
1164 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
1165 **/
1166 EFI_STATUS
1167 SmbiosFldMiscType27 (
1168 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
1169 IN UINT32 Offset,
1170 IN VOID *RecordData,
1171 IN UINT32 RecordDataSize
1172 );
1173
1174 /**
1175 Field Filling Function for Misc SubClass record type 28 -- Temperature Probe.
1176
1177 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
1178 @param Offset Offset of SMBIOS record which RecordData will be filled.
1179 @param RecordData RecordData buffer will be filled.
1180 @param RecordDataSize The size of RecordData buffer.
1181
1182 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
1183 **/
1184 EFI_STATUS
1185 SmbiosFldMiscType28 (
1186 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
1187 IN UINT32 Offset,
1188 IN VOID *RecordData,
1189 IN UINT32 RecordDataSize
1190 );
1191
1192 /**
1193 Field Filling Function for Misc SubClass record type 29 -- Electrical Current Probe.
1194
1195 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
1196 @param Offset Offset of SMBIOS record which RecordData will be filled.
1197 @param RecordData RecordData buffer will be filled.
1198 @param RecordDataSize The size of RecordData buffer.
1199
1200 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
1201 **/
1202 EFI_STATUS
1203 SmbiosFldMiscType29 (
1204 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
1205 IN UINT32 Offset,
1206 IN VOID *RecordData,
1207 IN UINT32 RecordDataSize
1208 );
1209
1210 /**
1211 Field Filling Function for Misc SubClass record type 30 -- Out-of-Band Remote Access.
1212
1213 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
1214 @param Offset Offset of SMBIOS record which RecordData will be filled.
1215 @param RecordData RecordData buffer will be filled.
1216 @param RecordDataSize The size of RecordData buffer.
1217
1218 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
1219 **/
1220 EFI_STATUS
1221 SmbiosFldMiscType30 (
1222 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
1223 IN UINT32 Offset,
1224 IN VOID *RecordData,
1225 IN UINT32 RecordDataSize
1226 );
1227
1228 /**
1229 Field Filling Function for Misc SubClass record type 34 -- Management Device.
1230
1231 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
1232 @param Offset Offset of SMBIOS record which RecordData will be filled.
1233 @param RecordData RecordData buffer will be filled.
1234 @param RecordDataSize The size of RecordData buffer.
1235
1236 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
1237 **/
1238 EFI_STATUS
1239 SmbiosFldMiscType34 (
1240 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
1241 IN UINT32 Offset,
1242 IN VOID *RecordData,
1243 IN UINT32 RecordDataSize
1244 );
1245
1246 /**
1247 Field Filling Function for Misc SubClass record type 36 -- Management Device Threshold.
1248
1249 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
1250 @param Offset Offset of SMBIOS record which RecordData will be filled.
1251 @param RecordData RecordData buffer will be filled.
1252 @param RecordDataSize The size of RecordData buffer.
1253
1254 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
1255 **/
1256 EFI_STATUS
1257 SmbiosFldMiscType36 (
1258 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
1259 IN UINT32 Offset,
1260 IN VOID *RecordData,
1261 IN UINT32 RecordDataSize
1262 );
1263
1264 /**
1265 Field Filling Function for Misc SubClass record type 38 -- IPMI device info.
1266
1267 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
1268 @param Offset Offset of SMBIOS record which RecordData will be filled.
1269 @param RecordData RecordData buffer will be filled.
1270 @param RecordDataSize The size of RecordData buffer.
1271
1272 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
1273 **/
1274 EFI_STATUS
1275 SmbiosFldMiscType38 (
1276 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
1277 IN UINT32 Offset,
1278 IN VOID *RecordData,
1279 IN UINT32 RecordDataSize
1280 );
1281
1282 /**
1283 Field Filling Function for Misc SubClass record type 39 -- Power supply.
1284
1285 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
1286 @param Offset Offset of SMBIOS record which RecordData will be filled.
1287 @param RecordData RecordData buffer will be filled.
1288 @param RecordDataSize The size of RecordData buffer.
1289
1290 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
1291 **/
1292 EFI_STATUS
1293 SmbiosFldMiscType39 (
1294 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
1295 IN UINT32 Offset,
1296 IN VOID *RecordData,
1297 IN UINT32 RecordDataSize
1298 );
1299
1300 /**
1301 Field Filling Function for Misc SubClass record type 127 - End-of-Table.
1302
1303 @param StructureNode Pointer to SMBIOS_STRUCTURE_NODE which is current processed.
1304 @param Offset Offset of SMBIOS record which RecordData will be filled.
1305 @param RecordData RecordData buffer will be filled.
1306 @param RecordDataSize The size of RecordData buffer.
1307
1308 @retval EFI_SUCCESS Success fill RecordData into SMBIOS's record buffer.
1309 **/
1310 EFI_STATUS
1311 SmbiosFldMiscType127 (
1312 IN OUT SMBIOS_STRUCTURE_NODE *StructureNode,
1313 IN UINT32 Offset,
1314 IN VOID *RecordData,
1315 IN UINT32 RecordDataSize
1316 );
1317
1318 /**
1319 Create a blank smbios record. The datahub record is only a field of smbios record.
1320 So before fill any field from datahub's record. A blank smbios record need to be
1321 created.
1322
1323 @param ProducerHandle The produce handle for a datahub record
1324 @param StructureNode Point to SMBIOS_STRUCTURE_NODE
1325
1326 @retval EFI_OUT_OF_RESOURCES Fail to allocate memory for new blank SMBIOS record.
1327 @retval EFI_SUCCESS Success to create blank smbios record.
1328 **/
1329 EFI_STATUS
1330 SmbiosProtocolCreateRecord (
1331 IN EFI_HANDLE ProducerHandle, OPTIONAL
1332 IN SMBIOS_STRUCTURE_NODE *StructureNode
1333 );
1334
1335 /**
1336 Get pointer of EFI_SMBIOS_PROTOCOL.
1337
1338 @return pointer of EFI_SMBIOS_PROTOCOL.
1339 **/
1340 EFI_SMBIOS_PROTOCOL*
1341 GetSmbiosProtocol (
1342 VOID
1343 );
1344
1345 /**
1346 Get pointer of a SMBIOS record's buffer according to its handle.
1347
1348 @param Handle The handle of SMBIOS record want to be searched.
1349 @param Type The type of SMBIOS record want to be searched.
1350 @param ProducerHandle The producer handle of SMBIOS record.
1351
1352 @return EFI_SMBIOS_TABLE_HEADER Point to a SMBIOS record's buffer.
1353 **/
1354 EFI_SMBIOS_TABLE_HEADER*
1355 GetSmbiosBufferFromHandle (
1356 IN EFI_SMBIOS_HANDLE Handle,
1357 IN EFI_SMBIOS_TYPE Type,
1358 IN EFI_HANDLE ProducerHandle OPTIONAL
1359 );
1360
1361 /**
1362
1363 Get the full size of smbios structure including optional strings that follow the formatted structure.
1364
1365 @param Head Pointer to the beginning of smbios structure.
1366 @param Size The returned size.
1367 @param NumberOfStrings The returned number of optional strings that follow the formatted structure.
1368
1369 @retval EFI_SUCCESS Size retured in Size.
1370 @retval EFI_INVALID_PARAMETER Input smbios structure mal-formed or Size is NULL.
1371
1372 **/
1373 EFI_STATUS
1374 EFIAPI
1375 GetSmbiosStructureSize (
1376 IN EFI_SMBIOS_TABLE_HEADER *Head,
1377 OUT UINT32 *Size,
1378 OUT UINT8 *NumberOfStrings
1379 );
1380
1381 #endif