dmidecode

package
v0.0.0-...-1465ce6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package dmidecode gives access to decoded SMBIOS/DMI structures.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnexpectedTableType = errors.New("unexpected table type")
)

Errors parsing tables.

View Source
var ErrUnsupportedTableType = errors.New("unsupported table type")

ErrUnsupportedTableType is returned by ParseTypedTable if this table type is not supported and cannot be parsed.

View Source
var MemoryDeviceManufacturer = map[string]uint16{
	"Micron":   0x2C00,
	"Samsung":  0xCE00,
	"Montage":  0x3206,
	"Kinston":  0x9801,
	"Elpida":   0xFE02,
	"Hynix":    0xAD00,
	"Infineon": 0xC100,
	"Smart":    0x9401,
	"Aeneon":   0x5705,
	"Qimonda":  0x5105,
	"NEC":      0x1000,
	"Nanya":    0x0B03,
	"TI":       0x9700,
	"IDT":      0xB300,
	"TEK":      0x3D00,
	"Agilent":  0xC802,
	"Inphi":    0xB304,
	"Intel":    0x8900,
	"Viking":   0x4001,
}

MemoryDeviceManufacturer numbers.

Functions

func ParseTypedTable

func ParseTypedTable(t *smbios.Table) (fmt.Stringer, error)

ParseTypedTable parses generic Table into a typed struct.

Types

type BIOSChars

type BIOSChars uint64

BIOSChars are BIOS characteristics as defined in DSP0134 7.1.1.

const (
	// Reserved.
	BIOSCharsReserved BIOSChars = 1 << 0
	// Reserved.
	BIOSCharsReserved2 BIOSChars = 1 << 1
	// Unknown.
	BIOSCharsUnknown BIOSChars = 1 << 2
	// BIOS Characteristics are not supported.
	BIOSCharsAreNotSupported BIOSChars = 1 << 3
	// ISA is supported.
	BIOSCharsISA BIOSChars = 1 << 4
	// MCA is supported.
	BIOSCharsMCA BIOSChars = 1 << 5
	// EISA is supported.
	BIOSCharsEISA BIOSChars = 1 << 6
	// PCI is supported.
	BIOSCharsPCI BIOSChars = 1 << 7
	// PC card (PCMCIA) is supported.
	BIOSCharsPCMCIA BIOSChars = 1 << 8
	// Plug and Play is supported.
	BIOSCharsPlugAndPlay BIOSChars = 1 << 9
	// APM is supported.
	BIOSCharsAPM BIOSChars = 1 << 10
	// BIOS is upgradeable (Flash).
	BIOSCharsBIOSUpgradeableFlash BIOSChars = 1 << 11
	// BIOS shadowing is allowed.
	BIOSCharsBIOSShadowingIsAllowed BIOSChars = 1 << 12
	// VL-VESA is supported.
	BIOSCharsVLVESA BIOSChars = 1 << 13
	// ESCD support is available.
	BIOSCharsESCD BIOSChars = 1 << 14
	// Boot from CD is supported.
	BIOSCharsBootFromCD BIOSChars = 1 << 15
	// Selectable boot is supported.
	BIOSCharsSelectableBoot BIOSChars = 1 << 16
	// BIOS ROM is socketed.
	BIOSCharsBIOSROMSocketed BIOSChars = 1 << 17
	// Boot from PC card (PCMCIA) is supported.
	BIOSCharsBootFromPCMCIA BIOSChars = 1 << 18
	// EDD specification is supported.
	BIOSCharsEDD BIOSChars = 1 << 19
	// Japanese floppy for NEC 9800 1.2 MB (3.5”, 1K bytes/sector, 360 RPM) is supported.
	BIOSCharsJapaneseFloppyNEC BIOSChars = 1 << 20
	// Japanese floppy for Toshiba 1.2 MB (3.5”, 360 RPM) is supported.
	BIOSCharsJapaneseFloppyToshiba BIOSChars = 1 << 21
	// 5.25” / 360 KB floppy services are supported.
	BIOSChars360KBFloppy BIOSChars = 1 << 22
	// 5.25” /1.2 MB floppy services are supported.
	BIOSChars12MBFloppy BIOSChars = 1 << 23
	// 3.5” / 720 KB floppy services are supported.
	BIOSChars720KBFloppy BIOSChars = 1 << 24
	// 3.5” / 2.88 MB floppy services are supported.
	BIOSChars288MBFloppy BIOSChars = 1 << 25
	// Int 5h, print screen Service is supported.
	BIOSCharsInt5h BIOSChars = 1 << 26
	// Int 9h, 8042 keyboard services are supported.
	BIOSCharsInt9h BIOSChars = 1 << 27
	// Int 14h, serial services are supported.
	BIOSCharsInt14h BIOSChars = 1 << 28
	// Int 17h, printer services are supported.
	BIOSCharsInt17h BIOSChars = 1 << 29
	// Int 10h, CGA/Mono Video Services are supported.
	BIOSCharsInt10h BIOSChars = 1 << 30
	// NEC PC-98.
	BIOSCharsNECPC98 BIOSChars = 1 << 31
)

BIOSChars fields are defined in DSP0134 7.1.1.

func (BIOSChars) String

func (v BIOSChars) String() string

type BIOSCharsExt1

type BIOSCharsExt1 uint8

BIOSCharsExt1 is defined in DSP0134 7.1.2.1.

const (
	BIOSCharsExt1ACPI               BIOSCharsExt1 = 1 << 0 // ACPI is supported.
	BIOSCharsExt1USBLegacy          BIOSCharsExt1 = 1 << 1 // USB Legacy is supported.
	BIOSCharsExt1AGP                BIOSCharsExt1 = 1 << 2 // AGP is supported.
	BIOSCharsExt1I2OBoot            BIOSCharsExt1 = 1 << 3 // I2O boot is supported.
	BIOSCharsExt1LS120SuperDiskBoot BIOSCharsExt1 = 1 << 4 // LS-120 SuperDisk boot is supported.
	BIOSCharsExt1ATAPIZIPDriveBoot  BIOSCharsExt1 = 1 << 5 // ATAPI ZIP drive boot is supported.
	BIOSCharsExt11394Boot           BIOSCharsExt1 = 1 << 6 // 1394 boot is supported.
	BIOSCharsExt1SmartBattery       BIOSCharsExt1 = 1 << 7 // Smart battery is supported.
)

BIOSCharsExt1 is defined in DSP0134 7.1.2.1.

func (BIOSCharsExt1) String

func (v BIOSCharsExt1) String() string

type BIOSCharsExt2

type BIOSCharsExt2 uint8

BIOSCharsExt2 is defined in DSP0134 7.1.2.2.

const (
	BIOSCharsExt2BIOSBootSpecification       BIOSCharsExt2 = 1 << 0 // BIOS Boot Specification is supported.
	BIOSCharsExt2FnNetworkServiceBoot        BIOSCharsExt2 = 1 << 1 // Function key-initiated network service boot is supported.
	BIOSCharsExt2TargetedContentDistribution BIOSCharsExt2 = 1 << 2 // Enable targeted content distribution.
	BIOSCharsExt2UEFISpecification           BIOSCharsExt2 = 1 << 3 // UEFI Specification is supported.
	BIOSCharsExt2SMBIOSTableDescribesVM      BIOSCharsExt2 = 1 << 4 // SMBIOS table describes a virtual machine. (If this bit is not set, no inference can be made
)

BIOSCharsExt1 is defined in DSP0134 7.1.2.2.

func (BIOSCharsExt2) String

func (v BIOSCharsExt2) String() string

type BIOSInfo

type BIOSInfo struct {
	smbios.Header          `smbios:"-"`
	Vendor                 string        // 04h
	Version                string        // 05h
	StartingAddressSegment uint16        // 06h
	ReleaseDate            string        // 08h
	ROMSize                uint8         // 09h
	Characteristics        BIOSChars     // 0Ah
	CharacteristicsExt1    BIOSCharsExt1 // 12h
	CharacteristicsExt2    BIOSCharsExt2 // 13h
	BIOSMajor              uint8         `smbios:"default=0xff"` // 14h
	BIOSMinor              uint8         `smbios:"default=0xff"` // 15h
	ECMajor                uint8         `smbios:"default=0xff"` // 16h
	ECMinor                uint8         `smbios:"default=0xff"` // 17h
	ExtendedROMSize        uint16        // 18h
}

BIOSInfo is defined in DSP0134 7.1.

func ParseBIOSInfo

func ParseBIOSInfo(t *smbios.Table) (*BIOSInfo, error)

ParseBIOSInfo parses a generic Table into BIOSInfo.

func (*BIOSInfo) ROMSizeBytes

func (bi *BIOSInfo) ROMSizeBytes() uint64

ROMSizeBytes returns ROM size in bytes.

func (*BIOSInfo) String

func (bi *BIOSInfo) String() string

type BMCInterfaceType

type BMCInterfaceType uint8

BMCInterfaceType is defined in DSP0134 7.39.1.

const (
	BMCInterfaceTypeUnknown                           BMCInterfaceType = 0x00 // Unknown
	BMCInterfaceTypeKCSKeyboardControllerStyle        BMCInterfaceType = 0x01 // KCS: Keyboard Controller Style
	BMCInterfaceTypeSMICServerManagementInterfaceChip BMCInterfaceType = 0x02 // SMIC: Server Management Interface Chip
	BMCInterfaceTypeBTBlockTransfer                   BMCInterfaceType = 0x03 // BT: Block Transfer
	BMCInterfaceTypeSSIFSMBusSystemInterface          BMCInterfaceType = 0x04 // SSIF: SMBus System Interface
)

BMCInterfaceType values are defined in DSP0134 7.39.1.

func (BMCInterfaceType) String

func (v BMCInterfaceType) String() string

type BaseboardInfo

