SmbiosLowLevel.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 
00019 #ifndef SMBIOSLOWLEVEL_H
00020 #define SMBIOSLOWLEVEL_H
00021 
00022 // compat header should always be first header
00023 #include "smbios/compat.h"
00024 
00025 #include "smbios/types.h"
00026 
00027 // abi_prefix should be last header included before declarations
00028 #include "smbios/config/abi_prefix.hpp"
00029 
00030 /*****************
00031  * The smbiosLowlevel namespace has the low-level structures
00032  * that appear in memory.
00033  * */
00034 namespace smbiosLowlevel
00035 {
00036 
00037 #if defined(_MSC_VER)
00038 #pragma pack(push,1)
00039 #endif
00040     struct smbios_structure_header
00041     {
00042         u8 type;
00043         u8 length;
00044         u16 handle;
00045     }
00046     LIBSMBIOS_PACKED_ATTR;
00047 
00048     struct dmi_table_entry_point
00049     {
00050         u8 anchor[5];
00051         u8 checksum;
00052         u16 table_length;
00053         u32 table_address;
00054         u16 table_num_structs;
00055         u8 smbios_bcd_revision;
00056     }
00057     LIBSMBIOS_PACKED_ATTR;
00058 
00059     struct smbios_table_entry_point
00060     {
00061         u8 anchor[4];
00062         u8 checksum;
00063         u8 eps_length;
00064         u8 major_ver;
00065         u8 minor_ver;
00066         u16 max_struct_size;
00067         u8 revision;
00068         u8 formatted_area[5];
00069         struct dmi_table_entry_point dmi;
00070         u8 padding_for_Intel_BIOS_bugs;
00071     } LIBSMBIOS_PACKED_ATTR;
00072 
00073 #if defined(_MSC_VER)
00074 #pragma pack(pop)
00075 #endif
00076 
00077 }
00078 
00079 // always should be last thing in header file
00080 #include "smbios/config/abi_suffix.hpp"
00081 
00082 #endif /* SMBIOSLOWLEVEL_H */

Generated on Sat Apr 21 11:36:09 2007 for SMBIOS Library by  doxygen 1.5.2