spdutil

package module
v0.0.0-...-a56b063 Latest Latest
Warning

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

Go to latest
Published: May 19, 2020 License: GPL-3.0 Imports: 9 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

spdlib

A golang library and tool to extract SPD (4) binaries from firmware blobs

Running

go build cmd/spdutil.go
mkdir test
./spdutil -o test firmware.bin

You will need an up-to-date libyara installed.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dump

func Dump(bs []byte) string

func WriteSPD4

func WriteSPD4(pspd ParsedSPD, filename string)

Types

type ParsedSPD

type ParsedSPD struct {
	Raw                      SPD
	RawBytes                 []byte
	BytesTotal               uint
	BytesUsed                uint
	Revision                 uint8
	RamType                  string
	Vendor                   string
	CalculatedChecksum       uint16
	ManufactoringInformation struct {
	}
	ModulePartNumber string
}

func ParseSPD4

func ParseSPD4(spdBytes []byte) ParsedSPD

type SPD

type SPD struct {
	SPDStatus                                         uint8
	SPDRevision                                       uint8
	DRAMDeviceType                                    uint8
	ModuleType                                        uint8
	DensityAndBanks                                   uint8
	Addressing                                        uint8
	PackageType                                       uint8
	OptionFeatures                                    uint8
	ThermalAndRefresh                                 uint8
	OtherOptionalFeatures                             uint8
	Reserved00_0                                      uint8
	NomalVoltage                                      uint8
	ModuleOrganization                                uint8
	ModuleMemoryBusWidth                              uint8
	ModuleThermalSensor                               uint8
	ExtendedModuleType                                uint8
	Reserved00_1                                      uint8
	Timebases                                         uint8
	MinimumCycleTime                                  uint8
	MaximumCycleTime                                  uint8
	CASLatencies                                      uint32
	MinimumCasLatency                                 uint8
	MinimumRAStoCASDelay                              uint8
	MinimumRowRechargeDelay                           uint8
	RASandRCminUppper                                 uint8
	ActiveToPrecharge_RAS_Lower                       uint8
	ActiveToActiveRefresh_RC_Lower                    uint8
	RefreshRecoveryDelay1                             uint16
	RefreshRecoveryDelay2                             uint16
	RefreshRecoveryDelay4                             uint16
	MinimumFourActiveWindow                           uint16
	MinimumActiveToActiveDelaySameBankGroup           uint8
	MinimumActiveToActiveDelayDifferentBankGroup      uint8
	MinimumCAStoCASDelay                              uint8
	Reserved00_2                                      [19]uint8
	ConnectorToRamMap                                 [18]uint8
	Reserved00_3                                      [116 - 78 + 1]uint8
	FineMinimumCAStoCASDelaySameBankGroup             uint8
	FineMinimumActiveToActiveDelaySameBankGroup       uint8
	FineMinimumAActiveToActiveDelayDifferentBankGroup uint8
	FineMinimumActiveToActiveRefreshDelay             uint8
	FineMinimumRowPrechargeDelay                      uint8
	FineMinimumRAStoCASDelay                          uint8
	FineMinimumCASLatencyTime                         uint8
	FineMaximumCycleTime                              uint8
	FineMinimumCycleTime                              uint8
	CRC                                               uint16
	ModuleSpecificParameter                           [191 - 127]byte
	HybridMemoryParameter                             [255 - 191]byte
	ExtendedFunctionParameter                         [319 - 255]byte
	ModuleManufactoringID                             uint16
	ModuleManufactoringLocation                       uint8
	ModuleManufactoringDate                           [2]byte
	ModuleManufactoringSerial                         uint32
	ModuleManufactoringPartNR                         [0x15C - 0x149 + 1]byte
	ModuleRevisionCode                                uint8
	ModuleManufactorID                                uint16
	ModuleStepping                                    uint8
	ModuleManufactoringData                           [0x17D - 0x161 + 1]byte
	ModuleReserved                                    [0x17F - 0x17E + 1]byte
	EndUserProgrammable                               [511 - 383]byte
}

type SPDMatch

type SPDMatch struct {
	Offset uint64
	SPD    []byte
}

func FindSPDs

func FindSPDs(bs []byte) (spds []SPDMatch)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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