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