type BaseboardInfo struct {
	smbios.Header     `smbios:"-"`
	Manufacturer      string        // 04h
	Product           string        // 05h
	Version           string        // 06h
	SerialNumber      string        // 07h
	AssetTag          string        // 08h
	BoardFeatures     BoardFeatures // 09h
	LocationInChassis string        // 0Ah
	ChassisHandle     uint16        // 0Bh
	BoardType         BoardType     // 0Dh
	ObjectHandles     ObjectHandles // 0Eh
}

BaseboardInfo is defined in DSP0134 7.3.

func ParseBaseboardInfo

func ParseBaseboardInfo(t *smbios.Table) (*BaseboardInfo, error)

ParseBaseboardInfo parses a generic smbios.Table into BaseboardInfo.

func (*BaseboardInfo) String

func (bi *BaseboardInfo) String() string

type BoardFeatures

type BoardFeatures uint8

BoardFeatures is defined in DSP0134 7.3.1.

const (
	BoardFeaturesIsHotSwappable                  BoardFeatures = 1 << 4 // Set to 1 if the board is hot swappable
	BoardFeaturesIsReplaceable                   BoardFeatures = 1 << 3 // Set to 1 if the board is replaceable
	BoardFeaturesIsRemovable                     BoardFeatures = 1 << 2 // Set to 1 if the board is removable
	BoardFeaturesRequiresAtLeastOneDaughterBoard BoardFeatures = 1 << 1 // Set to 1 if the board requires at least one daughter board or auxiliary card to function
	BoardFeaturesIsAHostingBoard                 BoardFeatures = 1 << 0 // Set to 1 if the board is a hosting board (for example, a motherboard)
)

BoardFeatures fields are defined in DSP0134 7.3.1.

func (BoardFeatures) String

func (v BoardFeatures) String() string

type BoardType

type BoardType uint8

BoardType is defined in DSP0134 7.3.2.

const (
	BoardTypeUnknown                                 BoardType = 0x01 // Unknown
	BoardTypeOther                                   BoardType = 0x02 // Other
	BoardTypeServerBlade                             BoardType = 0x03 // Server Blade
	BoardTypeConnectivitySwitch                      BoardType = 0x04 // Connectivity Switch
	BoardTypeSystemManagementModule                  BoardType = 0x05 // System Management Module
	BoardTypeProcessorModule                         BoardType = 0x06 // Processor Module
	BoardTypeIOModule                                BoardType = 0x07 // I/O Module
	BoardTypeMemoryModule                            BoardType = 0x08 // Memory Module
	BoardTypeDaughterBoard                           BoardType = 0x09 // Daughter board
	BoardTypeMotherboardIncludesProcessorMemoryAndIO BoardType = 0x0a // Motherboard (includes processor, memory, and I/O)
	BoardTypeProcessorMemoryModule                   BoardType = 0x0b // Processor/Memory Module
	BoardTypeProcessorIOModule                       BoardType = 0x0c // Processor/IO Module
	BoardTypeInterconnectBoard                       BoardType = 0x0d // Interconnect board
)

BoardType values are defined in DSP0134 7.3.2.

func (BoardType) String

func (v BoardType) String() string

type CacheAssociativity

type CacheAssociativity uint8

CacheAssociativity is defined in DSP0134 7.8.5.

const (
	CacheAssociativityOther               CacheAssociativity = 0x01 // Other
	CacheAssociativityUnknown             CacheAssociativity = 0x02 // Unknown
	CacheAssociativityDirectMapped        CacheAssociativity = 0x03 // Direct Mapped
	CacheAssociativity2waySetAssociative  CacheAssociativity = 0x04 // 2-way Set-associative
	CacheAssociativity4waySetAssociative  CacheAssociativity = 0x05 // 4-way Set-associative
	CacheAssociativityFullyAssociative    CacheAssociativity = 0x06 // Fully Associative
	CacheAssociativity8waySetAssociative  CacheAssociativity = 0x07 // 8-way Set-associative
	CacheAssociativity16waySetAssociative CacheAssociativity = 0x08 // 16-way Set-associative
	CacheAssociativity12waySetAssociative CacheAssociativity = 0x09 // 12-way Set-associative
	CacheAssociativity24waySetAssociative CacheAssociativity = 0x0a // 24-way Set-associative
	CacheAssociativity32waySetAssociative CacheAssociativity = 0x0b // 32-way Set-associative
	CacheAssociativity48waySetAssociative CacheAssociativity = 0x0c // 48-way Set-associative
	CacheAssociativity64waySetAssociative CacheAssociativity = 0x0d // 64-way Set-associative
	CacheAssociativity20waySetAssociative CacheAssociativity = 0x0e // 20-way Set-associative
)

CacheAssociativity values are defined in DSP0134 7.8.5.

func (CacheAssociativity) String

func (v CacheAssociativity) String() string

type CacheErrorCorrectionType

type CacheErrorCorrectionType uint8

CacheErrorCorrectionType is defined in DSP0134 7.8.3.

const (
	CacheErrorCorrectionTypeOther        CacheErrorCorrectionType = 0x01 // Other
	CacheErrorCorrectionTypeUnknown      CacheErrorCorrectionType = 0x02 // Unknown
	CacheErrorCorrectionTypeNone         CacheErrorCorrectionType = 0x03 // None
	CacheErrorCorrectionTypeParity       CacheErrorCorrectionType = 0x04 // Parity
	CacheErrorCorrectionTypeSinglebitECC CacheErrorCorrectionType = 0x05 // Single-bit ECC
	CacheErrorCorrectionTypeMultibitECC  CacheErrorCorrectionType = 0x06 // Multi-bit ECC
)

CacheErrorCorrectionType values are defined in DSP0134 7.8.3.

func (CacheErrorCorrectionType) String

func (v CacheErrorCorrectionType) String() string

type CacheInfo

type CacheInfo struct {
	smbios.Header       `smbios:"-"`
	SocketDesignation   string                   // 04h
	Configuration       uint16                   // 05h
	MaximumSize         uint16                   // 07h
	InstalledSize       uint16                   // 09h
	SupportedSRAMType   CacheSRAMType            // 0Bh
	CurrentSRAMType     CacheSRAMType            // 0Dh
	Speed               uint8                    // 0Fh
	ErrorCorrectionType CacheErrorCorrectionType // 10h
	SystemType          CacheSystemType          // 11h
	Associativity       CacheAssociativity       // 12h
	MaximumSize2        uint32                   // 13h
	InstalledSize2      uint32                   // 17h
}

CacheInfo is defined in DSP0134 7.8.

func ParseCacheInfo

func ParseCacheInfo(t *smbios.Table) (*CacheInfo, error)

ParseCacheInfo parses a generic smbios.Table into CacheInfo.

func (*CacheInfo) GetInstalledSizeBytes

func (ci *CacheInfo) GetInstalledSizeBytes() uint64

GetInstalledSizeBytes returns the currently installed cache size, in bytes.

func (*CacheInfo) GetMaxSizeBytes

func (ci *CacheInfo) GetMaxSizeBytes() uint64

GetMaxSizeBytes returns the maximum size of the cache that can be installed, in bytes.

func (*CacheInfo) String

func (ci *CacheInfo) String() string

type CacheSRAMType

type CacheSRAMType uint16

CacheSRAMType is defined in DSP0134 7.8.2.

const (
	CacheSRAMTypeOther         CacheSRAMType = 1 << 0 // Other
	CacheSRAMTypeUnknown       CacheSRAMType = 1 << 1 // Unknown
	CacheSRAMTypeNonBurst      CacheSRAMType = 1 << 2 // Non-Burst
	CacheSRAMTypeBurst         CacheSRAMType = 1 << 3 // Burst
	CacheSRAMTypePipelineBurst CacheSRAMType = 1 << 4 // Pipeline Burst
	CacheSRAMTypeSynchronous   CacheSRAMType = 1 << 5 // Synchronous
	CacheSRAMTypeAsynchronous  CacheSRAMType = 1 << 6 // Asynchronous
)

CacheSRAMType fields are defined in DSP0134 7.8.2.

func (CacheSRAMType) String

func (v CacheSRAMType) String() string

type CacheSystemType

type CacheSystemType uint8

CacheSystemType is defined in DSP0134 7.8.4.

const (
	CacheSystemTypeOther       CacheSystemType = 0x01 // Other
	CacheSystemTypeUnknown     CacheSystemType = 0x02 // Unknown
	CacheSystemTypeInstruction CacheSystemType = 0x03 // Instruction
	CacheSystemTypeData        CacheSystemType = 0x04 // Data
	CacheSystemTypeUnified     CacheSystemType = 0x05 // Unified
)

CacheSystemType values are defined in DSP0134 7.8.4.

func (CacheSystemType) String

func (v CacheSystemType) String() string

type ChassisContainedElement

type ChassisContainedElement struct {
	Type ChassisElementType // 00h
	Min  uint8              // 01h
	Max  uint8              // 02h
}

ChassisContainedElement is defined in DSP0134 7.4.4.

func (ChassisContainedElement) String

func (cce ChassisContainedElement) String() string

type ChassisContainedElements

type ChassisContainedElements []ChassisContainedElement

ChassisContainedElements are defined by DSP0134 7.4.4.

func (*ChassisContainedElements) ParseField

func (cec *ChassisContainedElements) ParseField(t *smbios.Table, off int) (int, error)

ParseField parses object handles as defined by DSP0134 Section 7.4.4.

func (ChassisContainedElements) String

func (cec ChassisContainedElements) String() string

type ChassisElementType

type ChassisElementType uint8

ChassisElementType is defined in DSP0134 7.4.4.

func (ChassisElementType) String

func (v ChassisElementType) String() string

type ChassisInfo

type ChassisInfo struct {
	smbios.Header      `smbios:"-"`
	Manufacturer       string                   // 04h
	Type               ChassisType              // 05h
	Version            string                   // 06h
	SerialNumber       string                   // 07h
	AssetTagNumber     string                   // 08h
	BootupState        ChassisState             // 09h
	PowerSupplyState   ChassisState             // 0Ah
	ThermalState       ChassisState             // 0Bh
	SecurityStatus     ChassisSecurityStatus    // 0Ch
	OEMInfo            uint32                   // 0Dh
	Height             uint8                    // 11h
	NumberOfPowerCords uint8                    // 12h
	ContainedElements  ChassisContainedElements // 13h
	SKUNumber          string                   // 15h + CEC * CERL
}

