1 | /*␊ |
2 | * Copyright (c) 1998-2009 Apple Computer, Inc. All rights reserved.␊ |
3 | *␊ |
4 | * @APPLE_LICENSE_HEADER_START@␊ |
5 | * ␊ |
6 | * The contents of this file constitute Original Code as defined in and␊ |
7 | * are subject to the Apple Public Source License Version 1.1 (the␊ |
8 | * "License"). You may not use this file except in compliance with the␊ |
9 | * License. Please obtain a copy of the License at␊ |
10 | * http://www.apple.com/publicsource and read it before using this file.␊ |
11 | * ␊ |
12 | * This Original Code and all software distributed under the License are␊ |
13 | * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER␊ |
14 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,␊ |
15 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,␊ |
16 | * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the␊ |
17 | * License for the specific language governing rights and limitations␊ |
18 | * under the License.␊ |
19 | * ␊ |
20 | * @APPLE_LICENSE_HEADER_END@␊ |
21 | */␊ |
22 | ␊ |
23 | #ifndef __LIBSAIO_SMBIOS_H␊ |
24 | #define __LIBSAIO_SMBIOS_H␊ |
25 | ␊ |
26 | /* Based on System Management BIOS Reference Specification v2.4 */␊ |
27 | // http://dmtf.org/standards/smbios␊ |
28 | ␊ |
29 | typedef uint8_t SMBString;␊ |
30 | typedef uint8_t SMBByte;␊ |
31 | typedef uint16_t SMBWord;␊ |
32 | typedef uint32_t SMBDWord;␊ |
33 | typedef uint64_t SMBQWord;␊ |
34 | ␊ |
35 | typedef struct DMIEntryPoint␊ |
36 | {␊ |
37 | SMBByte anchor[5];␊ |
38 | SMBByte checksum;␊ |
39 | SMBWord tableLength;␊ |
40 | SMBDWord tableAddress;␊ |
41 | SMBWord structureCount;␊ |
42 | SMBByte bcdRevision;␊ |
43 | } __attribute__((packed)) DMIEntryPoint;␊ |
44 | ␊ |
45 | typedef struct SMBEntryPoint␊ |
46 | {␊ |
47 | SMBByte anchor[4];␊ |
48 | SMBByte checksum;␊ |
49 | SMBByte entryPointLength;␊ |
50 | SMBByte majorVersion;␊ |
51 | SMBByte minorVersion;␊ |
52 | SMBWord maxStructureSize;␊ |
53 | SMBByte entryPointRevision;␊ |
54 | SMBByte formattedArea[5];␊ |
55 | DMIEntryPoint dmi;␊ |
56 | } __attribute__((packed)) SMBEntryPoint;␊ |
57 | ␊ |
58 | /* Header common to all SMBIOS structures */␊ |
59 | typedef struct SMBStructHeader␊ |
60 | {␊ |
61 | ␉SMBByte␉type;␊ |
62 | ␉SMBByte␉length;␊ |
63 | ␉SMBWord␉handle;␊ |
64 | //␉SMBByte␉*data;␊ |
65 | } __attribute__((packed)) SMBStructHeader;␊ |
66 | ␊ |
67 | #define SMB_STRUCT_HEADER SMBStructHeader header;␊ |
68 | ␊ |
69 | typedef struct SMBAnchor␊ |
70 | {␊ |
71 | ␉const SMBStructHeader *␉header;␊ |
72 | ␉const uint8_t *␉␉␉next;␊ |
73 | ␉const uint8_t *␉␉␉end;␊ |
74 | } SMBAnchor;␊ |
75 | ␊ |
76 | #define SMB_ANCHOR_IS_VALID(x)␉\␊ |
77 | ␉((x) && ((x)->header) && ((x)->next) && ((x)->end))␊ |
78 | ␊ |
79 | #define SMB_ANCHOR_RESET(x)␉␉\␊ |
80 | ␉bzero(x, sizeof(typedef struct SMBAnchor));␊ |
81 | ␊ |
82 | /* ======================= SMBIOS structure types. ======================= */␊ |
83 | enum␊ |
84 | {␊ |
85 | ␉kSMBTypeBIOSInformation␉␉␉= 0, // BIOS information (Type 0)␊ |
86 | ␉kSMBTypeSystemInformation␉␉= 1, // System Information (Type 1)␊ |
87 | ␉kSMBTypeBaseBoard␉␉␉= 2, // BaseBoard Information (Type 2)␊ |
88 | ␉kSMBTypeSystemEnclosure␉␉␉= 3, // System Chassis Information (Type 3)␊ |
89 | ␉kSMBTypeProcessorInformation␉␉= 4, // Processor Information (Type 4)␊ |
90 | ␉// Memory Controller Information (Type 5) Obsolete␊ |
91 | ␉kSMBTypeMemoryModule␉␉␉= 6, // Memory Module Information (Type 6) Obsolete␊ |
92 | ␉kSMBTypeCacheInformation␉␉= 7, // Cache Information (Type 7)␊ |
93 | ␉// Port Connector Information (Type 8)␊ |
94 | ␉kSMBTypeSystemSlot␉␉␉= 9, // System Slots (Type 9)␊ |
95 | ␉// On Board Devices Information (Type 10) Obsolete␊ |
96 | ␉kSMBOEMStrings␉␉␉= 11 ,// OEM Strings (Type 11)␊ |
97 | ␉// System Configuration Options (Type 12)␊ |
98 | ␉// BIOS Language Information (Type 13)␊ |
99 | ␉// Group Associations (Type 14)␊ |
100 | ␉// System Event Log (Type 15)␊ |
101 | ␉kSMBTypePhysicalMemoryArray␉␉= 16, // Physical Memory Array (Type 16)␊ |
102 | ␉kSMBTypeMemoryDevice␉␉␉= 17, // Memory Device (Type 17)␊ |
103 | ␉kSMBType32BitMemoryErrorInfo␉␉= 18, // 32-Bit Memory Error Information (Type 18)␊ |
104 | ␉// Memory Array Mapped Address (Type 19)␊ |
105 | ␉// Memory Device Mapped Address (Type 20)␊ |
106 | ␉// Built-in Pointing Device (Type 21)␊ |
107 | ␉// Portable Battery (Type 22)␊ |
108 | ␉// System Reset (Type 23)␊ |
109 | ␉// Hardware Security (Type 24)␊ |
110 | ␉// System Power Controls (Type 25)␊ |
111 | ␉// Voltage Probe (Type 26)␊ |
112 | ␉// Cooling Device (Type 27)␊ |
113 | ␉// Temperature Probe (Type 28)␊ |
114 | ␉// Electrical Current Probe (Type 29)␊ |
115 | ␉// Out-of-Band Remote Access (Type 30)␊ |
116 | ␉// Boot Integrity Service (BIS) Entry Point (Type 31)␊ |
117 | ␉// System Boot Information (Type 32)␊ |
118 | ␉kSMBType64BitMemoryErrorInfo␉␉= 33, // 64-Bit Memory Error Information (Type 33)␊ |
119 | ␉// Managment Device (Type 34)␊ |
120 | ␉// Managment Device Component (Type 35)␊ |
121 | ␉// Management Device Threshold Data (Type 36)␊ |
122 | ␉// Memory Channel (Type 37)␊ |
123 | ␉// IPMI Device Information (Type 38)␊ |
124 | ␉// System Power Supply (Type 39)␊ |
125 | ␉// Additional Information (Type 40)␊ |
126 | ␉// Onboard Devices Extended Information (Type 41)␊ |
127 | ␉// Management Controlle Host Interface (Type 42)␊ |
128 | ␊ |
129 | ␉// Inactive (Type 126)␊ |
130 | ␉kSMBTypeEndOfTable␉␉␉= 127, // End-of-Table (Type 127)␊ |
131 | ␊ |
132 | ␉// Apple Specific Structures␊ |
133 | ␉kSMBTypeFirmwareVolume␉␉␉= 128, // FirmwareVolume (TYPE 128)␊ |
134 | ␉kSMBTypeMemorySPD␉␉␉= 130, // MemorySPD (TYPE 130)␊ |
135 | ␉kSMBTypeOemProcessorType␉␉= 131, // Processor Type (Type 131)␊ |
136 | ␉kSMBTypeOemProcessorBusSpeed␉␉= 132, // Processor Bus Speed (Type 132)␊ |
137 | ␉kSMBTypeOemPlatformFeature␉␉= 133 // Platform Feature (Type 133)␊ |
138 | };␊ |
139 | ␊ |
140 | //----------------------------------------------------------------------------------------------------------␊ |
141 | // Struct - BIOS Information (Type 0), Apple uses 24 bytes length␊ |
142 | typedef struct SMBBIOSInformation␊ |
143 | {␊ |
144 | SMB_STRUCT_HEADER␊ |
145 | SMBString vendor; // BIOS vendor name␊ |
146 | SMBString version; // BIOS version␊ |
147 | SMBWord startSegment; // BIOS segment start␊ |
148 | SMBString releaseDate; // BIOS release date␊ |
149 | SMBByte romSize; // BIOS ROM Size (n); 64K * (n+1) bytes␊ |
150 | SMBQWord characteristics; // supported BIOS functions␊ |
151 | // Bungo␊ |
152 | SMBByte characteristicsExt1; // BIOS characteristics extension byte 1␊ |
153 | SMBByte characteristicsExt2; // BIOS characteristics extension byte 2␊ |
154 | SMBByte releaseMajor; // BIOS release (major)␊ |
155 | SMBByte releaseMinor; // BIOS release (minor)␊ |
156 | SMBByte ECreleaseMajor; // Embedded Controller firmware release (major)␊ |
157 | SMBByte ECreleaseMinor; // Embedded Controller firmware release (minor)␊ |
158 | } __attribute__((packed)) SMBBIOSInformation;␊ |
159 | ␊ |
160 | //----------------------------------------------------------------------------------------------------------␊ |
161 | // Struct - System Information (Type 1), Apple uses 27 bytes length␊ |
162 | typedef struct SMBSystemInformation␊ |
163 | {␊ |
164 | // 2.0+ spec (8 bytes)␊ |
165 | SMB_STRUCT_HEADER␊ |
166 | SMBString manufacturer;␊ |
167 | SMBString productName;␊ |
168 | SMBString version;␊ |
169 | SMBString serialNumber;␊ |
170 | // 2.1+ spec (25 bytes)␊ |
171 | SMBByte uuid[16]; // can be all 0 or all 1's␊ |
172 | SMBByte wakeupReason; // reason for system wakeup␊ |
173 | // 2.4+ spec (27 bytes)␊ |
174 | SMBString skuNumber;␊ |
175 | SMBString family;␊ |
176 | } __attribute__((packed)) SMBSystemInformation;␊ |
177 | ␊ |
178 | //----------------------------------------------------------------------------------------------------------␊ |
179 | // Base Board (or Module) Information (Type 2)␊ |
180 | ␊ |
181 | // Base Board - Board Type.␊ |
182 | // Values for SMBBaseBoard.boardType␊ |
183 | typedef enum␊ |
184 | {␊ |
185 | kSMBBaseBoardUnknown = 0x01,␉// Unknow␊ |
186 | kSMBBaseBoardOther = 0x02,␉// Other␊ |
187 | kSMBBaseBoardServerBlade = 0x03,␉// Server Blade␊ |
188 | kSMBBaseBoardConnectivitySwitch = 0x04,␉// Connectivity Switch␊ |
189 | kSMBBaseBoardSystemMgmtModule = 0x05,␉// System Management Module␊ |
190 | kSMBBaseBoardProcessorModule = 0x06,␉// Processor Module␊ |
191 | kSMBBaseBoardIOModule = 0x07,␉// I/O Module␊ |
192 | kSMBBaseBoardMemoryModule = 0x08,␉// Memory Module␊ |
193 | kSMBBaseBoardDaughter = 0x09,␉// Daughter Board␊ |
194 | kSMBBaseBoardMotherboard = 0x0A,␉// Motherboard (includes processor, memory, and I/O)␊ |
195 | kSMBBaseBoardProcessorMemoryModule = 0x0B,␉// Processor/Memory Module␊ |
196 | kSMBBaseBoardProcessorIOModule = 0x0C,␉// Processor/IO Module␊ |
197 | kSMBBaseBoardInterconnect = 0x0D␉// Interconnect board␊ |
198 | } BASE_BOARD_TYPE;␊ |
199 | ␊ |
200 | // Struct - Base Board (or Module) Information (Type 2), Apple uses 16 bytes length␊ |
201 | typedef struct SMBBaseBoard␊ |
202 | {␊ |
203 | ␉SMB_STRUCT_HEADER // Type 2␊ |
204 | ␉SMBString␉manufacturer;␊ |
205 | ␉SMBString␉product;␊ |
206 | ␉SMBString␉version;␊ |
207 | ␉SMBString␉serialNumber;␊ |
208 | ␉SMBString␉assetTag;␉␉␉// Bungo: renamed from assetTagNumber folowing convention␊ |
209 | ␉SMBByte featureFlags;␉␉␉// Collection of flag that identify features of this baseboard␊ |
210 | ␉SMBString␉locationInChassis;␊ |
211 | ␉SMBWord chassisHandle;␊ |
212 | ␉SMBByte boardType;␉␉␉␉// Type of board, numeration value from BASE_BOARD_TYPE.␊ |
213 | ␉SMBByte numberOfContainedHandles;␊ |
214 | ␉// 0 - 255 contained handles go here but we do not include␊ |
215 | ␉// them in our structure. Be careful to use numberOfContainedHandles␊ |
216 | ␉// times sizeof(SMBWord) when computing the actual record size,␊ |
217 | ␉// if you need it.␊ |
218 | ␉SMBByte containedObjectHandles;␊ |
219 | } __attribute__((packed)) SMBBaseBoard;␊ |
220 | ␊ |
221 | //----------------------------------------------------------------------------------------------------------␊ |
222 | // System Enclosure (Type 3)␊ |
223 | ␊ |
224 | // Bungo: values for SMBSystemEnclosure.chassisType␊ |
225 | typedef enum {␊ |
226 | kSMBchassisOther = 0x01,␊ |
227 | kSMBchassisUnknown = 0x02,␊ |
228 | kSMBchassisDesktop = 0x03,␊ |
229 | kSMBchassisLPDesktop = 0x04,␊ |
230 | kSMBchassisPizzaBox = 0x05,␊ |
231 | kSMBchassisMiniTower = 0x06,␊ |
232 | kSMBchassisTower = 0x07,␊ |
233 | kSMBchassisPortable = 0x08,␊ |
234 | kSMBchassisLaptop = 0x09,␊ |
235 | kSMBchassisNotebook = 0x0A,␊ |
236 | kSMBchassisHandHeld = 0x0B,␊ |
237 | kSMBchassisDockingStation = 0x0C,␊ |
238 | kSMBchassisAllInOne = 0x0D,␊ |
239 | kSMBchassisSubNotebook = 0x0E,␊ |
240 | // ... fill up if needed ;-)␊ |
241 | kSMBchassisLunchBox = 0x10,␊ |
242 | // ... fill up if needed ;-)␊ |
243 | kSMBchassisBladeEnclosing = 0x1D␊ |
244 | } MISC_CHASSIS_TYPE;␊ |
245 | ␊ |
246 | // System Enclosure or Chassis States.␊ |
247 | // values for SMBSystemEnclosure.bootupState␊ |
248 | // values for SMBSystemEnclosure.powerSupplyState␊ |
249 | // values for SMBSystemEnclosure.thermalState␊ |
250 | typedef enum {␊ |
251 | kSMBChassisStateOther = 0x01,␊ |
252 | kSMBChassisStateUnknown = 0x02,␊ |
253 | kSMBChassisStateSafe = 0x03,␊ |
254 | kSMBChassisStateWarning = 0x04,␊ |
255 | kSMBChassisStateCritical = 0x05,␊ |
256 | kSMBChassisStateNonRecoverable = 0x06␊ |
257 | } MISC_CHASSIS_STATE;␊ |
258 | ␊ |
259 | // System Enclosure or Chassis Security Status.␊ |
260 | // values for SMBSystemEnclosure.securityStatus␊ |
261 | typedef enum {␊ |
262 | kSMBChassisSecurityStatusOther = 0x01,␊ |
263 | kSMBChassisSecurityStatusUnknown = 0x02,␊ |
264 | kSMBChassisSecurityStatusNone = 0x03,␊ |
265 | kSMBChassisSecurityStatusExternalInterfaceLockedOut = 0x04,␊ |
266 | kSMBChassisSecurityStatusExternalInterfaceLockedEnabled = 0x05␊ |
267 | } MISC_CHASSIS_SECURITY_STATE;␊ |
268 | ␊ |
269 | // Struct - System Enclosure (Type 3), Apple uses 21 bytes length␊ |
270 | typedef struct SMBSystemEnclosure␊ |
271 | {␊ |
272 | ␉SMB_STRUCT_HEADER // Type 3␊ |
273 | ␉SMBString manufacturer;␊ |
274 | ␉SMBByte chassisType;␉␉// System Enclosure Indicator␊ |
275 | ␉SMBString version;␉␉// Board Number?␊ |
276 | ␉SMBString serialNumber;␊ |
277 | ␉SMBString assetTag;␉␉// Bungo: renamed from assetTagNumber folowing convention␊ |
278 | ␉SMBByte bootupState;␉␉// State of enclosure when when it was last booted␊ |
279 | ␉SMBByte powerSupplyState;␉// State of enclosure's power supply when last booted␊ |
280 | ␉SMBByte thermalState;␉// Thermal state of the enclosure when last booted␊ |
281 | ␉SMBByte securityStatus;␉// Physical security status of the enclosure when last booted␊ |
282 | ␉SMBDWord oemDefined;␉␉// OEM- or BIOS vendor-specific information␊ |
283 | ␉SMBByte height;␉␉// Height of the enclosure, in 'U's␊ |
284 | ␉SMBByte numberOfPowerCords;␉// Number of power cords associated with the enclosure or chassis␊ |
285 | ␉SMBByte containedElementCount;␉// Number of Contained Element record that follow, in the range 0 to 255␊ |
286 | //␉SMBByte containedElementRecord;␉// Byte leght of each Contained Element record that follow, in the range 0 to 255␊ |
287 | //␉SMBByte containedElements;␉// Elements, possibly defined by other SMBIOS structures present in chassis␊ |
288 | // 2.7+␊ |
289 | //␉SMBString skuNumber;␉␉// Number of null-terminated string describing the chassis or enclosure SKU number␊ |
290 | } __attribute__((packed)) SMBSystemEnclosure;␊ |
291 | ␊ |
292 | //----------------------------------------------------------------------------------------------------------␊ |
293 | // Processor Information (Type 4)␊ |
294 | #define kSMBProcessorInformationMinSize 26␊ |
295 | ␊ |
296 | // Processor Information - Processor Type.␊ |
297 | // Values for SMBProcessorInformation.processorType␊ |
298 | typedef enum␊ |
299 | {␊ |
300 | ␉kSMBprocessorTypeOther = 0x01,␊ |
301 | ␉kSMBprocessorTypeUnknown = 0x02,␊ |
302 | ␉kSMBprocessorTypeCPU = 0x03,␊ |
303 | ␉kSMBprocessorTypeMPU = 0x04,␊ |
304 | ␉kSMBprocessorTypeDSP = 0x05,␊ |
305 | ␉kSMBprocessorTypeGPU = 0x06␊ |
306 | } PROCESSOR_TYPE_DATA;␊ |
307 | ␊ |
308 | // Processor Information - Processor Family.␊ |
309 | // Values for SMBProcessorInformation.processorFamily␊ |
310 | typedef enum {␊ |
311 | kSMBprocessorFamilyOther = 0x01,␊ |
312 | kSMBprocessorFamilyUnknown = 0x02,␊ |
313 | kSMBprocessorFamily8086 = 0x03,␊ |
314 | kSMBprocessorFamily80286 = 0x04,␊ |
315 | kSMBprocessorFamilyIntel386 = 0x05,␊ |
316 | kSMBprocessorFamilyIntel486 = 0x06,␊ |
317 | kSMBprocessorFamily8087 = 0x07,␊ |
318 | kSMBprocessorFamily80287 = 0x08,␊ |
319 | kSMBprocessorFamily80387 = 0x09,␊ |
320 | kSMBprocessorFamily80487 = 0x0A,␊ |
321 | kSMBprocessorFamilyPentium = 0x0B,␊ |
322 | kSMBprocessorFamilyPentiumPro = 0x0C,␊ |
323 | kSMBprocessorFamilyPentiumII = 0x0D,␊ |
324 | kSMBprocessorFamilyPentiumMMX = 0x0E,␊ |
325 | kSMBprocessorFamilyCeleron = 0x0F,␊ |
326 | kSMBprocessorFamilyPentiumIIXeon = 0x10,␊ |
327 | kSMBprocessorFamilyPentiumIII = 0x11,␊ |
328 | kSMBprocessorFamilyM1 = 0x12,␊ |
329 | kSMBprocessorFamilyM2 = 0x13,␊ |
330 | kSMBprocessorFamilyIntelCeleronM = 0x14,␊ |
331 | kSMBprocessorFamilyIntelPentium4Ht = 0x15,␊ |
332 | kSMBprocessorFamilyM1Reserved4 = 0x16,␊ |
333 | kSMBprocessorFamilyM1Reserved5 = 0x17,␊ |
334 | kSMBprocessorFamilyAmdDuron = 0x18,␊ |
335 | kSMBprocessorFamilyK5 = 0x19,␊ |
336 | kSMBprocessorFamilyK6 = 0x1A,␊ |
337 | kSMBprocessorFamilyK6_2 = 0x1B,␊ |
338 | kSMBprocessorFamilyK6_3 = 0x1C,␊ |
339 | kSMBprocessorFamilyAmdAthlon = 0x1D,␊ |
340 | kSMBprocessorFamilyAmd29000 = 0x1E,␊ |
341 | kSMBprocessorFamilyK6_2Plus = 0x1F,␊ |
342 | kSMBprocessorFamilyPowerPC = 0x20,␊ |
343 | kSMBprocessorFamilyPowerPC601 = 0x21,␊ |
344 | kSMBprocessorFamilyPowerPC603 = 0x22,␊ |
345 | kSMBprocessorFamilyPowerPC603Plus = 0x23,␊ |
346 | kSMBprocessorFamilyPowerPC604 = 0x24,␊ |
347 | kSMBprocessorFamilyPowerPC620 = 0x25,␊ |
348 | kSMBprocessorFamilyPowerPCx704 = 0x26,␊ |
349 | kSMBprocessorFamilyPowerPC750 = 0x27,␊ |
350 | kSMBprocessorFamilyIntelCoreDuo = 0x28,␊ |
351 | kSMBprocessorFamilyIntelCoreDuoMobile = 0x29,␊ |
352 | kSMBprocessorFamilyIntelCoreSoloMobile = 0x2A,␊ |
353 | kSMBprocessorFamilyIntelAtom = 0x2B,␊ |
354 | kSMBprocessorFamilyAlpha3 = 0x30,␊ |
355 | kSMBprocessorFamilyAlpha21064 = 0x31,␊ |
356 | kSMBprocessorFamilyAlpha21066 = 0x32,␊ |
357 | kSMBprocessorFamilyAlpha21164 = 0x33,␊ |
358 | kSMBprocessorFamilyAlpha21164PC = 0x34,␊ |
359 | kSMBprocessorFamilyAlpha21164a = 0x35,␊ |
360 | kSMBprocessorFamilyAlpha21264 = 0x36,␊ |
361 | kSMBprocessorFamilyAlpha21364 = 0x37,␊ |
362 | kSMBprocessorFamilyAmdTurionIIUltraDualCoreMobileM = 0x38,␊ |
363 | kSMBprocessorFamilyAmdTurionIIDualCoreMobileM = 0x39,␊ |
364 | kSMBprocessorFamilyAmdAthlonIIDualCoreM = 0x3A,␊ |
365 | kSMBprocessorFamilyAmdOpteron6100Series = 0x3B,␊ |
366 | kSMBprocessorFamilyAmdOpteron4100Series = 0x3C,␊ |
367 | kSMBprocessorFamilyAmdOpteron6200Series = 0x3D,␊ |
368 | kSMBprocessorFamilyAmdOpteron4200Series = 0x3E,␊ |
369 | kSMBprocessorFamilyMips = 0x40,␊ |
370 | kSMBprocessorFamilyMIPSR4000 = 0x41,␊ |
371 | kSMBprocessorFamilyMIPSR4200 = 0x42,␊ |
372 | kSMBprocessorFamilyMIPSR4400 = 0x43,␊ |
373 | kSMBprocessorFamilyMIPSR4600 = 0x44,␊ |
374 | kSMBprocessorFamilyMIPSR10000 = 0x45,␊ |
375 | kSMBprocessorFamilyAmdCSeries = 0x46,␊ |
376 | kSMBprocessorFamilyAmdESeries = 0x47,␊ |
377 | kSMBprocessorFamilyAmdSSeries = 0x48,␊ |
378 | kSMBprocessorFamilyAmdGSeries = 0x49,␊ |
379 | kSMBprocessorFamilySparc = 0x50,␊ |
380 | kSMBprocessorFamilySuperSparc = 0x51,␊ |
381 | kSMBprocessorFamilymicroSparcII = 0x52,␊ |
382 | kSMBprocessorFamilymicroSparcIIep = 0x53,␊ |
383 | kSMBprocessorFamilyUltraSparc = 0x54,␊ |
384 | kSMBprocessorFamilyUltraSparcII = 0x55,␊ |
385 | kSMBprocessorFamilyUltraSparcIIi = 0x56,␊ |
386 | kSMBprocessorFamilyUltraSparcIII = 0x57,␊ |
387 | kSMBprocessorFamilyUltraSparcIIIi = 0x58,␊ |
388 | kSMBprocessorFamily68040 = 0x60,␊ |
389 | kSMBprocessorFamily68xxx = 0x61,␊ |
390 | kSMBprocessorFamily68000 = 0x62,␊ |
391 | kSMBprocessorFamily68010 = 0x63,␊ |
392 | kSMBprocessorFamily68020 = 0x64,␊ |
393 | kSMBprocessorFamily68030 = 0x65,␊ |
394 | kSMBprocessorFamilyHobbit = 0x70,␊ |
395 | kSMBprocessorFamilyCrusoeTM5000 = 0x78,␊ |
396 | kSMBprocessorFamilyCrusoeTM3000 = 0x79,␊ |
397 | kSMBprocessorFamilyEfficeonTM8000 = 0x7A,␊ |
398 | kSMBprocessorFamilyWeitek = 0x80,␊ |
399 | kSMBprocessorFamilyItanium = 0x82,␊ |
400 | kSMBprocessorFamilyAmdAthlon64 = 0x83,␊ |
401 | kSMBprocessorFamilyAmdOpteron = 0x84,␊ |
402 | kSMBprocessorFamilyAmdSempron = 0x85,␊ |
403 | kSMBprocessorFamilyAmdTurion64Mobile = 0x86,␊ |
404 | kSMBprocessorFamilyDualCoreAmdOpteron = 0x87,␊ |
405 | kSMBprocessorFamilyAmdAthlon64X2DualCore = 0x88,␊ |
406 | kSMBprocessorFamilyAmdTurion64X2Mobile = 0x89,␊ |
407 | kSMBprocessorFamilyQuadCoreAmdOpteron = 0x8A,␊ |
408 | kSMBprocessorFamilyThirdGenerationAmdOpteron = 0x8B,␊ |
409 | kSMBprocessorFamilyAmdPhenomFxQuadCore = 0x8C,␊ |
410 | kSMBprocessorFamilyAmdPhenomX4QuadCore = 0x8D,␊ |
411 | kSMBprocessorFamilyAmdPhenomX2DualCore = 0x8E,␊ |
412 | kSMBprocessorFamilyAmdAthlonX2DualCore = 0x8F,␊ |
413 | kSMBprocessorFamilyPARISC = 0x90,␊ |
414 | kSMBprocessorFamilyPaRisc8500 = 0x91,␊ |
415 | kSMBprocessorFamilyPaRisc8000 = 0x92,␊ |
416 | kSMBprocessorFamilyPaRisc7300LC = 0x93,␊ |
417 | kSMBprocessorFamilyPaRisc7200 = 0x94,␊ |
418 | kSMBprocessorFamilyPaRisc7100LC = 0x95,␊ |
419 | kSMBprocessorFamilyPaRisc7100 = 0x96,␊ |
420 | kSMBprocessorFamilyV30 = 0xA0,␊ |
421 | kSMBprocessorFamilyQuadCoreIntelXeon3200Series = 0xA1,␊ |
422 | kSMBprocessorFamilyDualCoreIntelXeon3000Series = 0xA2,␊ |
423 | kSMBprocessorFamilyQuadCoreIntelXeon5300Series = 0xA3,␊ |
424 | kSMBprocessorFamilyDualCoreIntelXeon5100Series = 0xA4,␊ |
425 | kSMBprocessorFamilyDualCoreIntelXeon5000Series = 0xA5,␊ |
426 | kSMBprocessorFamilyDualCoreIntelXeonLV = 0xA6,␊ |
427 | kSMBprocessorFamilyDualCoreIntelXeonULV = 0xA7,␊ |
428 | kSMBprocessorFamilyDualCoreIntelXeon7100Series = 0xA8,␊ |
429 | kSMBprocessorFamilyQuadCoreIntelXeon5400Series = 0xA9,␊ |
430 | kSMBprocessorFamilyQuadCoreIntelXeon = 0xAA,␊ |
431 | kSMBprocessorFamilyDualCoreIntelXeon5200Series = 0xAB,␊ |
432 | kSMBprocessorFamilyDualCoreIntelXeon7200Series = 0xAC,␊ |
433 | kSMBprocessorFamilyQuadCoreIntelXeon7300Series = 0xAD,␊ |
434 | kSMBprocessorFamilyQuadCoreIntelXeon7400Series = 0xAE,␊ |
435 | kSMBprocessorFamilyMultiCoreIntelXeon7400Series = 0xAF,␊ |
436 | kSMBprocessorFamilyPentiumIIIXeon = 0xB0,␊ |
437 | kSMBprocessorFamilyPentiumIIISpeedStep = 0xB1,␊ |
438 | kSMBprocessorFamilyPentium4 = 0xB2,␊ |
439 | kSMBprocessorFamilyIntelXeon = 0xB3,␊ |
440 | kSMBprocessorFamilyAS400 = 0xB4,␊ |
441 | kSMBprocessorFamilyIntelXeonMP = 0xB5,␊ |
442 | kSMBprocessorFamilyAMDAthlonXP = 0xB6,␊ |
443 | kSMBprocessorFamilyAMDAthlonMP = 0xB7,␊ |
444 | kSMBprocessorFamilyIntelItanium2 = 0xB8,␊ |
445 | kSMBprocessorFamilyIntelPentiumM = 0xB9,␊ |
446 | kSMBprocessorFamilyIntelCeleronD = 0xBA,␊ |
447 | kSMBprocessorFamilyIntelPentiumD = 0xBB,␊ |
448 | kSMBprocessorFamilyIntelPentiumEx = 0xBC,␊ |
449 | kSMBprocessorFamilyIntelCoreSolo = 0xBD, ///< SMBIOS spec 2.6 correct this value␊ |
450 | kSMBprocessorFamilyReserved = 0xBE,␊ |
451 | kSMBprocessorFamilyIntelCore2 = 0xBF,␊ |
452 | kSMBprocessorFamilyIntelCore2Solo = 0xC0,␊ |
453 | kSMBprocessorFamilyIntelCore2Extreme = 0xC1,␊ |
454 | kSMBprocessorFamilyIntelCore2Quad = 0xC2,␊ |
455 | kSMBprocessorFamilyIntelCore2ExtremeMobile = 0xC3,␊ |
456 | kSMBprocessorFamilyIntelCore2DuoMobile = 0xC4,␊ |
457 | kSMBprocessorFamilyIntelCore2SoloMobile = 0xC5,␊ |
458 | kSMBprocessorFamilyIntelCoreI7 = 0xC6,␊ |
459 | kSMBprocessorFamilyDualCoreIntelCeleron = 0xC7,␊ |
460 | kSMBprocessorFamilyIBM390 = 0xC8,␊ |
461 | kSMBprocessorFamilyG4 = 0xC9,␊ |
462 | kSMBprocessorFamilyG5 = 0xCA,␊ |
463 | kSMBprocessorFamilyG6 = 0xCB,␊ |
464 | kSMBprocessorFamilyzArchitectur = 0xCC,␊ |
465 | kSMBprocessorFamilyIntelCoreI5 = 0xCD,␊ |
466 | kSMBprocessorFamilyIntelCoreI3 = 0xCE,␊ |
467 | kSMBprocessorFamilyViaC7M = 0xD2,␊ |
468 | kSMBprocessorFamilyViaC7D = 0xD3,␊ |
469 | kSMBprocessorFamilyViaC7 = 0xD4,␊ |
470 | kSMBprocessorFamilyViaEden = 0xD5,␊ |
471 | kSMBprocessorFamilyMultiCoreIntelXeon = 0xD6,␊ |
472 | kSMBprocessorFamilyDualCoreIntelXeon3Series = 0xD7,␊ |
473 | kSMBprocessorFamilyQuadCoreIntelXeon3Series = 0xD8,␊ |
474 | kSMBprocessorFamilyViaNano = 0xD9,␊ |
475 | kSMBprocessorFamilyDualCoreIntelXeon5Series = 0xDA,␊ |
476 | kSMBprocessorFamilyQuadCoreIntelXeon5Series = 0xDB,␊ |
477 | kSMBprocessorFamilyDualCoreIntelXeon7Series = 0xDD,␊ |
478 | kSMBprocessorFamilyQuadCoreIntelXeon7Series = 0xDE,␊ |
479 | kSMBprocessorFamilyMultiCoreIntelXeon7Series = 0xDF,␊ |
480 | kSMBprocessorFamilyMultiCoreIntelXeon3400Series = 0xE0,␊ |
481 | kSMBprocessorFamilyEmbeddedAmdOpteronQuadCore = 0xE6,␊ |
482 | kSMBprocessorFamilyAmdPhenomTripleCore = 0xE7,␊ |
483 | kSMBprocessorFamilyAmdTurionUltraDualCoreMobile = 0xE8,␊ |
484 | kSMBprocessorFamilyAmdTurionDualCoreMobile = 0xE9,␊ |
485 | kSMBprocessorFamilyAmdAthlonDualCore = 0xEA,␊ |
486 | kSMBprocessorFamilyAmdSempronSI = 0xEB,␊ |
487 | kSMBprocessorFamilyAmdPhenomII = 0xEC,␊ |
488 | kSMBprocessorFamilyAmdAthlonII = 0xED,␊ |
489 | kSMBprocessorFamilySixCoreAmdOpteron = 0xEE,␊ |
490 | kSMBprocessorFamilyAmdSempronM = 0xEF,␊ |
491 | kSMBprocessorFamilyi860 = 0xFA,␊ |
492 | kSMBprocessorFamilyi960 = 0xFB,␊ |
493 | kSMBprocessorFamilyIndicatorFamily2 = 0xFE,␊ |
494 | kSMBprocessorFamilyReserved1 = 0xFF␊ |
495 | } PROCESSOR_FAMILY_DATA;␊ |
496 | ␊ |
497 | // Processor Information - Processor Upgrade.␊ |
498 | // Values for SMBProcessorInformation.processorUpgrade␊ |
499 | typedef enum {␊ |
500 | kSMBprocessorUpgradeOther = 0x01,␊ |
501 | kSMBprocessorUpgradeUnknown = 0x02,␊ |
502 | kSMBprocessorUpgradeDaughterBoard = 0x03,␊ |
503 | kSMBprocessorUpgradeZIFSocket = 0x04,␊ |
504 | kSMBprocessorUpgradePiggyBack = 0x05, ///< Replaceable.␊ |
505 | kSMBprocessorUpgradeNone = 0x06,␊ |
506 | kSMBprocessorUpgradeLIFSocket = 0x07,␊ |
507 | kSMBprocessorUpgradeSlot1 = 0x08,␊ |
508 | kSMBprocessorUpgradeSlot2 = 0x09,␊ |
509 | kSMBprocessorUpgrade370PinSocket = 0x0A,␊ |
510 | kSMBprocessorUpgradeSlotA = 0x0B,␊ |
511 | kSMBprocessorUpgradeSlotM = 0x0C,␊ |
512 | kSMBprocessorUpgradeSocket423 = 0x0D,␊ |
513 | kSMBprocessorUpgradeSocketA = 0x0E, ///< Socket 462.␊ |
514 | kSMBprocessorUpgradeSocket478 = 0x0F,␊ |
515 | kSMBprocessorUpgradeSocket754 = 0x10,␊ |
516 | kSMBprocessorUpgradeSocket940 = 0x11,␊ |
517 | kSMBprocessorUpgradeSocket939 = 0x12,␊ |
518 | kSMBprocessorUpgradeSocketmPGA604 = 0x13,␊ |
519 | kSMBprocessorUpgradeSocketLGA771 = 0x14,␊ |
520 | kSMBprocessorUpgradeSocketLGA775 = 0x15,␊ |
521 | kSMBprocessorUpgradeSocketS1 = 0x16,␊ |
522 | kSMBprocessorUpgradeAM2 = 0x17,␊ |
523 | kSMBprocessorUpgradeF1207 = 0x18,␊ |
524 | kSMBprocessorUpgradeSocketLGA1366 = 0x19,␊ |
525 | kSMBprocessorUpgradeSocketG34 = 0x1A,␊ |
526 | kSMBprocessorUpgradeSocketAM3 = 0x1B,␊ |
527 | kSMBprocessorUpgradeSocketC32 = 0x1C,␊ |
528 | kSMBprocessorUpgradeSocketLGA1156 = 0x1D,␊ |
529 | kSMBprocessorUpgradeSocketLGA1567 = 0x1E,␊ |
530 | kSMBprocessorUpgradeSocketPGA988A = 0x1F,␊ |
531 | kSMBprocessorUpgradeSocketBGA1288 = 0x20,␊ |
532 | kSMBprocessorUpgradeSocketrPGA988B = 0x21,␊ |
533 | kSMBprocessorUpgradeSocketBGA1023 = 0x22,␊ |
534 | kSMBprocessorUpgradeSocketBGA1224 = 0x23,␊ |
535 | kSMBprocessorUpgradeSocketBGA1155 = 0x24,␊ |
536 | kSMBprocessorUpgradeSocketLGA1356 = 0x25,␊ |
537 | kSMBprocessorUpgradeSocketLGA2011 = 0x26,␊ |
538 | kSMBprocessorUpgradeSocketFS1 = 0x27,␊ |
539 | kSMBprocessorUpgradeSocketFS2 = 0x28,␊ |
540 | kSMBprocessorUpgradeSocketFM1 = 0x29,␊ |
541 | kSMBprocessorUpgradeSocketFM2 = 0x2A␊ |
542 | } PROCESSOR_UPGRADE;␊ |
543 | ␊ |
544 | // Struct - Processor Information (Type 4), Apple uses 35 bytes length␊ |
545 | typedef struct SMBProcessorInformation␊ |
546 | {␊ |
547 | ␉// 2.0+ spec (26 bytes)␊ |
548 | ␉SMB_STRUCT_HEADER // Type 4␊ |
549 | ␉SMBString socketDesignation;␊ |
550 | ␉SMBByte processorType; // The enumeration value from PROCESSOR_TYPE_DATA.␊ |
551 | ␉SMBByte processorFamily; // The enumeration value from PROCESSOR_FAMILY_DATA.␊ |
552 | ␉SMBString manufacturer;␊ |
553 | ␉SMBQWord processorID; // based on CPUID␊ |
554 | ␉SMBString processorVersion;␊ |
555 | ␉SMBByte voltage; // bit7 cleared indicate legacy mode␊ |
556 | ␉SMBWord externalClock; // external clock in MHz␊ |
557 | ␉SMBWord maximumClock; // max internal clock in MHz␊ |
558 | ␉SMBWord currentClock; // current internal clock in MHz␊ |
559 | ␉SMBByte status;␊ |
560 | ␉SMBByte processorUpgrade; // The enumeration value from PROCESSOR_UPGRADE.␊ |
561 | ␉// 2.1+ spec (32 bytes)␊ |
562 | ␉SMBWord L1CacheHandle;␊ |
563 | ␉SMBWord L2CacheHandle;␊ |
564 | ␉SMBWord L3CacheHandle;␊ |
565 | ␉// 2.3+ spec (35 bytes)␊ |
566 | ␉SMBString serialNumber;␊ |
567 | ␉SMBString assetTag;␊ |
568 | ␉SMBString partNumber;␊ |
569 | ␉// 2.5+ spec (40 bytes)␊ |
570 | ␉SMBByte coreCount;␊ |
571 | ␉SMBByte coreEnabled;␊ |
572 | ␉SMBByte threadCount;␊ |
573 | //␉SMBWord processorFuncSupport;␊ |
574 | ␉// 2.6+ spec (42 bytes)␊ |
575 | //␉SMBWord processorFamily2;␊ |
576 | } __attribute__((packed)) SMBProcessorInformation;␊ |
577 | ␊ |
578 | //----------------------------------------------------------------------------------------------------------␊ |
579 | // Struct - Memory Controller Information (Type 5) Obsolete since SMBIOS version 2.1␊ |
580 | typedef struct SMBMemoryControllerInfo {␊ |
581 | ␉SMB_STRUCT_HEADER ␊ |
582 | ␉SMBByte␉␉␉errorDetectingMethod;␊ |
583 | ␉SMBByte␉␉␉errorCorrectingCapability;␊ |
584 | ␉SMBByte␉␉␉supportedInterleave;␊ |
585 | ␉SMBByte␉␉␉currentInterleave;␊ |
586 | ␉SMBByte␉␉␉maxMemoryModuleSize;␊ |
587 | ␉SMBWord␉␉␉supportedSpeeds;␊ |
588 | ␉SMBWord␉␉␉supportedMemoryTypes;␊ |
589 | ␉SMBByte␉␉␉memoryModuleVoltage;␊ |
590 | ␉SMBByte␉␉␉numberOfMemorySlots;␊ |
591 | } __attribute__((packed)) SMBMemoryControllerInfo;␊ |
592 | ␊ |
593 | //----------------------------------------------------------------------------------------------------------␊ |
594 | // Struct - Memory Module Information (Type 6) Obsolete since SMBIOS version 2.1␊ |
595 | typedef struct SMBMemoryModule␊ |
596 | {␊ |
597 | SMB_STRUCT_HEADER // Type 6␊ |
598 | SMBString socketDesignation;␊ |
599 | SMBByte bankConnections;␊ |
600 | SMBByte currentSpeed;␊ |
601 | SMBWord currentMemoryType;␊ |
602 | SMBByte installedSize;␊ |
603 | SMBByte enabledSize;␊ |
604 | SMBByte errorStatus;␊ |
605 | } __attribute__((packed)) SMBMemoryModule;␊ |
606 | ␊ |
607 | #define kSMBMemoryModuleSizeNotDeterminable 0x7D␊ |
608 | #define kSMBMemoryModuleSizeNotEnabled 0x7E␊ |
609 | #define kSMBMemoryModuleSizeNotInstalled 0x7F␊ |
610 | ␊ |
611 | //----------------------------------------------------------------------------------------------------------␊ |
612 | // Struct - Cache Information (Type 7), Apple uses 19 bytes length␊ |
613 | typedef struct SMBCacheInformation␊ |
614 | {␊ |
615 | SMB_STRUCT_HEADER // Type 7␊ |
616 | SMBString socketDesignation;␊ |
617 | SMBWord cacheConfiguration;␊ |
618 | SMBWord maximumCacheSize;␊ |
619 | SMBWord installedSize;␊ |
620 | SMBWord supportedSRAMType;␊ |
621 | SMBWord currentSRAMType;␊ |
622 | SMBByte cacheSpeed;␊ |
623 | SMBByte errorCorrectionType;␊ |
624 | SMBByte systemCacheType;␊ |
625 | SMBByte associativity;␊ |
626 | } __attribute__((packed)) SMBCacheInformation;␊ |
627 | ␊ |
628 | //----------------------------------------------------------------------------------------------------------␊ |
629 | // Struct - System Slots (Type 9), Apple uses 13 bytes length␊ |
630 | typedef struct SMBSystemSlot␊ |
631 | {␊ |
632 | // 2.0+ spec (12 bytes)␊ |
633 | ␉SMB_STRUCT_HEADER␊ |
634 | ␉SMBString slotDesignation;␊ |
635 | ␉SMBByte slotType;␊ |
636 | ␉SMBByte slotDataBusWidth;␊ |
637 | ␉SMBByte currentUsage;␊ |
638 | ␉SMBByte slotLength;␊ |
639 | ␉SMBWord slotID;␊ |
640 | ␉SMBByte slotCharacteristics1;␊ |
641 | ␉// 2.1+ spec (13 bytes)␊ |
642 | ␉SMBByte slotCharacteristics2;␊ |
643 | ␉// 2.6+ spec (17 bytes)␊ |
644 | //␉SMBWord␉␉segmentGroupNumber;␊ |
645 | //␉SMBByte␉␉busNumber;␊ |
646 | //␉SMBByte␉␉deviceFunctionNumber;␊ |
647 | } __attribute__((packed)) SMBSystemSlot;␊ |
648 | ␊ |
649 | //----------------------------------------------------------------------------------------------------------␊ |
650 | // Struct - OEM Strings (Type 11), Apple uses 5 bytes length␊ |
651 | typedef struct SMBOEMStrings␊ |
652 | {␊ |
653 | ␉SMB_STRUCT_HEADER // Type 11␊ |
654 | ␉SMBByte␉␉count;␉␉// number of strings␊ |
655 | } __attribute__((packed)) SMBOEMStrings;␊ |
656 | ␊ |
657 | //----------------------------------------------------------------------------------------------------------␊ |
658 | // Physical Memory Array (Type 16)␊ |
659 | ␊ |
660 | // Physical Memory Array - Use.␊ |
661 | // Values for SMBPhysicalMemoryArray.arrayUse␊ |
662 | typedef enum␊ |
663 | {␊ |
664 | kSMBMemoryArrayUseOther = 0x01,␊ |
665 | kSMBMemoryArrayUseUnknown = 0x02,␊ |
666 | kSMBMemoryArrayUseSystemMemory = 0x03,␊ |
667 | kSMBMemoryArrayUseVideoMemory = 0x04,␊ |
668 | kSMBMemoryArrayUseFlashMemory = 0x05,␊ |
669 | kSMBMemoryArrayUseNonVolatileMemory = 0x06,␊ |
670 | kSMBMemoryArrayUseCacheMemory = 0x07␊ |
671 | } MEMORY_ARRAY_USE;␊ |
672 | ␊ |
673 | // Physical Memory Array - Error Correction Types.␊ |
674 | // Values for SMBPhysicalMemoryArray.errorCorrection␊ |
675 | typedef enum␊ |
676 | {␊ |
677 | kSMBMemoryArrayErrorCorrectionTypeOther = 0x01,␊ |
678 | kSMBMemoryArrayErrorCorrectionTypeUnknown = 0x02,␊ |
679 | kSMBMemoryArrayErrorCorrectionTypeNone = 0x03,␊ |
680 | kSMBMemoryArrayErrorCorrectionTypeParity = 0x04,␊ |
681 | kSMBMemoryArrayErrorCorrectionTypeSingleBitECC = 0x05,␊ |
682 | kSMBMemoryArrayErrorCorrectionTypeMultiBitECC = 0x06,␊ |
683 | kSMBMemoryArrayErrorCorrectionTypeCRC = 0x07␊ |
684 | } MEMORY_ERROR_CORRECTION;␊ |
685 | ␊ |
686 | // Struct - Physical Memory Array (Type 16), Apple uses 15 bytes length␊ |
687 | typedef struct SMBPhysicalMemoryArray␊ |
688 | {␊ |
689 | ␉// 2.1+ spec (15 bytes)␊ |
690 | ␉SMB_STRUCT_HEADER // Type 16␊ |
691 | ␉SMBByte physicalLocation; // physical location␊ |
692 | ␉SMBByte arrayUse; // the use for the memory array, The enumeration value from MEMORY_ARRAY_USE.␊ |
693 | ␉SMBByte errorCorrection; // error correction/detection method, The enumeration value from MEMORY_ERROR_CORRECTION.␊ |
694 | ␉SMBDWord maximumCapacity; // maximum memory capacity in kilobytes␊ |
695 | ␉SMBWord errorHandle; // handle of a previously detected error␊ |
696 | ␉SMBWord numMemoryDevices; // number of memory slots or sockets␊ |
697 | ␉// 2.7+ spec␊ |
698 | //␉SMBQWord extMaximumCapacity;␉// maximum memory capacity in bytes␊ |
699 | } __attribute__((packed)) SMBPhysicalMemoryArray;␊ |
700 | ␊ |
701 | //----------------------------------------------------------------------------------------------------------␊ |
702 | // Struct - Memory Device (Type 17), Apple uses 27 bytes length␊ |
703 | typedef struct SMBMemoryDevice␊ |
704 | {␊ |
705 | ␉// 2.1+ spec (21 bytes)␊ |
706 | ␉SMB_STRUCT_HEADER // Type 17␊ |
707 | ␉SMBWord arrayHandle; // handle of the parent memory array␊ |
708 | ␉SMBWord errorHandle; // handle of a previously detected error␊ |
709 | ␉SMBWord totalWidth; // total width in bits; including ECC bits␊ |
710 | ␉SMBWord dataWidth; // data width in bits␊ |
711 | ␉SMBWord memorySize; // bit15 is scale, 0 = MB, 1 = KB␊ |
712 | ␉SMBByte formFactor; // memory device form factor␊ |
713 | ␉SMBByte deviceSet; // parent set of identical memory devices␊ |
714 | ␉SMBString deviceLocator; // labeled socket; e.g. "SIMM 3"␊ |
715 | ␉SMBString bankLocator; // labeled bank; e.g. "Bank 0" or "A"␊ |
716 | ␉SMBByte memoryType; // type of memory␊ |
717 | ␉SMBWord memoryTypeDetail; // additional detail on memory type␊ |
718 | ␉// 2.3+ spec (27 bytes)␊ |
719 | ␉SMBWord memorySpeed; // speed of device in MHz (0 for unknown)␊ |
720 | ␉SMBString manufacturer;␊ |
721 | ␉SMBString serialNumber;␊ |
722 | ␉SMBString assetTag;␊ |
723 | ␉SMBString partNumber;␊ |
724 | ␉// 2.6+ spec (28 bytes)␊ |
725 | //␉SMBByte attributes;␊ |
726 | ␉// 2.7+ spec␊ |
727 | //␉SMBDWord memoryExtSize;␊ |
728 | //␉SMBWord confMemClkSpeed;␊ |
729 | ␉// 2.8+ spec␊ |
730 | //␉SMBWord minimumVolt;␊ |
731 | //␉SMBWord maximumVolt;␊ |
732 | //␉SMBWord configuredVolt;␊ |
733 | } __attribute__((packed)) SMBMemoryDevice;␊ |
734 | ␊ |
735 | //----------------------------------------------------------------------------------------------------------␊ |
736 | ␊ |
737 | // Struct - Memory Array Mapped Address (Type 19), Apple uses 15 bytes length␊ |
738 | //typedef struct SMBMemoryArrayMappedAddress␊ |
739 | //{␊ |
740 | // 2.1+ spec␊ |
741 | //␉SMB_STRUCT_HEADER // Type 19␊ |
742 | //␉SMBDWord startingAddress;␊ |
743 | //␉SMBDWord endingAddress;␊ |
744 | //␉SMBWord arrayHandle;␊ |
745 | //␉SMBByte partitionWidth;␊ |
746 | ␉// 2.7+ spec␊ |
747 | //␉SMBQWord extStartAddress;␊ |
748 | //␉SMBQWord extEndAddress;␊ |
749 | //} __attribute__((packed)) SMBMemoryArrayMappedAddress;␊ |
750 | ␊ |
751 | //----------------------------------------------------------------------------------------------------------␊ |
752 | ␊ |
753 | // Struct - Memory Device Mapped Address (Type 20)␊ |
754 | //typedef struct SMBMemoryDeviceMappedAddress␊ |
755 | //{␊ |
756 | ␉// 2.1+ spec␊ |
757 | //␉SMB_STRUCT_HEADER // Type 20␊ |
758 | //␉SMBDWord startingAddress;␊ |
759 | //␉SMBDWord endingAddress;␊ |
760 | //␉SMBWord arrayHandle;␊ |
761 | //␉SMBByte partitionRowPosition;␊ |
762 | //␉SMBByte interleavePosition;␊ |
763 | //␉SMBByte interleaveDataDepth;␊ |
764 | ␉// 2.7+ spec␊ |
765 | //␉SMBQWord extStartAddress;␊ |
766 | //␉SMBQWord extEndAddress;␊ |
767 | //} __attribute__((packed)) SMBMemoryDeviceMappedAddress;␊ |
768 | ␊ |
769 | //----------------------------------------------------------------------------------------------------------␊ |
770 | // Firmware Volume Description (Apple Specific - Type 128)␊ |
771 | enum␊ |
772 | {␊ |
773 | ␉FW_REGION_RESERVED = 0,␊ |
774 | ␉FW_REGION_RECOVERY = 1,␊ |
775 | ␉FW_REGION_MAIN = 2,␊ |
776 | ␉FW_REGION_NVRAM = 3,␊ |
777 | ␉FW_REGION_CONFIG = 4,␊ |
778 | ␉FW_REGION_DIAGVAULT = 5,␊ |
779 | ␊ |
780 | ␉NUM_FLASHMAP_ENTRIES = 8␊ |
781 | };␊ |
782 | ␊ |
783 | typedef struct FW_REGION_INFO␊ |
784 | {␊ |
785 | ␉SMBDWord StartAddress;␊ |
786 | ␉SMBDWord EndAddress;␊ |
787 | } __attribute__((packed)) FW_REGION_INFO;␊ |
788 | ␊ |
789 | // Struct - Firmware Volume Description (Apple Specific - Type 128), Apple uses 88 bytes length␊ |
790 | typedef struct SMBFirmwareVolume␊ |
791 | {␊ |
792 | ␉SMB_STRUCT_HEADER␉␉␉// Type 128␊ |
793 | ␉SMBByte RegionCount;␊ |
794 | ␉SMBByte Reserved[3];␊ |
795 | ␉SMBDWord FirmwareFeatures;␊ |
796 | ␉SMBDWord FirmwareFeaturesMask;␊ |
797 | ␉SMBByte RegionType[ NUM_FLASHMAP_ENTRIES ];␊ |
798 | ␉FW_REGION_INFO FlashMap[ NUM_FLASHMAP_ENTRIES ];␊ |
799 | } __attribute__((packed)) SMBFirmwareVolume;␊ |
800 | ␊ |
801 | //----------------------------------------------------------------------------------------------------------␊ |
802 | ␊ |
803 | /* ===========================================␊ |
804 | Memory SPD Data (Apple Specific - Type 130)␊ |
805 | ============================================= */␊ |
806 | typedef struct SMBMemorySPD␊ |
807 | {␊ |
808 | ␉SMB_STRUCT_HEADER␉␉␉// Type 130␊ |
809 | ␉SMBWord Type17Handle;␊ |
810 | ␉SMBWord Offset;␊ |
811 | ␉SMBWord Size;␊ |
812 | ␉SMBWord Data[1];␊ |
813 | } __attribute__((packed)) SMBMemorySPD;␊ |
814 | ␊ |
815 | //----------------------------------------------------------------------------------------------------------␊ |
816 | ␊ |
817 | /* ============================================␊ |
818 | OEM Processor Type (Apple Specific - Type 131)␊ |
819 | ============================================== */␊ |
820 | typedef struct SMBOemProcessorType␊ |
821 | {␊ |
822 | ␉SMB_STRUCT_HEADER␉␉␉// Type131␊ |
823 | ␉SMBWord ProcessorType;␊ |
824 | } __attribute__((packed)) SMBOemProcessorType;␊ |
825 | ␊ |
826 | //----------------------------------------------------------------------------------------------------------␊ |
827 | ␊ |
828 | /* =================================================␊ |
829 | OEM Processor Bus Speed (Apple Specific - Type 132)␊ |
830 | =================================================== */␊ |
831 | typedef struct SMBOemProcessorBusSpeed␊ |
832 | {␊ |
833 | ␉SMB_STRUCT_HEADER␉␉␉// Type 132␊ |
834 | ␉SMBWord ProcessorBusSpeed; // MT/s unit␊ |
835 | } __attribute__((packed)) SMBOemProcessorBusSpeed;␊ |
836 | ␊ |
837 | //----------------------------------------------------------------------------------------------------------␊ |
838 | ␊ |
839 | /* ==============================================␊ |
840 | OEM Platform Feature (Apple Specific - Type 133)␊ |
841 | ================================================ */␊ |
842 | struct SMBOemPlatformFeature␊ |
843 | {␊ |
844 | ␉SMB_STRUCT_HEADER␉␉␉// Type 133␊ |
845 | ␉SMBWord PlatformFeature;␊ |
846 | } __attribute__((packed)) SMBOemPlatformFeature;␊ |
847 | ␊ |
848 | //----------------------------------------------------------------------------------------------------------␊ |
849 | ␊ |
850 | /* From Foundation/Efi/Guid/Smbios/SmBios.h */␊ |
851 | /* Modified to wrap Data4 array init with {} */␊ |
852 | #define EFI_SMBIOS_TABLE_GUID {0xeb9d2d31, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d}}␊ |
853 | ␊ |
854 | #define SMBIOS_ORIGINAL␉␉0␊ |
855 | #define SMBIOS_PATCHED␉␉1␊ |
856 | ␊ |
857 | extern void *getSmbios(int which);␊ |
858 | extern void readSMBIOSInfo(SMBEntryPoint *eps);␊ |
859 | extern void setupSMBIOSTable(void);␊ |
860 | ␊ |
861 | extern void decodeSMBIOSTable(SMBEntryPoint *eps);␊ |
862 | ␊ |
863 | #endif /* !__LIBSAIO_SMBIOS_H */␊ |
864 | |