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

TokenLowLevel.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 CMOSTOKENLOWLEVEL_H
00020 #define CMOSTOKENLOWLEVEL_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 namespace smbios
00031 {
00032 #if defined(_MSC_VER)
00033 #pragma pack(push,1)
00034 #endif
00035     enum  // Smbios Structure types
00036     {
00037         DellIndexedIoTokenType = 0xD4,
00038         DellProtectedAreaType1 = 0xD5,
00039         DellProtectedAreaType2 = 0xD6,
00040         DellCallingInterface   = 0xDA,
00041     };
00042 
00043     enum // Token types
00044     {
00045         TokenTypeEOT = 0xffff,
00046     };
00047 
00048     struct indexed_io_token
00049     {
00050         u16 tokenId;
00051         u8  location;
00052         u8  andMask;
00053         union {
00054             u8 orValue;
00055             u8 stringLength;
00056         };
00057     }
00058     LIBSMBIOS_PACKED_ATTR;
00059 
00060     struct indexed_io_access_structure
00061     { /* 0xD4 structure */
00062         u8       type;
00063         u8       length;
00064         u16      handle;
00065         u16      indexPort;
00066         u16      dataPort;
00067         u8       checkType;
00068         u8       checkedRangeStartIndex;
00069         u8       checkedRangeEndIndex;
00070         u8       checkValueIndex;
00071         //variable number of tokens present, but at least one.
00072         struct   indexed_io_token  first_token;
00073     }
00074     LIBSMBIOS_PACKED_ATTR;
00075 
00076 
00077     struct dell_protected_value_1_structure
00078     {  /* 0xD5 structure */
00079         u8       type;
00080         u8       length;
00081         u16      handle;
00082         u16      tokenId;
00083         u8       valueLen;
00084         u8       valueFormat;
00085         u16      validationKey;
00086         u16      indexPort;
00087         u16      dataPort;
00088         u8       checkType;
00089         u8       valueStartIndex;
00090         u8       checkIndex;
00091     }
00092     LIBSMBIOS_PACKED_ATTR;
00093 
00094     struct dell_protected_value_2_structure
00095     {  /* 0xD6 structure */
00096         u8       type;
00097         u8       length;
00098         u16      handle;
00099         u16      tokenId;
00100         u8       valueLen;
00101         u8       valueFormat;
00102         u16      validationKey;
00103         u16      indexPort;
00104         u16      dataPort;
00105         u8       checkType;
00106         u8       valueStartIndex;
00107         u8       checkIndex;
00108         u8       rangeCheckType;
00109         u8       rangeCheckStart;
00110         u8       rangeCheckEnd;
00111         u8       rangeCheckIndex;
00112     }
00113     LIBSMBIOS_PACKED_ATTR;
00114 
00115     struct calling_interface_token
00116     {
00117         u16 tokenId;
00118         u16 location;  // 0 for string tokens
00119         union {
00120             u16 value;
00121             u16 stringLength;
00122         };
00123     }
00124     LIBSMBIOS_PACKED_ATTR;
00125 
00126     struct calling_interface_structure
00127     { /* 0xDA structure */
00128         u8       type;
00129         u8       length;
00130         u16      handle;
00131 
00132         u16      cmdIOAddress;
00133         u8       cmdIOCode;
00134         u32      supportedCmds;
00135 
00136         //variable number of tokens present, zero or more possible
00137         //would _really_ like to do:
00138         //   struct   calling_interface_token  token_array[];
00139         // 
00140         //but cannot because it is a gcc extension. :-(
00141         struct   calling_interface_token  first_token;
00142     }
00143     LIBSMBIOS_PACKED_ATTR;
00144 
00145     enum  // protected value format types
00146     {
00147         pvFmtAlphaNumericScanCode = 0,
00148         pvFmtAlphaNumericAscii    = 1,
00149         pvFmtAlphaNumericScanCodeNS = 2,
00150         pvFmtAlphaNumericAsciiNS   = 3,
00151     };
00152 
00153 
00154 #if defined(_MSC_VER)
00155 #pragma pack(pop)
00156 #endif
00157 }
00158 
00159 // always should be last thing in header file
00160 #include "smbios/config/abi_suffix.hpp"
00161 
00162 #endif /* CMOSTOKENLOWLEVEL_H */

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