ChassisInfo is defined in DSP0134 7.4.

func ParseChassisInfo

func ParseChassisInfo(t *smbios.Table) (*ChassisInfo, error)

ParseChassisInfo parses a generic smbios.Table into ChassisInfo.

func (*ChassisInfo) String

func (si *ChassisInfo) String() string

type ChassisSecurityStatus

type ChassisSecurityStatus uint8

ChassisSecurityStatus is defined in DSP0134 7.4.3.

const (
	ChassisSecurityStatusOther                      ChassisSecurityStatus = 0x01 // Other
	ChassisSecurityStatusUnknown                    ChassisSecurityStatus = 0x02 // Unknown
	ChassisSecurityStatusNone                       ChassisSecurityStatus = 0x03 // None
	ChassisSecurityStatusExternalInterfaceLockedOut ChassisSecurityStatus = 0x04 // External interface locked out
	ChassisSecurityStatusExternalInterfaceEnabled   ChassisSecurityStatus = 0x05 // External interface enabled
)

ChassisSecurityStatus values are defined in DSP0134 7.4.3.

func (ChassisSecurityStatus) String

func (v ChassisSecurityStatus) String() string

type ChassisState

type ChassisState uint8

ChassisState is defined in DSP0134 7.4.2.

const (
	ChassisStateOther          ChassisState = 0x01 // Other
	ChassisStateUnknown        ChassisState = 0x02 // Unknown
	ChassisStateSafe           ChassisState = 0x03 // Safe
	ChassisStateWarning        ChassisState = 0x04 // Warning
	ChassisStateCritical       ChassisState = 0x05 // Critical
	ChassisStateNonrecoverable ChassisState = 0x06 // Non-recoverable
)

ChassisState values are defined in DSP0134 7.4.2.

func (ChassisState) String

func (v ChassisState) String() string

type ChassisType

type ChassisType uint8

ChassisType is defined in DSP0134 7.4.1.

const (
	ChassisTypeOther               ChassisType = 0x01 // Other
	ChassisTypeUnknown             ChassisType = 0x02 // Unknown
	ChassisTypeDesktop             ChassisType = 0x03 // Desktop
	ChassisTypeLowProfileDesktop   ChassisType = 0x04 // Low Profile Desktop
	ChassisTypePizzaBox            ChassisType = 0x05 // Pizza Box
	ChassisTypeMiniTower           ChassisType = 0x06 // Mini Tower
	ChassisTypeTower               ChassisType = 0x07 // Tower
	ChassisTypePortable            ChassisType = 0x08 // Portable
	ChassisTypeLaptop              ChassisType = 0x09 // Laptop
	ChassisTypeNotebook            ChassisType = 0x0a // Notebook
	ChassisTypeHandHeld            ChassisType = 0x0b // Hand Held
	ChassisTypeDockingStation      ChassisType = 0x0c // Docking Station
	ChassisTypeAllInOne            ChassisType = 0x0d // All in One
	ChassisTypeSubNotebook         ChassisType = 0x0e // Sub Notebook
	ChassisTypeSpacesaving         ChassisType = 0x0f // Space-saving
	ChassisTypeLunchBox            ChassisType = 0x10 // Lunch Box
	ChassisTypeMainServerChassis   ChassisType = 0x11 // Main Server Chassis
	ChassisTypeExpansionChassis    ChassisType = 0x12 // Expansion Chassis
	ChassisTypeSubChassis          ChassisType = 0x13 // SubChassis
	ChassisTypeBusExpansionChassis ChassisType = 0x14 // Bus Expansion Chassis
	ChassisTypePeripheralChassis   ChassisType = 0x15 // Peripheral Chassis
	ChassisTypeRAIDChassis         ChassisType = 0x16 // RAID Chassis
	ChassisTypeRackMountChassis    ChassisType = 0x17 // Rack Mount Chassis
	ChassisTypeSealedcasePC        ChassisType = 0x18 // Sealed-case PC
	ChassisTypeMultisystemChassis  ChassisType = 0x19 // Multi-system chassis
	ChassisTypeCompactPCI          ChassisType = 0x1a // Compact PCI
	ChassisTypeAdvancedTCA         ChassisType = 0x1b // Advanced TCA
	ChassisTypeBlade               ChassisType = 0x1c // Blade
	ChassisTypeBladeChassis        ChassisType = 0x1d // Blade Chassis
	ChassisTypeTablet              ChassisType = 0x1e // Tablet
	ChassisTypeConvertible         ChassisType = 0x1f // Convertible
	ChassisTypeDetachable          ChassisType = 0x20 // Detachable
	ChassisTypeIoTGateway          ChassisType = 0x21 // IoT Gateway
	ChassisTypeEmbeddedPC          ChassisType = 0x22 // Embedded PC
	ChassisTypeMiniPC              ChassisType = 0x23 // Mini PC
	ChassisTypeStickPC             ChassisType = 0x24 // Stick PC
)

ChassisType values are defined in DSP0134 7.4.1.

func (ChassisType) String

func (v ChassisType) String() string

type EndOfTable

type EndOfTable struct {
	smbios.Table
}

EndOfTable is Defined in DSP0134 7.46.

func NewEndOfTable

func NewEndOfTable(t *smbios.Table) (*EndOfTable, error)

NewEndOfTable parses a generic Table into EndOfTable.

func (*EndOfTable) String

func (eot *EndOfTable) String() string

type IPMIDeviceInfo

type IPMIDeviceInfo struct {
	smbios.Header                    `smbios:"-"`
	InterfaceType                    BMCInterfaceType // 04h
	IPMISpecificationRevision        uint8            // 05h
	I2CSlaveAddress                  uint8            // 06h
	NVStorageDeviceAddress           uint8            // 07h
	BaseAddress                      uint64           // 08h
	BaseAddressModifierInterruptInfo uint8            // 10h
	InterruptNumber                  uint8            // 11h
}

IPMIDeviceInfo is defined in DSP0134 7.39.

func ParseIPMIDeviceInfo

func ParseIPMIDeviceInfo(t *smbios.Table) (*IPMIDeviceInfo, error)

ParseIPMIDeviceInfo parses a generic smbios.Table into IPMIDeviceInfo.

func (*IPMIDeviceInfo) String

func (di *IPMIDeviceInfo) String() string

type InactiveTable

type InactiveTable struct {
	smbios.Table
}

InactiveTable is Defined in DSP0134 7.46.

func NewInactiveTable

func NewInactiveTable(t *smbios.Table) (*InactiveTable, error)

NewInactiveTable parses a generic Table into InactiveTable.

func (*InactiveTable) String

func (it *InactiveTable) String() string

type Info

type Info struct {
	Entry  smbios.EntryPoint
	Tables smbios.Tables
}

Info contains the SMBIOS information.

func FromSysfs

func FromSysfs() (*Info, error)

FromSysfs parses SMBIOS info from sysfs tables.

func ParseInfo

func ParseInfo(entryData, tableData []byte) (*Info, error)

ParseInfo parses SMBIOS information from binary data.

func (*Info) GetBIOSInfo

func (i *Info) GetBIOSInfo() (*BIOSInfo, error)

GetBIOSInfo returns the Bios Info (type 0) table, if present.

func (*Info) GetBaseboardInfo

func (i *Info) GetBaseboardInfo() ([]*BaseboardInfo, error)

GetBaseboardInfo returns all the Baseboard Info (type 2) tables present.

func (*Info) GetCacheInfo

func (i *Info) GetCacheInfo() ([]*CacheInfo, error)

GetCacheInfo returns all the Cache Info (type 7) tables present.

func (*Info) GetChassisInfo

func (i *Info) GetChassisInfo() ([]*ChassisInfo, error)

GetChassisInfo returns all the Chassis Info (type 3) tables present.

func (*Info) GetIPMIDeviceInfo

func (i *Info) GetIPMIDeviceInfo() ([]*IPMIDeviceInfo, error)

GetIPMIDeviceInfo returns all the IPMI Device Info (type 38) tables present.

func (*Info) GetMemoryDevices

func (i *Info) GetMemoryDevices() ([]*MemoryDevice, error)

GetMemoryDevices returns all the Memory Device (type 17) tables present.

func (*Info) GetProcessorInfo

func (i *Info) GetProcessorInfo() ([]*ProcessorInfo, error)

GetProcessorInfo returns all the Processor Info (type 4) tables present.

func (*Info) GetSystemInfo

func (i *Info) GetSystemInfo() (*SystemInfo, error)

GetSystemInfo returns the System Info (type 1) table, if present.

func (*Info) GetSystemSlots

func (i *Info) GetSystemSlots() ([]*SystemSlots, error)

GetSystemSlots returns all the System Slots (type 9) tables present.

func (*Info) GetTPMDevices

func (i *Info) GetTPMDevices() ([]*TPMDevice, error)

GetTPMDevices returns all the TPM Device (type 43) tables present.

func (*Info) String

func (i *Info) String() string

String returns a summary of the SMBIOS version and number of tables.

type MemoryDevice

