Chameleon

Chameleon Commit Details

Date:2014-01-28 13:43:16 (5 years 8 months ago)
Author:Bungo
Commit:2353
Parents: 2352
Message:Fix patching unsupported (smaller) SMBIOS tables
Changes:
M/branches/Bungo/i386/libsaio/smbios.c
M/branches/Bungo/i386/libsaio/smbios_decode.c
M/branches/Bungo/i386/libsaio/smbios.h
M/branches/Bungo/i386/libsaio/console.c
M/branches/Bungo/i386/boot2/prompt.c

File differences

branches/Bungo/i386/libsaio/console.c
9191
9292
9393
94
94
9595
9696
9797
msgbuf = malloc(BOOTER_LOG_SIZE);
bzero(msgbuf, BOOTER_LOG_SIZE);
cursor = msgbuf;
msglog("%s\n", "Chameleon " I386BOOT_CHAMELEONVERSION " (svn-r" I386BOOT_CHAMELEONREVISION ")" " [" I386BOOT_BUILDDATE "]");
msglog("%s\n", "Chameleon " I386BOOT_CHAMELEONVERSION " (Bungo branch) r" I386BOOT_CHAMELEONREVISION " [" I386BOOT_BUILDDATE "]");
}
void msglog(const char * fmt, ...)
branches/Bungo/i386/libsaio/smbios.c
8181
8282
8383
84
84
8585
8686
8787
8888
8989
90
91
90
91
9292
9393
9494
......
105105
106106
107107
108
109
108110
109111
110112
......
181183
182184
183185
186
184187
185188
186189
......
188191
189192
190193
191
194
192195
193196
194197
......
199202
200203
201204
202
205
203206
204207
205208
......
227230
228231
229232
230
231
232
233
233
234
235
236
234237
235238
236
239
237240
238241
239242
......
292295
293296
294297
298
299
300
295301
296302
297303
......
308314
309315
310316
311
312
317
313318
314319
315320
......
317322
318323
319324
320
321325
322326
323327
324328
325329
326330
327
328331
329
330332
331333
332334
......
352354
353355
354356
355
357
356358
357359
358360
359361
360362
361363
362
363364
364365
365366
......
382383
383384
384385
385
386
386
387
387388
388389
389390
......
585586
586587
587588
589
588590
589591
590592
......
689691
690692
691693
692
693
694
695
694
695
696
697
696698
697699
698700
......
701703
702704
703705
704
705
706
707
706
707
708
709
708710
709711
710712
......
771773
772774
773775
774
776
777
775778
776779
777780
778781
779
782
780783
781784
782785
......
989992
990993
991994
992
993
994
995
996
997
998
995
996
997
998
999
1000
9991001
10001002
10011003
......
10031005
10041006
10051007
1006
1008
10071009
10081010
10091011
......
10111013
10121014
10131015
1014
1015
1016
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
10171050
1018
1051
1052
1053
10191054
10201055
10211056
10221057
1023
1058
10241059
1025
1060
1061
1062
10261063
10271064
10281065
/* ============================
Processor Information (Type 4)
============================== */
// Bungo
// Bungo:
#define kSMBProcessorInformationSocketKey "SMcpusocket"
#define kSMBProcessorInformationManufacturerKey "SMcpumanufacturer"
#define kSMBProcessorInformationVersionKey "SMcpuversion"
//
#define kSMBProcessorInformationExternalClockKey"SMexternalclock"
#define kSMBProcessorInformationMaximumClockKey"SMmaximalclock"
// Bungo
#define kSMBProcessorInformationMaximalClockKey"SMmaximalclock"
// Bungo:
#define kSMBProcessorInformationCurrentClockKey "SMcurrentclock"
#define kSMBProcessorInformationUpgradeKey "SMcpuupgrade"
#define kSMBProcessorInformationSerialNumberKey "SMcpuserial"
#define kSMBMemoryDeviceManufacturerKey "SMmemmanufacturer" //
#define kSMBMemoryDeviceSerialNumberKey "SMmemserial" //
#define kSMBMemoryDevicePartNumberKey "SMmempart" //
// Bungo:
#define kSMBMemoryDeviceAssetTagKey "SMmemassettag" //
/* ===========================================
Memory SPD Data (Apple Specific - Type 130)
char*version;
char*serialNumber;
char*assetTag; // Bungo: renamed folowing convention
char *skuNumber;
} defaultChassis_t;
defaultChassis_t defaultChassis;
typedef struct
{
uint8_ttype;
SMBValueTypevalueType;
SMBValueTypevalueType;
uint8_tfieldOffset;
char*keyString;
bool(*getSMBValue)(returnType *);
{
/* =======================
BIOS Information (Type 0)
========================= */
=========================*/
{ kSMBTypeBIOSInformation, kSMBString, getFieldOffset(SMBBIOSInformation, vendor),
kSMBBIOSInformationVendorKey, NULL, &defaultBIOSInfo.vendor }, // SMbiosvendor - Apple Inc.
{kSMBTypeSystemInformation,kSMBString,getFieldOffset(SMBSystemInformation, serialNumber),
kSMBSystemInformationSerialNumberKey, NULL, &defaultSystemInfo.serialNumber }, // SMserial - Serial number
/*{kSMBTypeSystemInformation,kSMBByte,getFieldOffset(SMBSystemInformation, uuid[16]),
NULL, NULL, NULL}, // SmUUID/
/* Bungo:
{kSMBTypeSystemInformation,kSMBByte,getFieldOffset(SMBSystemInformation, uuid),
kSMBSystemInformationUUIDKey, NULL, NULL}, // SMsystemuuid
{kSMBTypeSystemInformation,kSMBByte,getFieldOffset(SMBSystemInformation, wakeupReason),
NULL, NULL, NULL}, // reason for system wakeup
*/
*/
// Bungo
{kSMBTypeSystemInformation,kSMBString,getFieldOffset(SMBSystemInformation, skuNumber),
{kSMBTypeSystemEnclosure, kSMBString, getFieldOffset(SMBSystemEnclosure, assetTag),
kSMBSystemEnclosureAssetTagKey, NULL, &defaultChassis.assetTag }, // SMchassisassettag - Pro Enclosure
/* {kSMBTypeSystemEnclosure, kSMBString, getFieldOffset(SMBSystemEnclosure, skuNumber), NULL, NULL, &defaultChassis.skuNumber },
*/
/* ============================
Processor Information (Type 4)
============================== */
kSMBProcessorInformationExternalClockKey, getProcessorInformationExternalClock,NULL}, // SMcpuexternalclock
{kSMBTypeProcessorInformation,kSMBWord, getFieldOffset(SMBProcessorInformation, maximumClock),
kSMBProcessorInformationMaximumClockKey, getProcessorInformationMaximumClock,NULL}, // SMcpumaxspeed
kSMBProcessorInformationMaximalClockKey, getProcessorInformationMaximumClock,NULL}, // SMcpumaximumclock
// Bungo
{kSMBTypeProcessorInformation,kSMBWord,getFieldOffset(SMBProcessorInformation, currentClock),
kSMBProcessorInformationCurrentClockKey, NULL, NULL}, // SMcpucurrentspeed
{kSMBTypeProcessorInformation,kSMBByte,getFieldOffset(SMBProcessorInformation, processorUpgrade),
kSMBProcessorInformationUpgradeKey, NULL, NULL}, // SMcpuupgrade
//
{kSMBTypeProcessorInformation,kSMBString,getFieldOffset(SMBProcessorInformation, serialNumber),
kSMBProcessorInformationSerialNumberKey, NULL, NULL},
// Bungo
{kSMBTypeProcessorInformation,kSMBString,getFieldOffset(SMBProcessorInformation, assetTag),
kSMBProcessorInformationAssetTagKey, NULL, NULL}, // SMcpuassettag
//
{kSMBTypeProcessorInformation,kSMBString,getFieldOffset(SMBProcessorInformation, partNumber),
kSMBProcessorInformationPartNumberKey, NULL, NULL},
kSMBMemoryDeviceSerialNumberKey, getSMBMemoryDeviceSerialNumber, NULL},
{kSMBTypeMemoryDevice,kSMBString,getFieldOffset(SMBMemoryDevice, assetTag),
NULL, NULL, NULL},
kSMBMemoryDeviceAssetTagKey, NULL, NULL},
{kSMBTypeMemoryDevice,kSMBWord,getFieldOffset(SMBMemoryDevice, errorHandle),
NULL, getSMBMemoryDeviceMemoryErrorHandle, NULL},
{kSMBTypeMemoryDevice,kSMBString,getFieldOffset(SMBMemoryDevice, partNumber),
kSMBMemoryDevicePartNumberKey, getSMBMemoryDevicePartNumber, NULL},
//
//-------------------------------------------------------------------------------------------------------------------------
// Apple Specific
static uint8_t stringIndex;// increament when a string is added and set the field value accordingly
static uint8_t stringsSize;// add string size
static SMBWord tableLength= 0;
static SMBWord handle= 0;
static SMBWord tableLength = 0;
static SMBWord handle = 0;
static SMBWord maxStructSize= 0;
static SMBWord structureCount= 0;
defaultChassis.manufacturer = kDefaultVendorManufacturer;
defaultChassis.serialNumber = kDefaultSerialNumber;
defaultChassis.assetTag = kDefaultAssetTag;
defaultChassis.skuNumber = kDefaultSkuNumber;
// if (platformCPUFeature(CPU_FEATURE_MOBILE)) Bungo: doesn't recognise correctly
if (PlatformType == 2) // this method works
break;
default:
defaultBIOSInfo.version= kDefaultMacProBIOSVersion;
defaultBIOSInfo.releaseDate= kDefaultMacProBIOSReleaseDate;
defaultSystemInfo.productName= kDefaultMacPro;
defaultSystemInfo.family= kDefaultMacProFamily;
defaultBIOSInfo.version = kDefaultMacProBIOSVersion;
defaultBIOSInfo.releaseDate = kDefaultMacProBIOSReleaseDate;
defaultSystemInfo.productName = kDefaultMacPro;
defaultSystemInfo.family = kDefaultMacProFamily;
defaultBaseBoard.product = kDefaultMacProBoardProduct;
defaultBaseBoard.boardType = kSMBBaseBoardMotherboard;
defaultChassis.chassisType = kSMBchassisUnknown;
break;
}
default:
defaultBIOSInfo.version= kDefaultMacProBIOSVersion;
defaultBIOSInfo.releaseDate= kDefaultMacProBIOSReleaseDate;
defaultSystemInfo.productName= kDefaultMacPro;
defaultSystemInfo.family= kDefaultMacProFamily;
defaultBIOSInfo.version = kDefaultMacProBIOSVersion;
defaultBIOSInfo.releaseDate = kDefaultMacProBIOSReleaseDate;
defaultSystemInfo.productName = kDefaultMacPro;
defaultSystemInfo.family = kDefaultMacProFamily;
defaultBaseBoard.product = kDefaultMacProBoardProduct;
defaultBaseBoard.boardType = kSMBBaseBoardMotherboard;
defaultChassis.chassisType = kSMBchassisUnknown;
}
strSize = strlen(string);
/* What was this for?
// remove any spaces found at the end
while ((strSize != 0) && (string[strSize - 1] == ' ')) {
strSize--;
}
*/
if (strSize == 0) {
*field = 0;
return;
void setSMBStruct(SMBStructPtrs *structPtr)
{
bool setterFound = false;
uint8_t *ptr;
SMBWord structSize;
int i;
/* http://forge.voodooprojects.org/p/chameleon/issues/361/ */
bool setterFound = false;
uint8_t *ptr;
SMBWord structSize;
int i;
/* Bungo: not needed because of tables lengths fix in next lines
// http://forge.voodooprojects.org/p/chameleon/issues/361/
bool forceFullMemInfo = false;
if (structPtr->orig->type == kSMBTypeMemoryDevice) {
if (forceFullMemInfo) {
structPtr->orig->length = 27;
}
}
} */
stringIndex = 1;
stringsSize = 0;
if (handle < structPtr->orig->handle) {
handle = structPtr->orig->handle;
}
memcpy((void *)structPtr->new, structPtr->orig, structPtr->orig->length);
// Bungo: fix unsuported tables lengths from original smbios: extend smaller or truncate bigger
switch (structPtr->orig->type) {
case kSMBTypeBIOSInformation:
structSize = sizeof(SMBBIOSInformation);
break;
case kSMBTypeSystemInformation:
structSize = sizeof(SMBSystemInformation);
break;
case kSMBTypeBaseBoard:
structSize = sizeof(SMBBaseBoard);
break;
case kSMBTypeSystemEnclosure:
structSize = sizeof(SMBSystemEnclosure);
break;
case kSMBTypeProcessorInformation:
structSize = sizeof(SMBProcessorInformation);
break;
case kSMBTypeMemoryDevice:
structSize = sizeof(SMBMemoryDevice);
break;
default:
structSize = structPtr->orig->length; // don't change if not to patch
break;
}
// memcpy((void *)structPtr->new, structPtr->orig, structPtr->orig->length);
if (structPtr->orig->length <= structSize) {
memcpy((void *)structPtr->new, structPtr->orig, structPtr->orig->length);
} else {
memcpy((void *)structPtr->new, structPtr->orig, structSize);
}
structPtr->new->length = structSize;
for (i = 0; i < numOfSetters; i++) {
if ((structPtr->orig->type == SMBSetters[i].type) && (SMBSetters[i].fieldOffset < structPtr->orig->length)) {
// Bungo:
//if ((structPtr->orig->type == SMBSetters[i].type) && (SMBSetters[i].fieldOffset < structPtr->orig->length)) {
if ((structPtr->orig->type == SMBSetters[i].type) && (SMBSetters[i].fieldOffset < structSize)) {
setterFound = true;
setSMBValue(structPtr, i, (returnType *)((uint8_t *)structPtr->new + SMBSetters[i].fieldOffset));
}
}
if (setterFound) {
ptr = (uint8_t *)structPtr->new + structPtr->orig->length;
// Bungo:
// ptr = (uint8_t *)structPtr->new + structPtr->orig->length;
ptr = (uint8_t *)structPtr->new + structPtr->new->length;
for (; ((uint16_t *)ptr)[0] != 0; ptr++);
if (((uint16_t *)ptr)[0] == 0) {
branches/Bungo/i386/libsaio/smbios_decode.c
2121
2222
2323
24
25
26
27
28
29
3024
31
3225
33
34
35
36
37
38
26
27
28
29
3930
40
41
42
43
44
45
46
47
48
31
32
33
34
35
4936
50
51
52
5337
5438
5539
......
123107
124108
125109
110
111
112
113
114
115
116
117
118
119
120
121
122
126123
127124
128
125
129126
130
127
131128
132129
133130
......
170167
171168
172169
173
174
170
171
175172
176173
177174
......
200197
201198
202199
203
204
205
206
207
200
201
202
203
204
208205
209206
210207
211208
212209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
213230
214231
215232
216
233
217234
235
218236
219
220
237
238
221239
222
223
240
241
224242
225
226
227
243
228244
229245
230
231
246
247
232248
233249
234250
235251
236252
237253
238
254
239255
256
240257
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
258
259
260
261
262
263
264
265
266
267
268
269
270
262271
263272
264
265
266
267
268
269
270
271
273
274
275
276
272277
273278
274279
275280
276281
277282
278
283
279284
285
280286
281
282
283
284
285
287
288
289
290
291
286292
287
293
288294
289
295
290296
291297
292
293
298
299
294300
295301
296302
......
299305
300306
301307
302
308
303309
310
304311
305
306
307
312
313
308314
309315
310
311
312
313
314
316
317
318
319
320
315321
316322
317323
......
328334
329335
330336
331
337
332338
339
333340
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
353364
354365
355366
356367
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373368
374369
375
376
377
378
379
380
381
382
370
371
372
373
374
375
376
377
378
379
380
383381
384382
385383
386384
387
385
388386
387
389388
390
391
392
393
394
395
396
397
398
399
400
401
402
389
390
391
392
393
394
395
396
397
403398
404399
405400
406401
407402
408403
409
404
410405
411
412
406
407
408
413409
414410
415411
416
412
417413
418
419
420
421
414
415
416
422417
423418
424419
......
436431
437432
438433
439
440
441
434
435
436
442437
443438
444
445
446
447439
448440
449441
450
442
451443
452444
453445
454
446
455447
456448
457449
458
450
459451
460452
461453
462
454
463455
464456
465457
466
458
467459
468460
469461
470
462
471463
472464
473
474
475
465
466
467
476468
477469
478
470
479471
480472
481
473
482474
483475
484
485
486
476
477
478
487479
488480
489
481
490482
491483
492484
493
485
494486
495487
496488
497489
498490
499
491
492
500493
501494
502495
#define DBG(x...)msglog(x)
#endif
static SMBByte minorVersion; // SMBIOS rev. minor
// Bungo:
static SMBByte majorVersion; // SMBIOS rev. major
static SMBByte bcdRevisionLo; // DMI rev. minor
static SMBByte bcdRevisionHi; // DMI rev. major
extern char *getSMBStringForField(SMBStructHeader *structHeader, uint8_t field);
// Bungo:
#define NotSpecifiedStr "Not Specified" // no string
#define OutOfSpecStr "<OUT OF SPEC>" // value out of smbios spec. range
#define PrivateStr "** PRIVATE **" // masking private data
#define alwaysMask true
#define neverMask false
static bool privateData = true;
#define NotSpecifiedStr "Not Specified" // no string
#define OutOfSpecStr "<OUT OF SPEC>" // value out of smbios spec. range
#define PrivateStr "** PRIVATE **" // masking private data
#define neverMask false
char *SMBStringForField(SMBStructHeader *structHeader, uint8_t field, const bool mask) // Bungo: fixes random string readout if null in smbios to "Not Specified" as dmidecode displays
{
char *str = NULL;
str = getSMBStringForField(structHeader, field);
if (!field) {
str = NotSpecifiedStr;
} else if (mask) {
str = PrivateStr;
}
static bool privateData = true;
static SMBByte minorVersion; // SMBIOS rev. minor
static SMBByte majorVersion; // SMBIOS rev. major
static SMBByte bcdRevisionLo; // DMI rev. minor
static SMBByte bcdRevisionHi; // DMI rev. major
return str;
};
/*====
7.2.2
===*/
};
/*====
7.5.1
===*/
static const char *SMBProcessorTypes[] = // Bungo: strings for processor type (Table Type 4 - Processor Information)
{
"Other", /* 01h */
"Unknown", /* 02h */
"Central Processor", /* 03h */
"Math Processor", /* 04h */
"DSP Processor", /* 05h */
"Video Processor" /* 06h */
};
/*====
7.5.5
===*/
/*static const char *SMBCpuSocket[] = // ErmaC: strings for (Table Type 4 - Processor Information )
static const char *SMBProcessorUpgrades[] = // ErmaC: strings for processor upgrade (Table Type 4 - Processor Information)
{
"Other", // 01h
"Other", // 01h
"Unknown",
"Daughter Board",
"ZIF Socket",
"Socket FM1",
"Socket FM2",
"Socket LGA2011-3",
"Socket LGA1356-3"// 2Ch
};*/
"Socket LGA1356-3" // 2Ch
};
/*=====
7.18.2
"DDR SDRAM", /* 12h DDR */
"DDR2 SDRAM", /* 13h DDR2 */
"DDR2 FB-DIMM", /* 14h DDR2 FB-DIMM */
"RAM",/* 15h unused */
"RAM",/* 16h unused */
"RAM",/* 17h unused */
"DDR3",/* 18h DDR3, chosen in [5776134] */
"FBD2"/* 19h FBD2 */
"RAM", /* 15h unused */
"RAM", /* 16h unused */
"RAM", /* 17h unused */
"DDR3", /* 18h DDR3, chosen in [5776134] */
"FBD2" /* 19h FBD2 */
};
static const int kSMBMemoryDeviceTypeCount = sizeof(SMBMemoryDeviceTypes) /
sizeof(SMBMemoryDeviceTypes[0]);
// Bungo: fixes random string readout if null in smbios to "Not Specified" as dmidecode displays
char *SMBStringForField(SMBStructHeader *structHeader, uint8_t field, const bool mask)
{
char *str = NULL;
str = getSMBStringForField(structHeader, field);
if (!field) {
str = NotSpecifiedStr;
}
else if (mask) {
str = PrivateStr;
}
return str;
};
void printHeader(SMBStructHeader *structHeader)
{
DBG("Type: %d, Length: %d, Handle: 0x%04x\n", structHeader->type, structHeader->length, structHeader->handle);
}
//-------------------------------------------------------------------------------------------------------------------------
// BIOS Information (Type 0)
//-------------------------------------------------------------------------------------------------------------------------
void decodeBIOSInformation(SMBBIOSInformation *structHeader)
void decodeBIOSInformation(SMBStructHeader *structHeader)
{
printHeader(structHeader);
DBG("BIOS Information:\n");
DBG("\tVendor: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->vendor, neverMask));
DBG("\tVersion: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->version, neverMask));
DBG("\tVendor: %s\n", SMBStringForField(structHeader, ((SMBBIOSInformation *)structHeader)->vendor, neverMask));
DBG("\tVersion: %s\n", SMBStringForField(structHeader, ((SMBBIOSInformation *)structHeader)->version, neverMask));
// Address Segment
DBG("\tRelease Date: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->releaseDate, neverMask));
DBG("\tBIOS Revision: %d.%d\n", structHeader->releaseMajor, structHeader->releaseMinor);
DBG("\tRelease Date: %s\n", SMBStringForField(structHeader, ((SMBBIOSInformation *)structHeader)->releaseDate, neverMask));
DBG("\tBIOS Revision: %d.%d\n", ((SMBBIOSInformation *)structHeader)->releaseMajor, ((SMBBIOSInformation *)structHeader)->releaseMinor);
// ROM Size
//DBG("\tSupported BIOS functions: (0x%llX) %s\n", structHeader->characteristics, SMBBIOSInfoChar0[structHeader->characteristics]);
// Major Release
// Minor Release
// DBG("\tSupported BIOS functions: (0x%llX) %s\n", ((SMBBIOSInformation *)structHeader)->characteristics, SMBBIOSInfoChar0[((SMBBIOSInformation *)structHeader)->characteristics]);
// Firmware Major Release
// Firmware Minor Release
//SMBByte characteristicsExt1;
//SMBByte characteristicsExt2;
// SMBByte characteristicsExt1;
// SMBByte characteristicsExt2;
DBG("\n");
}
//-------------------------------------------------------------------------------------------------------------------------
// System Information (Type 1)
//-------------------------------------------------------------------------------------------------------------------------
void decodeSystemInformation(SMBSystemInformation *structHeader)
void decodeSystemInformation(SMBStructHeader *structHeader)
{
printHeader(structHeader);
DBG("System Information:\n");
DBG("\tManufacturer: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->manufacturer, neverMask));
DBG("\tProduct Name: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->productName, neverMask));
DBG("\tVersion: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->version, neverMask));
DBG("\tSerial Number: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->serialNumber, privateData));
if (minorVersion < 1 || structHeader->header.length < 25) {
return;
}
uint8_t *uuid = structHeader->uuid;
if (uuid) {
if (privateData) {
DBG("\tUUID: %s\n", PrivateStr);
} else {
DBG("\tUUID: %02X%02X%02X%02X-%02X%02X-%02X%02X-%02x%02X-%02X%02X%02X%02X%02X%02X\n",
uuid[0], uuid[1], uuid[2], uuid[3], uuid[4], uuid[5], uuid[6], uuid[7],
uuid[8], uuid[9], uuid[10], uuid[11], uuid[12], uuid[13], uuid[14], uuid[15]);
}
}
if (structHeader->wakeupReason > 8) {
DBG("\tManufacturer: %s\n", SMBStringForField(structHeader, ((SMBSystemInformation *)structHeader)->manufacturer, neverMask));
DBG("\tProduct Name: %s\n", SMBStringForField(structHeader, ((SMBSystemInformation *)structHeader)->productName, neverMask));
DBG("\tVersion: %s\n", SMBStringForField(structHeader, ((SMBSystemInformation *)structHeader)->version, neverMask));
DBG("\tSerial Number: %s\n", SMBStringForField(structHeader, ((SMBSystemInformation *)structHeader)->serialNumber, privateData));
uint8_t *uuid = ((SMBSystemInformation *)structHeader)->uuid;
if (privateData) {
DBG("\tUUID: %s\n", PrivateStr);
} else {
DBG("\tUUID: %02X%02X%02X%02X-%02X%02X-%02X%02X-%02x%02X-%02X%02X%02X%02X%02X%02X\n",
uuid[0], uuid[1], uuid[2], uuid[3], uuid[4], uuid[5], uuid[6], uuid[7],
uuid[8], uuid[9], uuid[10], uuid[11], uuid[12], uuid[13], uuid[14], uuid[15]);
}
if (((SMBSystemInformation *)structHeader)->wakeupReason > 8) {
DBG("\tWake-up Type: %s\n", OutOfSpecStr);
} else {
DBG("\tWake-up Type: %s\n", SMBWakeUpTypes[structHeader->wakeupReason]);
}
if (minorVersion < 4 || structHeader->header.length < 27) {
return;
}
DBG("\tSKU Number: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->skuNumber, neverMask)); // System SKU#
DBG("\tFamily: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->family, neverMask));
DBG("\tWake-up Type: %s\n", SMBWakeUpTypes[((SMBSystemInformation *)structHeader)->wakeupReason]);
}
DBG("\tSKU Number: %s\n", SMBStringForField(structHeader, ((SMBSystemInformation *)structHeader)->skuNumber, neverMask)); // System SKU#
DBG("\tFamily: %s\n", SMBStringForField(structHeader, ((SMBSystemInformation *)structHeader)->family, neverMask));
DBG("\n");
}
//-------------------------------------------------------------------------------------------------------------------------
// Base Board (or Module) Information (Type 2)
//-------------------------------------------------------------------------------------------------------------------------
void decodeBaseBoard(SMBBaseBoard *structHeader)
void decodeBaseBoard(SMBStructHeader *structHeader)
{
printHeader(structHeader);
DBG("Base Board Information:\n");
DBG("\tManufacturer: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->manufacturer, neverMask));
DBG("\tProduct Name: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->product, neverMask));
DBG("\tVersion: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->version, neverMask));
DBG("\tSerial Number: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->serialNumber, privateData));
DBG("\tAsset Tag: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->assetTag, neverMask));
DBG("\tManufacturer: %s\n", SMBStringForField(structHeader, ((SMBBaseBoard *)structHeader)->manufacturer, neverMask));
DBG("\tProduct Name: %s\n", SMBStringForField(structHeader, ((SMBBaseBoard *)structHeader)->product, neverMask));
DBG("\tVersion: %s\n", SMBStringForField(structHeader, ((SMBBaseBoard *)structHeader)->version, neverMask));
DBG("\tSerial Number: %s\n", SMBStringForField(structHeader, ((SMBBaseBoard *)structHeader)->serialNumber, privateData));
DBG("\tAsset Tag: %s\n", SMBStringForField(structHeader, ((SMBBaseBoard *)structHeader)->assetTag, neverMask));
// Feature Flags (BYTE)
DBG("\tLocation In Chassis: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->locationInChassis, neverMask)); // Part Component
DBG("\tLocation In Chassis: %s\n", SMBStringForField(structHeader, ((SMBBaseBoard *)structHeader)->locationInChassis, neverMask)); // Part Component
// Chassis Handle (WORD)
if ((structHeader->boardType < kSMBBaseBoardUnknown) || (structHeader->boardType > kSMBBaseBoardInterconnect)) {
if ((((SMBBaseBoard *)structHeader)->boardType < kSMBBaseBoardUnknown) || (((SMBBaseBoard *)structHeader)->boardType > kSMBBaseBoardInterconnect)) {
DBG("\tType: %s\n", OutOfSpecStr);
} else {
DBG("\tType: %s\n", SMBBaseBoardTypes[(structHeader->boardType - 1)]);
}
DBG("\tType: %s\n", SMBBaseBoardTypes[(((SMBBaseBoard *)structHeader)->boardType - 1)]);
}
// Number of Contained Object Handles (n) (BYTE)
// Contained Object Handles n(WORDs)
DBG("\n");
//-------------------------------------------------------------------------------------------------------------------------
// System Enclosure or Chassis (Type 3)
//-------------------------------------------------------------------------------------------------------------------------
void decodeSystemEnclosure(SMBSystemEnclosure *structHeader)
void decodeSystemEnclosure(SMBStructHeader *structHeader)
{
printHeader(structHeader);
DBG("Chassis Information:\n");
DBG("\tManufacturer: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->manufacturer, neverMask));
// DBG("\tType: 0x%X\n", structHeader->chassisType);
if ((structHeader->chassisType < kSMBchassisOther) || (structHeader->chassisType > kSMBchassisBladeEnclosing)) {
DBG("\tManufacturer: %s\n", SMBStringForField(structHeader, ((SMBSystemEnclosure *)structHeader)->manufacturer, neverMask));
if ((((SMBSystemEnclosure *)structHeader)->chassisType < kSMBchassisOther) || (((SMBSystemEnclosure *)structHeader)->chassisType > kSMBchassisBladeEnclosing)) {
DBG("\tType: %s\n", OutOfSpecStr);
} else {
DBG("\tType: %s\n", SMBChassisTypes[(structHeader->chassisType - 1)]);
}
DBG("\tVersion: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->version, neverMask));
DBG("\tSerial Number: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->serialNumber, privateData));
DBG("\tAsset Tag: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->assetTag, neverMask));
DBG("\tType: %s\n", SMBChassisTypes[(((SMBSystemEnclosure *)structHeader)->chassisType - 1)]);
}
DBG("\tVersion: %s\n", SMBStringForField(structHeader, ((SMBSystemEnclosure *)structHeader)->version, neverMask));
DBG("\tSerial Number: %s\n", SMBStringForField(structHeader, ((SMBSystemEnclosure *)structHeader)->serialNumber, privateData));
DBG("\tAsset Tag: %s\n", SMBStringForField(structHeader, ((SMBSystemEnclosure *)structHeader)->assetTag, neverMask));
// Boot-up State:
// Power Supply State
// Thermal State
//-------------------------------------------------------------------------------------------------------------------------
// Processor Information (Type 4)
//-------------------------------------------------------------------------------------------------------------------------
void decodeProcessorInformation(SMBProcessorInformation *structHeader)
void decodeProcessorInformation(SMBStructHeader *structHeader)
{
printHeader(structHeader);
DBG("Processor Information:\n");
DBG("\tSocket Designation: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->socketDesignation, neverMask));
DBG("\tType: %d\n", structHeader->processorType);
DBG("\tFamily: 0x%X\n", structHeader->processorFamily);
DBG("\tManufacturer: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->manufacturer, neverMask));
DBG("\tID: 0x%llX\n", structHeader->processorID);
DBG("\tProcessor Version: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->processorVersion, neverMask));
//DBG("\tVoltage: 0.%xV\n", structHeader->voltage);
DBG("\tExternal Clock: %dMHz\n", structHeader->externalClock);
DBG("\tMaximum Clock: %dMHz\n", structHeader->maximumClock);
DBG("\tCurrent Clock: %dMHz\n", structHeader->currentClock);
if (minorVersion < 3 || structHeader->header.length < 35) {
return;
}
DBG("\tSerial Number: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->serialNumber, privateData));
DBG("\tAsset Tag: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->assetTag, neverMask));
DBG("\tPart Number: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->partNumber, neverMask));
//DBG("\tProcessor Family 2: %d\n", structHeader->processorFamily2);
DBG("\tSocket Designation: %s\n", SMBStringForField(structHeader, ((SMBProcessorInformation *)structHeader)->socketDesignation, neverMask));
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("\tFamily: 0x%X\n", ((SMBProcessorInformation *)structHeader)->processorFamily);
DBG("\tManufacturer: %s\n", SMBStringForField(structHeader, ((SMBProcessorInformation *)structHeader)->manufacturer, neverMask));
DBG("\tID: 0x%llX\n", ((SMBProcessorInformation *)structHeader)->processorID);
DBG("\tProcessor Version: %s\n", SMBStringForField(structHeader, ((SMBProcessorInformation *)structHeader)->processorVersion, neverMask));
//DBG("\tVoltage: 0.%xV\n", ((SMBProcessorInformation *)structHeader)->voltage);
DBG("\tExternal Clock: %dMHz\n", ((SMBProcessorInformation *)structHeader)->externalClock);
DBG("\tMaximal Clock: %dMHz\n", ((SMBProcessorInformation *)structHeader)->maximumClock);
DBG("\tCurrent Clock: %dMHz\n", ((SMBProcessorInformation *)structHeader)->currentClock);
if ((((SMBProcessorInformation *)structHeader)->processorUpgrade < 1) || (((SMBProcessorInformation *)structHeader)->processorUpgrade > 0x2C)) {
DBG("\tUpgrade: %s\n", OutOfSpecStr);
} else {
DBG("\tUpgrade: %s\n", SMBProcessorUpgrades[((SMBProcessorInformation *)structHeader)->processorUpgrade - 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));
//DBG("\tProcessor Family 2: %d\n", ((SMBProcessorInformation *)structHeader)->processorFamily2);
DBG("\n");
}
//-------------------------------------------------------------------------------------------------------------------------
// Memory Module Information (Type 6)
//-------------------------------------------------------------------------------------------------------------------------
//void decodeMemoryModule(SMBMemoryModule *structHeader)
//{
//DBG("Memory Module Information:\n");
//DBG("\tSocket Designation: %s\n", getSMBStringForField((SMBStructHeader *)structHeader, structHeader->socketDesignation));
//DBG("\tBank Connections: Type: %d\n", structHeader->bankConnections);
//DBG("\tCurrent Speed: %X\n", structHeader->currentSpeed);
//DBG("\tCurrent Memory Type: %llX\n", structHeader->currentMemoryType);
//DBG("\tInstalled Size: %d\n", structHeader->installedSize);
//DBG("\tEnabled Size: %d\n", structHeader->enabledSize);
//DBG("\tError Status: %x\n", structHeader->errorStatus);
//DBG("\n");
//}
//-------------------------------------------------------------------------------------------------------------------------
// OEM Strings (Type 11)
//-------------------------------------------------------------------------------------------------------------------------
//void decodeSMBOEMStrings(SMBOEMStrings *structHeader)
//{
//DBG("OEM Strings:\n");
//DBG("\tString 1: %d\n"); //, structHeader->string1);
//DBG("\tString 2: %d\n"); //, structHeader->string1);
//DBG("\tString 3: %d\n"); //, structHeader->string1);
//DBG("\n");
//}
void decodeSMBOEMStrings(SMBStructHeader *structHeader)
{
char *stringPtr = (char *)structHeader + structHeader->length;
printHeader(structHeader);
DBG("OEM Strings:\n");
for (SMBByte i = 1; i <= ((SMBOEMStrings *)structHeader)->count; i++) {
DBG("\tString %d: %s\n", i, stringPtr);
stringPtr = stringPtr + strlen(stringPtr) + 1;
}
DBG("\n");
}
//-------------------------------------------------------------------------------------------------------------------------
// MemoryDevice (Type 17)
//-------------------------------------------------------------------------------------------------------------------------
void decodeMemoryDevice(SMBMemoryDevice *structHeader)
void decodeMemoryDevice(SMBStructHeader *structHeader)
{
printHeader(structHeader);
DBG("Memory Device:\n");
DBG("\tDevice Locator: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->deviceLocator, neverMask));
DBG("\tBank Locator: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->bankLocator, neverMask));
DBG("\tMemory Type: %s\n", SMBMemoryDeviceTypes[structHeader->memoryType]);
if (minorVersion < 3 || structHeader->header.length < 27) {
return;
}
DBG("\tSpeed: %d MHz\n", structHeader->memorySpeed);
DBG("\tError Handle: %x\n", structHeader->errorHandle);
DBG("\tManufacturer: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->manufacturer, neverMask));
DBG("\tSerial Number: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->serialNumber, privateData));
DBG("\tAsset Tag: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->assetTag, neverMask));
DBG("\tPart Number: %s\n", SMBStringForField((SMBStructHeader *)structHeader, structHeader->partNumber, neverMask));
DBG("\tDevice Locator: %s\n", SMBStringForField(structHeader, ((SMBMemoryDevice *)structHeader)->deviceLocator, neverMask));
DBG("\tBank Locator: %s\n", SMBStringForField(structHeader, ((SMBMemoryDevice *)structHeader)->bankLocator, neverMask));
DBG("\tMemory Type: %s\n", SMBMemoryDeviceTypes[((SMBMemoryDevice *)structHeader)->memoryType]);
DBG("\tSpeed: %d MHz\n", ((SMBMemoryDevice *)structHeader)->memorySpeed);
DBG("\tError Handle: %x\n", ((SMBMemoryDevice *)structHeader)->errorHandle);
DBG("\tManufacturer: %s\n", SMBStringForField(structHeader, ((SMBMemoryDevice *)structHeader)->manufacturer, neverMask));
DBG("\tSerial Number: %s\n", SMBStringForField(structHeader, ((SMBMemoryDevice *)structHeader)->serialNumber, privateData));
DBG("\tAsset Tag: %s\n", SMBStringForField(structHeader, ((SMBMemoryDevice *)structHeader)->assetTag, neverMask));
DBG("\tPart Number: %s\n", SMBStringForField(structHeader, ((SMBMemoryDevice *)structHeader)->partNumber, neverMask));
DBG("\n");
}
//-------------------------------------------------------------------------------------------------------------------------
// Apple Specific
//-------------------------------------------------------------------------------------------------------------------------
void decodeOemProcessorType(SMBOemProcessorType *structHeader)
void decodeOemProcessorType(SMBStructHeader *structHeader)
{
DBG("Apple specific Processor Type:\n");
DBG("\tCpu-type: 0x%x\n", ((SMBOemProcessorType *)structHeader)->ProcessorType);
printHeader(structHeader);
DBG("Apple specific Processor Type:\n");
DBG("\tcpu=0x%x\n", ((SMBOemProcessorType *)structHeader)->ProcessorType);
DBG("\n");
}
void decodeOemProcessorBusSpeed(SMBOemProcessorBusSpeed *structHeader)
void decodeOemProcessorBusSpeed(SMBStructHeader *structHeader)
{
DBG("Apple specific Processor Interconnect Speed:\n");
DBG("\tQPI = %d.%dGT/s\n",
((SMBOemProcessorBusSpeed *)structHeader)->ProcessorBusSpeed / 1000,
(((SMBOemProcessorBusSpeed *)structHeader)->ProcessorBusSpeed / 100) % 10);
printHeader(structHeader);
DBG("Apple specific Processor Interconnect Speed:\n");
DBG("\tqpi=%d MT/s\n", ((SMBOemProcessorBusSpeed *)structHeader)->ProcessorBusSpeed);
DBG("\n");
}
//-------------------------------------------------------------------------------------------------------------------------
getBoolForKey(kPrivateData, &privateData, &bootInfo->chameleonConfig); // Bungo: chek if mask some data
DBG("\n");
DBG("SMBIOS rev. %d.%d, DMI rev. %d.%d\n", majorVersion, minorVersion, bcdRevisionHi, bcdRevisionLo);
DBG("\n");
DBG("\n");
DBG("SMBIOS rev.: %d.%d, DMI rev.: %d.%d\n", majorVersion, minorVersion, bcdRevisionHi, bcdRevisionLo);
DBG("\n");
for (;((eps->dmi.tableAddress + eps->dmi.tableLength) > ((uint32_t)(uint8_t *)structHeader + sizeof(SMBStructHeader)));)
{
DBG("Type: %d, Length: %d, Handle: 0x%04x\n",
structHeader->type, structHeader->length, structHeader->handle);
switch (structHeader->type)
{
case kSMBTypeBIOSInformation: // Type 0
decodeBIOSInformation((SMBBIOSInformation *)structHeader);
decodeBIOSInformation(structHeader);
break;
case kSMBTypeSystemInformation: // Type 1
decodeSystemInformation((SMBSystemInformation *)structHeader);
decodeSystemInformation(structHeader);
break;
case kSMBTypeBaseBoard: // Type 2
decodeBaseBoard((SMBBaseBoard *)structHeader);
decodeBaseBoard(structHeader);
break;
case kSMBTypeSystemEnclosure: // Type 3
decodeSystemEnclosure((SMBSystemEnclosure *)structHeader);
decodeSystemEnclosure(structHeader);
break;
case kSMBTypeProcessorInformation: // Type 4
decodeProcessorInformation((SMBProcessorInformation *)structHeader);
decodeProcessorInformation(structHeader);
break;
//case 6: // kSMBTypeMemoryModule: // Type 6
//decodeMemoryModule((SMBMemoryModule *)structHeader);
//decodeMemoryModule(structHeader);
//break;
//case 11: // kSMBOEMStrings: // Type 11
//decodeSMBOEMStrings((SMBOEMStrings *)structHeader);
//break;
case kSMBOEMStrings: // Type 11
decodeSMBOEMStrings(structHeader);
break;
case kSMBTypeMemoryDevice: // Type 17
decodeMemoryDevice((SMBMemoryDevice *)structHeader);
decodeMemoryDevice(structHeader);
break;
//kSMBTypeMemoryArrayMappedAddress: // Type 19
// kSMBTypeMemoryArrayMappedAddress: // Type 19
/* Skip all Apple Specific Structures */
case kSMBTypeFirmwareVolume: // Type 128
case kSMBTypeMemorySPD: // Type 130
break;
// case kSMBTypeFirmwareVolume: // Type 128
// case kSMBTypeMemorySPD: // Type 130
// break;
case kSMBTypeOemProcessorType: // Type 131
decodeOemProcessorType((SMBOemProcessorType *)structHeader);
decodeOemProcessorType(structHeader);
break;
case kSMBTypeOemProcessorBusSpeed: // Type 132
decodeOemProcessorBusSpeed((SMBOemProcessorBusSpeed *)structHeader);
decodeOemProcessorBusSpeed(structHeader);
break;
//kSMBTypeOemPlatformFeature: // Type 133
case kSMBTypeEndOfTable: // Type 127
/* Skip, to be added at the end */
DBG("Type: %d, Length: %d, Handle: 0x%04x\n", structHeader->type, structHeader->length, structHeader->handle);
DBG("End of Table\n");
break;
default:
branches/Bungo/i386/libsaio/smbios.h
9898
9999
100100
101
101
102102
103103
104104
......
240240
241241
242242
243
244
245
246
247
248
243
244
245
246
247
248
249249
250250
251251
......
308308
309309
310310
311
312
313
314
315
316
317
318
319
320
321
322
323
311324
312
325
313326
314327
315328
316
329
317330
318
319
320
321
322
323
324
325
326
327
328
329331
330
331
332
333
334332
335333
336334
......
374372
375373
376374
377
378
379
380
381
375
376
377
378
379
382380
383381
384382
// Port Connector Information (Type 8)
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)
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
//SMBBytecontainedElements;// Elements, possibly defined by other SMBIOS structures present in chassis
//SMBString skuNumber;// Number of null-terminated string describing the chassis or enclosure SKU number (2.7+)
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
// SMBString skuNumber;// Number of null-terminated string describing the chassis or enclosure SKU number (2.7+)
} __attribute__((packed)) SMBSystemEnclosure;
// Bungo: values for SMBSystemEnclosure.chassisType
#define kSMBProcessorInformationMinSize 26
/* ========================================
Values for processorType in Type 4 records
======================================== */
enum
{
kSMBprocessorTypeOther = 0x01,
kSMBprocessorTypeUnknown = 0x02,
kSMBprocessorTypeCPU = 0x03,
kSMBprocessorTypeMPU = 0x04,
kSMBprocessorTypeDSP = 0x05,
kSMBprocessorTypeGPU = 0x06
};
/* =======================================================================
Memory Controller Information (Type 5) Obsoleted since SMBIOS version 2.1
Memory Controller Information (Type 5) Obsolete since SMBIOS version 2.1
========================================================================= */
/* ===================================================================
Memory Module Information (Type 6) Obsoleted since SMBIOS version 2.1
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
/* ========================
Cache Information (Type 7)
========================== */
/* ===================
OEM Strings (Type 11)
===================== */
//typedef struct SMBOEMStrings
//{
//SMB_STRUCT_HEADER // Type 11
//SMBBytecount;// number of strings
//} __attribute__((packed)) SMBOEMStrings;
typedef struct SMBOEMStrings
{
SMB_STRUCT_HEADER // Type 11
SMBBytecount; // number of strings
} __attribute__((packed)) SMBOEMStrings;
/* =============================
Physical Memory Array (Type 16)
branches/Bungo/i386/boot2/prompt.c
2828
2929
3030
31
31
3232
3333
3434
#include <vers.h>
char bootBanner[] = "\nDarwin/x86 boot v" I386BOOT_VERSION " - Chameleon v" I386BOOT_CHAMELEONVERSION " r" I386BOOT_CHAMELEONREVISION "\n"
char bootBanner[] = "\nDarwin/x86 boot v" I386BOOT_VERSION " - Chameleon v" I386BOOT_CHAMELEONVERSION " (Bungo branch) r" I386BOOT_CHAMELEONREVISION "\n"
"Build date: " I386BOOT_BUILDDATE "\n"
"%dMB memory\n";

Archive Download the corresponding diff file

Revision: 2353