Chameleon

Chameleon Svn Source Tree

Root/branches/prasys/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 DMIEntryPoint {
43 SMBByte anchor[5];
44 SMBByte checksum;
45 SMBWord tableLength;
46 SMBDWord tableAddress;
47 SMBWord structureCount;
48 SMBByte bcdRevision;
49} __attribute__((packed));
50
51struct SMBEntryPoint {
52 SMBByte anchor[4];
53 SMBByte checksum;
54 SMBByte entryPointLength;
55 SMBByte majorVersion;
56 SMBByte minorVersion;
57 SMBWord maxStructureSize;
58 SMBByte entryPointRevision;
59 SMBByte formattedArea[5];
60 struct DMIEntryPoint dmi;
61} __attribute__((packed));
62
63#endif /* !_LIBSAIO_SMBIOS_H */
64

Archive Download this file

Revision: 24