type MemoryDevice struct {
	smbios.Header                     `smbios:"-"`
	PhysicalMemoryArrayHandle         uint16                              // 04h
	MemoryErrorInfoHandle             uint16                              // 06h
	TotalWidth                        uint16                              // 08h
	DataWidth                         uint16                              // 0Ah
	Size                              uint16                              // 0Ch
	FormFactor                        MemoryDeviceFormFactor              // 0Eh
	DeviceSet                         uint8                               // 0Fh
	DeviceLocator                     string                              // 10h
	BankLocator                       string                              // 11h
	Type                              MemoryDeviceType                    // 12h
	TypeDetail                        MemoryDeviceTypeDetail              // 13h
	Speed                             uint16                              // 15h
	Manufacturer                      string                              // 17h
	SerialNumber                      string                              // 18h
	AssetTag                          string                              // 19h
	PartNumber                        string                              // 1Ah
	Attributes                        uint8                               // 1Bh
	ExtendedSize                      uint32                              // 1Ch
	ConfiguredSpeed                   uint16                              // 20h
	MinimumVoltage                    uint16                              // 22h
	MaximumVoltage                    uint16                              // 24h
	ConfiguredVoltage                 uint16                              // 26h
	Technology                        MemoryDeviceTechnology              // 28h
	OperatingModeCapability           MemoryDeviceOperatingModeCapability // 29h
	FirmwareVersion                   string                              // 2Bh
	ModuleManufacturerID              uint16                              // 2Ch
	ModuleProductID                   uint16                              // 2Eh
	SubsystemControllerManufacturerID uint16                              // 30h
	SubsystemControllerProductID      uint16                              // 32h
	NonvolatileSize                   uint64                              // 34h
	VolatileSize                      uint64                              // 3Ch
	CacheSize                         uint64                              // 44h
	LogicalSize                       uint64                              // 4Ch
}

MemoryDevice is defined in DSP0134 7.18.

func ParseMemoryDevice

func ParseMemoryDevice(t *smbios.Table) (*MemoryDevice, error)

ParseMemoryDevice parses a generic smbios.Table into MemoryDevice.

func (*MemoryDevice) GetSizeBytes

func (md *MemoryDevice) GetSizeBytes() uint64

GetSizeBytes returns size of the memory device, in bytes.

func (*MemoryDevice) String

func (md *MemoryDevice) String() string

type MemoryDeviceFormFactor

type MemoryDeviceFormFactor uint8

MemoryDeviceFormFactor is defined in DSP0134 7.18.1.

const (
	MemoryDeviceFormFactorOther           MemoryDeviceFormFactor = 0x01 // Other
	MemoryDeviceFormFactorUnknown         MemoryDeviceFormFactor = 0x02 // Unknown
	MemoryDeviceFormFactorSIMM            MemoryDeviceFormFactor = 0x03 // SIMM
	MemoryDeviceFormFactorSIP             MemoryDeviceFormFactor = 0x04 // SIP
	MemoryDeviceFormFactorChip            MemoryDeviceFormFactor = 0x05 // Chip
	MemoryDeviceFormFactorDIP             MemoryDeviceFormFactor = 0x06 // DIP
	MemoryDeviceFormFactorZIP             MemoryDeviceFormFactor = 0x07 // ZIP
	MemoryDeviceFormFactorProprietaryCard MemoryDeviceFormFactor = 0x08 // Proprietary Card
	MemoryDeviceFormFactorDIMM            MemoryDeviceFormFactor = 0x09 // DIMM
	MemoryDeviceFormFactorTSOP            MemoryDeviceFormFactor = 0x0a // TSOP
	MemoryDeviceFormFactorRowOfChips      MemoryDeviceFormFactor = 0x0b // Row of chips
	MemoryDeviceFormFactorRIMM            MemoryDeviceFormFactor = 0x0c // RIMM
	MemoryDeviceFormFactorSODIMM          MemoryDeviceFormFactor = 0x0d // SODIMM
	MemoryDeviceFormFactorSRIMM           MemoryDeviceFormFactor = 0x0e // SRIMM
	MemoryDeviceFormFactorFBDIMM          MemoryDeviceFormFactor = 0x0f // FB-DIMM
)

MemoryDeviceFormFactor values are defined in DSP0134 7.18.1.

func (MemoryDeviceFormFactor) String

func (v MemoryDeviceFormFactor) String() string

type MemoryDeviceOperatingModeCapability

type MemoryDeviceOperatingModeCapability uint16

MemoryDeviceOperatingModeCapability is defined in DSP0134 7.18.7.

const (
	MemoryDeviceOperatingModeCapabilityOther                           MemoryDeviceOperatingModeCapability = 1 << 1 // Other
	MemoryDeviceOperatingModeCapabilityUnknown                         MemoryDeviceOperatingModeCapability = 1 << 2 // Unknown
	MemoryDeviceOperatingModeCapabilityVolatileMemory                  MemoryDeviceOperatingModeCapability = 1 << 3 // Volatile memory
	MemoryDeviceOperatingModeCapabilityByteaccessiblePersistentMemory  MemoryDeviceOperatingModeCapability = 1 << 4 // Byte-accessible persistent memory
	MemoryDeviceOperatingModeCapabilityBlockaccessiblePersistentMemory MemoryDeviceOperatingModeCapability = 1 << 5 // Block-accessible persistent memory
)

MemoryDeviceOperatingModeCapability fields are defined in DSP0134 ???.

func (MemoryDeviceOperatingModeCapability) String

type MemoryDeviceTechnology

type MemoryDeviceTechnology uint8

MemoryDeviceTechnology is defined in DSP0134 7.18.6.

const (
	MemoryDeviceTechnologyOther                 MemoryDeviceTechnology = 0x01 // Other
	MemoryDeviceTechnologyUnknown               MemoryDeviceTechnology = 0x02 // Unknown
	MemoryDeviceTechnologyDRAM                  MemoryDeviceTechnology = 0x03 // DRAM
	MemoryDeviceTechnologyNVDIMMN               MemoryDeviceTechnology = 0x04 // NVDIMM-N
	MemoryDeviceTechnologyNVDIMMF               MemoryDeviceTechnology = 0x05 // NVDIMM-F
	MemoryDeviceTechnologyNVDIMMP               MemoryDeviceTechnology = 0x06 // NVDIMM-P
	MemoryDeviceTechnologyIntelPersistentMemory MemoryDeviceTechnology = 0x07 // Intel persistent memory
)

MemoryDeviceTechnology values are defined in DSP0134 7.18.6.

func (MemoryDeviceTechnology) String

func (v MemoryDeviceTechnology) String() string

type MemoryDeviceType

type MemoryDeviceType uint8

MemoryDeviceType is defined in DSP0134 7.18.2.

const (
	MemoryDeviceTypeOther                    MemoryDeviceType = 0x01 // Other
	MemoryDeviceTypeUnknown                  MemoryDeviceType = 0x02 // Unknown
	MemoryDeviceTypeDRAM                     MemoryDeviceType = 0x03 // DRAM
	MemoryDeviceTypeEDRAM                    MemoryDeviceType = 0x04 // EDRAM
	MemoryDeviceTypeVRAM                     MemoryDeviceType = 0x05 // VRAM
	MemoryDeviceTypeSRAM                     MemoryDeviceType = 0x06 // SRAM
	MemoryDeviceTypeRAM                      MemoryDeviceType = 0x07 // RAM
	MemoryDeviceTypeROM                      MemoryDeviceType = 0x08 // ROM
	MemoryDeviceTypeFlash                    MemoryDeviceType = 0x09 // Flash
	MemoryDeviceTypeEEPROM                   MemoryDeviceType = 0x0a // EEPROM
	MemoryDeviceTypeFEPROM                   MemoryDeviceType = 0x0b // FEPROM
	MemoryDeviceTypeEPROM                    MemoryDeviceType = 0x0c // EPROM
	MemoryDeviceTypeCDRAM                    MemoryDeviceType = 0x0d // CDRAM
	MemoryDeviceType3DRAM                    MemoryDeviceType = 0x0e // 3DRAM
	MemoryDeviceTypeSDRAM                    MemoryDeviceType = 0x0f // SDRAM
	MemoryDeviceTypeSGRAM                    MemoryDeviceType = 0x10 // SGRAM
	MemoryDeviceTypeRDRAM                    MemoryDeviceType = 0x11 // RDRAM
	MemoryDeviceTypeDDR                      MemoryDeviceType = 0x12 // DDR
	MemoryDeviceTypeDDR2                     MemoryDeviceType = 0x13 // DDR2
	MemoryDeviceTypeDDR2FBDIMM               MemoryDeviceType = 0x14 // DDR2 FB-DIMM
	MemoryDeviceTypeDDR3                     MemoryDeviceType = 0x18 // DDR3
	MemoryDeviceTypeFBD2                     MemoryDeviceType = 0x19 // FBD2
	MemoryDeviceTypeDDR4                     MemoryDeviceType = 0x1a // DDR4
	MemoryDeviceTypeLPDDR                    MemoryDeviceType = 0x1b // LPDDR
	MemoryDeviceTypeLPDDR2                   MemoryDeviceType = 0x1c // LPDDR2
	MemoryDeviceTypeLPDDR3                   MemoryDeviceType = 0x1d // LPDDR3
	MemoryDeviceTypeLPDDR4                   MemoryDeviceType = 0x1e // LPDDR4
	MemoryDeviceTypeLogicalNonvolatileDevice MemoryDeviceType = 0x1f // Logical non-volatile device
	MemoryDeviceTypeDDR5                     MemoryDeviceType = 0x22 // DDR5
)

MemoryDeviceType values are defined in DSP0134 7.18.2.

func (MemoryDeviceType) String

func (v MemoryDeviceType) String() string

type MemoryDeviceTypeDetail

type MemoryDeviceTypeDetail uint16

MemoryDeviceTypeDetail is defined in DSP0134 7.18.3.

