Chameleon

Chameleon Svn Source Tree

Root/branches/azimutz/Chazileon/i386/libsaio/SMBIOS.h

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 DMIMemoryControllerInfo {/* 3.3.6 Memory Controller Information (Type 5) */
69struct DMIHeaderdmiHeader;
70SMBByteerrorDetectingMethod;
71SMBByteerrorCorrectingCapability;
72SMBBytesupportedInterleave;
73SMBBytecurrentInterleave;
74SMBBytemaxMemoryModuleSize;
75SMBWordsupportedSpeeds;
76SMBWordsupportedMemoryTypes;
77SMBBytememoryModuleVoltage;
78SMBBytenumberOfMemorySlots;
79} __attribute__((packed));
80
81struct DMIMemoryModuleInfo {/* 3.3.7 Memory Module Information (Type 6) */
82struct DMIHeaderdmiHeader;
83SMBBytesocketDesignation;
84SMBBytebankConnections;
85SMBBytecurrentSpeed;
86SMBWordcurrentMemoryType;
87SMBByteinstalledSize;
88SMBByteenabledSize;
89SMBByteerrorStatus;
90} __attribute__((packed));
91
92struct DMIPhysicalMemoryArray {/* 3.3.17 Physical Memory Array (Type 16) */
93struct DMIHeaderdmiHeader;
94SMBBytelocation;
95SMBByteuse;
96SMBBytememoryCorrectionError;
97SMBDWordmaximumCapacity;
98SMBWordmemoryErrorInformationHandle;
99SMBWordnumberOfMemoryDevices;
100} __attribute__((packed));
101
102struct DMIMemoryDevice {/* 3.3.18 Memory Device (Type 17) */
103struct DMIHeaderdmiHeader;
104SMBWordphysicalMemoryArrayHandle;
105SMBWordmemoryErrorInformationHandle;
106SMBWordtotalWidth;
107SMBWorddataWidth;
108SMBWordsize;
109SMBByteformFactor;
110SMBBytedeviceSet;
111SMBBytedeviceLocator;
112SMBBytebankLocator;
113SMBBytememoryType;
114SMBWordtypeDetail;
115 SMBWord speed;
116} __attribute__((packed));
117
118#endif /* !_LIBSAIO_SMBIOS_H */
119

Archive Download this file

Revision: 399