#ifndef _APPLE_SMBIOS_H
#define _APPLE_SMBIOS_H
#include <IOKit/IOService.h>
#include "SMBIOS.h"
class SMBPackedStrings;
class AppleSMBIOS : public IOService
{
OSDeclareDefaultStructors( AppleSMBIOS )
protected:
IOService * _provider;
IOService * _platform;
int _verbose;
OSData * memSlotsData;
OSData * memTypesData;
OSData * memSizesData;
enum {
kNoMemoryInfo,
kMemoryModuleInfo,
kMemoryDeviceInfo
} memInfoSource;
bool fetchSMBIOSTable();
void decodeSMBIOSTable( const void * tableData, UInt16 tableLength,
UInt16 structureCount );
void decodeSMBIOSStructure( const SMBStructHeader * structureHeader,
const void * tableBoundary );
void processSMBIOSStructure( const SMBStructBIOSInformation * bios,
SMBPackedStrings * strings );
void processSMBIOSStructure( const SMBStructSystemInformation * sys,
SMBPackedStrings * strings );
void processSMBIOSStructure( const SMBStructSystemEnclosure * enclosure,
SMBPackedStrings * strings );
void processSMBIOSStructure( const SMBStructProcessorInformation * cpu,
SMBPackedStrings * strings );
void processSMBIOSStructure( const SMBStructCacheInformation * cache,
SMBPackedStrings * strings );
void processSMBIOSStructure( const SMBStructMemoryDevice * memory,
SMBPackedStrings * strings );
void processSMBIOSStructure( const SMBStructMemoryModule * memory,
SMBPackedStrings * strings );
void updateDeviceTree();
public:
virtual bool start( IOService * provider );
virtual void free();
};
#endif