const (
	MemoryDeviceTypeDetailOther                  MemoryDeviceTypeDetail = 1 << 1  // Other
	MemoryDeviceTypeDetailUnknown                MemoryDeviceTypeDetail = 1 << 2  // Unknown
	MemoryDeviceTypeDetailFastpaged              MemoryDeviceTypeDetail = 1 << 3  // Fast-paged
	MemoryDeviceTypeDetailStaticColumn           MemoryDeviceTypeDetail = 1 << 4  // Static column
	MemoryDeviceTypeDetailPseudostatic           MemoryDeviceTypeDetail = 1 << 5  // Pseudo-static
	MemoryDeviceTypeDetailRAMBUS                 MemoryDeviceTypeDetail = 1 << 6  // RAMBUS
	MemoryDeviceTypeDetailSynchronous            MemoryDeviceTypeDetail = 1 << 7  // Synchronous
	MemoryDeviceTypeDetailCMOS                   MemoryDeviceTypeDetail = 1 << 8  // CMOS
	MemoryDeviceTypeDetailEDO                    MemoryDeviceTypeDetail = 1 << 9  // EDO
	MemoryDeviceTypeDetailWindowDRAM             MemoryDeviceTypeDetail = 1 << 10 // Window DRAM
	MemoryDeviceTypeDetailCacheDRAM              MemoryDeviceTypeDetail = 1 << 11 // Cache DRAM
	MemoryDeviceTypeDetailNonvolatile            MemoryDeviceTypeDetail = 1 << 12 // Non-volatile
	MemoryDeviceTypeDetailRegisteredBuffered     MemoryDeviceTypeDetail = 1 << 13 // Registered (Buffered)
	MemoryDeviceTypeDetailUnbufferedUnregistered MemoryDeviceTypeDetail = 1 << 14 // Unbuffered (Unregistered)
	MemoryDeviceTypeDetailLRDIMM                 MemoryDeviceTypeDetail = 1 << 15 // LRDIMM
)

MemoryDeviceTypeDetail fields are defined in DSP0134 7.18.3.

func (MemoryDeviceTypeDetail) String

func (v MemoryDeviceTypeDetail) String() string

type ObjectHandles

type ObjectHandles []uint16

ObjectHandles are defined in DSP0134 v4.7 Section 7.3 and embedded in the Baseboard structure.

func (*ObjectHandles) ParseField

func (oh *ObjectHandles) ParseField(t *smbios.Table, off int) (int, error)

ParseField parses object handles as defined by DSP0134 Section 7.3.

func (ObjectHandles) String

func (oh ObjectHandles) String() string

type ProcessorCharacteristics

type ProcessorCharacteristics uint16

ProcessorCharacteristics values are defined in DSP0134 7.5.9.

const (
	ProcessorCharacteristicsReserved                ProcessorCharacteristics = 1 << 0 // Reserved
	ProcessorCharacteristicsUnknown                 ProcessorCharacteristics = 1 << 1 // Unknown
	ProcessorCharacteristics64bitCapable            ProcessorCharacteristics = 1 << 2 // 64-bit Capable
	ProcessorCharacteristicsMultiCore               ProcessorCharacteristics = 1 << 3 // Multi-Core
	ProcessorCharacteristicsHardwareThread          ProcessorCharacteristics = 1 << 4 // Hardware Thread
	ProcessorCharacteristicsExecuteProtection       ProcessorCharacteristics = 1 << 5 // Execute Protection
	ProcessorCharacteristicsEnhancedVirtualization  ProcessorCharacteristics = 1 << 6 // Enhanced Virtualization
	ProcessorCharacteristicsPowerPerformanceControl ProcessorCharacteristics = 1 << 7 // Power/Performance Control
)

ProcessorCharacteristics fields are defined in DSP0134 x.x.x.

func (ProcessorCharacteristics) String

func (v ProcessorCharacteristics) String() string

type ProcessorFamily

type ProcessorFamily uint16

ProcessorFamily is defined in DSP0134 7.5.2.

