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

SmiLowLevel.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 SMILOWLEVEL_H
00020 #define SMILOWLEVEL_H
00021 
00022 #include "smbios/types.h"
00023 
00024 // abi_prefix should be last header included before declarations
00025 #include "smbios/config/abi_prefix.hpp"
00026 
00027 namespace smi
00028 {
00029 #if defined(_MSC_VER)
00030 #pragma pack(push,1)
00031 #endif
00032 
00033 
00034     /* cut and paste from kernel sources */
00035     struct callintf_cmd
00036     {
00037         u32 magic;
00038         u32 ebx;
00039         u32 ecx;
00040         u16 command_address;
00041         u8  command_code;
00042         u8  reserved;
00043         /*this should be 'u8 command_buffer[]', but it is not supported in VC6 
00044           therefore, we just hack it, I guess. Remember to subtract this from
00045           the size when taking the sizeof this struct
00046         */
00047         u8  command_buffer_start;
00048     }
00049     LIBSMBIOS_PACKED_ATTR;
00050 
00051 #define KERNEL_SMI_MAGIC_NUMBER (0x534D4931)   /* "SMI1" */
00052 #define DELL_CALLINTF_SMI_MAGIC_NUMBER   (0x42534931)  /* "BSI1" */
00053 
00054     struct calling_interface_command_buffer
00055     {
00056         u16      smiClass;
00057         u16      smiSelect;
00058         union {  /* to match BIOS docs, can use exact arg names specified in doc */
00059             u32      inputArgs[4];
00060             struct
00061             {
00062                 u32 cbARG1;
00063                 u32 cbARG2;
00064                 u32 cbARG3;
00065                 u32 cbARG4;
00066             };
00067         };
00068         union {  /* to match BIOS docs, can use exact res names specified in doc */
00069             u32      outputRes[4];
00070             struct
00071             {
00072                 s32 cbRES1;
00073                 s32 cbRES2;
00074                 s32 cbRES3;
00075                 s32 cbRES4;
00076             };
00077         };
00078     }
00079     LIBSMBIOS_PACKED_ATTR;
00080 
00081     enum
00082     {
00083         class_user_password =  9,
00084         class_admin_password = 10,
00085     };
00086 
00087 
00088 #if defined(_MSC_VER)
00089 #pragma pack(pop)
00090 #endif
00091 }
00092 
00093 // always should be last thing in header file
00094 #include "smbios/config/abi_suffix.hpp"
00095 
00096 #endif /* SMILOWLEVEL_H */

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