Chameleon

Chameleon Commit Details

Date:2017-10-10 11:41:16 (1 year 1 month ago)
Author:ErmaC
Commit:2904
Parents: 2903
Message:SMBios refactor Part.1 (Credits to MinusZwei)
Changes:
M/branches/ErmaC/Enoch/i386/libsaio/smbios.c
M/trunk/i386/libsaio/smbios.h
M/branches/ErmaC/Enoch/i386/libsaio/smbios_decode.c
M/branches/ErmaC/Enoch/i386/libsaio/smbios.h
M/trunk/i386/libsaio/smbios.c
M/trunk/i386/libsaio/smbios_decode.c

File differences

trunk/i386/libsaio/smbios.c
581581
582582
583583
584
584
585585
586586
587587
......
591591
592592
593593
594
594
595595
596596
597597
......
605605
606606
607607
608
608
609609
610610
611611
......
615615
616616
617617
618
618
619619
620620
621621
......
634634
635635
636636
637
637
638638
639639
640640
......
645645
646646
647647
648
648
649649
650650
651651
......
657657
658658
659659
660
660
661661
662662
663663
......
671671
672672
673673
674
674
675675
676676
677677
......
681681
682682
683683
684
684
685685
686686
687687
......
693693
694694
695695
696
696
697697
698698
699699
......
14301430
14311431
14321432
1433
1434
1435
1436
1437
1433
1434
1435
1436
1437
14381438
14391439
1440
1441
1442
1443
1440
1441
1442
1443
14441444
14451445
14461446
defaultSystemInfo.family = kDefaultMacBookProFamily;
defaultBaseBoard.product = kDefaultMacBookProBoardProduct;
defaultBaseBoard.boardType = kSMBBaseBoardMotherboard;
defaultChassis.chassisType = kSMBchassisUnknown;
defaultChassis.chassisType = kSMBChassisTypeUnknown;
}
else
{
defaultSystemInfo.family = kDefaultMacBookFamily;
defaultBaseBoard.product = kDefaultMacBookBoardProduct;
defaultBaseBoard.boardType = kSMBBaseBoardMotherboard;
defaultChassis.chassisType = kSMBchassisUnknown;
defaultChassis.chassisType = kSMBChassisTypeUnknown;
}
}
else
defaultSystemInfo.family = kDefaultMacMiniFamily;
defaultBaseBoard.product = kDefaultMacMiniBoardProduct;
defaultBaseBoard.boardType = kSMBBaseBoardUnknown;
defaultChassis.chassisType = kSMBchassisLPDesktop;
defaultChassis.chassisType = kSMBChassisTypeLowProfileDesktop;
break;
case 2:
defaultSystemInfo.family = kDefaultMacFamily; // iMac8,1 family = Mac
defaultBaseBoard.product = kDefaultiMacBoardProduct;
defaultBaseBoard.boardType = kSMBBaseBoardMotherboard;
defaultChassis.chassisType = kSMBchassisAllInOne;
defaultChassis.chassisType = kSMBChassisTypeAllInOne;
break;
default:
{
defaultSystemInfo.family= kDefaultiMacFamily;
defaultBaseBoard.product = kDefaultiMacNehalemBoardProduct;
defaultBaseBoard.boardType = kSMBBaseBoardMotherboard;
defaultChassis.chassisType = kSMBchassisAllInOne;
defaultChassis.chassisType = kSMBChassisTypeAllInOne;
break;
case CPUID_MODEL_SANDYBRIDGE:// Intel Core i3, i5, i7 LGA1155 (32nm)
defaultSystemInfo.family = kDefaultiMacFamily;
defaultBaseBoard.product = kDefaultiMacSandyBoardProduct;
defaultBaseBoard.boardType = kSMBBaseBoardMotherboard;
defaultChassis.chassisType = kSMBchassisAllInOne;
defaultChassis.chassisType = kSMBChassisTypeAllInOne;
break;
case CPUID_MODEL_NEHALEM:// Intel Core i7, Xeon W35xx, Xeon X55xx, Xeon E55xx LGA1366 (45nm)
defaultSystemInfo.family= kDefaultMacProFamily;
defaultBaseBoard.product = kDefaultMacProNehalemBoardProduct;
defaultBaseBoard.boardType = kSMBBaseBoardProcessorMemoryModule;
defaultChassis.chassisType = kSMBchassisTower;
defaultChassis.chassisType = kSMBChassisTypeTower;
break;
case CPUID_MODEL_WESTMERE:// Intel Core i7, Xeon X56xx, Xeon E56xx, Xeon W36xx LGA1366 (32nm) 6 Core
defaultSystemInfo.family= kDefaultMacProFamily;
defaultBaseBoard.product = kDefaultMacProWestmereBoardProduct;
defaultBaseBoard.boardType = kSMBBaseBoardProcessorMemoryModule;
defaultChassis.chassisType = kSMBchassisTower;
defaultChassis.chassisType = kSMBChassisTypeTower;
break;
default:
defaultSystemInfo.family= kDefaultMacProFamily;
defaultBaseBoard.product = kDefaultMacProBoardProduct;
defaultBaseBoard.boardType = kSMBBaseBoardMotherboard;
defaultChassis.chassisType = kSMBchassisUnknown;
defaultChassis.chassisType = kSMBChassisTypeUnknown;
break;
}
break;
defaultSystemInfo.family= kDefaultMacProFamily;
defaultBaseBoard.product = kDefaultMacProBoardProduct;
defaultBaseBoard.boardType = kSMBBaseBoardMotherboard;
defaultChassis.chassisType = kSMBchassisUnknown;
defaultChassis.chassisType = kSMBChassisTypeUnknown;
break;
}
break;
case kSMBTypeSystemEnclosure: // Bungo: determine platform type
switch (((SMBSystemEnclosure *)structHeader)->chassisType)
{
case kSMBchassisPortable:
case kSMBchassisLaptop:
case kSMBchassisNotebook:
case kSMBchassisHandHeld:
case kSMBchassisSubNotebook:
case kSMBChassisTypePortable:
case kSMBChassisTypeLaptop:
case kSMBChassisTypeNotebook:
case kSMBChassisTypeHandHeld:
case kSMBChassisTypeSubNotebook:
PlatformType = 2; // notebook (MacBooks/Pros)
break;
case kSMBchassisMiniTower:
case kSMBchassisTower:
case kSMBchassisBlade:
case kSMBchassisBladeEnclosing:
case kSMBChassisTypeMiniTower:
case kSMBChassisTypeTower:
case kSMBChassisTypeBlade:
case kSMBChassisTypeBladeEnclosing:
PlatformType = 3; // workstation (Mac Pro, Xserve)
break;
default:
trunk/i386/libsaio/smbios_decode.c
339339
340340
341341
342
342
343343
344344
345345
......
370370
371371
372372
373
373
374374
375375
376376
......
400400
401401
402402
403
404
405
406
407403
408
409
410
411
412
413
414
415
416
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
417422
418423
419424
printHeader(structHeader);
DBG("Chassis Information\n");
DBG("\tManufacturer: %s\n", SMBStringForField(structHeader, ((SMBSystemEnclosure *)structHeader)->manufacturer, neverMask));
if ((((SMBSystemEnclosure *)structHeader)->chassisType < kSMBchassisOther) || (((SMBSystemEnclosure *)structHeader)->chassisType > kSMBchassisBladeEnclosing)) {
if ((((SMBSystemEnclosure *)structHeader)->chassisType < kSMBChassisTypeOther) || (((SMBSystemEnclosure *)structHeader)->chassisType > kSMBChassisTypeBladeEnclosing)) {
DBG("\tType: %s\n", OutOfSpecStr);
} else {
DBG("\tType: %s\n", SMBChassisTypes[(((SMBSystemEnclosure *)structHeader)->chassisType - 1)]);
printHeader(structHeader);
DBG("Processor Information\n");
DBG("\tSocket Designation: %s\n", SMBStringForField(structHeader, ((SMBProcessorInformation *)structHeader)->socketDesignation, neverMask));
if ((((SMBProcessorInformation *)structHeader)->processorType < kSMBprocessorTypeOther) || (((SMBProcessorInformation *)structHeader)->processorType > kSMBprocessorTypeGPU)) {
if ((((SMBProcessorInformation *)structHeader)->processorType < kSMBProcessorTypeOther) || (((SMBProcessorInformation *)structHeader)->processorType > kSMBProcessorTypeGPU)) {
DBG("\tType: %s\n", OutOfSpecStr);
} else {
DBG("\tType: %s\n", SMBProcessorTypes[((SMBProcessorInformation *)structHeader)->processorType - 1]);
DBG("\tSerial Number: %s\n", SMBStringForField(structHeader, ((SMBProcessorInformation *)structHeader)->serialNumber, privateData));
DBG("\tAsset Tag: %s\n", SMBStringForField(structHeader, ((SMBProcessorInformation *)structHeader)->assetTag, neverMask));
DBG("\tPart Number: %s\n", SMBStringForField(structHeader, ((SMBProcessorInformation *)structHeader)->partNumber, neverMask));
if(((SMBProcessorInformation *)structHeader)->coreCount != 0)
{
DBG("\tCore Count: %d\n", ((SMBProcessorInformation *)structHeader)->coreCount);
}
if(((SMBProcessorInformation *)structHeader)->coreEnabled != 0)
{
DBG("\tCore Enabled: %d\n", ((SMBProcessorInformation *)structHeader)->coreEnabled);
}
if(((SMBProcessorInformation *)structHeader)->threadCount != 0)
{
DBG("\tThread Count: %d\n", ((SMBProcessorInformation *)structHeader)->threadCount);
}
//
// TODO: Check the size before printing this information.
// Keep in mind that Apple does not use this info, and only uses a 35 bytes struct
//
//if(((SMBProcessorInformation *)structHeader)->coreCount != 0)
//{
//DBG("\tCore Count: %d\n", ((SMBProcessorInformation *)structHeader)->coreCount);
//}
//
//if(((SMBProcessorInformation *)structHeader)->coreEnabled != 0)
//{
//DBG("\tCore Enabled: %d\n", ((SMBProcessorInformation *)structHeader)->coreEnabled);
//}
//
//if(((SMBProcessorInformation *)structHeader)->threadCount != 0)
//{
//DBG("\tThread Count: %d\n", ((SMBProcessorInformation *)structHeader)->threadCount);
//}
// Characteristics:
//DBG("\tProcessor Family 2: %d\n", ((SMBProcessorInformation *)structHeader)->processorFamily2);
DBG("\n");
trunk/i386/libsaio/smbios.h
2323
2424
2525
26
27
26
27
28
29
2830
2931
3032
......
3234
3335
3436
37
38
39
40
41
3542
3643
3744
......
5562
5663
5764
58
65
66
67
68
69
70
5971
6072
6173
6274
6375
64
6576
6677
6778
......
7990
8091
8192
82
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
83110
84111
85
86
87
88
89
112
113
114
115
116
90117
91
92
118
119
93120
94
121
95122
96
123
97124
98125
99126
100127
101
102
103
128
129
130
104131
105132
106133
......
115142
116143
117144
118
145
119146
120147
121148
......
127154
128155
129156
130
157
131158
132159
133
134
135
136
137
138
160
161
162
163
164
165
139166
140167
168
169
141170
142171
172
173
143174
144175
145
176
146177
147178
148179
149
180
150181
151182
152
183
184
153185
154186
155187
......
158190
159191
160192
193
194
195
196
161197
162198
199
200
163201
164202
165203
166
204
167205
168206
169207
......
176214
177215
178216
217
218
219
179220
180
221
222
181223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
182244
183245
184246
185247
186
248
187249
188250
189251
......
191253
192254
193255
194
256
195257
196258
197259
198260
199261
200262
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
263
221264
265
222266
223
267
268
224269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
225293
294
226295
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
248333
249334
250335
251336
252337
253338
254
255
256
257
258
259
260
339
340
341
342
343
344
345
261346
262347
263348
264349
265
266
267
268
269
270
350
351
352
353
354
355
271356
272
273
357
358
359
360
361
362
274363
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
294394
295
296
297395
298396
299397
300398
301399
302400
303
304
305
306
307
308
309
401
402
403
404
405
406
407
310408
311409
312410
313411
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
499597
500598
501599
502600
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
545655
546656
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580657
581658
582
583
584
585
586
587
588
589
590
591
592
593
594
595
659
596660
597
598
599
600
601
602
603
604
605
606
607
608
609661
610
611
612
613
614
615
616662
617663
618664
......
628674
629675
630676
677
631678
632679
680
681
633682
634683
635684
......
649698
650699
651700
701
652702
653703
704
705
654706
655707
656708
657709
658710
659711
712
660713
661
714
715
662716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
663731
664732
665733
......
686754
687755
688756
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703757
704758
705759
760
761
706762
707763
708764
......
735791
736792
737793
794
738795
796
797
739798
740
741
742
799
800
801
743802
744
745
746
747
748
749
750
751
752
803
804
805
806
807
808
809
810
811
812
753813
814
754815
755
756816
757
758
759
760
761
762
763
764
765
766
767
768
769
770
817
771818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
772842
773
843
844
845
774846
775847
776848
......
789861
790862
791863
792
793864
794865
795866
......
801872
802873
803874
875
804876
877
878
805879
806
807
808
809880
810881
811882
......
815886
816887
817888
889
818890
891
892
819893
820
821
822
823894
824895
825896
826897
827898
828899
900
829901
902
903
830904
831
832
833
834905
835906
836907
837908
838909
839910
911
840912
913
914
841915
842
843
844
845916
846917
847918
848919
849920
850921
922
851923
924
925
852926
853
854
855
856927
857928
858929
859930
860931
861932
933
934
935
936
937
938
862939
940
941
863942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
864981
865982
866983
984
867985
986
868987
988
869989
870990
871991
#ifndef __LIBSAIO_SMBIOS_H
#define __LIBSAIO_SMBIOS_H
/* Based on System Management BIOS Reference Specification v2.4 */
// http://dmtf.org/standards/smbios
//
// Based on System Management BIOS Reference Specification v3.1.1
// https://www.dmtf.org/standards/smbios
//
typedef uint8_t SMBString;
typedef uint8_t SMBByte;
typedef uint32_t SMBDWord;
typedef uint64_t SMBQWord;
//
// SMBIOS 2.1 (32-bit) Entry Point
//
typedef struct DMIEntryPoint
{
SMBByte anchor[5];
DMIEntryPoint dmi;
} __attribute__((packed)) SMBEntryPoint;
/* Header common to all SMBIOS structures */
//
// Structure header format
// Each SMBIOS structure begins with a four-byte header
//
typedef struct SMBStructHeader
{
SMBBytetype;
SMBBytelength;
SMBWordhandle;
//SMBByte*data;
} __attribute__((packed)) SMBStructHeader;
#define SMB_STRUCT_HEADER SMBStructHeader header;
#define SMB_ANCHOR_RESET(x)\
bzero(x, sizeof(typedef struct SMBAnchor));
/* ======================= SMBIOS structure types. ======================= */
//
// SMBIOS structure types.
// The following structures are requiered:
// - BIOS Information (Type 0)
// - System Information (Type 1)
// - System Enclosure (Type 3)
// - Processor Information (Type 4)
// - Cache Information (Type 7)
// - System Slots (Type 9)
// - Physical Memory Array (Type 16)
// - Memory Device (Type 17)
// - Memory Array Mapped Address (Type 19)
// - System Boot Information (Type 32)
//
enum
{
kSMBTypeBIOSInformation= 0, // BIOS information (Type 0)
kSMBTypeSystemInformation= 1, // System Information (Type 1)
kSMBTypeBaseBoard= 2, // BaseBoard Information (Type 2)
kSMBTypeSystemEnclosure= 3, // System Chassis Information (Type 3)
kSMBTypeProcessorInformation= 4, // Processor Information (Type 4)
kSMBTypeBIOSInformation = 0, // BIOS information (Type 0)
kSMBTypeSystemInformation = 1, // System Information (Type 1)
kSMBTypeBaseBoard = 2, // BaseBoard Information (Type 2)
kSMBTypeSystemEnclosure = 3, // System Chassis Information (Type 3)
kSMBTypeProcessorInformation = 4, // Processor Information (Type 4)
// Memory Controller Information (Type 5) Obsolete
kSMBTypeMemoryModule= 6, // Memory Module Information (Type 6) Obsolete
kSMBTypeCacheInformation= 7, // Cache Information (Type 7)
// Memory Module Information (Type 6) Obsolete
kSMBTypeCacheInformation = 7, // Cache Information (Type 7)
// Port Connector Information (Type 8)
kSMBTypeSystemSlot= 9, // System Slots (Type 9)
kSMBTypeSystemSlot = 9, // System Slots (Type 9)
// On Board Devices Information (Type 10) Obsolete
kSMBOEMStrings= 11 ,// OEM Strings (Type 11)
kSMBOEMStrings = 11,// OEM Strings (Type 11)
// System Configuration Options (Type 12)
// BIOS Language Information (Type 13)
// Group Associations (Type 14)
// System Event Log (Type 15)
kSMBTypePhysicalMemoryArray= 16, // Physical Memory Array (Type 16)
kSMBTypeMemoryDevice= 17, // Memory Device (Type 17)
kSMBType32BitMemoryErrorInfo= 18, // 32-Bit Memory Error Information (Type 18)
kSMBTypePhysicalMemoryArray = 16, // Physical Memory Array (Type 16)
kSMBTypeMemoryDevice = 17, // Memory Device (Type 17)
kSMBType32BitMemoryErrorInfo = 18, // 32-Bit Memory Error Information (Type 18)
// Memory Array Mapped Address (Type 19)
// Memory Device Mapped Address (Type 20)
// Built-in Pointing Device (Type 21)
// Out-of-Band Remote Access (Type 30)
// Boot Integrity Service (BIS) Entry Point (Type 31)
// System Boot Information (Type 32)
kSMBType64BitMemoryErrorInfo= 33, // 64-Bit Memory Error Information (Type 33)
kSMBType64BitMemoryErrorInfo = 33, // 64-Bit Memory Error Information (Type 33)
// Managment Device (Type 34)
// Managment Device Component (Type 35)
// Management Device Threshold Data (Type 36)
// Management Controlle Host Interface (Type 42)
// Inactive (Type 126)
kSMBTypeEndOfTable= 127, // End-of-Table (Type 127)
kSMBTypeEndOfTable = 127, // End-of-Table (Type 127)
// Apple Specific Structures
kSMBTypeFirmwareVolume= 128, // FirmwareVolume (TYPE 128)
kSMBTypeMemorySPD= 130, // MemorySPD (TYPE 130)
kSMBTypeOemProcessorType= 131, // Processor Type (Type 131)
kSMBTypeOemProcessorBusSpeed= 132, // Processor Bus Speed (Type 132)
kSMBTypeOemPlatformFeature= 133, // Platform Feature (Type 133)
kSMBTypeOemSMCVersion= 134 // SMC Version (Type 134)
kSMBTypeFirmwareVolume = 128, // FirmwareVolume (TYPE 128)
kSMBTypeMemorySPD = 130, // MemorySPD (TYPE 130)
kSMBTypeOemProcessorType = 131, // Processor Type (Type 131)
kSMBTypeOemProcessorBusSpeed = 132, // Processor Bus Speed (Type 132)
kSMBTypeOemPlatformFeature = 133, // Platform Feature (Type 133)
kSMBTypeOemSMCVersion = 134 // SMC Version (Type 134)
};
//----------------------------------------------------------------------------------------------------------
// Struct - BIOS Information (Type 0), Apple uses 24 bytes length
//----------------------------------------------------------------------------------------------------------
typedef struct SMBBIOSInformation
{
SMB_STRUCT_HEADER
SMB_STRUCT_HEADER // Type 0
SMBString vendor; // BIOS vendor name
SMBString version; // BIOS version
SMBWord startSegment; // BIOS segment start
SMBString releaseDate; // BIOS release date
SMBString releaseDate; // BIOS release date (mm/dd/yy or mm/dd/yyyy)
SMBByte romSize; // BIOS ROM Size (n); 64K * (n+1) bytes
SMBQWord characteristics; // supported BIOS functions
// Bungo
// Bungo - 2.4+ spec (6 bytes)
SMBByte characteristicsExt1; // BIOS characteristics extension byte 1
SMBByte characteristicsExt2; // BIOS characteristics extension byte 2
SMBByte releaseMajor; // BIOS release (major)
SMBByte ECreleaseMinor; // Embedded Controller firmware release (minor)
} __attribute__((packed)) SMBBIOSInformation;
// TODO: Add constants for BIOS characteristics bits (Section 7.1.1, table 7)
// TODO: Add constants for BIOS characteristics extenstion bytes (Section 7.1.2, table 8+9)
//----------------------------------------------------------------------------------------------------------
// Struct - System Information (Type 1), Apple uses 27 bytes length
//----------------------------------------------------------------------------------------------------------
typedef struct SMBSystemInformation
{
// 2.0+ spec (8 bytes)
SMB_STRUCT_HEADER
SMB_STRUCT_HEADER // Type 1
SMBString manufacturer;
SMBString productName;
SMBString version;
SMBString family;
} __attribute__((packed)) SMBSystemInformation;
// TODO: Add enum for wake-up type field (Section 7.2.2, table 12)
//----------------------------------------------------------------------------------------------------------
// Base Board (or Module) Information (Type 2)
// Base Board (or Module) Information (Type 2), Apple uses 16 bytes length
//----------------------------------------------------------------------------------------------------------
typedef struct SMBBaseBoard
{
SMB_STRUCT_HEADER // Type 2
SMBStringmanufacturer;
SMBStringproduct;
SMBStringversion;
SMBStringserialNumber;
SMBStringassetTag; // Bungo: renamed from assetTagNumber folowing convention
SMBByte featureFlags; // Collection of flag that identify features of this baseboard
SMBStringlocationInChassis;
SMBWord chassisHandle;
SMBByte boardType; // Type of board, numeration value from BASE_BOARD_TYPE.
SMBByte numberOfContainedHandles;
// 0 - 255 contained handles go here but we do not include
// them in our structure. Be careful to use numberOfContainedHandles
// times sizeof(SMBWord) when computing the actual record size,
// if you need it.
SMBByte containedObjectHandles;
} __attribute__((packed)) SMBBaseBoard;
// Base Board - Board Type.
// Values for SMBBaseBoard.boardType
typedef enum
{
kSMBBaseBoardUnknown = 0x01,// Unknow
kSMBBaseBoardUnknown = 0x01,// Unknown
kSMBBaseBoardOther = 0x02,// Other
kSMBBaseBoardServerBlade = 0x03,// Server Blade
kSMBBaseBoardConnectivitySwitch = 0x04,// Connectivity Switch
kSMBBaseBoardProcessorModule = 0x06,// Processor Module
kSMBBaseBoardIOModule = 0x07,// I/O Module
kSMBBaseBoardMemoryModule = 0x08,// Memory Module
kSMBBaseBoardDaughter = 0x09,// Daughter Board
kSMBBaseBoardDaughter = 0x09,// Daughter board
kSMBBaseBoardMotherboard = 0x0A,// Motherboard (includes processor, memory, and I/O)
kSMBBaseBoardProcessorMemoryModule = 0x0B,// Processor/Memory Module
kSMBBaseBoardProcessorIOModule = 0x0C,// Processor/IO Module
kSMBBaseBoardInterconnect = 0x0D// Interconnect board
} BASE_BOARD_TYPE;
// Struct - Base Board (or Module) Information (Type 2), Apple uses 16 bytes length
typedef struct SMBBaseBoard
{
SMB_STRUCT_HEADER // Type 2
SMBStringmanufacturer;
SMBStringproduct;
SMBStringversion;
SMBStringserialNumber;
SMBStringassetTag;// Bungo: renamed from assetTagNumber folowing convention
SMBByte featureFlags;// Collection of flag that identify features of this baseboard
SMBStringlocationInChassis;
SMBWord chassisHandle;
SMBByte boardType;// Type of board, numeration value from BASE_BOARD_TYPE.
SMBByte numberOfContainedHandles;
// 0 - 255 contained handles go here but we do not include
// them in our structure. Be careful to use numberOfContainedHandles
// times sizeof(SMBWord) when computing the actual record size,
// if you need it.
SMBByte containedObjectHandles;
} __attribute__((packed)) SMBBaseBoard;
// TODO: Add constants to identify the baseboard feature flags
//----------------------------------------------------------------------------------------------------------
// System Enclosure (Type 3)
// System Enclosure or Chassis (Type 3), Apple uses 21 bytes length
//----------------------------------------------------------------------------------------------------------
typedef struct SMBSystemEnclosure
{
SMB_STRUCT_HEADER // Type 3
SMBString manufacturer;
SMBByte chassisType; // System Enclosure Indicator
SMBString version; // Board Number?
SMBString serialNumber;
SMBString assetTag; // Bungo: renamed from assetTagNumber folowing convention
SMBByte bootupState; // State of enclosure when when it was last booted
SMBByte powerSupplyState; // State of enclosure's power supply when last booted
SMBByte thermalState; // Thermal state of the enclosure when last booted
SMBByte securityStatus; // Physical security status of the enclosure when last booted
SMBDWord oemDefined; // OEM- or BIOS vendor-specific information
SMBByte height; // Height of the enclosure, in 'U's
SMBByte numberOfPowerCords; // Number of power cords associated with the enclosure or chassis
SMBByte containedElementCount; // Number of Contained Element record that follow, in the range 0 to 255
SMBByte containedElementRecord; // Byte leght of each Contained Element record that follow, in the range 0 to 255
//SMBByte containedElements; // Elements, possibly defined by other SMBIOS structures present in chassis
// 2.7+
//SMBString skuNumber;// Number of null-terminated string describing the chassis or enclosure SKU number
} __attribute__((packed)) SMBSystemEnclosure;
// Bungo: values for SMBSystemEnclosure.chassisType
// MinusZwei: renamed enum values and added new values from later specs
typedef enum {
kSMBchassisOther = 0x01,
kSMBchassisUnknown = 0x02,
kSMBchassisDesktop = 0x03,
kSMBchassisLPDesktop = 0x04,
kSMBchassisPizzaBox = 0x05,
kSMBchassisMiniTower = 0x06,
kSMBchassisTower = 0x07,
kSMBchassisPortable = 0x08,
kSMBchassisLaptop = 0x09,
kSMBchassisNotebook = 0x0A,
kSMBchassisHandHeld = 0x0B,
kSMBchassisDockingStation = 0x0C,
kSMBchassisAllInOne = 0x0D,
kSMBchassisSubNotebook = 0x0E,
// ... fill up if needed ;-)
kSMBchassisLunchBox = 0x10,
kSMBchassisMainServer = 0x11,
// ... fill up if needed ;-)
kSMBchassisBlade = 0x1C,
kSMBchassisBladeEnclosing = 0x1D
} MISC_CHASSIS_TYPE;
kSMBChassisTypeOther = 0x01, // Other
kSMBChassisTypeUnknown = 0x02, // Unknown
kSMBChassisTypeDesktop = 0x03, // Desktop
kSMBChassisTypeLowProfileDesktop = 0x04, // Low Profile Desktop
kSMBChassisTypePizzaBox = 0x05, // Pizza Box
kSMBChassisTypeMiniTower = 0x06, // Mini Tower
kSMBChassisTypeTower = 0x07, // Tower
kSMBChassisTypePortable = 0x08, // Portable
kSMBChassisTypeLaptop = 0x09, // Laptop
kSMBChassisTypeNotebook = 0x0A, // Notebook
kSMBChassisTypeHandHeld = 0x0B, // Hand Held
kSMBChassisTypeDockingStation = 0x0C, // Docking Station
kSMBChassisTypeAllInOne = 0x0D, // All in One
kSMBChassisTypeSubNotebook = 0x0E, // Sub Notebook
kSMBChassisTypeSpaceSaving = 0x0F, // Space-saving
kSMBChassisTypeLunchBox = 0x10, // Lunch Box
kSMBChassisTypeMainServer = 0x11, // Main Server Chassis
kSMBChassisTypeExpansion = 0x12, // Expansion Chassis
kSMBChassisTypeSubChassis = 0x13, // SubChassis
kSMBChassisTypeBusExpansion = 0x14, // Bus Expansion Chassis
kSMBChassisTypePeripheral = 0x15, // Peripheral Chassis
kSMBChassisTypeRAID = 0x16, // RAID Chassis
kSMBChassisTypeRackMount = 0x17, // Rack Mount Chassis
kSMBChassisTypeSealedCase = 0x18, // Sealed-case PC
kSMBChassisTypeMultiSystem = 0x19, // Multi-system chassis
kSMBChassisTypeCompactPCI = 0x1A, // Compact PCI
kSMBChassisTypeAdvancedTCA = 0x1B, // Advanced TCA
kSMBChassisTypeBlade = 0x1C, // Blade
kSMBChassisTypeBladeEnclosing = 0x1D, // Blade Enclosure
kSMBChassisTypeTablet = 0x1E, // Tablet
kSMBChassisTypeConvertible = 0x1F, // Convertible
kSMBChassisTypeDetachable = 0x20, // Detachable
kSMBChassisTypeIoTGateway = 0x21, // IoT Gateway
kSMBChassisTypeEmbeddedPC = 0x22, // Embedded PC
kSMBChassisTypeMiniPC = 0x23, // Mini PC
kSMBChassisTypeStickPC = 0x24 // Stick PC
} SYSTEM_ENCLOSURE_CHASSIS_TYPE;
// System Enclosure or Chassis States.
// values for SMBSystemEnclosure.bootupState
// values for SMBSystemEnclosure.powerSupplyState
// values for SMBSystemEnclosure.thermalState
typedef enum {
kSMBChassisStateOther = 0x01,
kSMBChassisStateUnknown = 0x02,
kSMBChassisStateSafe = 0x03,
kSMBChassisStateWarning = 0x04,
kSMBChassisStateCritical = 0x05,
kSMBChassisStateNonRecoverable = 0x06
} MISC_CHASSIS_STATE;
kSMBChassisStateOther = 0x01, // Other
kSMBChassisStateUnknown = 0x02, // Unknown
kSMBChassisStateSafe = 0x03, // Safe
kSMBChassisStateWarning = 0x04, // Warning
kSMBChassisStateCritical = 0x05, // Critical
kSMBChassisStateNonRecoverable = 0x06 // Non-recoverable
} SYSTEM_ENCLOSURE_CHASSIS_STATE;
// System Enclosure or Chassis Security Status.
// values for SMBSystemEnclosure.securityStatus
typedef enum {
kSMBChassisSecurityStatusOther = 0x01,
kSMBChassisSecurityStatusUnknown = 0x02,
kSMBChassisSecurityStatusNone = 0x03,
kSMBChassisSecurityStatusExternalInterfaceLockedOut = 0x04,
kSMBChassisSecurityStatusExternalInterfaceLockedEnabled = 0x05
} MISC_CHASSIS_SECURITY_STATE;
kSMBChassisSecurityStatusOther = 0x01, // Other
kSMBChassisSecurityStatusUnknown = 0x02, // Unknown
kSMBChassisSecurityStatusNone = 0x03, // None
kSMBChassisSecurityStatusExternalInterfaceLockedOut = 0x04, // External interface locked out
kSMBChassisSecurityStatusExternalInterfaceLockedEnabled = 0x05 // External interface enabled
} SYSTEM_ENCLOSURE_CHASSIS_SECURITY_STATE;
// Struct - System Enclosure (Type 3), Apple uses 21 bytes length
typedef struct SMBSystemEnclosure
//----------------------------------------------------------------------------------------------------------
// Processor Information (Type 4), Apple uses 35 bytes length
//----------------------------------------------------------------------------------------------------------
typedef struct SMBProcessorInformation
{
SMB_STRUCT_HEADER // Type 3
SMBString manufacturer;
SMBByte chassisType;// System Enclosure Indicator
SMBString version;// Board Number?
SMBString serialNumber;
SMBString assetTag;// Bungo: renamed from assetTagNumber folowing convention
SMBByte bootupState;// State of enclosure when when it was last booted
SMBByte powerSupplyState;// State of enclosure's power supply when last booted
SMBByte thermalState;// Thermal state of the enclosure when last booted
SMBByte securityStatus;// Physical security status of the enclosure when last booted
SMBDWord oemDefined;// OEM- or BIOS vendor-specific information
SMBByte height;// Height of the enclosure, in 'U's
SMBByte numberOfPowerCords;// Number of power cords associated with the enclosure or chassis
SMBByte containedElementCount;// Number of Contained Element record that follow, in the range 0 to 255
SMBByte containedElementRecord;// Byte leght of each Contained Element record that follow, in the range 0 to 255
//SMBByte containedElements;// Elements, possibly defined by other SMBIOS structures present in chassis
// 2.7+
//SMBString skuNumber;// Number of null-terminated string describing the chassis or enclosure SKU number
} __attribute__((packed)) SMBSystemEnclosure;
// 2.0+ spec (26 bytes)
SMB_STRUCT_HEADER // Type 4
SMBString socketDesignation;
SMBByte processorType; // The enumeration value from PROCESSOR_TYPE.
SMBByte processorFamily; // The enumeration value from PROCESSOR_FAMILY.
SMBString manufacturer;
SMBQWord processorID; // based on CPUID
SMBString processorVersion;
SMBByte voltage; // bit7 cleared indicate legacy mode
SMBWord externalClock; // external clock in MHz
SMBWord maximumClock; // max internal clock in MHz
SMBWord currentClock; // current internal clock in MHz
SMBByte status;
SMBByte processorUpgrade; // The enumeration value from PROCESSOR_UPGRADE.
// 2.1+ spec (32 bytes)
SMBWord L1CacheHandle;
SMBWord L2CacheHandle;
SMBWord L3CacheHandle;
// 2.3+ spec (35 bytes)
SMBString serialNumber;
SMBString assetTag;
SMBString partNumber;
// 2.5+ spec (40 bytes) Apple still uses 2.4 spec
// SMBByte coreCount;
// SMBByte coreEnabled;
// SMBByte threadCount;
//SMBWord processorCharacteristics;
// 2.6+ spec (42 bytes)
//SMBWord processorFamily2;
} __attribute__((packed)) SMBProcessorInformation;
//----------------------------------------------------------------------------------------------------------
// Processor Information (Type 4)
#define kSMBProcessorInformationMinSize 26
// Processor Information - Processor Type.
// Values for SMBProcessorInformation.processorType
typedef enum
{
kSMBprocessorTypeOther = 0x01,
kSMBprocessorTypeUnknown = 0x02,
kSMBprocessorTypeCPU = 0x03,
kSMBprocessorTypeMPU = 0x04,
kSMBprocessorTypeDSP = 0x05,
kSMBprocessorTypeGPU = 0x06
} PROCESSOR_TYPE_DATA;
kSMBProcessorTypeOther = 0x01, // Other
kSMBProcessorTypeUnknown = 0x02, // Unknown
kSMBProcessorTypeCPU = 0x03, // Central Processor
kSMBProcessorTypeMPU = 0x04, // Math Processor
kSMBProcessorTypeDSP = 0x05, // DSP Processor
kSMBProcessorTypeGPU = 0x06 // Video Processor
} PROCESSOR_TYPE;
// Processor Information - Processor Family.
// Values for SMBProcessorInformation.processorFamily
typedef enum {
kSMBprocessorFamilyOther = 0x01,
kSMBprocessorFamilyUnknown = 0x02,
kSMBprocessorFamily8086 = 0x03,
kSMBprocessorFamily80286 = 0x04,
kSMBprocessorFamilyIntel386 = 0x05,
kSMBprocessorFamilyIntel486 = 0x06,
kSMBprocessorFamily8087 = 0x07,
kSMBprocessorFamily80287 = 0x08,
kSMBprocessorFamily80387 = 0x09,
kSMBprocessorFamily80487 = 0x0A,
kSMBprocessorFamilyPentium = 0x0B,
kSMBprocessorFamilyPentiumPro = 0x0C,
kSMBprocessorFamilyPentiumII = 0x0D,
kSMBprocessorFamilyPentiumMMX = 0x0E,
kSMBprocessorFamilyCeleron = 0x0F,
kSMBprocessorFamilyPentiumIIXeon = 0x10,
kSMBprocessorFamilyPentiumIII = 0x11,
kSMBprocessorFamilyM1 = 0x12,
kSMBprocessorFamilyM2 = 0x13,
kSMBprocessorFamilyIntelCeleronM = 0x14,
kSMBprocessorFamilyIntelPentium4Ht = 0x15,
kSMBprocessorFamilyM1Reserved4 = 0x16,
kSMBprocessorFamilyM1Reserved5 = 0x17,
kSMBprocessorFamilyAmdDuron = 0x18,
kSMBprocessorFamilyK5 = 0x19,
kSMBprocessorFamilyK6 = 0x1A,
kSMBprocessorFamilyK6_2 = 0x1B,
kSMBprocessorFamilyK6_3 = 0x1C,
kSMBprocessorFamilyAmdAthlon = 0x1D,
kSMBprocessorFamilyAmd29000 = 0x1E,
kSMBprocessorFamilyK6_2Plus = 0x1F,
kSMBprocessorFamilyPowerPC = 0x20,
kSMBprocessorFamilyPowerPC601 = 0x21,
kSMBprocessorFamilyPowerPC603 = 0x22,
kSMBprocessorFamilyPowerPC603Plus = 0x23,
kSMBprocessorFamilyPowerPC604 = 0x24,
kSMBprocessorFamilyPowerPC620 = 0x25,
kSMBprocessorFamilyPowerPCx704 = 0x26,
kSMBprocessorFamilyPowerPC750 = 0x27,
kSMBprocessorFamilyIntelCoreDuo = 0x28,
kSMBprocessorFamilyIntelCoreDuoMobile = 0x29,
kSMBprocessorFamilyIntelCoreSoloMobile = 0x2A,
kSMBprocessorFamilyIntelAtom = 0x2B,
kSMBprocessorFamilyAlpha3 = 0x30,
kSMBprocessorFamilyAlpha21064 = 0x31,
kSMBprocessorFamilyAlpha21066 = 0x32,
kSMBprocessorFamilyAlpha21164 = 0x33,
kSMBprocessorFamilyAlpha21164PC = 0x34,
kSMBprocessorFamilyAlpha21164a = 0x35,
kSMBprocessorFamilyAlpha21264 = 0x36,
kSMBprocessorFamilyAlpha21364 = 0x37,
kSMBprocessorFamilyAmdTurionIIUltraDualCoreMobileM = 0x38,
kSMBprocessorFamilyAmdTurionIIDualCoreMobileM = 0x39,
kSMBprocessorFamilyAmdAthlonIIDualCoreM = 0x3A,
kSMBprocessorFamilyAmdOpteron6100Series = 0x3B,
kSMBprocessorFamilyAmdOpteron4100Series = 0x3C,
kSMBprocessorFamilyAmdOpteron6200Series = 0x3D,
kSMBprocessorFamilyAmdOpteron4200Series = 0x3E,
kSMBprocessorFamilyMips = 0x40,
kSMBprocessorFamilyMIPSR4000 = 0x41,
kSMBprocessorFamilyMIPSR4200 = 0x42,
kSMBprocessorFamilyMIPSR4400 = 0x43,
kSMBprocessorFamilyMIPSR4600 = 0x44,
kSMBprocessorFamilyMIPSR10000 = 0x45,
kSMBprocessorFamilyAmdCSeries = 0x46,
kSMBprocessorFamilyAmdESeries = 0x47,
kSMBprocessorFamilyAmdSSeries = 0x48,
kSMBprocessorFamilyAmdGSeries = 0x49,
kSMBprocessorFamilySparc = 0x50,
kSMBprocessorFamilySuperSparc = 0x51,
kSMBprocessorFamilymicroSparcII = 0x52,
kSMBprocessorFamilymicroSparcIIep = 0x53,
kSMBprocessorFamilyUltraSparc = 0x54,
kSMBprocessorFamilyUltraSparcII = 0x55,
kSMBprocessorFamilyUltraSparcIIi = 0x56,
kSMBprocessorFamilyUltraSparcIII = 0x57,
kSMBprocessorFamilyUltraSparcIIIi = 0x58,
kSMBprocessorFamily68040 = 0x60,
kSMBprocessorFamily68xxx = 0x61,
kSMBprocessorFamily68000 = 0x62,
kSMBprocessorFamily68010 = 0x63,
kSMBprocessorFamily68020 = 0x64,
kSMBprocessorFamily68030 = 0x65,
kSMBprocessorFamilyHobbit = 0x70,
kSMBprocessorFamilyCrusoeTM5000 = 0x78,
kSMBprocessorFamilyCrusoeTM3000 = 0x79,
kSMBprocessorFamilyEfficeonTM8000 = 0x7A,
kSMBprocessorFamilyWeitek = 0x80,
kSMBprocessorFamilyItanium = 0x82,
kSMBprocessorFamilyAmdAthlon64 = 0x83,
kSMBprocessorFamilyAmdOpteron = 0x84,
kSMBprocessorFamilyAmdSempron = 0x85,
kSMBprocessorFamilyAmdTurion64Mobile = 0x86,
kSMBprocessorFamilyDualCoreAmdOpteron = 0x87,
kSMBprocessorFamilyAmdAthlon64X2DualCore = 0x88,
kSMBprocessorFamilyAmdTurion64X2Mobile = 0x89,
kSMBprocessorFamilyQuadCoreAmdOpteron = 0x8A,
kSMBprocessorFamilyThirdGenerationAmdOpteron = 0x8B,
kSMBprocessorFamilyAmdPhenomFxQuadCore = 0x8C,
kSMBprocessorFamilyAmdPhenomX4QuadCore = 0x8D,
kSMBprocessorFamilyAmdPhenomX2DualCore = 0x8E,
kSMBprocessorFamilyAmdAthlonX2DualCore = 0x8F,
kSMBprocessorFamilyPARISC = 0x90,
kSMBprocessorFamilyPaRisc8500 = 0x91,
kSMBprocessorFamilyPaRisc8000 = 0x92,
kSMBprocessorFamilyPaRisc7300LC = 0x93,
kSMBprocessorFamilyPaRisc7200 = 0x94,
kSMBprocessorFamilyPaRisc7100LC = 0x95,
kSMBprocessorFamilyPaRisc7100 = 0x96,
kSMBprocessorFamilyV30 = 0xA0,
kSMBprocessorFamilyQuadCoreIntelXeon3200Series = 0xA1,
kSMBprocessorFamilyDualCoreIntelXeon3000Series = 0xA2,
kSMBprocessorFamilyQuadCoreIntelXeon5300Series = 0xA3,
kSMBprocessorFamilyDualCoreIntelXeon5100Series = 0xA4,
kSMBprocessorFamilyDualCoreIntelXeon5000Series = 0xA5,
kSMBprocessorFamilyDualCoreIntelXeonLV = 0xA6,
kSMBprocessorFamilyDualCoreIntelXeonULV = 0xA7,
kSMBprocessorFamilyDualCoreIntelXeon7100Series = 0xA8,
kSMBprocessorFamilyQuadCoreIntelXeon5400Series = 0xA9,
kSMBprocessorFamilyQuadCoreIntelXeon = 0xAA,
kSMBprocessorFamilyDualCoreIntelXeon5200Series = 0xAB,
kSMBprocessorFamilyDualCoreIntelXeon7200Series = 0xAC,
kSMBprocessorFamilyQuadCoreIntelXeon7300Series = 0xAD,
kSMBprocessorFamilyQuadCoreIntelXeon7400Series = 0xAE,
kSMBprocessorFamilyMultiCoreIntelXeon7400Series = 0xAF,
kSMBprocessorFamilyPentiumIIIXeon = 0xB0,
kSMBprocessorFamilyPentiumIIISpeedStep = 0xB1,
kSMBprocessorFamilyPentium4 = 0xB2,
kSMBprocessorFamilyIntelXeon = 0xB3,
kSMBprocessorFamilyAS400 = 0xB4,
kSMBprocessorFamilyIntelXeonMP = 0xB5,
kSMBprocessorFamilyAMDAthlonXP = 0xB6,
kSMBprocessorFamilyAMDAthlonMP = 0xB7,
kSMBprocessorFamilyIntelItanium2 = 0xB8,
kSMBprocessorFamilyIntelPentiumM = 0xB9,
kSMBprocessorFamilyIntelCeleronD = 0xBA,
kSMBprocessorFamilyIntelPentiumD = 0xBB,
kSMBprocessorFamilyIntelPentiumEx = 0xBC,
kSMBprocessorFamilyIntelCoreSolo = 0xBD, ///< SMBIOS spec 2.6 correct this value
kSMBprocessorFamilyReserved = 0xBE,
kSMBprocessorFamilyIntelCore2 = 0xBF,
kSMBprocessorFamilyIntelCore2Solo = 0xC0,
kSMBprocessorFamilyIntelCore2Extreme = 0xC1,
kSMBprocessorFamilyIntelCore2Quad = 0xC2,
kSMBprocessorFamilyIntelCore2ExtremeMobile = 0xC3,
kSMBprocessorFamilyIntelCore2DuoMobile = 0xC4,
kSMBprocessorFamilyIntelCore2SoloMobile = 0xC5,
kSMBprocessorFamilyIntelCoreI7 = 0xC6,
kSMBprocessorFamilyDualCoreIntelCeleron = 0xC7,
kSMBprocessorFamilyIBM390 = 0xC8,
kSMBprocessorFamilyG4 = 0xC9,
kSMBprocessorFamilyG5 = 0xCA,
kSMBprocessorFamilyG6 = 0xCB,
kSMBprocessorFamilyzArchitectur = 0xCC,
kSMBprocessorFamilyIntelCoreI5 = 0xCD,
kSMBprocessorFamilyIntelCoreI3 = 0xCE,
kSMBprocessorFamilyViaC7M = 0xD2,
kSMBprocessorFamilyViaC7D = 0xD3,
kSMBprocessorFamilyViaC7 = 0xD4,
kSMBprocessorFamilyViaEden = 0xD5,
kSMBprocessorFamilyMultiCoreIntelXeon = 0xD6,
kSMBprocessorFamilyDualCoreIntelXeon3Series = 0xD7,
kSMBprocessorFamilyQuadCoreIntelXeon3Series = 0xD8,
kSMBprocessorFamilyViaNano = 0xD9,
kSMBprocessorFamilyDualCoreIntelXeon5Series = 0xDA,
kSMBprocessorFamilyQuadCoreIntelXeon5Series = 0xDB,
kSMBprocessorFamilyDualCoreIntelXeon7Series = 0xDD,
kSMBprocessorFamilyQuadCoreIntelXeon7Series = 0xDE,
kSMBprocessorFamilyMultiCoreIntelXeon7Series = 0xDF,
kSMBprocessorFamilyMultiCoreIntelXeon3400Series = 0xE0,
kSMBprocessorFamilyEmbeddedAmdOpteronQuadCore = 0xE6,
kSMBprocessorFamilyAmdPhenomTripleCore = 0xE7,
kSMBprocessorFamilyAmdTurionUltraDualCoreMobile = 0xE8,
kSMBprocessorFamilyAmdTurionDualCoreMobile = 0xE9,
kSMBprocessorFamilyAmdAthlonDualCore = 0xEA,
kSMBprocessorFamilyAmdSempronSI = 0xEB,
kSMBprocessorFamilyAmdPhenomII = 0xEC,
kSMBprocessorFamilyAmdAthlonII = 0xED,
kSMBprocessorFamilySixCoreAmdOpteron = 0xEE,
kSMBprocessorFamilyAmdSempronM = 0xEF,
kSMBprocessorFamilyi860 = 0xFA,
kSMBprocessorFamilyi960 = 0xFB,
kSMBprocessorFamilyIndicatorFamily2 = 0xFE,
kSMBprocessorFamilyReserved1 = 0xFF
} PROCESSOR_FAMILY_DATA;
kSMBProcessorFamilyOther = 0x01,
kSMBProcessorFamilyUnknown = 0x02,
kSMBProcessorFamily8086 = 0x03,
kSMBProcessorFamily80286 = 0x04,
kSMBProcessorFamilyIntel386 = 0x05,
kSMBProcessorFamilyIntel486 = 0x06,
kSMBProcessorFamily8087 = 0x07,
kSMBProcessorFamily80287 = 0x08,
kSMBProcessorFamily80387 = 0x09,
kSMBProcessorFamily80487 = 0x0A,
kSMBProcessorFamilyPentium = 0x0B,
kSMBProcessorFamilyPentiumPro = 0x0C,
kSMBProcessorFamilyPentiumII = 0x0D,
kSMBProcessorFamilyPentiumMMX = 0x0E,
kSMBProcessorFamilyCeleron = 0x0F,
kSMBProcessorFamilyPentiumIIXeon = 0x10,
kSMBProcessorFamilyPentiumIII = 0x11,
kSMBProcessorFamilyM1 = 0x12,
kSMBProcessorFamilyM2 = 0x13,
kSMBProcessorFamilyIntelCeleronM = 0x14,
kSMBProcessorFamilyIntelPentium4Ht = 0x15,
kSMBProcessorFamilyM1Reserved4 = 0x16,
kSMBProcessorFamilyM1Reserved5 = 0x17,
kSMBProcessorFamilyAmdDuron = 0x18,
kSMBProcessorFamilyK5 = 0x19,
kSMBProcessorFamilyK6 = 0x1A,
kSMBProcessorFamilyK6_2 = 0x1B,
kSMBProcessorFamilyK6_3 = 0x1C,
kSMBProcessorFamilyAmdAthlon = 0x1D,
kSMBProcessorFamilyAmd29000 = 0x1E,
kSMBProcessorFamilyK6_2Plus = 0x1F,
kSMBProcessorFamilyPowerPC = 0x20,
kSMBProcessorFamilyPowerPC601 = 0x21,
kSMBProcessorFamilyPowerPC603 = 0x22,
kSMBProcessorFamilyPowerPC603Plus = 0x23,
kSMBProcessorFamilyPowerPC604 = 0x24,
kSMBProcessorFamilyPowerPC620 = 0x25,
kSMBProcessorFamilyPowerPCx704 = 0x26,
kSMBProcessorFamilyPowerPC750 = 0x27,
kSMBProcessorFamilyIntelCoreDuo = 0x28,
kSMBProcessorFamilyIntelCoreDuoMobile = 0x29,
kSMBProcessorFamilyIntelCoreSoloMobile = 0x2A,
kSMBProcessorFamilyIntelAtom = 0x2B,
kSMBProcessorFamilyAlpha3 = 0x30,
kSMBProcessorFamilyAlpha21064 = 0x31,
kSMBProcessorFamilyAlpha21066 = 0x32,
kSMBProcessorFamilyAlpha21164 = 0x33,
kSMBProcessorFamilyAlpha21164PC = 0x34,
kSMBProcessorFamilyAlpha21164a = 0x35,
kSMBProcessorFamilyAlpha21264 = 0x36,
kSMBProcessorFamilyAlpha21364 = 0x37,
kSMBProcessorFamilyAmdTurionIIUltraDualCoreMobileM = 0x38,
kSMBProcessorFamilyAmdTurionIIDualCoreMobileM = 0x39,
kSMBProcessorFamilyAmdAthlonIIDualCoreM = 0x3A,
kSMBProcessorFamilyAmdOpteron6100Series = 0x3B,
kSMBProcessorFamilyAmdOpteron4100Series = 0x3C,
kSMBProcessorFamilyAmdOpteron6200Series = 0x3D,
kSMBProcessorFamilyAmdOpteron4200Series = 0x3E,
kSMBProcessorFamilyMips = 0x40,
kSMBProcessorFamilyMIPSR4000 = 0x41,
kSMBProcessorFamilyMIPSR4200 = 0x42,
kSMBProcessorFamilyMIPSR4400 = 0x43,
kSMBProcessorFamilyMIPSR4600 = 0x44,
kSMBProcessorFamilyMIPSR10000 = 0x45,
kSMBProcessorFamilyAmdCSeries = 0x46,
kSMBProcessorFamilyAmdESeries = 0x47,
kSMBProcessorFamilyAmdSSeries = 0x48,
kSMBProcessorFamilyAmdGSeries = 0x49,
kSMBProcessorFamilySparc = 0x50,
kSMBProcessorFamilySuperSparc = 0x51,
kSMBProcessorFamilymicroSparcII = 0x52,
kSMBProcessorFamilymicroSparcIIep = 0x53,
kSMBProcessorFamilyUltraSparc = 0x54,
kSMBProcessorFamilyUltraSparcII = 0x55,
kSMBProcessorFamilyUltraSparcIIi = 0x56,
kSMBProcessorFamilyUltraSparcIII = 0x57,
kSMBProcessorFamilyUltraSparcIIIi = 0x58,
kSMBProcessorFamily68040 = 0x60,
kSMBProcessorFamily68xxx = 0x61,
kSMBProcessorFamily68000 = 0x62,
kSMBProcessorFamily68010 = 0x63,
kSMBProcessorFamily68020 = 0x64,
kSMBProcessorFamily68030 = 0x65,
kSMBProcessorFamilyHobbit = 0x70,
kSMBProcessorFamilyCrusoeTM5000 = 0x78,
kSMBProcessorFamilyCrusoeTM3000 = 0x79,
kSMBProcessorFamilyEfficeonTM8000 = 0x7A,
kSMBProcessorFamilyWeitek = 0x80,
kSMBProcessorFamilyItanium = 0x82,
kSMBProcessorFamilyAmdAthlon64 = 0x83,
kSMBProcessorFamilyAmdOpteron = 0x84,
kSMBProcessorFamilyAmdSempron = 0x85,
kSMBProcessorFamilyAmdTurion64Mobile = 0x86,
kSMBProcessorFamilyDualCoreAmdOpteron = 0x87,
kSMBProcessorFamilyAmdAthlon64X2DualCore = 0x88,
kSMBProcessorFamilyAmdTurion64X2Mobile = 0x89,
kSMBProcessorFamilyQuadCoreAmdOpteron = 0x8A,
kSMBProcessorFamilyThirdGenerationAmdOpteron = 0x8B,
kSMBProcessorFamilyAmdPhenomFxQuadCore = 0x8C,
kSMBProcessorFamilyAmdPhenomX4QuadCore = 0x8D,
kSMBProcessorFamilyAmdPhenomX2DualCore = 0x8E,
kSMBProcessorFamilyAmdAthlonX2DualCore = 0x8F,
kSMBProcessorFamilyPARISC = 0x90,
kSMBProcessorFamilyPaRisc8500 = 0x91,
kSMBProcessorFamilyPaRisc8000 = 0x92,
kSMBProcessorFamilyPaRisc7300LC = 0x93,
kSMBProcessorFamilyPaRisc7200 = 0x94,
kSMBProcessorFamilyPaRisc7100LC = 0x95,
kSMBProcessorFamilyPaRisc7100 = 0x96,
kSMBProcessorFamilyV30 = 0xA0,
kSMBProcessorFamilyQuadCoreIntelXeon3200Series = 0xA1,
kSMBProcessorFamilyDualCoreIntelXeon3000Series = 0xA2,
kSMBProcessorFamilyQuadCoreIntelXeon5300Series = 0xA3,
kSMBProcessorFamilyDualCoreIntelXeon5100Series = 0xA4,
kSMBProcessorFamilyDualCoreIntelXeon5000Series = 0xA5,
kSMBProcessorFamilyDualCoreIntelXeonLV = 0xA6,
kSMBProcessorFamilyDualCoreIntelXeonULV = 0xA7,
kSMBProcessorFamilyDualCoreIntelXeon7100Series = 0xA8,
kSMBProcessorFamilyQuadCoreIntelXeon5400Series = 0xA9,
kSMBProcessorFamilyQuadCoreIntelXeon = 0xAA,
kSMBProcessorFamilyDualCoreIntelXeon5200Series = 0xAB,
kSMBProcessorFamilyDualCoreIntelXeon7200Series = 0xAC,
kSMBProcessorFamilyQuadCoreIntelXeon7300Series = 0xAD,
kSMBProcessorFamilyQuadCoreIntelXeon7400Series = 0xAE,
kSMBProcessorFamilyMultiCoreIntelXeon7400Series = 0xAF,
kSMBProcessorFamilyPentiumIIIXeon = 0xB0,
kSMBProcessorFamilyPentiumIIISpeedStep = 0xB1,
kSMBProcessorFamilyPentium4 = 0xB2,
kSMBProcessorFamilyIntelXeon = 0xB3,
kSMBProcessorFamilyAS400 = 0xB4,
kSMBProcessorFamilyIntelXeonMP = 0xB5,
kSMBProcessorFamilyAMDAthlonXP = 0xB6,
kSMBProcessorFamilyAMDAthlonMP = 0xB7,
kSMBProcessorFamilyIntelItanium2 = 0xB8,
kSMBProcessorFamilyIntelPentiumM = 0xB9,
kSMBProcessorFamilyIntelCeleronD = 0xBA,
kSMBProcessorFamilyIntelPentiumD = 0xBB,
kSMBProcessorFamilyIntelPentiumEx = 0xBC,
kSMBProcessorFamilyIntelCoreSolo = 0xBD, ///< SMBIOS spec 2.6 correct this value
kSMBProcessorFamilyReserved = 0xBE,
kSMBProcessorFamilyIntelCore2 = 0xBF,
kSMBProcessorFamilyIntelCore2Solo = 0xC0,
kSMBProcessorFamilyIntelCore2Extreme = 0xC1,
kSMBProcessorFamilyIntelCore2Quad = 0xC2,
kSMBProcessorFamilyIntelCore2ExtremeMobile = 0xC3,
kSMBProcessorFamilyIntelCore2DuoMobile = 0xC4,
kSMBProcessorFamilyIntelCore2SoloMobile = 0xC5,
kSMBProcessorFamilyIntelCoreI7 = 0xC6,
kSMBProcessorFamilyDualCoreIntelCeleron = 0xC7,
kSMBProcessorFamilyIBM390 = 0xC8,
kSMBProcessorFamilyG4 = 0xC9,
kSMBProcessorFamilyG5 = 0xCA,
kSMBProcessorFamilyG6 = 0xCB,
kSMBProcessorFamilyzArchitectur = 0xCC,
kSMBProcessorFamilyIntelCoreI5 = 0xCD,
kSMBProcessorFamilyIntelCoreI3 = 0xCE,
kSMBProcessorFamilyViaC7M = 0xD2,
kSMBProcessorFamilyViaC7D = 0xD3,
kSMBProcessorFamilyViaC7 = 0xD4,
kSMBProcessorFamilyViaEden = 0xD5,
kSMBProcessorFamilyMultiCoreIntelXeon = 0xD6,
kSMBProcessorFamilyDualCoreIntelXeon3Series = 0xD7,
kSMBProcessorFamilyQuadCoreIntelXeon3Series = 0xD8,
kSMBProcessorFamilyViaNano = 0xD9,
kSMBProcessorFamilyDualCoreIntelXeon5Series = 0xDA,
kSMBProcessorFamilyQuadCoreIntelXeon5Series = 0xDB,
kSMBProcessorFamilyDualCoreIntelXeon7Series = 0xDD,
kSMBProcessorFamilyQuadCoreIntelXeon7Series = 0xDE,
kSMBProcessorFamilyMultiCoreIntelXeon7Series = 0xDF,
kSMBProcessorFamilyMultiCoreIntelXeon3400Series = 0xE0,
kSMBProcessorFamilyEmbeddedAmdOpteronQuadCore = 0xE6,
kSMBProcessorFamilyAmdPhenomTripleCore = 0xE7,
kSMBProcessorFamilyAmdTurionUltraDualCoreMobile = 0xE8,
kSMBProcessorFamilyAmdTurionDualCoreMobile = 0xE9,
kSMBProcessorFamilyAmdAthlonDualCore = 0xEA,
kSMBProcessorFamilyAmdSempronSI = 0xEB,
kSMBProcessorFamilyAmdPhenomII = 0xEC,
kSMBProcessorFamilyAmdAthlonII = 0xED,
kSMBProcessorFamilySixCoreAmdOpteron = 0xEE,
kSMBProcessorFamilyAmdSempronM = 0xEF,
kSMBProcessorFamilyi860 = 0xFA,
kSMBProcessorFamilyi960 = 0xFB,
kSMBProcessorFamilyIndicatorFamily2 = 0xFE,
kSMBProcessorFamilyReserved1 = 0xFF
} PROCESSOR_FAMILY;
// Processor Information - Processor Upgrade.
// Values for SMBProcessorInformation.processorUpgrade
typedef enum {
kSMBprocessorUpgradeOther = 0x01,
kSMBprocessorUpgradeUnknown = 0x02,
kSMBprocessorUpgradeDaughterBoard = 0x03,
kSMBprocessorUpgradeZIFSocket = 0x04,
kSMBprocessorUpgradePiggyBack = 0x05, ///< Replaceable.
kSMBprocessorUpgradeNone = 0x06,
kSMBprocessorUpgradeLIFSocket = 0x07,
kSMBprocessorUpgradeSlot1 = 0x08,
kSMBprocessorUpgradeSlot2 = 0x09,
kSMBprocessorUpgrade370PinSocket = 0x0A,
kSMBprocessorUpgradeSlotA = 0x0B,
kSMBprocessorUpgradeSlotM = 0x0C,
kSMBprocessorUpgradeSocket423 = 0x0D,
kSMBprocessorUpgradeSocketA = 0x0E, ///< Socket 462.
kSMBprocessorUpgradeSocket478 = 0x0F,
kSMBprocessorUpgradeSocket754 = 0x10,
kSMBprocessorUpgradeSocket940 = 0x11,
kSMBprocessorUpgradeSocket939 = 0x12,
kSMBprocessorUpgradeSocketmPGA604 = 0x13,
kSMBprocessorUpgradeSocketLGA771 = 0x14,
kSMBprocessorUpgradeSocketLGA775 = 0x15,
kSMBprocessorUpgradeSocketS1 = 0x16,
kSMBprocessorUpgradeAM2 = 0x17,
kSMBprocessorUpgradeF1207 = 0x18,
kSMBprocessorUpgradeSocketLGA1366 = 0x19,
kSMBprocessorUpgradeSocketG34 = 0x1A,
kSMBprocessorUpgradeSocketAM3 = 0x1B,
kSMBprocessorUpgradeSocketC32 = 0x1C,
kSMBprocessorUpgradeSocketLGA1156 = 0x1D,
kSMBprocessorUpgradeSocketLGA1567 = 0x1E,
kSMBprocessorUpgradeSocketPGA988A = 0x1F,
kSMBprocessorUpgradeSocketBGA1288 = 0x20,
kSMBprocessorUpgradeSocketrPGA988B = 0x21,
kSMBprocessorUpgradeSocketBGA1023 = 0x22,
kSMBprocessorUpgradeSocketBGA1224 = 0x23,
kSMBprocessorUpgradeSocketBGA1155 = 0x24,
kSMBprocessorUpgradeSocketLGA1356 = 0x25,
kSMBprocessorUpgradeSocketLGA2011 = 0x26,
kSMBprocessorUpgradeSocketFS1 = 0x27,
kSMBprocessorUpgradeSocketFS2 = 0x28,
kSMBprocessorUpgradeSocketFM1 = 0x29,
kSMBprocessorUpgradeSocketFM2 = 0x2A
kSMBProcessorUpgradeOther = 0x01, // Other
kSMBProcessorUpgradeUnknown = 0x02, // Unknown
kSMBProcessorUpgradeDaughterBoard = 0x03, // Daughter Board
kSMBProcessorUpgradeZIFSocket = 0x04, // ZIF Socket
kSMBProcessorUpgradePiggyBack = 0x05, // Replaceable Piggy Back
kSMBProcessorUpgradeNone = 0x06, // None
kSMBProcessorUpgradeLIFSocket = 0x07, // LIF Socket
kSMBProcessorUpgradeSlot1 = 0x08, // Slot 1
kSMBProcessorUpgradeSlot2 = 0x09, // Slot 2
kSMBProcessorUpgrade370PinSocket = 0x0A, // 370-pin socket
kSMBProcessorUpgradeSlotA = 0x0B, // Slot A
kSMBProcessorUpgradeSlotM = 0x0C, // Slot M
kSMBProcessorUpgradeSocket423 = 0x0D, // Socket 423
kSMBProcessorUpgradeSocketA = 0x0E, // Socket A (Socket 462)
kSMBProcessorUpgradeSocket478 = 0x0F, // Socket 478
kSMBProcessorUpgradeSocket754 = 0x10, // Socket 754
kSMBProcessorUpgradeSocket940 = 0x11, // Socket 940
kSMBProcessorUpgradeSocket939 = 0x12, // Socket 939
kSMBProcessorUpgradeSocketmPGA604 = 0x13, // Socket mPGA604
kSMBProcessorUpgradeSocketLGA771 = 0x14, // Socket LGA771
kSMBProcessorUpgradeSocketLGA775 = 0x15, // Socket LGA775
kSMBProcessorUpgradeSocketS1 = 0x16, // Socket S1
kSMBProcessorUpgradeAM2 = 0x17, // Socket AM2
kSMBProcessorUpgradeF1207 = 0x18, // Socket F (1207)
kSMBProcessorUpgradeSocketLGA1366 = 0x19, // Socket LGA1366
kSMBProcessorUpgradeSocketG34 = 0x1A, // Socket G34
kSMBProcessorUpgradeSocketAM3 = 0x1B, // Socket AM3
kSMBProcessorUpgradeSocketC32 = 0x1C, // Socket C32
kSMBProcessorUpgradeSocketLGA1156 = 0x1D, // Socket LGA1156
kSMBProcessorUpgradeSocketLGA1567 = 0x1E, // Socket LGA1567
kSMBProcessorUpgradeSocketPGA988A = 0x1F, // Socket PGA988A
kSMBProcessorUpgradeSocketBGA1288 = 0x20, // Socket BGA1288
kSMBProcessorUpgradeSocketrPGA988B = 0x21, // Socket rPGA988B
kSMBProcessorUpgradeSocketBGA1023 = 0x22, // Socket BGA1023
kSMBProcessorUpgradeSocketBGA1224 = 0x23, // Socket BGA1224
kSMBProcessorUpgradeSocketBGA1155 = 0x24, // Socket LGA1155
kSMBProcessorUpgradeSocketLGA1356 = 0x25, // Socket LGA1356
kSMBProcessorUpgradeSocketLGA2011 = 0x26, // Socket LGA2011
kSMBProcessorUpgradeSocketFS1 = 0x27, // Socket FS1
kSMBProcessorUpgradeSocketFS2 = 0x28, // Socket FS2
kSMBProcessorUpgradeSocketFM1 = 0x29, // Socket FM1
kSMBProcessorUpgradeSocketFM2 = 0x2A, // Socket FM2
kSMBProcessorUpgradeSocketLGA2011_3 = 0x2B, // Socket LGA2011-3
kSMBProcessorUpgradeSocketLGA1356_3 = 0x2C, // Socket LGA1356-3
kSMBProcessorUpgradeSocketLGA1150 = 0x2D, // Socket LGA1150
kSMBProcessorUpgradeSocketBGA1168 = 0x2E, // Socket BGA1168
kSMBProcessorUpgradeSocketBGA1234 = 0x2F, // Socket BGA1234
kSMBProcessorUpgradeSocketBGA1364 = 0x30, // Socket BGA1364
kSMBProcessorUpgradeSocketAM4 = 0x31, // Socket AM4
kSMBProcessorUpgradeSocketLGA1151 = 0x32, // Socket LGA1151
kSMBProcessorUpgradeSocketBGA1356 = 0x33, // Socket BGA1356
kSMBProcessorUpgradeSocketBGA1440 = 0x34, // Socket BGA1440
kSMBProcessorUpgradeSocketBGA1515 = 0x35, // Socket BGA1515
kSMBProcessorUpgradeSocketLGA3647_1 = 0x36 // Socket LGA3647-1
} PROCESSOR_UPGRADE;
// Struct - Processor Information (Type 4), Apple uses 35 bytes length
typedef struct SMBProcessorInformation
{
// 2.0+ spec (26 bytes)
SMB_STRUCT_HEADER // Type 4
SMBString socketDesignation;
SMBByte processorType; // The enumeration value from PROCESSOR_TYPE_DATA.
SMBByte processorFamily; // The enumeration value from PROCESSOR_FAMILY_DATA.
SMBString manufacturer;
SMBQWord processorID; // based on CPUID
SMBString processorVersion;
SMBByte voltage; // bit7 cleared indicate legacy mode
SMBWord externalClock; // external clock in MHz
SMBWord maximumClock; // max internal clock in MHz
SMBWord currentClock; // current internal clock in MHz
SMBByte status;
SMBByte processorUpgrade; // The enumeration value from PROCESSOR_UPGRADE.
// 2.1+ spec (32 bytes)
SMBWord L1CacheHandle;
SMBWord L2CacheHandle;
SMBWord L3CacheHandle;
// 2.3+ spec (35 bytes)
SMBString serialNumber;
SMBString assetTag;
SMBString partNumber;
// 2.5+ spec (40 bytes) Apple still uses 2.4 spec
SMBByte coreCount;
SMBByte coreEnabled;
SMBByte threadCount;
//SMBWord processorFuncSupport;
// 2.6+ spec (42 bytes)
//SMBWord processorFamily2;
} __attribute__((packed)) SMBProcessorInformation;
//----------------------------------------------------------------------------------------------------------
// Struct - Memory Controller Information (Type 5) Obsolete since SMBIOS version 2.1
typedef struct SMBMemoryControllerInfo {
SMB_STRUCT_HEADER
SMBByteerrorDetectingMethod;
SMBByteerrorCorrectingCapability;
SMBBytesupportedInterleave;
SMBBytecurrentInterleave;
SMBBytemaxMemoryModuleSize;
SMBWordsupportedSpeeds;
SMBWordsupportedMemoryTypes;
SMBBytememoryModuleVoltage;
SMBBytenumberOfMemorySlots;
} __attribute__((packed)) SMBMemoryControllerInfo;
// Struct - Cache Information (Type 7), Apple uses 19 bytes length
//----------------------------------------------------------------------------------------------------------
// Struct - Memory Module Information (Type 6) Obsolete since SMBIOS version 2.1
typedef struct SMBMemoryModule
{
SMB_STRUCT_HEADER // Type 6
SMBString socketDesignation;
SMBByte bankConnections;
SMBByte currentSpeed;
SMBWord currentMemoryType;
SMBByte installedSize;
SMBByte enabledSize;
SMBByte errorStatus;
} __attribute__((packed)) SMBMemoryModule;
#define kSMBMemoryModuleSizeNotDeterminable 0x7D
#define kSMBMemoryModuleSizeNotEnabled 0x7E
#define kSMBMemoryModuleSizeNotInstalled 0x7F
//----------------------------------------------------------------------------------------------------------
// Struct - Cache Information (Type 7), Apple uses 19 bytes length
typedef struct SMBCacheInformation
{
SMB_STRUCT_HEADER // Type 7
SMBByte associativity;
} __attribute__((packed)) SMBCacheInformation;
//----------------------------------------------------------------------------------------------------------
// Struct - System Slots (Type 9), Apple uses 13 bytes length
//----------------------------------------------------------------------------------------------------------
typedef struct SMBSystemSlot
{
// 2.0+ spec (12 bytes)
//SMBBytedeviceFunctionNumber;
} __attribute__((packed)) SMBSystemSlot;
//----------------------------------------------------------------------------------------------------------
// Struct - OEM Strings (Type 11), Apple uses 5 bytes length
//----------------------------------------------------------------------------------------------------------
typedef struct SMBOEMStrings
{
SMB_STRUCT_HEADER // Type 11
SMBBytecount;// number of strings
} __attribute__((packed)) SMBOEMStrings;
//----------------------------------------------------------------------------------------------------------
// Physical Memory Array (Type 16)
// Physical Memory Array (Type 16), Apple uses 15 bytes length
//----------------------------------------------------------------------------------------------------------
typedef struct SMBPhysicalMemoryArray
{
// 2.1+ spec (15 bytes)
SMB_STRUCT_HEADER // Type 16
SMBByte physicalLocation; // physical location
SMBByte arrayUse; // the use for the memory array, The enumeration value from MEMORY_ARRAY_USE.
SMBByte errorCorrection; // error correction/detection method, The enumeration value from MEMORY_ERROR_CORRECTION.
SMBDWord maximumCapacity; // maximum memory capacity in kilobytes
SMBWord errorHandle; // handle of a previously detected error
SMBWord numMemoryDevices; // number of memory slots or sockets
// 2.7+ spec
//SMBQWord extMaximumCapacity;// maximum memory capacity in bytes
} __attribute__((packed)) SMBPhysicalMemoryArray;
// Physical Memory Array - Use.
// Values for SMBPhysicalMemoryArray.arrayUse
typedef enum
kSMBMemoryArrayErrorCorrectionTypeCRC = 0x07
} MEMORY_ERROR_CORRECTION;
// Struct - Physical Memory Array (Type 16), Apple uses 15 bytes length
typedef struct SMBPhysicalMemoryArray
{
// 2.1+ spec (15 bytes)
SMB_STRUCT_HEADER // Type 16
SMBByte physicalLocation; // physical location
SMBByte arrayUse; // the use for the memory array, The enumeration value from MEMORY_ARRAY_USE.
SMBByte errorCorrection; // error correction/detection method, The enumeration value from MEMORY_ERROR_CORRECTION.
SMBDWord maximumCapacity; // maximum memory capacity in kilobytes
SMBWord errorHandle; // handle of a previously detected error
SMBWord numMemoryDevices; // number of memory slots or sockets
// 2.7+ spec
//SMBQWord extMaximumCapacity;// maximum memory capacity in bytes
} __attribute__((packed)) SMBPhysicalMemoryArray;
//----------------------------------------------------------------------------------------------------------
// Struct - Memory Device (Type 17), Apple uses 27 bytes length
//----------------------------------------------------------------------------------------------------------
typedef struct SMBMemoryDevice
{
// 2.1+ spec (21 bytes)
//SMBWord configuredVolt;
} __attribute__((packed)) SMBMemoryDevice;
//----------------------------------------------------------------------------------------------------------
// Struct - Memory Array Mapped Address (Type 19), Apple uses 15 bytes length
//----------------------------------------------------------------------------------------------------------
// Struct - Memory Array Mapped Address (Type 19), Apple uses 15 bytes length
//typedef struct SMBMemoryArrayMappedAddress
//{
#if 0
typedef struct SMBMemoryArrayMappedAddress
{
// 2.1+ spec
//SMB_STRUCT_HEADER // Type 19
//SMBDWord startingAddress;
//SMBDWord endingAddress;
//SMBWord arrayHandle;
//SMBByte partitionWidth;
// 2.7+ spec
//SMBQWord extStartAddress;
//SMBQWord extEndAddress;
//} __attribute__((packed)) SMBMemoryArrayMappedAddress;
SMB_STRUCT_HEADER // Type 19
SMBDWord startingAddress;
SMBDWord endingAddress;
SMBWord arrayHandle;
SMBByte partitionWidth;
// 2.7+ spec
SMBQWord extStartAddress;
SMBQWord extEndAddress;
} __attribute__((packed)) SMBMemoryArrayMappedAddress;
#endif
//----------------------------------------------------------------------------------------------------------
// Struct - Memory Device Mapped Address (Type 20)
//typedef struct SMBMemoryDeviceMappedAddress
//{
// 2.1+ spec
//SMB_STRUCT_HEADER // Type 20
//SMBDWord startingAddress;
//SMBDWord endingAddress;
//SMBWord arrayHandle;
//SMBByte partitionRowPosition;
//SMBByte interleavePosition;
//SMBByte interleaveDataDepth;
// 2.7+ spec
//SMBQWord extStartAddress;
//SMBQWord extEndAddress;
//} __attribute__((packed)) SMBMemoryDeviceMappedAddress;
//----------------------------------------------------------------------------------------------------------
#if 0
typedef struct SMBMemoryDeviceMappedAddress
{
// 2.1+ spec
SMB_STRUCT_HEADER // Type 20
SMBDWord startingAddress;
SMBDWord endingAddress;
SMBWord arrayHandle;
SMBByte partitionRowPosition;
SMBByte interleavePosition;
SMBByte interleaveDataDepth;
// 2.7+ spec
SMBQWord extStartAddress;
SMBQWord extEndAddress;
} __attribute__((packed)) SMBMemoryDeviceMappedAddress;
#endif
//
// Apple Specific structures
//
//----------------------------------------------------------------------------------------------------------
// Firmware Volume Description (Apple Specific - Type 128)
// Firmware Volume Description (Apple Specific - Type 128), Apple uses 88 bytes length
//----------------------------------------------------------------------------------------------------------
enum
{
FW_REGION_RESERVED = 0,
SMBDWord EndAddress;
} __attribute__((packed)) FW_REGION_INFO;
// Struct - Firmware Volume Description (Apple Specific - Type 128), Apple uses 88 bytes length
typedef struct SMBFirmwareVolume
{
SMB_STRUCT_HEADER// Type 128
FW_REGION_INFO FlashMap[ NUM_FLASHMAP_ENTRIES ];
} __attribute__((packed)) SMBFirmwareVolume;
//----------------------------------------------------------------------------------------------------------
// Memory SPD Data (Apple Specific - Type 130)
//----------------------------------------------------------------------------------------------------------
/* ===========================================
Memory SPD Data (Apple Specific - Type 130)
============================================= */
typedef struct SMBMemorySPD
{
SMB_STRUCT_HEADER// Type 130
SMBWord Data[1];
} __attribute__((packed)) SMBMemorySPD;
//----------------------------------------------------------------------------------------------------------
// OEM Processor Type (Apple Specific - Type 131)
//----------------------------------------------------------------------------------------------------------
/* ============================================
OEM Processor Type (Apple Specific - Type 131)
============================================== */
typedef struct SMBOemProcessorType
{
SMB_STRUCT_HEADER// Type131
SMBWord ProcessorType;
} __attribute__((packed)) SMBOemProcessorType;
//----------------------------------------------------------------------------------------------------------
// OEM Processor Bus Speed (Apple Specific - Type 132)
//----------------------------------------------------------------------------------------------------------
/* =================================================
OEM Processor Bus Speed (Apple Specific - Type 132)
=================================================== */
typedef struct SMBOemProcessorBusSpeed
{
SMB_STRUCT_HEADER// Type 132
SMBWord ProcessorBusSpeed;// MT/s unit
} __attribute__((packed)) SMBOemProcessorBusSpeed;
//----------------------------------------------------------------------------------------------------------
// OEM Platform Feature (Apple Specific - Type 133)
//----------------------------------------------------------------------------------------------------------
/* ==============================================
OEM Platform Feature (Apple Specific - Type 133)
================================================ */
typedef struct SMBOemPlatformFeature
{
SMB_STRUCT_HEADER// Type 133
SMBWord PlatformFeature;
} __attribute__((packed)) SMBOemPlatformFeature;
//----------------------------------------------------------------------------------------------------------
// OEM SMC Version (Apple Specific - Type 134)
//----------------------------------------------------------------------------------------------------------
/* =========================================
OEM SMC Version (Apple Specific - Type 134)
=========================================== */
typedef struct SMBOemSMCVersion
{
SMB_STRUCT_HEADER// Type 134
SMBWord SMCVersion;
} __attribute__((packed)) SMBOemSMCVersion;
//
// Obsolete SMBIOS structures
//
//----------------------------------------------------------------------------------------------------------
// Struct - Memory Controller Information (Type 5) Obsolete since SMBIOS version 2.1
//----------------------------------------------------------------------------------------------------------
typedef struct SMBMemoryControllerInfo {
SMB_STRUCT_HEADER
SMBByteerrorDetectingMethod;
SMBByteerrorCorrectingCapability;
SMBBytesupportedInterleave;
SMBBytecurrentInterleave;
SMBBytemaxMemoryModuleSize;
SMBWordsupportedSpeeds;
SMBWordsupportedMemoryTypes;
SMBBytememoryModuleVoltage;
SMBBytenumberOfMemorySlots;
} __attribute__((packed)) SMBMemoryControllerInfo;
//----------------------------------------------------------------------------------------------------------
// Struct - Memory Module Information (Type 6) Obsolete since SMBIOS version 2.1
//----------------------------------------------------------------------------------------------------------
typedef struct SMBMemoryModule
{
SMB_STRUCT_HEADER // Type 6
SMBString socketDesignation;
SMBByte bankConnections;
SMBByte currentSpeed;
SMBWord currentMemoryType;
SMBByte installedSize;
SMBByte enabledSize;
SMBByte errorStatus;
} __attribute__((packed)) SMBMemoryModule;
#define kSMBMemoryModuleSizeNotDeterminable 0x7D
#define kSMBMemoryModuleSizeNotEnabled 0x7E
#define kSMBMemoryModuleSizeNotInstalled 0x7F
//----------------------------------------------------------------------------------------------------------
#define SMBIOS_ORIGINAL0
#define SMBIOS_PATCHED1
extern void *getSmbios(int which);
extern void readSMBIOSInfo(SMBEntryPoint *eps);
extern void setupSMBIOSTable(void);
extern void decodeSMBIOSTable(SMBEntryPoint *eps);
branches/ErmaC/Enoch/i386/libsaio/smbios.c
581581
582582
583583
584
584
585585
586586
587587
......
591591
592592
593593
594
594
595595
596596
597597
......
605605
606606
607607
608
608
609609
610610
611611
......
615615
616616
617617
618
618
619619
620620
621621
......
634634
635635
636636
637
637
638638
639639
640640
......
645645
646646
647647
648
648
649649
650650
651651
......
657657
658658
659659
660
660
661661
662662
663663
......
671671
672672
673673
674
674
675675
676676
677677
......
681681
682682
683683
684
684
685685
686686
687687
......
693693
694694
695695
696
696
697697
698698
699699
......
14301430
14311431
14321432
1433
1434
1435
1436
1437
1433
1434
1435
1436
1437
14381438
14391439
1440
1441
1442
1443
1440
1441
1442
1443
14441444
14451445
14461446
defaultSystemInfo.family = kDefaultMacBookProFamily;
defaultBaseBoard.product = kDefaultMacBookProBoardProduct;
defaultBaseBoard.boardType = kSMBBaseBoardMotherboard;
defaultChassis.chassisType = kSMBchassisUnknown;
defaultChassis.chassisType = kSMBChassisTypeUnknown;
}
else
{
defaultSystemInfo.family = kDefaultMacBookFamily;
defaultBaseBoard.product = kDefaultMacBookBoardProduct;
defaultBaseBoard.boardType = kSMBBaseBoardMotherboard;
defaultChassis.chassisType = kSMBchassisUnknown;
defaultChassis.chassisType = kSMBChassisTypeUnknown;
}
}
else
defaultSystemInfo.family = kDefaultMacMiniFamily;
defaultBaseBoard.product = kDefaultMacMiniBoardProduct;
defaultBaseBoard.boardType = kSMBBaseBoardUnknown;
defaultChassis.chassisType = kSMBchassisLPDesktop;
defaultChassis.chassisType = kSMBChassisTypeLowProfileDesktop;
break;
case 2:
defaultSystemInfo.family = kDefaultMacFamily; // iMac8,1 family = Mac
defaultBaseBoard.product = kDefaultiMacBoardProduct;
defaultBaseBoard.boardType = kSMBBaseBoardMotherboard;
defaultChassis.chassisType = kSMBchassisAllInOne;
defaultChassis.chassisType = kSMBChassisTypeAllInOne;
break;
default:
{
defaultSystemInfo.family= kDefaultiMacFamily;
defaultBaseBoard.product = kDefaultiMacNehalemBoardProduct;
defaultBaseBoard.boardType = kSMBBaseBoardMotherboard;
defaultChassis.chassisType = kSMBchassisAllInOne;
defaultChassis.chassisType = kSMBChassisTypeAllInOne;
break;
case CPUID_MODEL_SANDYBRIDGE:// Intel Core i3, i5, i7 LGA1155 (32nm)
defaultSystemInfo.family = kDefaultiMacFamily;
defaultBaseBoard.product = kDefaultiMacSandyBoardProduct;
defaultBaseBoard.boardType = kSMBBaseBoardMotherboard;
defaultChassis.chassisType = kSMBchassisAllInOne;
defaultChassis.chassisType = kSMBChassisTypeAllInOne;
break;
case CPUID_MODEL_NEHALEM:// Intel Core i7, Xeon W35xx, Xeon X55xx, Xeon E55xx LGA1366 (45nm)
defaultSystemInfo.family= kDefaultMacProFamily;
defaultBaseBoard.product = kDefaultMacProNehalemBoardProduct;
defaultBaseBoard.boardType = kSMBBaseBoardProcessorMemoryModule;
defaultChassis.chassisType = kSMBchassisTower;
defaultChassis.chassisType = kSMBChassisTypeTower;
break;
case CPUID_MODEL_WESTMERE:// Intel Core i7, Xeon X56xx, Xeon E56xx, Xeon W36xx LGA1366 (32nm) 6 Core
defaultSystemInfo.family= kDefaultMacProFamily;
defaultBaseBoard.product = kDefaultMacProWestmereBoardProduct;
defaultBaseBoard.boardType = kSMBBaseBoardProcessorMemoryModule;
defaultChassis.chassisType = kSMBchassisTower;
defaultChassis.chassisType = kSMBChassisTypeTower;
break;
default:
defaultSystemInfo.family= kDefaultMacProFamily;
defaultBaseBoard.product = kDefaultMacProBoardProduct;
defaultBaseBoard.boardType = kSMBBaseBoardMotherboard;
defaultChassis.chassisType = kSMBchassisUnknown;
defaultChassis.chassisType = kSMBChassisTypeUnknown;
break;
}
break;
defaultSystemInfo.family= kDefaultMacProFamily;
defaultBaseBoard.product = kDefaultMacProBoardProduct;
defaultBaseBoard.boardType = kSMBBaseBoardMotherboard;
defaultChassis.chassisType = kSMBchassisUnknown;
defaultChassis.chassisType = kSMBChassisTypeUnknown;
break;
}
break;
case kSMBTypeSystemEnclosure: // Bungo: determine platform type
switch (((SMBSystemEnclosure *)structHeader)->chassisType)
{
case kSMBchassisPortable:
case kSMBchassisLaptop:
case kSMBchassisNotebook:
case kSMBchassisHandHeld:
case kSMBchassisSubNotebook:
case kSMBChassisTypePortable:
case kSMBChassisTypeLaptop:
case kSMBChassisTypeNotebook:
case kSMBChassisTypeHandHeld:
case kSMBChassisTypeSubNotebook:
PlatformType = 2; // notebook (MacBooks/Pros)
break;
case kSMBchassisMiniTower:
case kSMBchassisTower:
case kSMBchassisBlade:
case kSMBchassisBladeEnclosing:
case kSMBChassisTypeMiniTower:
case kSMBChassisTypeTower:
case kSMBChassisTypeBlade:
case kSMBChassisTypeBladeEnclosing:
PlatformType = 3; // workstation (Mac Pro, Xserve)
break;
default:
branches/ErmaC/Enoch/i386/libsaio/smbios_decode.c
339339
340340
341341
342
342
343343
344344
345345
......
370370
371371
372372
373
373
374374
375375
376376
......
400400
401401
402402
403
404
405
406
407403
408
409
410
411
412
413
414
415
416
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
417422
418423
419424
printHeader(structHeader);
DBG("Chassis Information\n");
DBG("\tManufacturer: %s\n", SMBStringForField(structHeader, ((SMBSystemEnclosure *)structHeader)->manufacturer, neverMask));
if ((((SMBSystemEnclosure *)structHeader)->chassisType < kSMBchassisOther) || (((SMBSystemEnclosure *)structHeader)->chassisType > kSMBchassisBladeEnclosing)) {
if ((((SMBSystemEnclosure *)structHeader)->chassisType < kSMBChassisTypeOther) || (((SMBSystemEnclosure *)structHeader)->chassisType > kSMBChassisTypeBladeEnclosing)) {
DBG("\tType: %s\n", OutOfSpecStr);
} else {
DBG("\tType: %s\n", SMBChassisTypes[(((SMBSystemEnclosure *)structHeader)->chassisType - 1)]);
printHeader(structHeader);
DBG("Processor Information\n");
DBG("\tSocket Designation: %s\n", SMBStringForField(structHeader, ((SMBProcessorInformation *)structHeader)->socketDesignation, neverMask));
if ((((SMBProcessorInformation *)structHeader)->processorType < kSMBprocessorTypeOther) || (((SMBProcessorInformation *)structHeader)->processorType > kSMBprocessorTypeGPU)) {
if ((((SMBProcessorInformation *)structHeader)->processorType < kSMBProcessorTypeOther) || (((SMBProcessorInformation *)structHeader)->processorType > kSMBProcessorTypeGPU)) {
DBG("\tType: %s\n", OutOfSpecStr);
} else {
DBG("\tType: %s\n", SMBProcessorTypes[((SMBProcessorInformation *)structHeader)->processorType - 1]);
DBG("\tSerial Number: %s\n", SMBStringForField(structHeader, ((SMBProcessorInformation *)structHeader)->serialNumber, privateData));
DBG("\tAsset Tag: %s\n", SMBStringForField(structHeader, ((SMBProcessorInformation *)structHeader)->assetTag, neverMask));
DBG("\tPart Number: %s\n", SMBStringForField(structHeader, ((SMBProcessorInformation *)structHeader)->partNumber, neverMask));
if(((SMBProcessorInformation *)structHeader)->coreCount != 0)
{
DBG("\tCore Count: %d\n", ((SMBProcessorInformation *)structHeader)->coreCount);
}
if(((SMBProcessorInformation *)structHeader)->coreEnabled != 0)
{
DBG("\tCore Enabled: %d\n", ((SMBProcessorInformation *)structHeader)->coreEnabled);
}
if(((SMBProcessorInformation *)structHeader)->threadCount != 0)
{
DBG("\tThread Count: %d\n", ((SMBProcessorInformation *)structHeader)->threadCount);
}
//
// TODO: Check the size before printing this information.
// Keep in mind that Apple does not use this info, and only uses a 35 bytes struct
//
//if(((SMBProcessorInformation *)structHeader)->coreCount != 0)
//{
//DBG("\tCore Count: %d\n", ((SMBProcessorInformation *)structHeader)->coreCount);
//}
//
//if(((SMBProcessorInformation *)structHeader)->coreEnabled != 0)
//{
//DBG("\tCore Enabled: %d\n", ((SMBProcessorInformation *)structHeader)->coreEnabled);
//}
//
//if(((SMBProcessorInformation *)structHeader)->threadCount != 0)
//{
//DBG("\tThread Count: %d\n", ((SMBProcessorInformation *)structHeader)->threadCount);
//}
// Characteristics:
//DBG("\tProcessor Family 2: %d\n", ((SMBProcessorInformation *)structHeader)->processorFamily2);
DBG("\n");
branches/ErmaC/Enoch/i386/libsaio/smbios.h
2323
2424
2525
26
27
26
27
28
29
2830
2931
3032
......
3234
3335
3436
37
38
39
40
41
3542
3643
3744
......
5562
5663
5764
58
65
66
67
68
69
70
5971
6072
6173
6274
6375
64
6576
6677
6778
......
7990
8091
8192
82
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
83110
84111
85
86
87
88
89
112
113
114
115
116
90117
91
92
118
119
93120
94
121
95122
96
123
97124
98125
99126
100127
101
102
103
128
129
130
104131
105132
106133
......
115142
116143
117144
118
145
119146
120147
121148
......
127154
128155
129156
130
157
131158
132159
133
134
135
136
137
138
160
161
162
163
164
165
139166
140167
168
169
141170
142171
172
173
143174
144175
145
176
146177
147178
148179
149
180
150181
151182
152
183
184
153185
154186
155187
......
158190
159191
160192
193
194
195
196
161197
162198
199
200
163201
164202
165203
166
204
167205
168206
169207
......
176214
177215
178216
217
218
219
179220
180
221
222
181223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
182244
183245
184246
185247
186
248
187249
188250
189251
......
191253
192254
193255
194
256
195257
196258
197259
198260
199261
200262
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
263
221264
265
222266
223
267
268
224269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
225293
294
226295
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
248333
249334
250335
251336
252337
253338
254
255
256
257
258
259
260
339
340
341
342
343
344
345
261346
262347
263348
264349
265
266
267
268
269
270
350
351
352
353
354
355
271356
272
273
357
358
359
360
361
362
274363
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
294394
295
296
297395
298396
299397
300398
301399
302400
303
304
305
306
307
308
309
401
402
403
404
405
406
407
310408
311409
312410
313411
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
499597
500598
501599
502600
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
545655
546656
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580657
581658
582
583
584
585
586
587
588
589
590
591
592
593
594
595
659
596660
597
598
599
600
601
602
603
604
605
606
607
608
609661
610
611
612
613
614
615
616662
617663
618664
......
628674
629675
630676
677
631678
632679
680
681
633682
634683
635684
......
649698
650699
651700
701
652702
653703
704
705
654706
655707
656708
657709
658710
659711
712
660713
661
714
715
662716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
663731
664732
665733
......
686754
687755
688756
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703757
704758
705759
760
761
706762
707763
708764
......
735791
736792
737793
794
738795
796
797
739798
740
741
742
799
800
801
743802
744
745
746
747
748
749
750
751
752
803
804
805
806
807
808
809
810
811
812
753813
814
754815
755
756816
757
758
759
760
761
762
763
764
765
766
767
768
769
770
817
771818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
772842
773
843
844
845
774846
775847
776848
......
789861
790862
791863
792
793864
794865
795866
......
801872
802873
803874
875
804876
877
878
805879
806
807
808
809880
810881
811882
......
815886
816887
817888
889
818890
891
892
819893
820
821
822
823894
824895
825896
826897
827898
828899
900
829901
902
903
830904
831
832
833
834905
835906
836907
837908
838909
839910
911
840912
913
914
841915
842
843
844
845916
846917
847918
848919
849920
850921
922
851923
924
925
852926
853
854
855
856927
857928
858929
859930
860931
861932
933
934
935
936
937
938
862939
940
941
863942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
864981
865982
866983
984
867985
986
868987
988
869989
870990
871991
#ifndef __LIBSAIO_SMBIOS_H
#define __LIBSAIO_SMBIOS_H
/* Based on System Management BIOS Reference Specification v2.4 */
// http://dmtf.org/standards/smbios
//
// Based on System Management BIOS Reference Specification v3.1.1
// https://www.dmtf.org/standards/smbios
//
typedef uint8_t SMBString;
typedef uint8_t SMBByte;
typedef uint32_t SMBDWord;
typedef uint64_t SMBQWord;
//
// SMBIOS 2.1 (32-bit) Entry Point
//
typedef struct DMIEntryPoint
{
SMBByte anchor[5];
DMIEntryPoint dmi;
} __attribute__((packed)) SMBEntryPoint;
/* Header common to all SMBIOS structures */
//
// Structure header format
// Each SMBIOS structure begins with a four-byte header
//
typedef struct SMBStructHeader
{
SMBBytetype;
SMBBytelength;
SMBWordhandle;
//SMBByte*data;
} __attribute__((packed)) SMBStructHeader;
#define SMB_STRUCT_HEADER SMBStructHeader header;
#define SMB_ANCHOR_RESET(x)\
bzero(x, sizeof(typedef struct SMBAnchor));
/* ======================= SMBIOS structure types. ======================= */
//
// SMBIOS structure types.
// The following structures are requiered:
// - BIOS Information (Type 0)
// - System Information (Type 1)
// - System Enclosure (Type 3)
// - Processor Information (Type 4)
// - Cache Information (Type 7)
// - System Slots (Type 9)
// - Physical Memory Array (Type 16)
// - Memory Device (Type 17)
// - Memory Array Mapped Address (Type 19)
// - System Boot Information (Type 32)
//
enum
{
kSMBTypeBIOSInformation= 0, // BIOS information (Type 0)
kSMBTypeSystemInformation= 1, // System Information (Type 1)
kSMBTypeBaseBoard= 2, // BaseBoard Information (Type 2)
kSMBTypeSystemEnclosure= 3, // System Chassis Information (Type 3)
kSMBTypeProcessorInformation= 4, // Processor Information (Type 4)
kSMBTypeBIOSInformation = 0, // BIOS information (Type 0)
kSMBTypeSystemInformation = 1, // System Information (Type 1)
kSMBTypeBaseBoard = 2, // BaseBoard Information (Type 2)
kSMBTypeSystemEnclosure = 3, // System Chassis Information (Type 3)
kSMBTypeProcessorInformation = 4, // Processor Information (Type 4)
// Memory Controller Information (Type 5) Obsolete
kSMBTypeMemoryModule= 6, // Memory Module Information (Type 6) Obsolete
kSMBTypeCacheInformation= 7, // Cache Information (Type 7)
// Memory Module Information (Type 6) Obsolete
kSMBTypeCacheInformation = 7, // Cache Information (Type 7)
// Port Connector Information (Type 8)
kSMBTypeSystemSlot= 9, // System Slots (Type 9)
kSMBTypeSystemSlot = 9, // System Slots (Type 9)
// On Board Devices Information (Type 10) Obsolete
kSMBOEMStrings= 11 ,// OEM Strings (Type 11)
kSMBOEMStrings = 11,// OEM Strings (Type 11)
// System Configuration Options (Type 12)
// BIOS Language Information (Type 13)
// Group Associations (Type 14)
// System Event Log (Type 15)
kSMBTypePhysicalMemoryArray= 16, // Physical Memory Array (Type 16)
kSMBTypeMemoryDevice= 17, // Memory Device (Type 17)
kSMBType32BitMemoryErrorInfo= 18, // 32-Bit Memory Error Information (Type 18)
kSMBTypePhysicalMemoryArray = 16, // Physical Memory Array (Type 16)
kSMBTypeMemoryDevice = 17, // Memory Device (Type 17)
kSMBType32BitMemoryErrorInfo = 18, // 32-Bit Memory Error Information (Type 18)
// Memory Array Mapped Address (Type 19)
// Memory Device Mapped Address (Type 20)
// Built-in Pointing Device (Type 21)
// Out-of-Band Remote Access (Type 30)
// Boot Integrity Service (BIS) Entry Point (Type 31)
// System Boot Information (Type 32)
kSMBType64BitMemoryErrorInfo= 33, // 64-Bit Memory Error Information (Type 33)
kSMBType64BitMemoryErrorInfo = 33, // 64-Bit Memory Error Information (Type 33)
// Managment Device (Type 34)
// Managment Device Component (Type 35)
// Management Device Threshold Data (Type 36)
// Management Controlle Host Interface (Type 42)
// Inactive (Type 126)
kSMBTypeEndOfTable= 127, // End-of-Table (Type 127)
kSMBTypeEndOfTable = 127, // End-of-Table (Type 127)
// Apple Specific Structures
kSMBTypeFirmwareVolume= 128, // FirmwareVolume (TYPE 128)
kSMBTypeMemorySPD= 130, // MemorySPD (TYPE 130)
kSMBTypeOemProcessorType= 131, // Processor Type (Type 131)
kSMBTypeOemProcessorBusSpeed= 132, // Processor Bus Speed (Type 132)
kSMBTypeOemPlatformFeature= 133, // Platform Feature (Type 133)
kSMBTypeOemSMCVersion= 134 // SMC Version (Type 134)
kSMBTypeFirmwareVolume = 128, // FirmwareVolume (TYPE 128)
kSMBTypeMemorySPD = 130, // MemorySPD (TYPE 130)
kSMBTypeOemProcessorType = 131, // Processor Type (Type 131)
kSMBTypeOemProcessorBusSpeed = 132, // Processor Bus Speed (Type 132)
kSMBTypeOemPlatformFeature = 133, // Platform Feature (Type 133)
kSMBTypeOemSMCVersion = 134 // SMC Version (Type 134)
};
//----------------------------------------------------------------------------------------------------------
// Struct - BIOS Information (Type 0), Apple uses 24 bytes length
//----------------------------------------------------------------------------------------------------------
typedef struct SMBBIOSInformation
{
SMB_STRUCT_HEADER
SMB_STRUCT_HEADER // Type 0
SMBString vendor; // BIOS vendor name
SMBString version; // BIOS version
SMBWord startSegment; // BIOS segment start
SMBString releaseDate; // BIOS release date
SMBString releaseDate; // BIOS release date (mm/dd/yy or mm/dd/yyyy)
SMBByte romSize; // BIOS ROM Size (n); 64K * (n+1) bytes
SMBQWord characteristics; // supported BIOS functions
// Bungo
// Bungo - 2.4+ spec (6 bytes)
SMBByte characteristicsExt1; // BIOS characteristics extension byte 1
SMBByte characteristicsExt2; // BIOS characteristics extension byte 2
SMBByte releaseMajor; // BIOS release (major)
SMBByte ECreleaseMinor; // Embedded Controller firmware release (minor)
} __attribute__((packed)) SMBBIOSInformation;
// TODO: Add constants for BIOS characteristics bits (Section 7.1.1, table 7)
// TODO: Add constants for BIOS characteristics extenstion bytes (Section 7.1.2, table 8+9)
//----------------------------------------------------------------------------------------------------------
// Struct - System Information (Type 1), Apple uses 27 bytes length
//----------------------------------------------------------------------------------------------------------
typedef struct SMBSystemInformation
{
// 2.0+ spec (8 bytes)
SMB_STRUCT_HEADER
SMB_STRUCT_HEADER // Type 1
SMBString manufacturer;
SMBString productName;
SMBString version;
SMBString family;
} __attribute__((packed)) SMBSystemInformation;
// TODO: Add enum for wake-up type field (Section 7.2.2, table 12)
//----------------------------------------------------------------------------------------------------------
// Base Board (or Module) Information (Type 2)
// Base Board (or Module) Information (Type 2), Apple uses 16 bytes length
//----------------------------------------------------------------------------------------------------------
typedef struct SMBBaseBoard
{
SMB_STRUCT_HEADER // Type 2
SMBStringmanufacturer;
SMBStringproduct;
SMBStringversion;
SMBStringserialNumber;
SMBStringassetTag; // Bungo: renamed from assetTagNumber folowing convention
SMBByte featureFlags; // Collection of flag that identify features of this baseboard
SMBStringlocationInChassis;
SMBWord chassisHandle;
SMBByte boardType; // Type of board, numeration value from BASE_BOARD_TYPE.
SMBByte numberOfContainedHandles;
// 0 - 255 contained handles go here but we do not include
// them in our structure. Be careful to use numberOfContainedHandles
// times sizeof(SMBWord) when computing the actual record size,
// if you need it.
SMBByte containedObjectHandles;
} __attribute__((packed)) SMBBaseBoard;
// Base Board - Board Type.
// Values for SMBBaseBoard.boardType
typedef enum
{
kSMBBaseBoardUnknown = 0x01,// Unknow
kSMBBaseBoardUnknown = 0x01,// Unknown
kSMBBaseBoardOther = 0x02,// Other
kSMBBaseBoardServerBlade = 0x03,// Server Blade
kSMBBaseBoardConnectivitySwitch = 0x04,// Connectivity Switch
kSMBBaseBoardProcessorModule = 0x06,// Processor Module
kSMBBaseBoardIOModule = 0x07,// I/O Module
kSMBBaseBoardMemoryModule = 0x08,// Memory Module
kSMBBaseBoardDaughter = 0x09,// Daughter Board
kSMBBaseBoardDaughter = 0x09,// Daughter board
kSMBBaseBoardMotherboard = 0x0A,// Motherboard (includes processor, memory, and I/O)
kSMBBaseBoardProcessorMemoryModule = 0x0B,// Processor/Memory Module
kSMBBaseBoardProcessorIOModule = 0x0C,// Processor/IO Module
kSMBBaseBoardInterconnect = 0x0D// Interconnect board
} BASE_BOARD_TYPE;
// Struct - Base Board (or Module) Information (Type 2), Apple uses 16 bytes length
typedef struct SMBBaseBoard
{
SMB_STRUCT_HEADER // Type 2
SMBStringmanufacturer;
SMBStringproduct;
SMBStringversion;
SMBStringserialNumber;
SMBStringassetTag;// Bungo: renamed from assetTagNumber folowing convention
SMBByte featureFlags;// Collection of flag that identify features of this baseboard
SMBStringlocationInChassis;
SMBWord chassisHandle;
SMBByte boardType;// Type of board, numeration value from BASE_BOARD_TYPE.
SMBByte numberOfContainedHandles;
// 0 - 255 contained handles go here but we do not include
// them in our structure. Be careful to use numberOfContainedHandles
// times sizeof(SMBWord) when computing the actual record size,
// if you need it.
SMBByte containedObjectHandles;
} __attribute__((packed)) SMBBaseBoard;
// TODO: Add constants to identify the baseboard feature flags
//----------------------------------------------------------------------------------------------------------
// System Enclosure (Type 3)
// System Enclosure or Chassis (Type 3), Apple uses 21 bytes length
//----------------------------------------------------------------------------------------------------------
typedef struct SMBSystemEnclosure
{
SMB_STRUCT_HEADER // Type 3
SMBString manufacturer;
SMBByte chassisType; // System Enclosure Indicator
SMBString version; // Board Number?
SMBString serialNumber;
SMBString assetTag; // Bungo: renamed from assetTagNumber folowing convention
SMBByte bootupState; // State of enclosure when when it was last booted
SMBByte powerSupplyState; // State of enclosure's power supply when last booted
SMBByte thermalState; // Thermal state of the enclosure when last booted
SMBByte securityStatus; // Physical security status of the enclosure when last booted
SMBDWord oemDefined; // OEM- or BIOS vendor-specific information
SMBByte height; // Height of the enclosure, in 'U's
SMBByte numberOfPowerCords; // Number of power cords associated with the enclosure or chassis
SMBByte containedElementCount; // Number of Contained Element record that follow, in the range 0 to 255
SMBByte containedElementRecord; // Byte leght of each Contained Element record that follow, in the range 0 to 255
//SMBByte containedElements; // Elements, possibly defined by other SMBIOS structures present in chassis
// 2.7+
//SMBString skuNumber;// Number of null-terminated string describing the chassis or enclosure SKU number
} __attribute__((packed)) SMBSystemEnclosure;
// Bungo: values for SMBSystemEnclosure.chassisType
// MinusZwei: renamed enum values and added new values from later specs
typedef enum {
kSMBchassisOther = 0x01,
kSMBchassisUnknown = 0x02,
kSMBchassisDesktop = 0x03,
kSMBchassisLPDesktop = 0x04,
kSMBchassisPizzaBox = 0x05,
kSMBchassisMiniTower = 0x06,
kSMBchassisTower = 0x07,
kSMBchassisPortable = 0x08,
kSMBchassisLaptop = 0x09,
kSMBchassisNotebook = 0x0A,
kSMBchassisHandHeld = 0x0B,
kSMBchassisDockingStation = 0x0C,
kSMBchassisAllInOne = 0x0D,
kSMBchassisSubNotebook = 0x0E,
// ... fill up if needed ;-)
kSMBchassisLunchBox = 0x10,
kSMBchassisMainServer = 0x11,
// ... fill up if needed ;-)
kSMBchassisBlade = 0x1C,
kSMBchassisBladeEnclosing = 0x1D
} MISC_CHASSIS_TYPE;
kSMBChassisTypeOther = 0x01, // Other
kSMBChassisTypeUnknown = 0x02, // Unknown
kSMBChassisTypeDesktop = 0x03, // Desktop
kSMBChassisTypeLowProfileDesktop = 0x04, // Low Profile Desktop
kSMBChassisTypePizzaBox = 0x05, // Pizza Box
kSMBChassisTypeMiniTower = 0x06, // Mini Tower
kSMBChassisTypeTower = 0x07, // Tower
kSMBChassisTypePortable = 0x08, // Portable
kSMBChassisTypeLaptop = 0x09, // Laptop
kSMBChassisTypeNotebook = 0x0A, // Notebook
kSMBChassisTypeHandHeld = 0x0B, // Hand Held
kSMBChassisTypeDockingStation = 0x0C, // Docking Station
kSMBChassisTypeAllInOne = 0x0D, // All in One
kSMBChassisTypeSubNotebook = 0x0E, // Sub Notebook
kSMBChassisTypeSpaceSaving = 0x0F, // Space-saving
kSMBChassisTypeLunchBox = 0x10, // Lunch Box
kSMBChassisTypeMainServer = 0x11, // Main Server Chassis
kSMBChassisTypeExpansion = 0x12, // Expansion Chassis
kSMBChassisTypeSubChassis = 0x13, // SubChassis
kSMBChassisTypeBusExpansion = 0x14, // Bus Expansion Chassis
kSMBChassisTypePeripheral = 0x15, // Peripheral Chassis
kSMBChassisTypeRAID = 0x16, // RAID Chassis
kSMBChassisTypeRackMount = 0x17, // Rack Mount Chassis
kSMBChassisTypeSealedCase = 0x18, // Sealed-case PC
kSMBChassisTypeMultiSystem = 0x19, // Multi-system chassis
kSMBChassisTypeCompactPCI = 0x1A, // Compact PCI
kSMBChassisTypeAdvancedTCA = 0x1B, // Advanced TCA
kSMBChassisTypeBlade = 0x1C, // Blade
kSMBChassisTypeBladeEnclosing = 0x1D, // Blade Enclosure
kSMBChassisTypeTablet = 0x1E, // Tablet
kSMBChassisTypeConvertible = 0x1F, // Convertible
kSMBChassisTypeDetachable = 0x20, // Detachable
kSMBChassisTypeIoTGateway = 0x21, // IoT Gateway
kSMBChassisTypeEmbeddedPC = 0x22, // Embedded PC
kSMBChassisTypeMiniPC = 0x23, // Mini PC
kSMBChassisTypeStickPC = 0x24 // Stick PC
} SYSTEM_ENCLOSURE_CHASSIS_TYPE;
// System Enclosure or Chassis States.
// values for SMBSystemEnclosure.bootupState
// values for SMBSystemEnclosure.powerSupplyState
// values for SMBSystemEnclosure.thermalState
typedef enum {
kSMBChassisStateOther = 0x01,
kSMBChassisStateUnknown = 0x02,
kSMBChassisStateSafe = 0x03,
kSMBChassisStateWarning = 0x04,
kSMBChassisStateCritical = 0x05,
kSMBChassisStateNonRecoverable = 0x06
} MISC_CHASSIS_STATE;
kSMBChassisStateOther = 0x01, // Other
kSMBChassisStateUnknown = 0x02, // Unknown
kSMBChassisStateSafe = 0x03, // Safe
kSMBChassisStateWarning = 0x04, // Warning
kSMBChassisStateCritical = 0x05, // Critical
kSMBChassisStateNonRecoverable = 0x06 // Non-recoverable
} SYSTEM_ENCLOSURE_CHASSIS_STATE;
// System Enclosure or Chassis Security Status.
// values for SMBSystemEnclosure.securityStatus
typedef enum {
kSMBChassisSecurityStatusOther = 0x01,
kSMBChassisSecurityStatusUnknown = 0x02,
kSMBChassisSecurityStatusNone = 0x03,
kSMBChassisSecurityStatusExternalInterfaceLockedOut = 0x04,
kSMBChassisSecurityStatusExternalInterfaceLockedEnabled = 0x05
} MISC_CHASSIS_SECURITY_STATE;
kSMBChassisSecurityStatusOther = 0x01, // Other
kSMBChassisSecurityStatusUnknown = 0x02, // Unknown
kSMBChassisSecurityStatusNone = 0x03, // None
kSMBChassisSecurityStatusExternalInterfaceLockedOut = 0x04, // External interface locked out
kSMBChassisSecurityStatusExternalInterfaceLockedEnabled = 0x05 // External interface enabled
} SYSTEM_ENCLOSURE_CHASSIS_SECURITY_STATE;
// Struct - System Enclosure (Type 3), Apple uses 21 bytes length
typedef struct SMBSystemEnclosure
//----------------------------------------------------------------------------------------------------------
// Processor Information (Type 4), Apple uses 35 bytes length
//----------------------------------------------------------------------------------------------------------
typedef struct SMBProcessorInformation
{
SMB_STRUCT_HEADER // Type 3
SMBString manufacturer;
SMBByte chassisType;// System Enclosure Indicator
SMBString version;// Board Number?
SMBString serialNumber;
SMBString assetTag;// Bungo: renamed from assetTagNumber folowing convention
SMBByte bootupState;// State of enclosure when when it was last booted
SMBByte powerSupplyState;// State of enclosure's power supply when last booted
SMBByte thermalState;// Thermal state of the enclosure when last booted
SMBByte securityStatus;// Physical security status of the enclosure when last booted
SMBDWord oemDefined;// OEM- or BIOS vendor-specific information
SMBByte height;// Height of the enclosure, in 'U's
SMBByte numberOfPowerCords;// Number of power cords associated with the enclosure or chassis
SMBByte containedElementCount;// Number of Contained Element record that follow, in the range 0 to 255
SMBByte containedElementRecord;// Byte leght of each Contained Element record that follow, in the range 0 to 255
//SMBByte containedElements;// Elements, possibly defined by other SMBIOS structures present in chassis
// 2.7+
//SMBString skuNumber;// Number of null-terminated string describing the chassis or enclosure SKU number
} __attribute__((packed)) SMBSystemEnclosure;
// 2.0+ spec (26 bytes)
SMB_STRUCT_HEADER // Type 4
SMBString socketDesignation;
SMBByte processorType; // The enumeration value from PROCESSOR_TYPE.
SMBByte processorFamily; // The enumeration value from PROCESSOR_FAMILY.
SMBString manufacturer;
SMBQWord processorID; // based on CPUID
SMBString processorVersion;
SMBByte voltage; // bit7 cleared indicate legacy mode
SMBWord externalClock; // external clock in MHz
SMBWord maximumClock; // max internal clock in MHz
SMBWord currentClock; // current internal clock in MHz
SMBByte status;
SMBByte processorUpgrade; // The enumeration value from PROCESSOR_UPGRADE.
// 2.1+ spec (32 bytes)
SMBWord L1CacheHandle;
SMBWord L2CacheHandle;
SMBWord L3CacheHandle;
// 2.3+ spec (35 bytes)
SMBString serialNumber;
SMBString assetTag;
SMBString partNumber;
// 2.5+ spec (40 bytes) Apple still uses 2.4 spec
// SMBByte coreCount;
// SMBByte coreEnabled;
// SMBByte threadCount;
//SMBWord processorCharacteristics;
// 2.6+ spec (42 bytes)
//SMBWord processorFamily2;
} __attribute__((packed)) SMBProcessorInformation;
//----------------------------------------------------------------------------------------------------------
// Processor Information (Type 4)
#define kSMBProcessorInformationMinSize 26
// Processor Information - Processor Type.
// Values for SMBProcessorInformation.processorType
typedef enum
{
kSMBprocessorTypeOther = 0x01,
kSMBprocessorTypeUnknown = 0x02,
kSMBprocessorTypeCPU = 0x03,
kSMBprocessorTypeMPU = 0x04,
kSMBprocessorTypeDSP = 0x05,
kSMBprocessorTypeGPU = 0x06
} PROCESSOR_TYPE_DATA;
kSMBProcessorTypeOther = 0x01, // Other
kSMBProcessorTypeUnknown = 0x02, // Unknown
kSMBProcessorTypeCPU = 0x03, // Central Processor
kSMBProcessorTypeMPU = 0x04, // Math Processor
kSMBProcessorTypeDSP = 0x05, // DSP Processor
kSMBProcessorTypeGPU = 0x06 // Video Processor
} PROCESSOR_TYPE;
// Processor Information - Processor Family.
// Values for SMBProcessorInformation.processorFamily
typedef enum {
kSMBprocessorFamilyOther = 0x01,
kSMBprocessorFamilyUnknown = 0x02,
kSMBprocessorFamily8086 = 0x03,
kSMBprocessorFamily80286 = 0x04,
kSMBprocessorFamilyIntel386 = 0x05,
kSMBprocessorFamilyIntel486 = 0x06,
kSMBprocessorFamily8087 = 0x07,
kSMBprocessorFamily80287 = 0x08,
kSMBprocessorFamily80387 = 0x09,
kSMBprocessorFamily80487 = 0x0A,
kSMBprocessorFamilyPentium = 0x0B,
kSMBprocessorFamilyPentiumPro = 0x0C,
kSMBprocessorFamilyPentiumII = 0x0D,
kSMBprocessorFamilyPentiumMMX = 0x0E,
kSMBprocessorFamilyCeleron = 0x0F,
kSMBprocessorFamilyPentiumIIXeon = 0x10,
kSMBprocessorFamilyPentiumIII = 0x11,
kSMBprocessorFamilyM1 = 0x12,
kSMBprocessorFamilyM2 = 0x13,
kSMBprocessorFamilyIntelCeleronM = 0x14,
kSMBprocessorFamilyIntelPentium4Ht = 0x15,
kSMBprocessorFamilyM1Reserved4 = 0x16,
kSMBprocessorFamilyM1Reserved5 = 0x17,
kSMBprocessorFamilyAmdDuron = 0x18,
kSMBprocessorFamilyK5 = 0x19,
kSMBprocessorFamilyK6 = 0x1A,
kSMBprocessorFamilyK6_2 = 0x1B,
kSMBprocessorFamilyK6_3 = 0x1C,
kSMBprocessorFamilyAmdAthlon = 0x1D,
kSMBprocessorFamilyAmd29000 = 0x1E,
kSMBprocessorFamilyK6_2Plus = 0x1F,
kSMBprocessorFamilyPowerPC = 0x20,
kSMBprocessorFamilyPowerPC601 = 0x21,
kSMBprocessorFamilyPowerPC603 = 0x22,
kSMBprocessorFamilyPowerPC603Plus = 0x23,
kSMBprocessorFamilyPowerPC604 = 0x24,
kSMBprocessorFamilyPowerPC620 = 0x25,
kSMBprocessorFamilyPowerPCx704 = 0x26,
kSMBprocessorFamilyPowerPC750 = 0x27,
kSMBprocessorFamilyIntelCoreDuo = 0x28,
kSMBprocessorFamilyIntelCoreDuoMobile = 0x29,
kSMBprocessorFamilyIntelCoreSoloMobile = 0x2A,
kSMBprocessorFamilyIntelAtom = 0x2B,
kSMBprocessorFamilyAlpha3 = 0x30,
kSMBprocessorFamilyAlpha21064 = 0x31,
kSMBprocessorFamilyAlpha21066 = 0x32,
kSMBprocessorFamilyAlpha21164 = 0x33,
kSMBprocessorFamilyAlpha21164PC = 0x34,
kSMBprocessorFamilyAlpha21164a = 0x35,
kSMBprocessorFamilyAlpha21264 = 0x36,
kSMBprocessorFamilyAlpha21364 = 0x37,
kSMBprocessorFamilyAmdTurionIIUltraDualCoreMobileM = 0x38,
kSMBprocessorFamilyAmdTurionIIDualCoreMobileM = 0x39,
kSMBprocessorFamilyAmdAthlonIIDualCoreM = 0x3A,
kSMBprocessorFamilyAmdOpteron6100Series = 0x3B,
kSMBprocessorFamilyAmdOpteron4100Series = 0x3C,
kSMBprocessorFamilyAmdOpteron6200Series = 0x3D,
kSMBprocessorFamilyAmdOpteron4200Series = 0x3E,
kSMBprocessorFamilyMips = 0x40,
kSMBprocessorFamilyMIPSR4000 = 0x41,
kSMBprocessorFamilyMIPSR4200 = 0x42,
kSMBprocessorFamilyMIPSR4400 = 0x43,
kSMBprocessorFamilyMIPSR4600 = 0x44,
kSMBprocessorFamilyMIPSR10000 = 0x45,
kSMBprocessorFamilyAmdCSeries = 0x46,
kSMBprocessorFamilyAmdESeries = 0x47,
kSMBprocessorFamilyAmdSSeries = 0x48,
kSMBprocessorFamilyAmdGSeries = 0x49,
kSMBprocessorFamilySparc = 0x50,
kSMBprocessorFamilySuperSparc = 0x51,
kSMBprocessorFamilymicroSparcII = 0x52,
kSMBprocessorFamilymicroSparcIIep = 0x53,
kSMBprocessorFamilyUltraSparc = 0x54,
kSMBprocessorFamilyUltraSparcII = 0x55,
kSMBprocessorFamilyUltraSparcIIi = 0x56,
kSMBprocessorFamilyUltraSparcIII = 0x57,
kSMBprocessorFamilyUltraSparcIIIi = 0x58,
kSMBprocessorFamily68040 = 0x60,
kSMBprocessorFamily68xxx = 0x61,
kSMBprocessorFamily68000 = 0x62,
kSMBprocessorFamily68010 = 0x63,
kSMBprocessorFamily68020 = 0x64,
kSMBprocessorFamily68030 = 0x65,
kSMBprocessorFamilyHobbit = 0x70,
kSMBprocessorFamilyCrusoeTM5000 = 0x78,
kSMBprocessorFamilyCrusoeTM3000 = 0x79,
kSMBprocessorFamilyEfficeonTM8000 = 0x7A,
kSMBprocessorFamilyWeitek = 0x80,
kSMBprocessorFamilyItanium = 0x82,
kSMBprocessorFamilyAmdAthlon64 = 0x83,
kSMBprocessorFamilyAmdOpteron = 0x84,
kSMBprocessorFamilyAmdSempron = 0x85,
kSMBprocessorFamilyAmdTurion64Mobile = 0x86,
kSMBprocessorFamilyDualCoreAmdOpteron = 0x87,
kSMBprocessorFamilyAmdAthlon64X2DualCore = 0x88,
kSMBprocessorFamilyAmdTurion64X2Mobile = 0x89,
kSMBprocessorFamilyQuadCoreAmdOpteron = 0x8A,
kSMBprocessorFamilyThirdGenerationAmdOpteron = 0x8B,
kSMBprocessorFamilyAmdPhenomFxQuadCore = 0x8C,
kSMBprocessorFamilyAmdPhenomX4QuadCore = 0x8D,
kSMBprocessorFamilyAmdPhenomX2DualCore = 0x8E,
kSMBprocessorFamilyAmdAthlonX2DualCore = 0x8F,
kSMBprocessorFamilyPARISC = 0x90,
kSMBprocessorFamilyPaRisc8500 = 0x91,
kSMBprocessorFamilyPaRisc8000 = 0x92,
kSMBprocessorFamilyPaRisc7300LC = 0x93,
kSMBprocessorFamilyPaRisc7200 = 0x94,
kSMBprocessorFamilyPaRisc7100LC = 0x95,
kSMBprocessorFamilyPaRisc7100 = 0x96,
kSMBprocessorFamilyV30 = 0xA0,
kSMBprocessorFamilyQuadCoreIntelXeon3200Series = 0xA1,
kSMBprocessorFamilyDualCoreIntelXeon3000Series = 0xA2,
kSMBprocessorFamilyQuadCoreIntelXeon5300Series = 0xA3,
kSMBprocessorFamilyDualCoreIntelXeon5100Series = 0xA4,
kSMBprocessorFamilyDualCoreIntelXeon5000Series = 0xA5,
kSMBprocessorFamilyDualCoreIntelXeonLV = 0xA6,
kSMBprocessorFamilyDualCoreIntelXeonULV = 0xA7,
kSMBprocessorFamilyDualCoreIntelXeon7100Series = 0xA8,
kSMBprocessorFamilyQuadCoreIntelXeon5400Series = 0xA9,
kSMBprocessorFamilyQuadCoreIntelXeon = 0xAA,
kSMBprocessorFamilyDualCoreIntelXeon5200Series = 0xAB,
kSMBprocessorFamilyDualCoreIntelXeon7200Series = 0xAC,
kSMBprocessorFamilyQuadCoreIntelXeon7300Series = 0xAD,
kSMBprocessorFamilyQuadCoreIntelXeon7400Series = 0xAE,
kSMBprocessorFamilyMultiCoreIntelXeon7400Series = 0xAF,
kSMBprocessorFamilyPentiumIIIXeon = 0xB0,
kSMBprocessorFamilyPentiumIIISpeedStep = 0xB1,
kSMBprocessorFamilyPentium4 = 0xB2,
kSMBprocessorFamilyIntelXeon = 0xB3,
kSMBprocessorFamilyAS400 = 0xB4,
kSMBprocessorFamilyIntelXeonMP = 0xB5,
kSMBprocessorFamilyAMDAthlonXP = 0xB6,
kSMBprocessorFamilyAMDAthlonMP = 0xB7,
kSMBprocessorFamilyIntelItanium2 = 0xB8,
kSMBprocessorFamilyIntelPentiumM = 0xB9,
kSMBprocessorFamilyIntelCeleronD = 0xBA,
kSMBprocessorFamilyIntelPentiumD = 0xBB,
kSMBprocessorFamilyIntelPentiumEx = 0xBC,
kSMBprocessorFamilyIntelCoreSolo = 0xBD, ///< SMBIOS spec 2.6 correct this value
kSMBprocessorFamilyReserved = 0xBE,
kSMBprocessorFamilyIntelCore2 = 0xBF,
kSMBprocessorFamilyIntelCore2Solo = 0xC0,
kSMBprocessorFamilyIntelCore2Extreme = 0xC1,
kSMBprocessorFamilyIntelCore2Quad = 0xC2,
kSMBprocessorFamilyIntelCore2ExtremeMobile = 0xC3,
kSMBprocessorFamilyIntelCore2DuoMobile = 0xC4,
kSMBprocessorFamilyIntelCore2SoloMobile = 0xC5,
kSMBprocessorFamilyIntelCoreI7 = 0xC6,
kSMBprocessorFamilyDualCoreIntelCeleron = 0xC7,
kSMBprocessorFamilyIBM390 = 0xC8,
kSMBprocessorFamilyG4 = 0xC9,
kSMBprocessorFamilyG5 = 0xCA,
kSMBprocessorFamilyG6 = 0xCB,
kSMBprocessorFamilyzArchitectur = 0xCC,
kSMBprocessorFamilyIntelCoreI5 = 0xCD,
kSMBprocessorFamilyIntelCoreI3 = 0xCE,
kSMBprocessorFamilyViaC7M = 0xD2,
kSMBprocessorFamilyViaC7D = 0xD3,
kSMBprocessorFamilyViaC7 = 0xD4,
kSMBprocessorFamilyViaEden = 0xD5,
kSMBprocessorFamilyMultiCoreIntelXeon = 0xD6,
kSMBprocessorFamilyDualCoreIntelXeon3Series = 0xD7,
kSMBprocessorFamilyQuadCoreIntelXeon3Series = 0xD8,
kSMBprocessorFamilyViaNano = 0xD9,
kSMBprocessorFamilyDualCoreIntelXeon5Series = 0xDA,
kSMBprocessorFamilyQuadCoreIntelXeon5Series = 0xDB,
kSMBprocessorFamilyDualCoreIntelXeon7Series = 0xDD,
kSMBprocessorFamilyQuadCoreIntelXeon7Series = 0xDE,
kSMBprocessorFamilyMultiCoreIntelXeon7Series = 0xDF,
kSMBprocessorFamilyMultiCoreIntelXeon3400Series = 0xE0,
kSMBprocessorFamilyEmbeddedAmdOpteronQuadCore = 0xE6,
kSMBprocessorFamilyAmdPhenomTripleCore = 0xE7,
kSMBprocessorFamilyAmdTurionUltraDualCoreMobile = 0xE8,
kSMBprocessorFamilyAmdTurionDualCoreMobile = 0xE9,
kSMBprocessorFamilyAmdAthlonDualCore = 0xEA,
kSMBprocessorFamilyAmdSempronSI = 0xEB,
kSMBprocessorFamilyAmdPhenomII = 0xEC,
kSMBprocessorFamilyAmdAthlonII = 0xED,
kSMBprocessorFamilySixCoreAmdOpteron = 0xEE,
kSMBprocessorFamilyAmdSempronM = 0xEF,
kSMBprocessorFamilyi860 = 0xFA,
kSMBprocessorFamilyi960 = 0xFB,
kSMBprocessorFamilyIndicatorFamily2 = 0xFE,
kSMBprocessorFamilyReserved1 = 0xFF
} PROCESSOR_FAMILY_DATA;
kSMBProcessorFamilyOther = 0x01,
kSMBProcessorFamilyUnknown = 0x02,
kSMBProcessorFamily8086 = 0x03,
kSMBProcessorFamily80286 = 0x04,
kSMBProcessorFamilyIntel386 = 0x05,
kSMBProcessorFamilyIntel486 = 0x06,
kSMBProcessorFamily8087 = 0x07,
kSMBProcessorFamily80287 = 0x08,
kSMBProcessorFamily80387 = 0x09,
kSMBProcessorFamily80487 = 0x0A,
kSMBProcessorFamilyPentium = 0x0B,
kSMBProcessorFamilyPentiumPro = 0x0C,
kSMBProcessorFamilyPentiumII = 0x0D,
kSMBProcessorFamilyPentiumMMX = 0x0E,
kSMBProcessorFamilyCeleron = 0x0F,
kSMBProcessorFamilyPentiumIIXeon = 0x10,
kSMBProcessorFamilyPentiumIII = 0x11,
kSMBProcessorFamilyM1 = 0x12,
kSMBProcessorFamilyM2 = 0x13,
kSMBProcessorFamilyIntelCeleronM = 0x14,
kSMBProcessorFamilyIntelPentium4Ht = 0x15,
kSMBProcessorFamilyM1Reserved4 = 0x16,
kSMBProcessorFamilyM1Reserved5 = 0x17,
kSMBProcessorFamilyAmdDuron = 0x18,
kSMBProcessorFamilyK5 = 0x19,
kSMBProcessorFamilyK6 = 0x1A,
kSMBProcessorFamilyK6_2 = 0x1B,
kSMBProcessorFamilyK6_3 = 0x1C,
kSMBProcessorFamilyAmdAthlon = 0x1D,
kSMBProcessorFamilyAmd29000 = 0x1E,
kSMBProcessorFamilyK6_2Plus = 0x1F,
kSMBProcessorFamilyPowerPC = 0x20,
kSMBProcessorFamilyPowerPC601 = 0x21,
kSMBProcessorFamilyPowerPC603 = 0x22,
kSMBProcessorFamilyPowerPC603Plus = 0x23,
kSMBProcessorFamilyPowerPC604 = 0x24,
kSMBProcessorFamilyPowerPC620 = 0x25,
kSMBProcessorFamilyPowerPCx704 = 0x26,
kSMBProcessorFamilyPowerPC750 = 0x27,
kSMBProcessorFamilyIntelCoreDuo = 0x28,
kSMBProcessorFamilyIntelCoreDuoMobile = 0x29,
kSMBProcessorFamilyIntelCoreSoloMobile = 0x2A,
kSMBProcessorFamilyIntelAtom = 0x2B,
kSMBProcessorFamilyAlpha3 = 0x30,
kSMBProcessorFamilyAlpha21064 = 0x31,
kSMBProcessorFamilyAlpha21066 = 0x32,
kSMBProcessorFamilyAlpha21164 = 0x33,
kSMBProcessorFamilyAlpha21164PC = 0x34,
kSMBProcessorFamilyAlpha21164a = 0x35,
kSMBProcessorFamilyAlpha21264 = 0x36,
kSMBProcessorFamilyAlpha21364 = 0x37,
kSMBProcessorFamilyAmdTurionIIUltraDualCoreMobileM = 0x38,
kSMBProcessorFamilyAmdTurionIIDualCoreMobileM = 0x39,
kSMBProcessorFamilyAmdAthlonIIDualCoreM = 0x3A,
kSMBProcessorFamilyAmdOpteron6100Series = 0x3B,
kSMBProcessorFamilyAmdOpteron4100Series = 0x3C,
kSMBProcessorFamilyAmdOpteron6200Series = 0x3D,
kSMBProcessorFamilyAmdOpteron4200Series = 0x3E,
kSMBProcessorFamilyMips = 0x40,
kSMBProcessorFamilyMIPSR4000 = 0x41,
kSMBProcessorFamilyMIPSR4200 = 0x42,
kSMBProcessorFamilyMIPSR4400 = 0x43,
kSMBProcessorFamilyMIPSR4600 = 0x44,
kSMBProcessorFamilyMIPSR10000 = 0x45,
kSMBProcessorFamilyAmdCSeries = 0x46,
kSMBProcessorFamilyAmdESeries = 0x47,
kSMBProcessorFamilyAmdSSeries = 0x48,
kSMBProcessorFamilyAmdGSeries = 0x49,
kSMBProcessorFamilySparc = 0x50,
kSMBProcessorFamilySuperSparc = 0x51,
kSMBProcessorFamilymicroSparcII = 0x52,
kSMBProcessorFamilymicroSparcIIep = 0x53,
kSMBProcessorFamilyUltraSparc = 0x54,
kSMBProcessorFamilyUltraSparcII = 0x55,
kSMBProcessorFamilyUltraSparcIIi = 0x56,
kSMBProcessorFamilyUltraSparcIII = 0x57,
kSMBProcessorFamilyUltraSparcIIIi = 0x58,
kSMBProcessorFamily68040 = 0x60,
kSMBProcessorFamily68xxx = 0x61,
kSMBProcessorFamily68000 = 0x62,
kSMBProcessorFamily68010 = 0x63,
kSMBProcessorFamily68020 = 0x64,
kSMBProcessorFamily68030 = 0x65,
kSMBProcessorFamilyHobbit = 0x70,
kSMBProcessorFamilyCrusoeTM5000 = 0x78,
kSMBProcessorFamilyCrusoeTM3000 = 0x79,
kSMBProcessorFamilyEfficeonTM8000 = 0x7A,
kSMBProcessorFamilyWeitek = 0x80,
kSMBProcessorFamilyItanium = 0x82,
kSMBProcessorFamilyAmdAthlon64 = 0x83,
kSMBProcessorFamilyAmdOpteron = 0x84,
kSMBProcessorFamilyAmdSempron = 0x85,
kSMBProcessorFamilyAmdTurion64Mobile = 0x86,
kSMBProcessorFamilyDualCoreAmdOpteron = 0x87,
kSMBProcessorFamilyAmdAthlon64X2DualCore = 0x88,
kSMBProcessorFamilyAmdTurion64X2Mobile = 0x89,
kSMBProcessorFamilyQuadCoreAmdOpteron = 0x8A,
kSMBProcessorFamilyThirdGenerationAmdOpteron = 0x8B,
kSMBProcessorFamilyAmdPhenomFxQuadCore = 0x8C,
kSMBProcessorFamilyAmdPhenomX4QuadCore = 0x8D,
kSMBProcessorFamilyAmdPhenomX2DualCore = 0x8E,
kSMBProcessorFamilyAmdAthlonX2DualCore = 0x8F,
kSMBProcessorFamilyPARISC = 0x90,
kSMBProcessorFamilyPaRisc8500 = 0x91,
kSMBProcessorFamilyPaRisc8000 = 0x92,
kSMBProcessorFamilyPaRisc7300LC = 0x93,
kSMBProcessorFamilyPaRisc7200 = 0x94,
kSMBProcessorFamilyPaRisc7100LC = 0x95,
kSMBProcessorFamilyPaRisc7100 = 0x96,
kSMBProcessorFamilyV30 = 0xA0,
kSMBProcessorFamilyQuadCoreIntelXeon3200Series = 0xA1,
kSMBProcessorFamilyDualCoreIntelXeon3000Series = 0xA2,
kSMBProcessorFamilyQuadCoreIntelXeon5300Series = 0xA3,
kSMBProcessorFamilyDualCoreIntelXeon5100Series = 0xA4,
kSMBProcessorFamilyDualCoreIntelXeon5000Series = 0xA5,
kSMBProcessorFamilyDualCoreIntelXeonLV = 0xA6,
kSMBProcessorFamilyDualCoreIntelXeonULV = 0xA7,
kSMBProcessorFamilyDualCoreIntelXeon7100Series = 0xA8,
kSMBProcessorFamilyQuadCoreIntelXeon5400Series = 0xA9,
kSMBProcessorFamilyQuadCoreIntelXeon = 0xAA,
kSMBProcessorFamilyDualCoreIntelXeon5200Series = 0xAB,
kSMBProcessorFamilyDualCoreIntelXeon7200Series = 0xAC,
kSMBProcessorFamilyQuadCoreIntelXeon7300Series = 0xAD,
kSMBProcessorFamilyQuadCoreIntelXeon7400Series = 0xAE,
kSMBProcessorFamilyMultiCoreIntelXeon7400Series = 0xAF,
kSMBProcessorFamilyPentiumIIIXeon = 0xB0,
kSMBProcessorFamilyPentiumIIISpeedStep = 0xB1,
kSMBProcessorFamilyPentium4 = 0xB2,
kSMBProcessorFamilyIntelXeon = 0xB3,
kSMBProcessorFamilyAS400 = 0xB4,
kSMBProcessorFamilyIntelXeonMP = 0xB5,
kSMBProcessorFamilyAMDAthlonXP = 0xB6,
kSMBProcessorFamilyAMDAthlonMP = 0xB7,
kSMBProcessorFamilyIntelItanium2 = 0xB8,
kSMBProcessorFamilyIntelPentiumM = 0xB9,
kSMBProcessorFamilyIntelCeleronD = 0xBA,
kSMBProcessorFamilyIntelPentiumD = 0xBB,
kSMBProcessorFamilyIntelPentiumEx = 0xBC,
kSMBProcessorFamilyIntelCoreSolo = 0xBD, ///< SMBIOS spec 2.6 correct this value
kSMBProcessorFamilyReserved = 0xBE,
kSMBProcessorFamilyIntelCore2 = 0xBF,
kSMBProcessorFamilyIntelCore2Solo = 0xC0,
kSMBProcessorFamilyIntelCore2Extreme = 0xC1,
kSMBProcessorFamilyIntelCore2Quad = 0xC2,
kSMBProcessorFamilyIntelCore2ExtremeMobile = 0xC3,
kSMBProcessorFamilyIntelCore2DuoMobile = 0xC4,
kSMBProcessorFamilyIntelCore2SoloMobile = 0xC5,
kSMBProcessorFamilyIntelCoreI7 = 0xC6,
kSMBProcessorFamilyDualCoreIntelCeleron = 0xC7,
kSMBProcessorFamilyIBM390 = 0xC8,
kSMBProcessorFamilyG4 = 0xC9,
kSMBProcessorFamilyG5 = 0xCA,
kSMBProcessorFamilyG6 = 0xCB,
kSMBProcessorFamilyzArchitectur = 0xCC,
kSMBProcessorFamilyIntelCoreI5 = 0xCD,
kSMBProcessorFamilyIntelCoreI3 = 0xCE,
kSMBProcessorFamilyViaC7M = 0xD2,
kSMBProcessorFamilyViaC7D = 0xD3,
kSMBProcessorFamilyViaC7 = 0xD4,
kSMBProcessorFamilyViaEden = 0xD5,
kSMBProcessorFamilyMultiCoreIntelXeon = 0xD6,
kSMBProcessorFamilyDualCoreIntelXeon3Series = 0xD7,
kSMBProcessorFamilyQuadCoreIntelXeon3Series = 0xD8,
kSMBProcessorFamilyViaNano = 0xD9,
kSMBProcessorFamilyDualCoreIntelXeon5Series = 0xDA,
kSMBProcessorFamilyQuadCoreIntelXeon5Series = 0xDB,
kSMBProcessorFamilyDualCoreIntelXeon7Series = 0xDD,
kSMBProcessorFamilyQuadCoreIntelXeon7Series = 0xDE,
kSMBProcessorFamilyMultiCoreIntelXeon7Series = 0xDF,
kSMBProcessorFamilyMultiCoreIntelXeon3400Series = 0xE0,
kSMBProcessorFamilyEmbeddedAmdOpteronQuadCore = 0xE6,
kSMBProcessorFamilyAmdPhenomTripleCore = 0xE7,
kSMBProcessorFamilyAmdTurionUltraDualCoreMobile = 0xE8,
kSMBProcessorFamilyAmdTurionDualCoreMobile = 0xE9,
kSMBProcessorFamilyAmdAthlonDualCore = 0xEA,
kSMBProcessorFamilyAmdSempronSI = 0xEB,
kSMBProcessorFamilyAmdPhenomII = 0xEC,
kSMBProcessorFamilyAmdAthlonII = 0xED,
kSMBProcessorFamilySixCoreAmdOpteron = 0xEE,
kSMBProcessorFamilyAmdSempronM = 0xEF,
kSMBProcessorFamilyi860 = 0xFA,
kSMBProcessorFamilyi960 = 0xFB,
kSMBProcessorFamilyIndicatorFamily2 = 0xFE,
kSMBProcessorFamilyReserved1 = 0xFF
} PROCESSOR_FAMILY;
// Processor Information - Processor Upgrade.
// Values for SMBProcessorInformation.processorUpgrade
typedef enum {
kSMBprocessorUpgradeOther = 0x01,
kSMBprocessorUpgradeUnknown = 0x02,
kSMBprocessorUpgradeDaughterBoard = 0x03,
kSMBprocessorUpgradeZIFSocket = 0x04,
kSMBprocessorUpgradePiggyBack = 0x05, ///< Replaceable.
kSMBprocessorUpgradeNone = 0x06,
kSMBprocessorUpgradeLIFSocket = 0x07,
kSMBprocessorUpgradeSlot1 = 0x08,
kSMBprocessorUpgradeSlot2 = 0x09,
kSMBprocessorUpgrade370PinSocket = 0x0A,
kSMBprocessorUpgradeSlotA = 0x0B,
kSMBprocessorUpgradeSlotM = 0x0C,
kSMBprocessorUpgradeSocket423 = 0x0D,
kSMBprocessorUpgradeSocketA = 0x0E, ///< Socket 462.
kSMBprocessorUpgradeSocket478 = 0x0F,
kSMBprocessorUpgradeSocket754 = 0x10,
kSMBprocessorUpgradeSocket940 = 0x11,
kSMBprocessorUpgradeSocket939 = 0x12,
kSMBprocessorUpgradeSocketmPGA604 = 0x13,
kSMBprocessorUpgradeSocketLGA771 = 0x14,
kSMBprocessorUpgradeSocketLGA775 = 0x15,
kSMBprocessorUpgradeSocketS1 = 0x16,
kSMBprocessorUpgradeAM2 = 0x17,
kSMBprocessorUpgradeF1207 = 0x18,
kSMBprocessorUpgradeSocketLGA1366 = 0x19,
kSMBprocessorUpgradeSocketG34 = 0x1A,
kSMBprocessorUpgradeSocketAM3 = 0x1B,
kSMBprocessorUpgradeSocketC32 = 0x1C,
kSMBprocessorUpgradeSocketLGA1156 = 0x1D,
kSMBprocessorUpgradeSocketLGA1567 = 0x1E,
kSMBprocessorUpgradeSocketPGA988A = 0x1F,
kSMBprocessorUpgradeSocketBGA1288 = 0x20,
kSMBprocessorUpgradeSocketrPGA988B = 0x21,
kSMBprocessorUpgradeSocketBGA1023 = 0x22,
kSMBprocessorUpgradeSocketBGA1224 = 0x23,
kSMBprocessorUpgradeSocketBGA1155 = 0x24,
kSMBprocessorUpgradeSocketLGA1356 = 0x25,
kSMBprocessorUpgradeSocketLGA2011 = 0x26,
kSMBprocessorUpgradeSocketFS1 = 0x27,
kSMBprocessorUpgradeSocketFS2 = 0x28,
kSMBprocessorUpgradeSocketFM1 = 0x29,
kSMBprocessorUpgradeSocketFM2 = 0x2A
kSMBProcessorUpgradeOther = 0x01, // Other
kSMBProcessorUpgradeUnknown = 0x02, // Unknown
kSMBProcessorUpgradeDaughterBoard = 0x03, // Daughter Board
kSMBProcessorUpgradeZIFSocket = 0x04, // ZIF Socket
kSMBProcessorUpgradePiggyBack = 0x05, // Replaceable Piggy Back
kSMBProcessorUpgradeNone = 0x06, // None
kSMBProcessorUpgradeLIFSocket = 0x07, // LIF Socket
kSMBProcessorUpgradeSlot1 = 0x08, // Slot 1
kSMBProcessorUpgradeSlot2 = 0x09, // Slot 2
kSMBProcessorUpgrade370PinSocket = 0x0A, // 370-pin socket
kSMBProcessorUpgradeSlotA = 0x0B, // Slot A
kSMBProcessorUpgradeSlotM = 0x0C, // Slot M
kSMBProcessorUpgradeSocket423 = 0x0D, // Socket 423
kSMBProcessorUpgradeSocketA = 0x0E, // Socket A (Socket 462)
kSMBProcessorUpgradeSocket478 = 0x0F, // Socket 478
kSMBProcessorUpgradeSocket754 = 0x10, // Socket 754
kSMBProcessorUpgradeSocket940 = 0x11, // Socket 940
kSMBProcessorUpgradeSocket939 = 0x12, // Socket 939
kSMBProcessorUpgradeSocketmPGA604 = 0x13, // Socket mPGA604
kSMBProcessorUpgradeSocketLGA771 = 0x14, // Socket LGA771
kSMBProcessorUpgradeSocketLGA775 = 0x15, // Socket LGA775
kSMBProcessorUpgradeSocketS1 = 0x16, // Socket S1
kSMBProcessorUpgradeAM2 = 0x17, // Socket AM2
kSMBProcessorUpgradeF1207 = 0x18, // Socket F (1207)
kSMBProcessorUpgradeSocketLGA1366 = 0x19, // Socket LGA1366
kSMBProcessorUpgradeSocketG34 = 0x1A, // Socket G34
kSMBProcessorUpgradeSocketAM3 = 0x1B, // Socket AM3
kSMBProcessorUpgradeSocketC32 = 0x1C, // Socket C32
kSMBProcessorUpgradeSocketLGA1156 = 0x1D, // Socket LGA1156
kSMBProcessorUpgradeSocketLGA1567 = 0x1E, // Socket LGA1567
kSMBProcessorUpgradeSocketPGA988A = 0x1F, // Socket PGA988A
kSMBProcessorUpgradeSocketBGA1288 = 0x20, // Socket BGA1288
kSMBProcessorUpgradeSocketrPGA988B = 0x21, // Socket rPGA988B
kSMBProcessorUpgradeSocketBGA1023 = 0x22, // Socket BGA1023
kSMBProcessorUpgradeSocketBGA1224 = 0x23, // Socket BGA1224
kSMBProcessorUpgradeSocketBGA1155 = 0x24, // Socket LGA1155
kSMBProcessorUpgradeSocketLGA1356 = 0x25, // Socket LGA1356
kSMBProcessorUpgradeSocketLGA2011 = 0x26, // Socket LGA2011
kSMBProcessorUpgradeSocketFS1 = 0x27, // Socket FS1
kSMBProcessorUpgradeSocketFS2 = 0x28, // Socket FS2
kSMBProcessorUpgradeSocketFM1 = 0x29, // Socket FM1
kSMBProcessorUpgradeSocketFM2 = 0x2A, // Socket FM2
kSMBProcessorUpgradeSocketLGA2011_3 = 0x2B, // Socket LGA2011-3
kSMBProcessorUpgradeSocketLGA1356_3 = 0x2C, // Socket LGA1356-3
kSMBProcessorUpgradeSocketLGA1150 = 0x2D, // Socket LGA1150
kSMBProcessorUpgradeSocketBGA1168 = 0x2E, // Socket BGA1168
kSMBProcessorUpgradeSocketBGA1234 = 0x2F, // Socket BGA1234
kSMBProcessorUpgradeSocketBGA1364 = 0x30, // Socket BGA1364
kSMBProcessorUpgradeSocketAM4 = 0x31, // Socket AM4
kSMBProcessorUpgradeSocketLGA1151 = 0x32, // Socket LGA1151
kSMBProcessorUpgradeSocketBGA1356 = 0x33, // Socket BGA1356
kSMBProcessorUpgradeSocketBGA1440 = 0x34, // Socket BGA1440
kSMBProcessorUpgradeSocketBGA1515 = 0x35, // Socket BGA1515
kSMBProcessorUpgradeSocketLGA3647_1 = 0x36 // Socket LGA3647-1
} PROCESSOR_UPGRADE;
// Struct - Processor Information (Type 4), Apple uses 35 bytes length
typedef struct SMBProcessorInformation
{
// 2.0+ spec (26 bytes)
SMB_STRUCT_HEADER // Type 4
SMBString socketDesignation;
SMBByte processorType; // The enumeration value from PROCESSOR_TYPE_DATA.
SMBByte processorFamily; // The enumeration value from PROCESSOR_FAMILY_DATA.
SMBString manufacturer;
SMBQWord processorID; // based on CPUID
SMBString processorVersion;
SMBByte voltage; // bit7 cleared indicate legacy mode
SMBWord externalClock; // external clock in MHz
SMBWord maximumClock; // max internal clock in MHz
SMBWord currentClock; // current internal clock in MHz
SMBByte status;
SMBByte processorUpgrade; // The enumeration value from PROCESSOR_UPGRADE.
// 2.1+ spec (32 bytes)
SMBWord L1CacheHandle;
SMBWord L2CacheHandle;
SMBWord L3CacheHandle;
// 2.3+ spec (35 bytes)
SMBString serialNumber;
SMBString assetTag;
SMBString partNumber;
// 2.5+ spec (40 bytes) Apple still uses 2.4 spec
SMBByte coreCount;
SMBByte coreEnabled;
SMBByte threadCount;
//SMBWord processorFuncSupport;
// 2.6+ spec (42 bytes)
//SMBWord processorFamily2;
} __attribute__((packed)) SMBProcessorInformation;
//----------------------------------------------------------------------------------------------------------
// Struct - Memory Controller Information (Type 5) Obsolete since SMBIOS version 2.1
typedef struct SMBMemoryControllerInfo {
SMB_STRUCT_HEADER
SMBByteerrorDetectingMethod;
SMBByteerrorCorrectingCapability;
SMBBytesupportedInterleave;
SMBBytecurrentInterleave;
SMBBytemaxMemoryModuleSize;
SMBWordsupportedSpeeds;
SMBWordsupportedMemoryTypes;
SMBBytememoryModuleVoltage;
SMBBytenumberOfMemorySlots;
} __attribute__((packed)) SMBMemoryControllerInfo;
// Struct - Cache Information (Type 7), Apple uses 19 bytes length
//----------------------------------------------------------------------------------------------------------
// Struct - Memory Module Information (Type 6) Obsolete since SMBIOS version 2.1
typedef struct SMBMemoryModule
{
SMB_STRUCT_HEADER // Type 6
SMBString socketDesignation;
SMBByte bankConnections;
SMBByte currentSpeed;
SMBWord currentMemoryType;
SMBByte installedSize;
SMBByte enabledSize;
SMBByte errorStatus;
} __attribute__((packed)) SMBMemoryModule;
#define kSMBMemoryModuleSizeNotDeterminable 0x7D
#define kSMBMemoryModuleSizeNotEnabled 0x7E
#define kSMBMemoryModuleSizeNotInstalled 0x7F
//----------------------------------------------------------------------------------------------------------
// Struct - Cache Information (Type 7), Apple uses 19 bytes length
typedef struct SMBCacheInformation
{
SMB_STRUCT_HEADER // Type 7
SMBByte associativity;
} __attribute__((packed)) SMBCacheInformation;
//----------------------------------------------------------------------------------------------------------
// Struct - System Slots (Type 9), Apple uses 13 bytes length
//----------------------------------------------------------------------------------------------------------
typedef struct SMBSystemSlot
{
// 2.0+ spec (12 bytes)
//SMBBytedeviceFunctionNumber;
} __attribute__((packed)) SMBSystemSlot;
//----------------------------------------------------------------------------------------------------------
// Struct - OEM Strings (Type 11), Apple uses 5 bytes length
//----------------------------------------------------------------------------------------------------------
typedef struct SMBOEMStrings
{
SMB_STRUCT_HEADER // Type 11
SMBBytecount;// number of strings
} __attribute__((packed)) SMBOEMStrings;
//----------------------------------------------------------------------------------------------------------
// Physical Memory Array (Type 16)
// Physical Memory Array (Type 16), Apple uses 15 bytes length
//----------------------------------------------------------------------------------------------------------
typedef struct SMBPhysicalMemoryArray
{
// 2.1+ spec (15 bytes)
SMB_STRUCT_HEADER // Type 16
SMBByte physicalLocation; // physical location
SMBByte arrayUse; // the use for the memory array, The enumeration value from MEMORY_ARRAY_USE.
SMBByte errorCorrection; // error correction/detection method, The enumeration value from MEMORY_ERROR_CORRECTION.
SMBDWord maximumCapacity; // maximum memory capacity in kilobytes
SMBWord errorHandle; // handle of a previously detected error
SMBWord numMemoryDevices; // number of memory slots or sockets
// 2.7+ spec
//SMBQWord extMaximumCapacity;// maximum memory capacity in bytes
} __attribute__((packed)) SMBPhysicalMemoryArray;
// Physical Memory Array - Use.
// Values for SMBPhysicalMemoryArray.arrayUse
typedef enum
kSMBMemoryArrayErrorCorrectionTypeCRC = 0x07
} MEMORY_ERROR_CORRECTION;
// Struct - Physical Memory Array (Type 16), Apple uses 15 bytes length
typedef struct SMBPhysicalMemoryArray
{
// 2.1+ spec (15 bytes)
SMB_STRUCT_HEADER // Type 16
SMBByte physicalLocation; // physical location
SMBByte arrayUse; // the use for the memory array, The enumeration value from MEMORY_ARRAY_USE.
SMBByte errorCorrection; // error correction/detection method, The enumeration value from MEMORY_ERROR_CORRECTION.
SMBDWord maximumCapacity; // maximum memory capacity in kilobytes
SMBWord errorHandle; // handle of a previously detected error
SMBWord numMemoryDevices; // number of memory slots or sockets
// 2.7+ spec
//SMBQWord extMaximumCapacity;// maximum memory capacity in bytes
} __attribute__((packed)) SMBPhysicalMemoryArray;
//----------------------------------------------------------------------------------------------------------
// Struct - Memory Device (Type 17), Apple uses 27 bytes length
//----------------------------------------------------------------------------------------------------------
typedef struct SMBMemoryDevice
{
// 2.1+ spec (21 bytes)
//SMBWord configuredVolt;
} __attribute__((packed)) SMBMemoryDevice;
//----------------------------------------------------------------------------------------------------------
// Struct - Memory Array Mapped Address (Type 19), Apple uses 15 bytes length
//----------------------------------------------------------------------------------------------------------
// Struct - Memory Array Mapped Address (Type 19), Apple uses 15 bytes length
//typedef struct SMBMemoryArrayMappedAddress
//{
#if 0
typedef struct SMBMemoryArrayMappedAddress
{
// 2.1+ spec
//SMB_STRUCT_HEADER // Type 19
//SMBDWord startingAddress;
//SMBDWord endingAddress;
//SMBWord arrayHandle;
//SMBByte partitionWidth;
// 2.7+ spec
//SMBQWord extStartAddress;
//SMBQWord extEndAddress;
//} __attribute__((packed)) SMBMemoryArrayMappedAddress;
SMB_STRUCT_HEADER // Type 19
SMBDWord startingAddress;
SMBDWord endingAddress;
SMBWord arrayHandle;
SMBByte partitionWidth;
// 2.7+ spec
SMBQWord extStartAddress;
SMBQWord extEndAddress;
} __attribute__((packed)) SMBMemoryArrayMappedAddress;
#endif
//----------------------------------------------------------------------------------------------------------
// Struct - Memory Device Mapped Address (Type 20)
//typedef struct SMBMemoryDeviceMappedAddress
//{
// 2.1+ spec
//SMB_STRUCT_HEADER // Type 20
//SMBDWord startingAddress;
//SMBDWord endingAddress;
//SMBWord arrayHandle;
//SMBByte partitionRowPosition;
//SMBByte interleavePosition;
//SMBByte interleaveDataDepth;
// 2.7+ spec
//SMBQWord extStartAddress;
//SMBQWord extEndAddress;
//} __attribute__((packed)) SMBMemoryDeviceMappedAddress;
//----------------------------------------------------------------------------------------------------------
#if 0
typedef struct SMBMemoryDeviceMappedAddress
{
// 2.1+ spec
SMB_STRUCT_HEADER // Type 20
SMBDWord startingAddress;
SMBDWord endingAddress;
SMBWord arrayHandle;
SMBByte partitionRowPosition;
SMBByte interleavePosition;
SMBByte interleaveDataDepth;
// 2.7+ spec
SMBQWord extStartAddress;
SMBQWord extEndAddress;
} __attribute__((packed)) SMBMemoryDeviceMappedAddress;
#endif
//
// Apple Specific structures
//
//----------------------------------------------------------------------------------------------------------
// Firmware Volume Description (Apple Specific - Type 128)
// Firmware Volume Description (Apple Specific - Type 128), Apple uses 88 bytes length
//----------------------------------------------------------------------------------------------------------
enum
{
FW_REGION_RESERVED = 0,
SMBDWord EndAddress;
} __attribute__((packed)) FW_REGION_INFO;
// Struct - Firmware Volume Description (Apple Specific - Type 128), Apple uses 88 bytes length
typedef struct SMBFirmwareVolume
{
SMB_STRUCT_HEADER// Type 128
FW_REGION_INFO FlashMap[ NUM_FLASHMAP_ENTRIES ];
} __attribute__((packed)) SMBFirmwareVolume;
//----------------------------------------------------------------------------------------------------------
// Memory SPD Data (Apple Specific - Type 130)
//----------------------------------------------------------------------------------------------------------
/* ===========================================
Memory SPD Data (Apple Specific - Type 130)
============================================= */
typedef struct SMBMemorySPD
{
SMB_STRUCT_HEADER// Type 130
SMBWord Data[1];
} __attribute__((packed)) SMBMemorySPD;
//----------------------------------------------------------------------------------------------------------
// OEM Processor Type (Apple Specific - Type 131)
//----------------------------------------------------------------------------------------------------------
/* ============================================
OEM Processor Type (Apple Specific - Type 131)
============================================== */
typedef struct SMBOemProcessorType
{
SMB_STRUCT_HEADER// Type131
SMBWord ProcessorType;
} __attribute__((packed)) SMBOemProcessorType;
//----------------------------------------------------------------------------------------------------------
// OEM Processor Bus Speed (Apple Specific - Type 132)
//----------------------------------------------------------------------------------------------------------
/* =================================================
OEM Processor Bus Speed (Apple Specific - Type 132)
=================================================== */
typedef struct SMBOemProcessorBusSpeed
{
SMB_STRUCT_HEADER// Type 132
SMBWord ProcessorBusSpeed;// MT/s unit
} __attribute__((packed)) SMBOemProcessorBusSpeed;
//----------------------------------------------------------------------------------------------------------
// OEM Platform Feature (Apple Specific - Type 133)
//----------------------------------------------------------------------------------------------------------
/* ==============================================
OEM Platform Feature (Apple Specific - Type 133)
================================================ */
typedef struct SMBOemPlatformFeature
{
SMB_STRUCT_HEADER// Type 133
SMBWord PlatformFeature;
} __attribute__((packed)) SMBOemPlatformFeature;
//----------------------------------------------------------------------------------------------------------
// OEM SMC Version (Apple Specific - Type 134)
//----------------------------------------------------------------------------------------------------------
/* =========================================
OEM SMC Version (Apple Specific - Type 134)
=========================================== */
typedef struct SMBOemSMCVersion
{
SMB_STRUCT_HEADER// Type 134
SMBWord SMCVersion;
} __attribute__((packed)) SMBOemSMCVersion;
//
// Obsolete SMBIOS structures
//
//----------------------------------------------------------------------------------------------------------
// Struct - Memory Controller Information (Type 5) Obsolete since SMBIOS version 2.1
//----------------------------------------------------------------------------------------------------------
typedef struct SMBMemoryControllerInfo {
SMB_STRUCT_HEADER
SMBByteerrorDetectingMethod;
SMBByteerrorCorrectingCapability;
SMBBytesupportedInterleave;
SMBBytecurrentInterleave;
SMBBytemaxMemoryModuleSize;
SMBWordsupportedSpeeds;
SMBWordsupportedMemoryTypes;
SMBBytememoryModuleVoltage;
SMBBytenumberOfMemorySlots;
} __attribute__((packed)) SMBMemoryControllerInfo;
//----------------------------------------------------------------------------------------------------------
// Struct - Memory Module Information (Type 6) Obsolete since SMBIOS version 2.1
//----------------------------------------------------------------------------------------------------------
typedef struct SMBMemoryModule
{
SMB_STRUCT_HEADER // Type 6
SMBString socketDesignation;
SMBByte bankConnections;
SMBByte currentSpeed;
SMBWord currentMemoryType;
SMBByte installedSize;
SMBByte enabledSize;
SMBByte errorStatus;
} __attribute__((packed)) SMBMemoryModule;
#define kSMBMemoryModuleSizeNotDeterminable 0x7D
#define kSMBMemoryModuleSizeNotEnabled 0x7E
#define kSMBMemoryModuleSizeNotInstalled 0x7F
//----------------------------------------------------------------------------------------------------------
#define SMBIOS_ORIGINAL0
#define SMBIOS_PATCHED1
extern void *getSmbios(int which);
extern void readSMBIOSInfo(SMBEntryPoint *eps);
extern void setupSMBIOSTable(void);
extern void decodeSMBIOSTable(SMBEntryPoint *eps);

Archive Download the corresponding diff file

Revision: 2904