Documentation
¶
Overview ¶
Package type17 implements SMBIOS Type 17 - Memory Device Per DSP0134 SMBIOS Reference Specification 3.9.0
Index ¶
- Constants
- type MemoryDevice
- func (m *MemoryDevice) DisplayName() string
- func (m *MemoryDevice) GetConfiguredSpeed() uint32
- func (m *MemoryDevice) GetSpeed() uint32
- func (m *MemoryDevice) IsPopulated() bool
- func (m *MemoryDevice) Ranks() uint8
- func (m *MemoryDevice) SizeString() string
- func (m *MemoryDevice) SpeedString() string
- func (m *MemoryDevice) VoltageString() string
- type MemoryFormFactor
- type MemoryTechnology
- type MemoryType
- type MemoryTypeDetail
- type OperatingModeCapability
Constants ¶
const StructureType uint8 = 17
StructureType is the SMBIOS structure type for Memory Device
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MemoryDevice ¶
type MemoryDevice struct {
Header gosmbios.Header
PhysicalMemoryArrayHandle uint16
MemoryErrorInformationHandle uint16
TotalWidth uint16 // In bits, 0xFFFF = unknown
DataWidth uint16 // In bits, 0xFFFF = unknown
Size uint64 // In MB (calculated)
FormFactor MemoryFormFactor
DeviceSet uint8
DeviceLocator string
BankLocator string
MemoryType MemoryType
TypeDetail MemoryTypeDetail
Speed uint16 // In MT/s, 0 = unknown
Manufacturer string // SMBIOS 2.3+
SerialNumber string // SMBIOS 2.3+
AssetTag string // SMBIOS 2.3+
PartNumber string // SMBIOS 2.3+
Attributes uint8 // SMBIOS 2.6+
ExtendedSize uint32 // SMBIOS 2.7+ (in MB)
ConfiguredMemorySpeed uint16 // SMBIOS 2.7+ (in MT/s)
MinimumVoltage uint16 // SMBIOS 2.8+ (in mV)
MaximumVoltage uint16 // SMBIOS 2.8+ (in mV)
ConfiguredVoltage uint16 // SMBIOS 2.8+ (in mV)
MemoryTechnology MemoryTechnology // SMBIOS 3.2+
MemoryOperatingModeCapability OperatingModeCapability // SMBIOS 3.2+
FirmwareVersion string // SMBIOS 3.2+
ModuleManufacturerID uint16 // SMBIOS 3.2+
ModuleProductID uint16 // SMBIOS 3.2+
MemorySubsystemControllerManufacturerID uint16 // SMBIOS 3.2+
MemorySubsystemControllerProductID uint16 // SMBIOS 3.2+
NonVolatileSize uint64 // SMBIOS 3.2+ (in bytes)
VolatileSize uint64 // SMBIOS 3.2+ (in bytes)
CacheSize uint64 // SMBIOS 3.2+ (in bytes)
LogicalSize uint64 // SMBIOS 3.2+ (in bytes)
ExtendedSpeed uint32 // SMBIOS 3.3+ (in MT/s)
ExtendedConfiguredMemorySpeed uint32 // SMBIOS 3.3+ (in MT/s)
PMIC0ManufacturerID uint16 // SMBIOS 3.7+
PMIC0RevisionNumber uint16 // SMBIOS 3.7+
RCDManufacturerID uint16 // SMBIOS 3.7+
RCDRevisionNumber uint16 // SMBIOS 3.7+
}
MemoryDevice represents Type 17 - Memory Device
func Get ¶
func Get(sm *gosmbios.SMBIOS) (*MemoryDevice, error)
Get retrieves the first Memory Device from SMBIOS data
func GetAll ¶
func GetAll(sm *gosmbios.SMBIOS) ([]*MemoryDevice, error)
GetAll retrieves all Memory Device structures from SMBIOS data
func GetPopulated ¶
func GetPopulated(sm *gosmbios.SMBIOS) ([]*MemoryDevice, error)
GetPopulated retrieves only populated Memory Device structures (those with memory installed)
func Parse ¶
func Parse(s *gosmbios.Structure) (*MemoryDevice, error)
Parse parses a Memory Device structure from raw SMBIOS data
func (*MemoryDevice) DisplayName ¶
func (m *MemoryDevice) DisplayName() string
DisplayName returns a display-friendly memory description
func (*MemoryDevice) GetConfiguredSpeed ¶
func (m *MemoryDevice) GetConfiguredSpeed() uint32
GetConfiguredSpeed returns the configured speed in MT/s
func (*MemoryDevice) GetSpeed ¶
func (m *MemoryDevice) GetSpeed() uint32
GetSpeed returns the effective speed in MT/s
func (*MemoryDevice) IsPopulated ¶
func (m *MemoryDevice) IsPopulated() bool
IsPopulated returns true if memory is installed in this slot
func (*MemoryDevice) Ranks ¶
func (m *MemoryDevice) Ranks() uint8
Ranks returns the number of ranks (from Attributes field)
func (*MemoryDevice) SizeString ¶
func (m *MemoryDevice) SizeString() string
SizeString returns a human-readable size string
func (*MemoryDevice) SpeedString ¶
func (m *MemoryDevice) SpeedString() string
SpeedString returns a human-readable speed string
func (*MemoryDevice) VoltageString ¶
func (m *MemoryDevice) VoltageString() string
VoltageString returns a human-readable voltage string
type MemoryFormFactor ¶
type MemoryFormFactor uint8
MemoryFormFactor identifies the physical form factor of the memory device
const ( FormFactorOther MemoryFormFactor = 0x01 FormFactorUnknown MemoryFormFactor = 0x02 FormFactorSIMM MemoryFormFactor = 0x03 FormFactorSIP MemoryFormFactor = 0x04 FormFactorChip MemoryFormFactor = 0x05 FormFactorDIP MemoryFormFactor = 0x06 FormFactorZIP MemoryFormFactor = 0x07 FormFactorProprietaryCard MemoryFormFactor = 0x08 FormFactorDIMM MemoryFormFactor = 0x09 FormFactorTSOP MemoryFormFactor = 0x0A FormFactorRowOfChips MemoryFormFactor = 0x0B FormFactorRIMM MemoryFormFactor = 0x0C FormFactorSODIMM MemoryFormFactor = 0x0D FormFactorSRIMM MemoryFormFactor = 0x0E FormFactorFBDIMM MemoryFormFactor = 0x0F FormFactorDie MemoryFormFactor = 0x10 )
Memory form factor values
func (MemoryFormFactor) String ¶
func (ff MemoryFormFactor) String() string
String returns a human-readable form factor description
type MemoryTechnology ¶
type MemoryTechnology uint8
MemoryTechnology identifies the memory technology (SMBIOS 3.2+)
const ( TechOther MemoryTechnology = 0x01 TechUnknown MemoryTechnology = 0x02 TechDRAM MemoryTechnology = 0x03 TechNVDIMMN MemoryTechnology = 0x04 TechNVDIMMF MemoryTechnology = 0x05 TechNVDIMMP MemoryTechnology = 0x06 TechIntelOptanePersistent MemoryTechnology = 0x07 )
Memory technology values
func (MemoryTechnology) String ¶
func (mt MemoryTechnology) String() string
String returns a human-readable technology description
type MemoryType ¶
type MemoryType uint8
MemoryType identifies the type of memory
const ( MemTypeOther MemoryType = 0x01 MemTypeUnknown MemoryType = 0x02 MemTypeDRAM MemoryType = 0x03 MemTypeEDRAM MemoryType = 0x04 MemTypeVRAM MemoryType = 0x05 MemTypeSRAM MemoryType = 0x06 MemTypeRAM MemoryType = 0x07 MemTypeROM MemoryType = 0x08 MemTypeFlash MemoryType = 0x09 MemTypeEEPROM MemoryType = 0x0A MemTypeFEPROM MemoryType = 0x0B MemTypeEPROM MemoryType = 0x0C MemTypeCDRAM MemoryType = 0x0D MemType3DRAM MemoryType = 0x0E MemTypeSDRAM MemoryType = 0x0F MemTypeSGRAM MemoryType = 0x10 MemTypeRDRAM MemoryType = 0x11 MemTypeDDR MemoryType = 0x12 MemTypeDDR2 MemoryType = 0x13 MemTypeDDR2FBDIMM MemoryType = 0x14 MemTypeDDR3 MemoryType = 0x18 MemTypeFBD2 MemoryType = 0x19 MemTypeDDR4 MemoryType = 0x1A MemTypeLPDDR MemoryType = 0x1B MemTypeLPDDR2 MemoryType = 0x1C MemTypeLPDDR3 MemoryType = 0x1D MemTypeLPDDR4 MemoryType = 0x1E MemTypeLogicalNonVolatile MemoryType = 0x1F MemTypeHBM MemoryType = 0x20 MemTypeHBM2 MemoryType = 0x21 MemTypeDDR5 MemoryType = 0x22 MemTypeLPDDR5 MemoryType = 0x23 MemTypeHBM3 MemoryType = 0x24 )
Memory type values
func (MemoryType) IsDDR ¶
func (mt MemoryType) IsDDR() bool
IsDDR returns true if the memory type is DDR-based
func (MemoryType) String ¶
func (mt MemoryType) String() string
String returns a human-readable memory type description
type MemoryTypeDetail ¶
type MemoryTypeDetail uint16
MemoryTypeDetail represents memory type detail flags
const ( TypeDetailReserved0 MemoryTypeDetail = 1 << 0 // Reserved TypeDetailOther MemoryTypeDetail = 1 << 1 // Other TypeDetailUnknown MemoryTypeDetail = 1 << 2 // Unknown TypeDetailFastPaged MemoryTypeDetail = 1 << 3 // Fast-paged TypeDetailStaticColumn MemoryTypeDetail = 1 << 4 // Static column TypeDetailPseudoStatic MemoryTypeDetail = 1 << 5 // Pseudo-static TypeDetailRAMBUS MemoryTypeDetail = 1 << 6 // RAMBUS TypeDetailSynchronous MemoryTypeDetail = 1 << 7 // Synchronous TypeDetailCMOS MemoryTypeDetail = 1 << 8 // CMOS TypeDetailEDO MemoryTypeDetail = 1 << 9 // EDO TypeDetailWindowDRAM MemoryTypeDetail = 1 << 10 // Window DRAM TypeDetailCacheDRAM MemoryTypeDetail = 1 << 11 // Cache DRAM TypeDetailNonVolatile MemoryTypeDetail = 1 << 12 // Non-volatile TypeDetailRegistered MemoryTypeDetail = 1 << 13 // Registered (Buffered) TypeDetailUnbuffered MemoryTypeDetail = 1 << 14 // Unbuffered (Unregistered) TypeDetailLRDIMM MemoryTypeDetail = 1 << 15 // LRDIMM )
Memory type detail bit definitions
func (MemoryTypeDetail) Has ¶
func (td MemoryTypeDetail) Has(flag MemoryTypeDetail) bool
Has checks if a type detail flag is set
func (MemoryTypeDetail) String ¶
func (td MemoryTypeDetail) String() string
String returns a human-readable type detail description
type OperatingModeCapability ¶
type OperatingModeCapability uint16
OperatingModeCapability represents memory operating mode capability (SMBIOS 3.2+)
const ( OpModeReserved0 OperatingModeCapability = 1 << 0 // Reserved OpModeOther OperatingModeCapability = 1 << 1 // Other OpModeUnknown OperatingModeCapability = 1 << 2 // Unknown OpModeVolatile OperatingModeCapability = 1 << 3 // Volatile memory OpModeByteAccessPersistent OperatingModeCapability = 1 << 4 // Byte-accessible persistent memory OpModeBlockAccessPersistent OperatingModeCapability = 1 << 5 // Block-accessible persistent memory )
Operating mode capability bit definitions
func (OperatingModeCapability) Has ¶
func (omc OperatingModeCapability) Has(flag OperatingModeCapability) bool
Has checks if an operating mode is supported