The SMBIOS (System Management BIOS) is a standard developed by the DMTF. The information stored in the SMBIOS includes devices manufacturer, model name, serial number, BIOS version, asset tag, processors, ports and device memory installed.
The TSMBIOS libary allows access the System Management BIOS (SMBIOS) using the Object Pascal language (Delphi or Free Pascal).
- Fully documented (XMLDoc), compatible with the Help Insight feature, available since Delphi 2005.
- Supports SMBIOS Version 2.1 to 3.9.
- Compatible with Delphi 5 through Delphi 13 Florence.
- Works with FPC 2.4.0 or later.
- Supports Windows and Linux.
- Can read SMBIOS data from remote machines using WMI.
- Exposes the SMBIOS 3.x fixed-layout fields added to the supported table types, including BIOS ROM size, processor core/thread counts, cache sizes, system slot bus data, and memory device technology, firmware, persistent memory, speed, PMIC, and RCD data.
- Provides
SMBiosAtLeastto guard version-specific fields before reading newer SMBIOS data.
- BIOS Information (Type 0)
- System Information (Type 1)
- Baseboard (or Module) Information (Type 2)
- System Enclosure or Chassis (Type 3)
- Processor Information (Type 4)
- Memory Controller Information (Type 5)
- Memory Module Information (Type 6)
- Cache Information (Type 7)
- Port Connector Information (Type 8)
- System Slots (Type 9)
- On Board Devices Information (Type 10)
- OEM Strings (Type 11)
- System Configuration Options (Type 12)
- BIOS Language Information (Type 13)
- Group Associations (Type 14)
- System Event Log (Type 15) - Not Implemented
- Physical Memory Array (Type 16)
- Memory Device (Type 17)
- Memory Array Mapped Address (Type 19)
- Memory Device Mapped Address (Type 20)
- Built-in Pointing Device (Type 21)
- Portable Battery (Type 22)
- System Reset (Type 23) - Not Implemented
- Voltage Probe (Type 26)
- Cooling Device (Type 27)
- Temperature Probe (Type 28)
- Electrical Current Probe (Type 29)
- Out-of-Band Remote Access (Type 30) - Not Implemented
- 64-Bit Memory Error Information (Type 33) - Not Implemented
- Management Device (Type 34) - Not Implemented
- Management Device Component (Type 35) - Not Implemented
- Management Device Threshold Data (Type 36) - Not Implemented
- Memory Channel (Type 37) - Not Implemented
- System Power Supply (Type 39) - Not Implemented
- Additional Information (Type 40) - Not Implemented
- Onboard Devices Extended Information (Type 41) - Not Implemented
- Management Controller Host Interface (Type 42) - Not Implemented
The existing supported tables have been updated with SMBIOS 3.x fields where the library already implements the table. This update does not add support for new SMBIOS table types.
This code demonstrates how to retrieve information related to the memory devices installed on the system.
{$APPTYPE CONSOLE}
{$R *.res}
uses
Classes,
SysUtils,
uSMBIOS in '..\..\Common\uSMBIOS.pas';
procedure GetMemoryDeviceInfo;
Var
SMBios: TSMBios;
LMemoryDevice: TMemoryDeviceInformation;
begin
SMBios := TSMBios.Create;
try
WriteLn('Memory Device Information');
WriteLn('-------------------------');
if SMBios.HasMemoryDeviceInfo then
for LMemoryDevice in SMBios.MemoryDeviceInfo do
begin
WriteLn(Format('Total Width %d bits',[LMemoryDevice.RAWMemoryDeviceInfo.TotalWidth]));
WriteLn(Format('Data Width %d bits',[LMemoryDevice.RAWMemoryDeviceInfo.DataWidth]));
WriteLn(Format('Size %d Mbytes',[LMemoryDevice.GetSize]));
WriteLn(Format('Form Factor %s',[LMemoryDevice.GetFormFactor]));
WriteLn(Format('Device Locator %s',[LMemoryDevice.GetDeviceLocatorStr]));
WriteLn(Format('Bank Locator %s',[LMemoryDevice.GetBankLocatorStr]));
WriteLn(Format('Memory Type %s',[LMemoryDevice.GetMemoryTypeStr]));
WriteLn(Format('Speed %d MT/s',[LMemoryDevice.GetSpeed]));
if SMBiosAtLeast(SMBios, 2, 7) then
WriteLn(Format('Configured Speed %d MT/s',[LMemoryDevice.GetConfiguredMemorySpeed]));
if SMBiosAtLeast(SMBios, 3, 2) then
begin
WriteLn(Format('Technology %s',[LMemoryDevice.GetMemoryTechnologyStr]));
WriteLn(Format('Firmware %s',[LMemoryDevice.FirmwareVersionStr]));
WriteLn(Format('Non-Volatile %d bytes',[LMemoryDevice.RAWMemoryDeviceInfo.NonVolatileSize]));
WriteLn(Format('Volatile %d bytes',[LMemoryDevice.RAWMemoryDeviceInfo.VolatileSize]));
WriteLn(Format('Cache %d bytes',[LMemoryDevice.RAWMemoryDeviceInfo.CacheSize]));
WriteLn(Format('Logical %d bytes',[LMemoryDevice.RAWMemoryDeviceInfo.LogicalSize]));
end;
if SMBiosAtLeast(SMBios, 3, 7) then
begin
WriteLn(Format('PMIC0 Manufacturer ID %.4x',[LMemoryDevice.RAWMemoryDeviceInfo.PMIC0ManufacturerID]));
WriteLn(Format('PMIC0 Revision Number %.4x',[LMemoryDevice.RAWMemoryDeviceInfo.PMIC0RevisionNumber]));
WriteLn(Format('RCD Manufacturer ID %.4x',[LMemoryDevice.RAWMemoryDeviceInfo.RCDManufacturerID]));
WriteLn(Format('RCD Revision Number %.4x',[LMemoryDevice.RAWMemoryDeviceInfo.RCDRevisionNumber]));
end;
WriteLn(Format('Manufacturer %s',[LMemoryDevice.ManufacturerStr]));
WriteLn(Format('Serial Number %s',[LMemoryDevice.SerialNumberStr]));
WriteLn(Format('Asset Tag %s',[LMemoryDevice.AssetTagStr]));
WriteLn(Format('Part Number %s',[LMemoryDevice.PartNumberStr]));
WriteLn;
if Assigned(LMemoryDevice.PhysicalMemoryArray) then
begin
WriteLn(' Physical Memory Array');
WriteLn(' ---------------------');
WriteLn(' Location '+LMemoryDevice.PhysicalMemoryArray.GetLocationStr);
WriteLn(' Use '+LMemoryDevice.PhysicalMemoryArray.GetUseStr);
WriteLn(' Error Correction '+LMemoryDevice.PhysicalMemoryArray.GetErrorCorrectionStr);
if LMemoryDevice.PhysicalMemoryArray.RAWPhysicalMemoryArrayInformation.MaximumCapacity<>$80000000 then
WriteLn(Format(' Maximum Capacity %d Kb',[LMemoryDevice.PhysicalMemoryArray.RAWPhysicalMemoryArrayInformation.MaximumCapacity]))
else
WriteLn(Format(' Maximum Capacity %d bytes',[LMemoryDevice.PhysicalMemoryArray.RAWPhysicalMemoryArrayInformation.ExtendedMaximumCapacity]));
WriteLn(Format(' Memory devices %d',[LMemoryDevice.PhysicalMemoryArray.RAWPhysicalMemoryArrayInformation.NumberofMemoryDevices]));
end;
WriteLn;
end
else
Writeln('No Memory Device Info was found');
finally
SMBios.Free;
end;
end;
begin
try
GetMemoryDeviceInfo;
except
on E:Exception do
Writeln(E.Classname, ':', E.Message);
end;
Writeln('Press Enter to exit');
Readln;
end.You can install Delphinus package manager and install TSMBIOS as a package there. (Delphinus-Support)
