Chameleon

Chameleon Svn Source Tree

Root/branches/andyvand/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 * - Remove everything except the entry point structure. We don't need anything else.
27 */
28
29#ifndef _LIBSAIO_SMBIOS_H
30#define _LIBSAIO_SMBIOS_H
31
32/*
33 * Based on System Management BIOS Reference Specification v2.5
34 */
35
36typedef UInt8 SMBString;
37typedef UInt8 SMBByte;
38typedef UInt16 SMBWord;
39typedef UInt32 SMBDWord;
40typedef UInt64 SMBQWord;
41
42struct DMIHeader{
43 SMBByte type;
44 SMBByte length;
45 SMBWord handle;
46} __attribute__((packed));
47
48struct DMIEntryPoint {
49 SMBByte anchor[5];
50 SMBByte checksum;
51 SMBWord tableLength;
52 SMBDWord tableAddress;
53 SMBWord structureCount;
54 SMBByte bcdRevision;
55} __attribute__((packed));
56
57struct SMBEntryPoint {
58 SMBByte anchor[4];
59 SMBByte checksum;
60 SMBByte entryPointLength;
61 SMBByte majorVersion;
62 SMBByte minorVersion;
63 SMBWord maxStructureSize;
64 SMBByte entryPointRevision;
65 SMBByte formattedArea[5];
66 struct DMIEntryPoint dmi;
67} __attribute__((packed));
68
69#endif /* !_LIBSAIO_SMBIOS_H */
70

Archive Download this file

Revision: 142