const (
	ProcessorFamilyOther                        ProcessorFamily = 0x01  // Other
	ProcessorFamilyUnknown                      ProcessorFamily = 0x02  // Unknown
	ProcessorFamily8086                         ProcessorFamily = 0x03  // 8086
	ProcessorFamily80286                        ProcessorFamily = 0x04  // 80286
	ProcessorFamily80386                        ProcessorFamily = 0x05  // 80386
	ProcessorFamily80486                        ProcessorFamily = 0x06  // 80486
	ProcessorFamily8087                         ProcessorFamily = 0x07  // 8087
	ProcessorFamily80287                        ProcessorFamily = 0x08  // 80287
	ProcessorFamily80387                        ProcessorFamily = 0x09  // 80387
	ProcessorFamily80487                        ProcessorFamily = 0x0a  // 80487
	ProcessorFamilyPentium                      ProcessorFamily = 0x0b  // Pentium
	ProcessorFamilyPentiumPro                   ProcessorFamily = 0x0c  // Pentium Pro
	ProcessorFamilyPentiumII                    ProcessorFamily = 0x0d  // Pentium II
	ProcessorFamilyPentiumMMX                   ProcessorFamily = 0x0e  // Pentium MMX
	ProcessorFamilyCeleron                      ProcessorFamily = 0x0f  // Celeron
	ProcessorFamilyPentiumIIXeon                ProcessorFamily = 0x10  // Pentium II Xeon
	ProcessorFamilyPentiumIII                   ProcessorFamily = 0x11  // Pentium III
	ProcessorFamilyM1                           ProcessorFamily = 0x12  // M1
	ProcessorFamilyM2                           ProcessorFamily = 0x13  // M2
	ProcessorFamilyCeleronM                     ProcessorFamily = 0x14  // Celeron M
	ProcessorFamilyPentium4HT                   ProcessorFamily = 0x15  // Pentium 4 HT
	ProcessorFamilyDuron                        ProcessorFamily = 0x18  // Duron
	ProcessorFamilyK5                           ProcessorFamily = 0x19  // K5
	ProcessorFamilyK6                           ProcessorFamily = 0x1a  // K6
	ProcessorFamilyK62                          ProcessorFamily = 0x1b  // K6-2
	ProcessorFamilyK63                          ProcessorFamily = 0x1c  // K6-3
	ProcessorFamilyAthlon                       ProcessorFamily = 0x1d  // Athlon
	ProcessorFamilyAMD29000                     ProcessorFamily = 0x1e  // AMD29000
	ProcessorFamilyK62Plus                      ProcessorFamily = 0x1f  // K6-2+
	ProcessorFamilyPowerPC                      ProcessorFamily = 0x20  // Power PC
	ProcessorFamilyPowerPC601                   ProcessorFamily = 0x21  // Power PC 601
	ProcessorFamilyPowerPC603                   ProcessorFamily = 0x22  // Power PC 603
	ProcessorFamilyPowerPC603Plus               ProcessorFamily = 0x23  // Power PC 603+
	ProcessorFamilyPowerPC604                   ProcessorFamily = 0x24  // Power PC 604
	ProcessorFamilyPowerPC620                   ProcessorFamily = 0x25  // Power PC 620
	ProcessorFamilyPowerPCX704                  ProcessorFamily = 0x26  // Power PC x704
	ProcessorFamilyPowerPC750                   ProcessorFamily = 0x27  // Power PC 750
	ProcessorFamilyCoreDuo                      ProcessorFamily = 0x28  // Core Duo
	ProcessorFamilyCoreDuoMobile                ProcessorFamily = 0x29  // Core Duo Mobile
	ProcessorFamilyCoreSoloMobile               ProcessorFamily = 0x2a  // Core Solo Mobile
	ProcessorFamilyAtom                         ProcessorFamily = 0x2b  // Atom
	ProcessorFamilyCoreM                        ProcessorFamily = 0x2c  // Core M
	ProcessorFamilyCoreM3                       ProcessorFamily = 0x2d  // Core m3
	ProcessorFamilyCoreM5                       ProcessorFamily = 0x2e  // Core m5
	ProcessorFamilyCoreM7                       ProcessorFamily = 0x2f  // Core m7
	ProcessorFamilyAlpha                        ProcessorFamily = 0x30  // Alpha
	ProcessorFamilyAlpha21064                   ProcessorFamily = 0x31  // Alpha 21064
	ProcessorFamilyAlpha21066                   ProcessorFamily = 0x32  // Alpha 21066
	ProcessorFamilyAlpha21164                   ProcessorFamily = 0x33  // Alpha 21164
	ProcessorFamilyAlpha21164PC                 ProcessorFamily = 0x34  // Alpha 21164PC
	ProcessorFamilyAlpha21164a                  ProcessorFamily = 0x35  // Alpha 21164a
	ProcessorFamilyAlpha21264                   ProcessorFamily = 0x36  // Alpha 21264
	ProcessorFamilyAlpha21364                   ProcessorFamily = 0x37  // Alpha 21364
	ProcessorFamilyTurionIIUltraDualCoreMobileM ProcessorFamily = 0x38  // Turion II Ultra Dual-Core Mobile M
	ProcessorFamilyTurionIIDualCoreMobileM      ProcessorFamily = 0x39  // Turion II Dual-Core Mobile M
	ProcessorFamilyAthlonIIDualCoreM            ProcessorFamily = 0x3a  // Athlon II Dual-Core M
	ProcessorFamilyOpteron6100                  ProcessorFamily = 0x3b  // Opteron 6100
	ProcessorFamilyOpteron4100                  ProcessorFamily = 0x3c  // Opteron 4100
	ProcessorFamilyOpteron6200                  ProcessorFamily = 0x3d  // Opteron 6200
	ProcessorFamilyOpteron4200                  ProcessorFamily = 0x3e  // Opteron 4200
	ProcessorFamilyFX                           ProcessorFamily = 0x3f  // FX
	ProcessorFamilyMIPS                         ProcessorFamily = 0x40  // MIPS
	ProcessorFamilyMIPSR4000                    ProcessorFamily = 0x41  // MIPS R4000
	ProcessorFamilyMIPSR4200                    ProcessorFamily = 0x42  // MIPS R4200
	ProcessorFamilyMIPSR4400                    ProcessorFamily = 0x43  // MIPS R4400
	ProcessorFamilyMIPSR4600                    ProcessorFamily = 0x44  // MIPS R4600
	ProcessorFamilyMIPSR10000                   ProcessorFamily = 0x45  // MIPS R10000
	ProcessorFamilyCSeries                      ProcessorFamily = 0x46  // C-Series
	ProcessorFamilyESeries                      ProcessorFamily = 0x47  // E-Series
	ProcessorFamilyASeries                      ProcessorFamily = 0x48  // A-Series
	ProcessorFamilyGSeries                      ProcessorFamily = 0x49  // G-Series
	ProcessorFamilyZSeries                      ProcessorFamily = 0x4a  // Z-Series
	ProcessorFamilyRSeries                      ProcessorFamily = 0x4b  // R-Series
	ProcessorFamilyOpteron4300                  ProcessorFamily = 0x4c  // Opteron 4300
	ProcessorFamilyOpteron6300                  ProcessorFamily = 0x4d  // Opteron 6300
	ProcessorFamilyOpteron3300                  ProcessorFamily = 0x4e  // Opteron 3300
	ProcessorFamilyFirePro                      ProcessorFamily = 0x4f  // FirePro
	ProcessorFamilySPARC                        ProcessorFamily = 0x50  // SPARC
	ProcessorFamilySuperSPARC                   ProcessorFamily = 0x51  // SuperSPARC
	ProcessorFamilyMicroSPARCII                 ProcessorFamily = 0x52  // MicroSPARC II
	ProcessorFamilyMicroSPARCIIep               ProcessorFamily = 0x53  // MicroSPARC IIep
	ProcessorFamilyUltraSPARC                   ProcessorFamily = 0x54  // UltraSPARC
	ProcessorFamilyUltraSPARCII                 ProcessorFamily = 0x55  // UltraSPARC II
	ProcessorFamilyUltraSPARCIIi                ProcessorFamily = 0x56  // UltraSPARC IIi
	ProcessorFamilyUltraSPARCIII                ProcessorFamily = 0x57  // UltraSPARC III
	ProcessorFamilyUltraSPARCIIIi               ProcessorFamily = 0x58  // UltraSPARC IIIi
	ProcessorFamily68040                        ProcessorFamily = 0x60  // 68040
	ProcessorFamily68xxx                        ProcessorFamily = 0x61  // 68xxx
	ProcessorFamily68000                        ProcessorFamily = 0x62  // 68000
	ProcessorFamily68010                        ProcessorFamily = 0x63  // 68010
	ProcessorFamily68020                        ProcessorFamily = 0x64  // 68020
	ProcessorFamily68030                        ProcessorFamily = 0x65  // 68030
	ProcessorFamilyAthlonX4                     ProcessorFamily = 0x66  // Athlon X4
	ProcessorFamilyOpteronX1000                 ProcessorFamily = 0x67  // Opteron X1000
	ProcessorFamilyOpteronX2000                 ProcessorFamily = 0x68  // Opteron X2000
	ProcessorFamilyOpteronASeries               ProcessorFamily = 0x69  // Opteron A-Series
	ProcessorFamilyOpteronX3000                 ProcessorFamily = 0x6a  // Opteron X3000
	ProcessorFamilyZen                          ProcessorFamily = 0x6b  // Zen
	ProcessorFamilyHobbit                       ProcessorFamily = 0x70  // Hobbit
	ProcessorFamilyCrusoeTM5000                 ProcessorFamily = 0x78  // Crusoe TM5000
	ProcessorFamilyCrusoeTM3000                 ProcessorFamily = 0x79  // Crusoe TM3000
	ProcessorFamilyEfficeonTM8000               ProcessorFamily = 0x7a  // Efficeon TM8000
	ProcessorFamilyWeitek                       ProcessorFamily = 0x80  // Weitek
	ProcessorFamilyItanium                      ProcessorFamily = 0x82  // Itanium
	ProcessorFamilyAthlon64                     ProcessorFamily = 0x83  // Athlon 64
	ProcessorFamilyOpteron                      ProcessorFamily = 0x84  // Opteron
	ProcessorFamilySempron                      ProcessorFamily = 0x85  // Sempron
	ProcessorFamilyTurion64                     ProcessorFamily = 0x86  // Turion 64
	ProcessorFamilyDualCoreOpteron              ProcessorFamily = 0x87  // Dual-Core Opteron
	ProcessorFamilyAthlon64X2                   ProcessorFamily = 0x88  // Athlon 64 X2
	ProcessorFamilyTurion64X2                   ProcessorFamily = 0x89  // Turion 64 X2
	ProcessorFamilyQuadCoreOpteron              ProcessorFamily = 0x8a  // Quad-Core Opteron
	ProcessorFamilyThirdGenerationOpteron       ProcessorFamily = 0x8b  // Third-Generation Opteron
	ProcessorFamilyPhenomFX                     ProcessorFamily = 0x8c  // Phenom FX
	ProcessorFamilyPhenomX4                     ProcessorFamily = 0x8d  // Phenom X4
	ProcessorFamilyPhenomX2                     ProcessorFamily = 0x8e  // Phenom X2
	ProcessorFamilyAthlonX2                     ProcessorFamily = 0x8f  // Athlon X2
	ProcessorFamilyPARISC                       ProcessorFamily = 0x90  // PA-RISC
	ProcessorFamilyPARISC8500                   ProcessorFamily = 0x91  // PA-RISC 8500
	ProcessorFamilyPARISC8000                   ProcessorFamily = 0x92  // PA-RISC 8000
	ProcessorFamilyPARISC7300LC                 ProcessorFamily = 0x93  // PA-RISC 7300LC
	ProcessorFamilyPARISC7200                   ProcessorFamily = 0x94  // PA-RISC 7200
	ProcessorFamilyPARISC7100LC                 ProcessorFamily = 0x95  // PA-RISC 7100LC
	ProcessorFamilyPARISC7100                   ProcessorFamily = 0x96  // PA-RISC 7100
	ProcessorFamilyV30                          ProcessorFamily = 0xa0  // V30
	ProcessorFamilyQuadCoreXeon3200             ProcessorFamily = 0xa1  // Quad-Core Xeon 3200
	ProcessorFamilyDualCoreXeon3000             ProcessorFamily = 0xa2  // Dual-Core Xeon 3000
	ProcessorFamilyQuadCoreXeon5300             ProcessorFamily = 0xa3  // Quad-Core Xeon 5300
	ProcessorFamilyDualCoreXeon5100             ProcessorFamily = 0xa4  // Dual-Core Xeon 5100
	ProcessorFamilyDualCoreXeon5000             ProcessorFamily = 0xa5  // Dual-Core Xeon 5000
	ProcessorFamilyDualCoreXeonLV               ProcessorFamily = 0xa6  // Dual-Core Xeon LV
	ProcessorFamilyDualCoreXeonULV              ProcessorFamily = 0xa7  // Dual-Core Xeon ULV
	ProcessorFamilyDualCoreXeon7100             ProcessorFamily = 0xa8  // Dual-Core Xeon 7100
	ProcessorFamilyQuadCoreXeon5400             ProcessorFamily = 0xa9  // Quad-Core Xeon 5400
	ProcessorFamilyQuadCoreXeon                 ProcessorFamily = 0xaa  // Quad-Core Xeon
	ProcessorFamilyDualCoreXeon5200             ProcessorFamily = 0xab  // Dual-Core Xeon 5200
	ProcessorFamilyDualCoreXeon7200             ProcessorFamily = 0xac  // Dual-Core Xeon 7200
	ProcessorFamilyQuadCoreXeon7300             ProcessorFamily = 0xad  // Quad-Core Xeon 7300
	ProcessorFamilyQuadCoreXeon7400             ProcessorFamily = 0xae  // Quad-Core Xeon 7400
	ProcessorFamilyMultiCoreXeon7400            ProcessorFamily = 0xaf  // Multi-Core Xeon 7400
	ProcessorFamilyPentiumIIIXeon               ProcessorFamily = 0xb0  // Pentium III Xeon
	ProcessorFamilyPentiumIIISpeedstep          ProcessorFamily = 0xb1  // Pentium III Speedstep
	ProcessorFamilyPentium4                     ProcessorFamily = 0xb2  // Pentium 4
	ProcessorFamilyXeon                         ProcessorFamily = 0xb3  // Xeon
	ProcessorFamilyAS400                        ProcessorFamily = 0xb4  // AS400
	ProcessorFamilyXeonMP                       ProcessorFamily = 0xb5  // Xeon MP
	ProcessorFamilyAthlonXP                     ProcessorFamily = 0xb6  // Athlon XP
	ProcessorFamilyAthlonMP                     ProcessorFamily = 0xb7  // Athlon MP
	ProcessorFamilyItanium2                     ProcessorFamily = 0xb8  // Itanium 2
	ProcessorFamilyPentiumM                     ProcessorFamily = 0xb9  // Pentium M
	ProcessorFamilyCeleronD                     ProcessorFamily = 0xba  // Celeron D
	ProcessorFamilyPentiumD                     ProcessorFamily = 0xbb  // Pentium D
	ProcessorFamilyPentiumEE                    ProcessorFamily = 0xbc  // Pentium EE
	ProcessorFamilyCoreSolo                     ProcessorFamily = 0xbd  // Core Solo
	ProcessorFamilyHandledAsASpecialCase        ProcessorFamily = 0xbe  // handled as a special case */
	ProcessorFamilyCore2Duo                     ProcessorFamily = 0xbf  // Core 2 Duo
	ProcessorFamilyCore2Solo                    ProcessorFamily = 0xc0  // Core 2 Solo
	ProcessorFamilyCore2Extreme                 ProcessorFamily = 0xc1  // Core 2 Extreme
	ProcessorFamilyCore2Quad                    ProcessorFamily = 0xc2  // Core 2 Quad
	ProcessorFamilyCore2ExtremeMobile           ProcessorFamily = 0xc3  // Core 2 Extreme Mobile
	ProcessorFamilyCore2DuoMobile               ProcessorFamily = 0xc4  // Core 2 Duo Mobile
	ProcessorFamilyCore2SoloMobile              ProcessorFamily = 0xc5  // Core 2 Solo Mobile
	ProcessorFamilyCoreI7                       ProcessorFamily = 0xc6  // Core i7
	ProcessorFamilyDualCoreCeleron              ProcessorFamily = 0xc7  // Dual-Core Celeron
	ProcessorFamilyIBM390                       ProcessorFamily = 0xc8  // IBM390
	ProcessorFamilyG4                           ProcessorFamily = 0xc9  // G4
	ProcessorFamilyG5                           ProcessorFamily = 0xca  // G5
	ProcessorFamilyESA390G6                     ProcessorFamily = 0xcb  // ESA/390 G6
	ProcessorFamilyZarchitecture                ProcessorFamily = 0xcc  // z/Architecture
	ProcessorFamilyCoreI5                       ProcessorFamily = 0xcd  // Core i5
	ProcessorFamilyCoreI3                       ProcessorFamily = 0xce  // Core i3
	ProcessorFamilyCoreI9                       ProcessorFamily = 0xcf  // Core i9
	ProcessorFamilyC7M                          ProcessorFamily = 0xd2  // C7-M
	ProcessorFamilyC7D                          ProcessorFamily = 0xd3  // C7-D
	ProcessorFamilyC7                           ProcessorFamily = 0xd4  // C7
	ProcessorFamilyEden                         ProcessorFamily = 0xd5  // Eden
	ProcessorFamilyMultiCoreXeon                ProcessorFamily = 0xd6  // Multi-Core Xeon
	ProcessorFamilyDualCoreXeon3xxx             ProcessorFamily = 0xd7  // Dual-Core Xeon 3xxx
	ProcessorFamilyQuadCoreXeon3xxx             ProcessorFamily = 0xd8  // Quad-Core Xeon 3xxx
	ProcessorFamilyNano                         ProcessorFamily = 0xd9  // Nano
	ProcessorFamilyDualCoreXeon5xxx             ProcessorFamily = 0xda  // Dual-Core Xeon 5xxx
	ProcessorFamilyQuadCoreXeon5xxx             ProcessorFamily = 0xdb  // Quad-Core Xeon 5xxx
	ProcessorFamilyDualCoreXeon7xxx             ProcessorFamily = 0xdd  // Dual-Core Xeon 7xxx
	ProcessorFamilyQuadCoreXeon7xxx             ProcessorFamily = 0xde  // Quad-Core Xeon 7xxx
	ProcessorFamilyMultiCoreXeon7xxx            ProcessorFamily = 0xdf  // Multi-Core Xeon 7xxx
	ProcessorFamilyMultiCoreXeon3400            ProcessorFamily = 0xe0  // Multi-Core Xeon 3400
	ProcessorFamilyOpteron3000                  ProcessorFamily = 0xe4  // Opteron 3000
	ProcessorFamilySempronII                    ProcessorFamily = 0xe5  // Sempron II
	ProcessorFamilyEmbeddedOpteronQuadCore      ProcessorFamily = 0xe6  // Embedded Opteron Quad-Core
	ProcessorFamilyPhenomTripleCore             ProcessorFamily = 0xe7  // Phenom Triple-Core
	ProcessorFamilyTurionUltraDualCoreMobile    ProcessorFamily = 0xe8  // Turion Ultra Dual-Core Mobile
	ProcessorFamilyTurionDualCoreMobile         ProcessorFamily = 0xe9  // Turion Dual-Core Mobile
	ProcessorFamilyAthlonDualCore               ProcessorFamily = 0xea  // Athlon Dual-Core
	ProcessorFamilySempronSI                    ProcessorFamily = 0xeb  // Sempron SI
	ProcessorFamilyPhenomII                     ProcessorFamily = 0xec  // Phenom II
	ProcessorFamilyAthlonII                     ProcessorFamily = 0xed  // Athlon II
	ProcessorFamilySixCoreOpteron               ProcessorFamily = 0xee  // Six-Core Opteron
	ProcessorFamilySempronM                     ProcessorFamily = 0xef  // Sempron M
	ProcessorFamilyI860                         ProcessorFamily = 0xfa  // i860
	ProcessorFamilyI960                         ProcessorFamily = 0xfb  // i960
	ProcessorFamilyARMv7                        ProcessorFamily = 0x100 // ARMv7
	ProcessorFamilyARMv8                        ProcessorFamily = 0x101 // ARMv8
	ProcessorFamilySH3                          ProcessorFamily = 0x104 // SH-3
	ProcessorFamilySH4                          ProcessorFamily = 0x105 // SH-4
	ProcessorFamilyARM                          ProcessorFamily = 0x118 // ARM
	ProcessorFamilyStrongARM                    ProcessorFamily = 0x119 // StrongARM
	ProcessorFamily6x86                         ProcessorFamily = 0x12c // 6x86
	ProcessorFamilyMediaGX                      ProcessorFamily = 0x12d // MediaGX
	ProcessorFamilyMII                          ProcessorFamily = 0x12e // MII
	ProcessorFamilyWinChip                      ProcessorFamily = 0x140 // WinChip
	ProcessorFamilyDSP                          ProcessorFamily = 0x15e // DSP
	ProcessorFamilyVideoProcessor               ProcessorFamily = 0x1f4 // Video Processor
)

