Chameleon

Chameleon Svn Source Tree

Root/branches/valv/i386/libsaio/SMBIOS.h

  • Property svn:executable set to
1/*
2 * Copyright (c) 1998-2006 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/* This file is a stripped-down version of the one found in the AppleSMBIOS project.
24 * Changes:
25 * - Don't use pragma pack but instead use GCC's packed attribute
26 */
27
28#ifndef _LIBSAIO_SMBIOS_H
29#define _LIBSAIO_SMBIOS_H
30
31/*
32 * Based on System Management BIOS Reference Specification v2.5
33 */
34
35typedef uint8_tSMBString;
36typedef uint8_tSMBByte;
37typedef uint16_tSMBWord;
38typedef uint32_tSMBDWord;
39typedef uint64_tSMBQWord;
40
41struct DMIHeader {
42SMBBytetype;
43SMBBytelength;
44SMBWordhandle;
45} __attribute__((packed));
46
47struct DMIEntryPoint {
48SMBByteanchor[5];
49SMBBytechecksum;
50SMBWordtableLength;
51SMBDWordtableAddress;
52SMBWordstructureCount;
53SMBBytebcdRevision;
54} __attribute__((packed));
55
56struct SMBEntryPoint {
57SMBByteanchor[4];
58SMBBytechecksum;
59SMBByteentryPointLength;
60SMBBytemajorVersion;
61SMBByteminorVersion;
62SMBWordmaxStructureSize;
63SMBByteentryPointRevision;
64SMBByteformattedArea[5];
65struct DMIEntryPointdmi;
66} __attribute__((packed));
67
68struct DMIBIOSInfo {
69struct DMIHeaderdmiHeader; // Type 0
70SMBStringvendor;// BIOS vendor name
71SMBStringversion;// BIOS version
72SMBWordstartSegment;// BIOS segment start
73SMBStringreleaseDate;// BIOS release date
74SMBByteromSize;// (n); 64K * (n+1) bytes
75SMBQWordcharacteristics;// supported BIOS functions
76} __attribute__((packed));
77
78struct DMIMemoryControllerInfo {/* 3.3.6 Memory Controller Information (Type 5) */
79struct DMIHeaderdmiHeader;
80SMBByteerrorDetectingMethod;
81SMBByteerrorCorrectingCapability;
82SMBBytesupportedInterleave;
83SMBBytecurrentInterleave;
84SMBBytemaxMemoryModuleSize;
85SMBWordsupportedSpeeds;
86SMBWordsupportedMemoryTypes;
87SMBBytememoryModuleVoltage;
88SMBBytenumberOfMemorySlots;
89} __attribute__((packed));
90
91struct DMIMemoryModuleInfo {/* 3.3.7 Memory Module Information (Type 6) */
92struct DMIHeaderdmiHeader;
93SMBBytesocketDesignation;
94SMBBytebankConnections;
95SMBBytecurrentSpeed;
96SMBWordcurrentMemoryType;
97SMBByteinstalledSize;
98SMBByteenabledSize;
99SMBByteerrorStatus;
100} __attribute__((packed));
101
102struct DMIPhysicalMemoryArray {/* 3.3.17 Physical Memory Array (Type 16) */
103struct DMIHeaderdmiHeader;
104SMBBytelocation;
105SMBByteuse;
106SMBBytememoryCorrectionError;
107SMBDWordmaximumCapacity;
108SMBWordmemoryErrorInformationHandle;
109SMBWordnumberOfMemoryDevices;
110} __attribute__((packed));
111
112struct DMIMemoryDevice {/* 3.3.18 Memory Device (Type 17) */
113struct DMIHeaderdmiHeader;
114SMBWordphysicalMemoryArrayHandle;
115SMBWordmemoryErrorInformationHandle;
116SMBWordtotalWidth;
117SMBWorddataWidth;
118SMBWordsize;
119SMBByteformFactor;
120SMBBytedeviceSet;
121SMBBytedeviceLocator;
122SMBBytebankLocator;
123SMBBytememoryType;
124SMBWordtypeDetail;
125 SMBWord speed;
126} __attribute__((packed));
127
128#endif /* !_LIBSAIO_SMBIOS_H */
129

Archive Download this file

Revision: 665