#include "smbios/ISmbios.h"
#include "smbios/IToken.h"
#include "smbios/ISmi.h"
#include "smbios/SystemInfo.h"
#include "smbios/IMemory.h"
#include "smbios/SmbiosDefs.h"
#include "../common/ExceptionImpl.h"
#include "../token/TokenLowLevel.h"
#include "DellMagic.h"
#include "smbios/version.h"
#include "smbios/message.h"
Go to the source code of this file.
Classes | |
struct | DellGetServiceTagFunctions |
struct | DellSetServiceTagFunctions |
struct | DellAssetTagFunctions |
struct | DellSetAssetTagFunctions |
struct | DellSystemNameFunctions |
struct | DellBiosVersionFunctions |
Defines | |
#define | LIBSMBIOS_SOURCE |
#define | DCOUT(line) do {} while(0) |
#define | DCERR(line) do {} while(0) |
Functions | |
static void | stripString (char *str) |
static unsigned char | dell_decode_digit (char tagval) |
static void | dell_decode_service_tag (char *tag, int len) |
static unsigned char | dell_encode_digit (char ch) |
static void | dell_encode_service_tag (char *tag, size_t len) |
const char * | SMBIOSGetLibraryVersionString () |
Return a string representing the version of the libsmbios library. | |
void | SMBIOSFreeMemory (const char *ptr) |
Free memory allocated by libsmbios. | |
static char * | getTagFromSMI (u16 select) |
static void | setTagUsingSMI (const char *newTag, u16 select) |
static char * | getStringFromTable (unsigned int structure, unsigned int stringNumber) |
static char * | getServiceTagFromSysInfo () |
static char * | getServiceTagFromSysEncl () |
char * | getServiceTagFromCMOSToken () |
char * | getServiceTagFromSMI () |
const char * | SMBIOSGetServiceTag () |
Returns the 5 or 7 character Dell Service Tag. | |
void | setServiceTagUsingCMOSToken (const char *newTag, size_t len) |
void | setServiceTagUsingSMI (const char *newTag, size_t size) |
int | SMBIOSSetServiceTag (const char *password, const char *serviceTag, size_t len) |
Set the 5 or 7 character Dell Service Tag. | |
static char * | getAssetTagFromSysEncl () |
static char * | getAssetTagFromToken () |
char * | getAssetTagFromSMI () |
const char * | SMBIOSGetAssetTag () |
Returns the 10 character Dell Asset Tag. | |
void | setAssetTagUsingCMOSToken (const char *newTag, size_t len) |
void | setAssetTagUsingSMI (const char *newTag, size_t size) |
int | SMBIOSSetAssetTag (const char *password, const char *assetTag, size_t len) |
Set the Dell Asset Tag. | |
static char * | getSystemNameFromSysInfo () |
const char * | SMBIOSGetSystemName () |
Return a buffer containing the System Name. | |
static char * | getBiosVersionFromOneByteStructForDiamond () |
static char * | getBiosVersionFromSmbios () |
const char * | SMBIOSGetBiosVersion () |
Return a buffer containing the BIOS version string. | |
const char * | SMBIOSGetVendorName () |
int | SMBIOSHasNvramStateBytes () |
int | SMBIOSGetNvramStateBytes (int user) |
void | SMBIOSSetNvramStateBytes (int value, int user) |
static bool | getUpOffsetAndFlag (up_info *up) |
static int | upBootHelper (bool set=false, bool value=false) |
int | SMBIOSHasBootToUp () |
int | SMBIOSGetBootToUp () |
void | SMBIOSSetBootToUp (int state) |
int | SMBIOSGetSmiPasswordCoding () |
Variables | |
smbios::Exception< smbios::IException > | SysInfoException |
static std::string | biosPassword = "" |
|
Definition at line 46 of file System.cpp. |
|
Definition at line 45 of file System.cpp. |
|
Definition at line 19 of file System.cpp. |
|
Definition at line 83 of file System.cpp. Referenced by dell_decode_service_tag(). |
|
Definition at line 105 of file System.cpp. References dell_decode_digit(), and SVC_TAG_LEN_MAX. Referenced by getServiceTagFromCMOSToken(). |
|
Definition at line 127 of file System.cpp. Referenced by dell_encode_service_tag(). |
|
Definition at line 151 of file System.cpp. References dell_encode_digit(), SVC_TAG_CMOS_LEN_MAX, and SVC_TAG_LEN_MAX. Referenced by setServiceTagUsingCMOSToken(). |
|
Definition at line 549 of file System.cpp. References getTagFromSMI(). |
|
Definition at line 497 of file System.cpp. References getStringFromTable(), smbios::System_Enclosure_or_Chassis, and System_Enclosure_or_Chassis_Asset_Offset. |
|
Definition at line 502 of file System.cpp. References ASSET_TAG_CMOS_LEN_MAX, ASSET_TAG_LEN_MAX, Cmos_Asset_Token, CmosRWFactory::getFactory(), TokenTableFactory::getFactory(), CmosRWFactory::getSingleton(), TokenTableFactory::getSingleton(), and ICmosRW::readByte(). |
|
Definition at line 734 of file System.cpp. References DELL_SYSTEM_STRING, DELL_SYSTEM_STRING_LEN, DELL_SYSTEM_STRING_LOC_DIAMOND_1, IMemory::fillBuffer(), IMemory::getByte(), MemoryFactory::getFactory(), ID_BYTE_LOC_DIAMOND_1, and SYSTEM_ID_DIAMOND. |
|
Definition at line 767 of file System.cpp. References smbios::BIOS_Information, BIOS_Information_Version_Offset, and getStringFromTable(). |
|
Definition at line 282 of file System.cpp. References Cmos_Service_Token, DCOUT, dell_decode_service_tag(), TokenTableFactory::getFactory(), CmosRWFactory::getFactory(), TokenTableFactory::getSingleton(), CmosRWFactory::getSingleton(), ICmosRW::readByte(), SVC_TAG_CMOS_LEN_MAX, and SVC_TAG_LEN_MAX. Referenced by testSmbiosXml::testServiceTagWriting(). |
|
Definition at line 337 of file System.cpp. References DCOUT, and getTagFromSMI(). |
|
Definition at line 275 of file System.cpp. References DCOUT, getStringFromTable(), smbios::System_Enclosure_or_Chassis, and System_Enclosure_or_Chassis_Service_Offset. |
|
Definition at line 269 of file System.cpp. References DCOUT, getStringFromTable(), smbios::System_Information, and System_Information_Serial_Number_Offset. |
|
Definition at line 238 of file System.cpp. References SmbiosFactory::getFactory(), SmbiosFactory::getSingleton(), and stripString(). Referenced by getAssetTagFromSysEncl(), getBiosVersionFromSmbios(), getServiceTagFromSysEncl(), getServiceTagFromSysInfo(), getSystemNameFromSysInfo(), and SMBIOSGetVendorName(). |
|
Definition at line 690 of file System.cpp. References getStringFromTable(), smbios::System_Information, and System_Information_Product_Name_Offset. |
|
Definition at line 213 of file System.cpp. References smi::doSimpleCallingInterfaceSmi(). Referenced by getAssetTagFromSMI(), and getServiceTagFromSMI(). |
|
Definition at line 961 of file System.cpp. References IMemory::fillBuffer(), and MemoryFactory::getFactory(). Referenced by upBootHelper(). |
|
Definition at line 596 of file System.cpp. References ASSET_TAG_CMOS_LEN_MAX, Cmos_Asset_Token, CmosRWFactory::getFactory(), TokenTableFactory::getFactory(), CmosRWFactory::getSingleton(), TokenTableFactory::getSingleton(), ICmosRW::readByte(), and ICmosRW::writeByte(). |
|
Definition at line 641 of file System.cpp. References setTagUsingSMI(). |
|
Definition at line 392 of file System.cpp. References Cmos_Service_Token, dell_encode_service_tag(), CmosRWFactory::getFactory(), TokenTableFactory::getFactory(), CmosRWFactory::getSingleton(), TokenTableFactory::getSingleton(), ICmosRW::readByte(), SVC_TAG_CMOS_LEN_MAX, SVC_TAG_LEN_MAX, and ICmosRW::writeByte(). |
|
Definition at line 450 of file System.cpp. References setTagUsingSMI(). |
|
Definition at line 230 of file System.cpp. References biosPassword, smi::doSimpleCallingInterfaceSmi(), and smi::getAuthenticationKey(). Referenced by setAssetTagUsingSMI(), and setServiceTagUsingSMI(). |
|
Free memory allocated by libsmbios. This function must be called to free memory for any function that allocates memory on behalf of its caller. Definition at line 207 of file System.cpp. Referenced by safeConvertToString(), and testSmbiosXml::testSystemInfo(). |
|
Returns the 10 character Dell Asset Tag. Allocates a buffer on behalf of the caller. Caller must use the freeMemory() function call to free this memory when finished. Definition at line 567 of file System.cpp. Referenced by testSmbiosXml::testAssetTag(), and testSmbiosXml::testSystemInfo(). |
|
Return a buffer containing the BIOS version string. Allocates a buffer on behalf of the caller. Caller must use the freeMemory() function call to free this memory when finished. Definition at line 782 of file System.cpp. Referenced by testSmbiosXml::testBiosVersion(), and testSmbiosXml::testSystemInfo(). |
|
Definition at line 1076 of file System.cpp. References upBootHelper(). Referenced by testSmbiosXml::testUpBoot(). |
|
Return a string representing the version of the libsmbios library. Returns the current version of the SMBIOS library as a string Definition at line 201 of file System.cpp. References LIBSMBIOS_RELEASE_VERSION. Referenced by testSmbiosXml::testLibraryVersion(). |
|
Definition at line 869 of file System.cpp. References _, TokenTableFactory::getFactory(), TokenTableFactory::getSingleton(), NvramByte1_Token, NvramByte2_Token, and SysInfoException. Referenced by testSmbiosXml::testStateBytes(). |
|
Returns the 5 or 7 character Dell Service Tag. Allocates a buffer on behalf of the caller. Caller must use the freeMemory() function call to free this memory when finished. Definition at line 357 of file System.cpp. References DCOUT. Referenced by testSmbiosXml::testServiceTag(), testSmbiosXml::testServiceTagWriting(), and testSmbiosXml::testSystemInfo(). |
|
returns password coding used in SMI calls 0 == unknown 1 == scan code 2 == ascii Definition at line 1090 of file System.cpp. References smi::getPasswordFormat(). |
|
Return a buffer containing the System Name. Allocates a buffer on behalf of the caller. Caller must use the freeMemory() function call to free this memory when finished. Definition at line 705 of file System.cpp. Referenced by testSmbiosXml::testSystemInfo(), and testSmbiosXml::testSystemName(). |
|
Allocates a buffer on behalf of the caller. Caller must use the freeMemory() function call to free this memory when finished. Definition at line 811 of file System.cpp. References _, getStringFromTable(), stripString(), SysInfoException, smbios::System_Information, and System_Information_Manufacturer_Offset. Referenced by testSmbiosXml::testSystemInfo(). |
|
Definition at line 1071 of file System.cpp. References upBootHelper(). Referenced by testSmbiosXml::testUpBoot(). |
|
Definition at line 833 of file System.cpp. References _, TokenTableFactory::getFactory(), TokenTableFactory::getSingleton(), NvramByte1_Token, NvramByte2_Token, and SysInfoException. Referenced by testSmbiosXml::testStateBytes(). |
|
Set the Dell Asset Tag. The Dell Asset Tag is displayed in BIOS and is also contained in SMBIOS. This tag can generally be up to 10 chars long. There are SMI and CMOS methods to set this tag. At present, only CMOS access method is implemented in libsmbios. This works across all Dell hardware that the author is aware of. User of the system can use this field to store any user-defined data. Dell BIOS/support/etc does not utilize this value. Definition at line 659 of file System.cpp. References biosPassword. |
|
Definition at line 1083 of file System.cpp. References upBootHelper(). Referenced by testSmbiosXml::testUpBoot(). |
|
Definition at line 922 of file System.cpp. References _, TokenTableFactory::getFactory(), TokenTableFactory::getSingleton(), NvramByte1_Token, NvramByte2_Token, and SysInfoException. Referenced by testSmbiosXml::testStateBytes(). |
|
Set the 5 or 7 character Dell Service Tag. The Dell Asset Tag is displayed in BIOS and is also contained in SMBIOS. This tag can generally be up to 7 chars long. There are SMI and CMOS methods to set this tag. At present, only CMOS access method is implemented in libsmbios. This works across all Dell hardware that the author is aware of. WARNING! The Dell Service Tag is very closely tied into the Dell support system. This tag should not be changed except under direction from Dell support. Definition at line 467 of file System.cpp. References biosPassword. Referenced by testSmbiosXml::testServiceTagWriting(). |
|
Definition at line 57 of file System.cpp. Referenced by getStringFromTable(), and SMBIOSGetVendorName(). |
|
Definition at line 1002 of file System.cpp. References _, indexed_io_access_structure::dataPort, CmosRWFactory::getFactory(), TokenTableFactory::getFactory(), CmosRWFactory::getSingleton(), TokenTableFactory::getSingleton(), getUpOffsetAndFlag(), indexed_io_access_structure::indexPort, NvramByte2_Token, and SysInfoException. Referenced by SMBIOSGetBootToUp(), SMBIOSHasBootToUp(), and SMBIOSSetBootToUp(). |
|
Definition at line 55 of file System.cpp. Referenced by setTagUsingSMI(), SMBIOSSetAssetTag(), and SMBIOSSetServiceTag(). |
|
Definition at line 23 of file SysInfoError.cpp. |