package sst

import "github.com/intel/goresctrl/pkg/sst"

Index

Constants

const (
	ISST_IF_GET_PHY_ID   = 0xc008fe01
	ISST_IF_IO_CMD       = 0x4008fe02
	ISST_IF_MBOX_COMMAND = 0xc008fe03
)
const (
	CONFIG_TDP                        = 0x7f
	CONFIG_TDP_GET_LEVELS_INFO        = 0x0
	CONFIG_TDP_GET_TDP_CONTROL        = 0x1
	CONFIG_TDP_SET_TDP_CONTROL        = 0x2
	CONFIG_TDP_GET_TDP_INFO           = 0x3
	CONFIG_TDP_GET_PWR_INFO           = 0x4
	CONFIG_TDP_GET_TJMAX_INFO         = 0x5
	CONFIG_TDP_GET_CORE_MASK          = 0x6
	CONFIG_TDP_GET_TURBO_LIMIT_RATIOS = 0x7
	CONFIG_TDP_SET_LEVEL              = 0x8
	CONFIG_TDP_GET_UNCORE_P0_P1_INFO  = 0x9
	CONFIG_TDP_GET_P1_INFO            = 0xa
	CONFIG_TDP_GET_MEM_FREQ           = 0xb

	CONFIG_TDP_GET_FACT_HP_TURBO_LIMIT_NUMCORES = 0x10
	CONFIG_TDP_GET_FACT_HP_TURBO_LIMIT_RATIOS   = 0x11
	CONFIG_TDP_GET_FACT_LP_CLIPPING_RATIO       = 0x12

	CONFIG_TDP_PBF_GET_CORE_MASK_INFO = 0x20
	CONFIG_TDP_PBF_GET_P1HI_P1LO_INFO = 0x21
	CONFIG_TDP_PBF_GET_TJ_MAX_INFO    = 0x22
	CONFIG_TDP_PBF_GET_TDP_INFO       = 0x23

	CONFIG_CLOS        = 0xd0
	CLOS_PM_QOS_CONFIG = 0x2
	CLOS_PQR_ASSOC     = 0x0
	CLOS_PM_CLOS       = 0x1
	CLOS_STATUS        = 0x3

	MBOX_CMD_WRITE_BIT = 0x8

	READ_PM_CONFIG  = 0x94
	WRITE_PM_CONFIG = 0x95
	PM_FEATURE      = 0x3

	PM_QOS_INFO_OFFSET   = 0x0
	PM_QOS_CONFIG_OFFSET = 0x4
	PM_CLOS_OFFSET       = 0x8
	PQR_ASSOC_OFFSET     = 0x20

	MSR_PM_ENABLE = 0x770
)
const NumClos = 4

NumClos is the number of CLOSes suported by SST-CP

Functions

func CheckPackageCpus

func CheckPackageCpus(info *SstPackageInfo, cpus utils.IDSet) bool

Check that a list of CPUs belong to a given package

func ClosSetup

func ClosSetup(info *SstPackageInfo, clos int, closInfo *SstClosInfo) error

ClosSetup stores the user supplied Clos information into punit

func ConfigureCP

func ConfigureCP(info *SstPackageInfo, priority int, cpu2clos *ClosCPUSet) error

ConfigureCP will allow caller to configure CPUs to various Clos.

func DisableBF

func DisableBF(pkgs ...int) error

DisableBF disables SST-BF and clears things properly

func DisableCP

func DisableCP(info *SstPackageInfo) error

DisableCP disables SST-CP feature

func EnableBF

func EnableBF(pkgs ...int) error

EnableBF enables SST-BF and sets it up properly

func EnableCP

func EnableCP(info *SstPackageInfo) error

EnableCP enables SST-CP feature

func GetCPUClosID

func GetCPUClosID(cpu utils.ID) (int, error)

GetCPUClosID returns the SST-CP CLOS id that a cpu is associated with.

func GetPackageInfo

func GetPackageInfo(pkgs ...int) (map[int]*SstPackageInfo, error)

GetPackageInfo returns information of those packages given as a parameter or all if none given.

func ResetCPConfig

func ResetCPConfig() error

ResetCPConfig will bring the system to a known state. This means that all CLOS groups are reset to their default values, all package cores are assigned to CLOS group 0 and ordered priority mode is enabled.

func SstSupported

func SstSupported() bool

SstSupported returns true if Intel Speed Select Technologies (SST) is supported by the system and can be interfaced via the Linux kernel device

Types

type CPPriorityType

type CPPriorityType int

CPPriorityType denotes the type CLOS priority ordering used in SST-CP

const (
	Proportional CPPriorityType = 0
	Ordered      CPPriorityType = 1
)

type ClosCPUSet

type ClosCPUSet map[int]utils.IDSet

ClosCPUSet contains mapping from Clos id to a set of CPU ids

type SstClosInfo

type SstClosInfo struct {
	EPP                  int
	ProportionalPriority int
	MinFreq              int
	MaxFreq              int
	DesiredFreq          int
}

SstClosInfo contains parameters of one CLOS of SST-CP

type SstPackageInfo

type SstPackageInfo struct {

	// Gereric PP info
	PPSupported    bool
	PPLocked       bool
	PPVersion      int
	PPCurrentLevel int
	PPMaxLevel     int

	// Information about the currently active PP level
	CPSupported bool
	CPEnabled   bool
	CPPriority  CPPriorityType
	BFSupported bool
	BFEnabled   bool
	BFCores     utils.IDSet
	TFSupported bool
	TFEnabled   bool

	ClosInfo    [NumClos]SstClosInfo
	ClosCPUInfo ClosCPUSet
	// contains filtered or unexported fields
}

SstPackageInfo contains status of Intel Speed Select Technologies (SST) for one CPU package

Source Files

sst.go sst_if.go sst_types_amd64.go sst_types_priv.go sysfs.go

Version
v0.8.0 (latest)
Published
Sep 19, 2024
Platform
linux/amd64
Imports
12 packages
Last checked
2 days ago

Tools for package owners.