mbox

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BFReadCoreMask

func BFReadCoreMask(cpu uint16, ppCurrentLevel, maskIndex int) (uint32, error)

BFReadCoreMask reads one BF core mask word (32-bit) for the given PP level and mask index.

func BFSetStatus

func BFSetStatus(cpu uint16, ppCurrentLevel int, enable bool) error

BFSetStatus enables or disables SST-BF.

func CPGetPriorityType

func CPGetPriorityType(cpu uint16) (int, error)

CPGetPriorityType reads the current CP priority type (0=proportional, 1=ordered).

func CPSendClosCmd

func CPSendClosCmd(cpu uint16, subCmd uint16, parameter uint32, reqData uint32) (uint32, error)

CPSendClosCmd sends a CLOS command via MMIO to PUNIT.

func CPSetPriorityType

func CPSetPriorityType(cpu uint16, priority int) error

CPSetPriorityType changes the CP priority type.

func CPSetStatus

func CPSetStatus(cpu uint16, enable bool, priority int) error

CPSetStatus sets the SST-CP status. Returns an error if the hardware did not reflect the expected state.

func ClosAssociate

func ClosAssociate(cpu uint16, clos uint8) error

ClosAssociate associates one CPU to a CLOS.

func ClosReset

func ClosReset(cpu uint16) error

ClosReset resets all CLOSes to default values.

func ClosSetParam

func ClosSetParam(cpu uint16, clos, epp, proportional, minFreq, maxFreq, desiredFreq uint8) error

ClosSetParam writes CLOS parameters for one CLOS. Frequency values are 8-bit ratios (x100 = MHz).

func GetCPUClosID

func GetCPUClosID(cpu uint16) (uint8, error)

GetCPUClosID returns the CLOS id of a CPU.

func PPGetCurrentLevel

func PPGetCurrentLevel(cpu uint16) (int, error)

PPGetCurrentLevel reads the current PP level for a CPU.

func PerfLevelGetCoreMask64

func PerfLevelGetCoreMask64(cpu uint16, level int) (uint64, error)

PerfLevelGetCoreMask64 reads the 64-bit punit core bitmask for a PP level.

func TFSetStatus

func TFSetStatus(cpu uint16, ppCurrentLevel int, enable bool) error

TFSetStatus enables or disables SST-TF via the Mbox interface.

Types

type BFInfo

type BFInfo struct {
	HighPriorityBaseFreqRatio int // ratio (x100 = MHz)
	LowPriorityBaseFreqRatio  int // ratio (x100 = MHz)
	CoreMask                  uint64
}

BFInfo holds SST-BF properties for one PP level.

func BFGetInfo

func BFGetInfo(cpu uint16, level int) (BFInfo, error)

BFGetInfo reads SST-BF properties for one PP level.

type CPStatus

type CPStatus struct {
	Supported bool
	Enabled   bool
}

CPStatus holds SST-CP support/enable status.

func CPReadStatus

func CPReadStatus(cpu uint16) (CPStatus, error)

CPReadStatus reads SST-CP support and enable state.

type ClosParam

type ClosParam struct {
	Proportional int
	MinFreq      int
	MaxFreq      int
	Epp          int
	DesiredFreq  int
}

ClosParam holds per-CLOS parameters read from hardware.

func ClosGetParam

func ClosGetParam(cpu uint16, closIdx int) (ClosParam, error)

ClosGetParam reads CLOS parameters for one CLOS index.

type PPInfo

type PPInfo struct {
	Supported    bool
	Locked       bool
	CurrentLevel int
	MaxLevel     int
	Version      int
}

PPInfo holds SST-PP (perf profile) information.

func PPReadInfo

func PPReadInfo(cpu uint16) (PPInfo, error)

PPReadInfo reads SST-PP info for a CPU.

type TDPControl

type TDPControl struct {
	BFSupported bool
	BFEnabled   bool
	TFSupported bool
	TFEnabled   bool
}

TDPControl holds SST-BF and SST-TF support/enable flags.

func PPReadTDPControl

func PPReadTDPControl(cpu uint16, ppCurrentLevel int) (TDPControl, error)

PPReadTDPControl reads SST BF/TF status for a CPU at the given PP level.

type TFInfo

type TFInfo struct {
	LPClipRatios [3]int    // x100 = MHz, indices 0=SSE, 1=AVX2, 2=AVX512
	HPCoreCounts [8]int    // high-priority core count per bucket
	HPTRLRatios  [3][8]int // [trllevel][bucket] ratio, x100 = MHz
}

TFInfo holds SST-TF properties for one PP level. Note: Mbox TF only exposes up to 3 TRL levels (SSE=0, AVX2=1, AVX512=2).

func TFGetInfo

func TFGetInfo(cpu uint16, level int) (TFInfo, error)

TFGetInfo reads SST-TF properties for one PP level.

Jump to

Keyboard shortcuts

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