ProcessorFamily values are defined in DSP0134 7.5.2.

func (ProcessorFamily) String

func (v ProcessorFamily) String() string

type ProcessorInfo

type ProcessorInfo struct {
	smbios.Header     `smbios:"-"`
	SocketDesignation string                   // 04h
	Type              ProcessorType            // 05h
	Family            uint8                    // 06h
	Manufacturer      string                   // 07h
	ID                uint64                   // 08h
	Version           string                   // 10h
	Voltage           uint8                    // 11h
	ExternalClock     uint16                   // 12h
	MaxSpeed          uint16                   // 14h
	CurrentSpeed      uint16                   // 16h
	Status            ProcessorStatus          // 18h
	Upgrade           ProcessorUpgrade         // 19h
	L1CacheHandle     uint16                   // 1Ah
	L2CacheHandle     uint16                   // 1Ch
	L3CacheHandle     uint16                   // 1Eh
	SerialNumber      string                   // 20h
	AssetTag          string                   // 21h
	PartNumber        string                   // 22h
	CoreCount         uint8                    // 23h
	CoreEnabled       uint8                    // 24h
	ThreadCount       uint8                    // 25h
	Characteristics   ProcessorCharacteristics // 26h
	Family2           ProcessorFamily          // 28h
	CoreCount2        uint16                   // 2Ah
	CoreEnabled2      uint16                   // 2Ch
	ThreadCount2      uint16                   // 2Eh
}

ProcessorInfo is defined in DSP0134 x.x.

func ParseProcessorInfo

func ParseProcessorInfo(t *smbios.Table) (*ProcessorInfo, error)

ParseProcessorInfo parses a generic smbios.Table into ProcessorInfo.

func (*ProcessorInfo) GetCoreCount

func (pi *ProcessorInfo) GetCoreCount() int

GetCoreCount returns the number of cores detected by the BIOS for this processor socket.

func (*ProcessorInfo) GetCoreEnabled

func (pi *ProcessorInfo) GetCoreEnabled() int

GetCoreEnabled returns the number of cores that are enabled by the BIOS and available for Operating System use.

func (*ProcessorInfo) GetFamily

func (pi *ProcessorInfo) GetFamily() ProcessorFamily

GetFamily returns the processor family, taken from the appropriate field.

func (*ProcessorInfo) GetThreadCount

func (pi *ProcessorInfo) GetThreadCount() int

GetThreadCount returns the total number of threads detected by the BIOS for this processor socket.

func (*ProcessorInfo) GetVoltage

func (pi *ProcessorInfo) GetVoltage() float32

GetVoltage returns the processor voltage, in volts.

func (*ProcessorInfo) String

func (pi *ProcessorInfo) String() string

type ProcessorStatus

type ProcessorStatus uint8

ProcessorStatus is defined in DSP0134 7.5.

func (ProcessorStatus) String

func (v ProcessorStatus) String() string

type ProcessorType

type ProcessorType uint8

ProcessorType is defined in DSP0134 7.5.1.

const (
	ProcessorTypeOther            ProcessorType = 0x01 // Other
	ProcessorTypeUnknown          ProcessorType = 0x02 // Unknown
	ProcessorTypeCentralProcessor ProcessorType = 0x03 // Central Processor
	ProcessorTypeMathProcessor    ProcessorType = 0x04 // Math Processor
	ProcessorTypeDSPProcessor     ProcessorType = 0x05 // DSP Processor
	ProcessorTypeVideoProcessor   ProcessorType = 0x06 // Video Processor
)

ProcessorType values are defined in DSP0134 7.5.1.

func (ProcessorType) String

func (v ProcessorType) String() string

type ProcessorUpgrade

type ProcessorUpgrade uint8

ProcessorUpgrade is defined in DSP0134 7.5.5.

