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