Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

DellMagic.h

Go to the documentation of this file.
00001 // vim:expandtab:autoindent:tabstop=4:shiftwidth=4:filetype=c:
00002 /*
00003  * Copyright (C) 2005 Dell Inc.
00004  *  by Michael Brown <Michael_E_Brown@dell.com>
00005  * Licensed under the Open Software License version 2.1
00006  *
00007  * Alternatively, you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published
00009  * by the Free Software Foundation; either version 2 of the License,
00010  * or (at your option) any later version.
00011 
00012  * This program is distributed in the hope that it will be useful, but
00013  * WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00015  * See the GNU General Public License for more details.
00016  */
00017 
00018 #ifndef DELLMAGIC_H
00019 #define DELLMAGIC_H
00020 
00021 // private stuff
00022 #define NvramByte1_Token                            0x83
00023 #define NvramByte2_Token                            0x84
00024 #define BIOS_Information_Version_Offset             0x05
00025 #define System_Information_Manufacturer_Offset      0x04
00026 #define System_Information_Product_Name_Offset      0x05
00027 #define System_Information_Serial_Number_Offset     0x07
00028 #define System_Enclosure_or_Chassis_Service_Offset  0x07
00029 #define System_Enclosure_or_Chassis_Asset_Offset    0x08
00030 #define ID_Byte_Location                            0xFE845
00031 #define ID_Word_Location                            0xFE840
00032 #define Cmos_Asset_Token                            0xC000
00033 #define Cmos_Service_Token                          0xC003
00034 #define OEM_String_Field_Number                     1
00035 #define Bayonet_Detect_String                       "Dell System"
00036 #define DELL_SYSTEM_STRING_LOC                      0xFE076
00037 #define DELL_SYSTEM_STRING                          "Dell System"
00038 #define DELL_SYSTEM_STRING_LEN                      12
00039 #define TWO_BYTE_STRUCT_LOC                         0xFE840
00040 #define DELL_SYSTEM_STRING_LOC_DIAMOND_1            0xD8044
00041 #define DELL_SYSTEM_STRING_LOC_DIAMOND_2            0xDC044
00042 #define ID_BYTE_LOC_DIAMOND_1                       0xD8040
00043 #define ID_BYTE_LOC_DIAMOND_2                       0xDC040
00044 #define SYSTEM_ID_DIAMOND                           0x8C
00045 #define OEM_Dell_String                             "Dell"
00046 #define OEM_String_Location                         0xFE076
00047 #define SVC_TAG_CMOS_LEN_MAX                        5
00048 #define SVC_TAG_LEN_MAX                             7
00049 #define ASSET_TAG_CMOS_LEN_MAX                      10
00050 #define ASSET_TAG_LEN_MAX                           10
00051 
00052 namespace smbios
00053 {
00054 #if defined(_MSC_VER)
00055 #pragma pack(push,1)
00056 #endif
00057     // all of these are packed, so put them all between the above ifdef/below
00058     // endif.
00059 
00060     struct up_info
00061     {
00062         char anchor[4];
00063         u16  stuff1; // anybody know what this is?
00064         u8   offset;
00065         u16  stuff2; // anybody know what this is?
00066         u8   flag;
00067     }
00068     LIBSMBIOS_PACKED_ATTR;
00069 
00070     struct one_byte_structure
00071     {
00072         u8   bios_version[3];
00073         u8   system_id;
00074         u8   platform_revision;
00075         u8   checksum; //(offsets 3+4+5 must equal 0)
00076     }
00077     LIBSMBIOS_PACKED_ATTR;
00078 
00079     struct two_byte_structure
00080     {
00081         u16  two_byte_id;
00082         u8   bios_version[3];
00083         u8   system_id;
00084         u8   platform_revision;
00085         u8   checksum; // (offsets 5+6+7 must equal 0)
00086         u8   Reserved1;
00087         u8   Reserved2;
00088         u8   extended_checksum;// ( offsets 0x0 + 0x1 + 0xA + 0xB + extension bytes must equal 0)
00089         u8   extension_byte_count;
00090         u8   first_extended_byte; // Brand ID
00091         //u8   ... more extension bytes ...
00092     }
00093     LIBSMBIOS_PACKED_ATTR;
00094 
00095 #if defined(_MSC_VER)
00096 #pragma pack(pop)
00097 #endif
00098 }
00099 
00100 #endif

Generated on Wed Apr 11 16:25:10 2007 for SMBIOS Library by doxygen 1.3.5