const (
	ProcessorUpgradeOther                ProcessorUpgrade = 0x01 // Other
	ProcessorUpgradeUnknown              ProcessorUpgrade = 0x02 // Unknown
	ProcessorUpgradeDaughterBoard        ProcessorUpgrade = 0x03 // Daughter Board
	ProcessorUpgradeZIFSocket            ProcessorUpgrade = 0x04 // ZIF Socket
	ProcessorUpgradeReplaceablePiggyBack ProcessorUpgrade = 0x05 // Replaceable Piggy Back
	ProcessorUpgradeNone                 ProcessorUpgrade = 0x06 // None
	ProcessorUpgradeLIFSocket            ProcessorUpgrade = 0x07 // LIF Socket
	ProcessorUpgradeSlot1                ProcessorUpgrade = 0x08 // Slot 1
	ProcessorUpgradeSlot2                ProcessorUpgrade = 0x09 // Slot 2
	ProcessorUpgrade370pinSocket         ProcessorUpgrade = 0x0a // 370-pin Socket
	ProcessorUpgradeSlotA                ProcessorUpgrade = 0x0b // Slot A
	ProcessorUpgradeSlotM                ProcessorUpgrade = 0x0c // Slot M
	ProcessorUpgradeSocket423            ProcessorUpgrade = 0x0d // Socket 423
	ProcessorUpgradeSocketA              ProcessorUpgrade = 0x0e // Socket A (Socket 462)
	ProcessorUpgradeSocket478            ProcessorUpgrade = 0x0f // Socket 478
	ProcessorUpgradeSocket754            ProcessorUpgrade = 0x10 // Socket 754
	ProcessorUpgradeSocket940            ProcessorUpgrade = 0x11 // Socket 940
	ProcessorUpgradeSocket939            ProcessorUpgrade = 0x12 // Socket 939
	ProcessorUpgradeSocketMpga604        ProcessorUpgrade = 0x13 // Socket mPGA604
	ProcessorUpgradeSocketLGA771         ProcessorUpgrade = 0x14 // Socket LGA771
	ProcessorUpgradeSocketLGA775         ProcessorUpgrade = 0x15 // Socket LGA775
	ProcessorUpgradeSocketS1             ProcessorUpgrade = 0x16 // Socket S1
	ProcessorUpgradeSocketAM2            ProcessorUpgrade = 0x17 // Socket AM2
	ProcessorUpgradeSocketF1207          ProcessorUpgrade = 0x18 // Socket F (1207)
	ProcessorUpgradeSocketLGA1366        ProcessorUpgrade = 0x19 // Socket LGA1366
	ProcessorUpgradeSocketG34            ProcessorUpgrade = 0x1a // Socket G34
	ProcessorUpgradeSocketAM3            ProcessorUpgrade = 0x1b // Socket AM3
	ProcessorUpgradeSocketC32            ProcessorUpgrade = 0x1c // Socket C32
	ProcessorUpgradeSocketLGA1156        ProcessorUpgrade = 0x1d // Socket LGA1156
	ProcessorUpgradeSocketLGA1567        ProcessorUpgrade = 0x1e // Socket LGA1567
	ProcessorUpgradeSocketPGA988A        ProcessorUpgrade = 0x1f // Socket PGA988A
	ProcessorUpgradeSocketBGA1288        ProcessorUpgrade = 0x20 // Socket BGA1288
	ProcessorUpgradeSocketRpga988b       ProcessorUpgrade = 0x21 // Socket rPGA988B
	ProcessorUpgradeSocketBGA1023        ProcessorUpgrade = 0x22 // Socket BGA1023
	ProcessorUpgradeSocketBGA1224        ProcessorUpgrade = 0x23 // Socket BGA1224
	ProcessorUpgradeSocketBGA1155        ProcessorUpgrade = 0x24 // Socket BGA1155
	ProcessorUpgradeSocketLGA1356        ProcessorUpgrade = 0x25 // Socket LGA1356
	ProcessorUpgradeSocketLGA2011        ProcessorUpgrade = 0x26 // Socket LGA2011
	ProcessorUpgradeSocketFS1            ProcessorUpgrade = 0x27 // Socket FS1
	ProcessorUpgradeSocketFS2            ProcessorUpgrade = 0x28 // Socket FS2
	ProcessorUpgradeSocketFM1            ProcessorUpgrade = 0x29 // Socket FM1
	ProcessorUpgradeSocketFM2            ProcessorUpgrade = 0x2a // Socket FM2
	ProcessorUpgradeSocketLGA20113       ProcessorUpgrade = 0x2b // Socket LGA2011-3
	ProcessorUpgradeSocketLGA13563       ProcessorUpgrade = 0x2c // Socket LGA1356-3
	ProcessorUpgradeSocketLGA1150        ProcessorUpgrade = 0x2d // Socket LGA1150
	ProcessorUpgradeSocketBGA1168        ProcessorUpgrade = 0x2e // Socket BGA1168
	ProcessorUpgradeSocketBGA1234        ProcessorUpgrade = 0x2f // Socket BGA1234
	ProcessorUpgradeSocketBGA1364        ProcessorUpgrade = 0x30 // Socket BGA1364
	ProcessorUpgradeSocketAM4            ProcessorUpgrade = 0x31 // Socket AM4
	ProcessorUpgradeSocketLGA1151        ProcessorUpgrade = 0x32 // Socket LGA1151
	ProcessorUpgradeSocketBGA1356        ProcessorUpgrade = 0x33 // Socket BGA1356
	ProcessorUpgradeSocketBGA1440        ProcessorUpgrade = 0x34 // Socket BGA1440
	ProcessorUpgradeSocketBGA1515        ProcessorUpgrade = 0x35 // Socket BGA1515
	ProcessorUpgradeSocketLGA36471       ProcessorUpgrade = 0x36 // Socket LGA3647-1
	ProcessorUpgradeSocketSP3            ProcessorUpgrade = 0x37 // Socket SP3
	ProcessorUpgradeSocketSP3r2          ProcessorUpgrade = 0x38 // Socket SP3r2
	ProcessorUpgradeSocketLGA2066        ProcessorUpgrade = 0x39 // Socket LGA2066
	ProcessorUpgradeSocketBGA1392        ProcessorUpgrade = 0x3a // Socket BGA1392
	ProcessorUpgradeSocketBGA1510        ProcessorUpgrade = 0x3b // Socket BGA1510
	ProcessorUpgradeSocketBGA1528        ProcessorUpgrade = 0x3c // Socket BGA1528
)

ProcessorUpgrade values are defined in DSP0134 7.5.5.

func (ProcessorUpgrade) String

func (v ProcessorUpgrade) String() string

type SystemInfo

type SystemInfo struct {
	smbios.Header `smbios:"-"`
	Manufacturer  string     // 04h
	ProductName   string     // 05h
	Version       string     // 06h
	SerialNumber  string     // 07h
	UUID          UUID       // 08h
	WakeupType    WakeupType // 18h
	SKUNumber     string     // 19h
	Family        string     // 1Ah
}

SystemInfo is defined in DSP0134 7.2.

func ParseSystemInfo

func ParseSystemInfo(t *smbios.Table) (*SystemInfo, error)

ParseSystemInfo parses a generic Table into SystemInfo.

func (*SystemInfo) String

func (si *SystemInfo) String() string

type SystemSlots

type SystemSlots struct {
	smbios.Table
	SlotDesignation      string // 04h
	SlotType             uint8  // 05h
	SlotDataBusWidth     uint8  // 06h
	CurrentUsage         uint8  // 07h
	SlotLength           uint8  // 08h
	SlotID               uint16 // 09h
	SlotCharacteristics1 uint8  // 0Bh
	SlotCharacteristics2 uint8  // 0Ch
	SegmentGroupNumber   uint16 // 0Dh
	BusNumber            uint8  // 0Fh
	DeviceFunctionNumber uint8  // 10h
	DataBusWidth         uint8  // 11h

}

SystemSlots is defined in DSP0134 7.10.

func ParseSystemSlots

func ParseSystemSlots(t *smbios.Table) (*SystemSlots, error)

ParseSystemSlots parses a generic smbios.Table into SystemSlots.

type TPMDevice

type TPMDevice struct {
	smbios.Header    `smbios:"-"`
	VendorID         TPMDeviceVendorID        `smbios:"-,skip=4"` // 04h
	MajorSpecVersion uint8                    // 08h
	MinorSpecVersion uint8                    // 09h
	FirmwareVersion1 uint32                   // 0Ah
	FirmwareVersion2 uint32                   // 0Eh
	Description      string                   // 12h
	Characteristics  TPMDeviceCharacteristics // 13h
	OEMDefined       uint32                   // 1Bh
}

TPMDevice is defined in DSP0134 7.44.

func ParseTPMDevice

func ParseTPMDevice(t *smbios.Table) (*TPMDevice, error)

ParseTPMDevice parses a generic smbios.Table into TPMDevice.

func (*TPMDevice) String

func (di *TPMDevice) String() string

type TPMDeviceCharacteristics

type TPMDeviceCharacteristics uint64

TPMDeviceCharacteristics is defined in DSP0134 7.44.1.

const (
	TPMDeviceCharacteristicsNotSupported                                 TPMDeviceCharacteristics = 1 << 2 // TPM Device Characteristics are not supported.
	TPMDeviceCharacteristicsFamilyConfigurableViaFirmwareUpdate          TPMDeviceCharacteristics = 1 << 3 // Family configurable via firmware update.
	TPMDeviceCharacteristicsFamilyConfigurableViaPlatformSoftwareSupport TPMDeviceCharacteristics = 1 << 4 // Family configurable via platform software support.
	TPMDeviceCharacteristicsFamilyConfigurableViaOEMProprietaryMechanism TPMDeviceCharacteristics = 1 << 5 // Family configurable via OEM proprietary mechanism.
)

TPMDeviceCharacteristics fields are defined in DSP0134 x.x.x.

func (TPMDeviceCharacteristics) String

func (v TPMDeviceCharacteristics) String() string

type TPMDeviceVendorID

type TPMDeviceVendorID [4]byte

TPMDeviceVendorID is defined in TCG Vendor ID Registry.

func (TPMDeviceVendorID) String

func (vid TPMDeviceVendorID) String() string

type UUID

type UUID [16]byte

UUID is defined in DSP0134 7.2.1.

func (*UUID) ParseField

func (u *UUID) ParseField(t *smbios.Table, off int) (int, error)

ParseField parses UUD field within a table.

func (UUID) String

func (u UUID) String() string

type WakeupType

type WakeupType uint8

WakeupType is defined in DSP0134 7.2.2.

const (
	WakeupTypeReserved        WakeupType = 0x00 // Reserved
	WakeupTypeOther           WakeupType = 0x01 // Other
	WakeupTypeUnknown         WakeupType = 0x02 // Unknown
	WakeupTypeAPMTimer        WakeupType = 0x03 // APM Timer
	WakeupTypeModemRing       WakeupType = 0x04 // Modem Ring
	WakeupTypeLANRemote       WakeupType = 0x05 // LAN Remote
	WakeupTypePowerSwitch     WakeupType = 0x06 // Power Switch
	WakeupTypePCIPME          WakeupType = 0x07 // PCI PME#
	WakeupTypeACPowerRestored WakeupType = 0x08 // AC Power Restored
)

WakeupType values are defined in DSP0134 7.2.2.

func (WakeupType) String

func (v WakeupType) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL