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