isst

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: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ISST_IF_GET_PLATFORM_INFO = 0x8008fe00
	ISST_IF_GET_PHY_ID        = 0xc008fe01
	ISST_IF_IO_CMD            = 0x4008fe02
	ISST_IF_MBOX_COMMAND      = 0xc008fe03

	ISST_IF_COUNT_TPMI_INSTANCES    = 0x8008fe05
	ISST_IF_CORE_POWER_STATE        = 0xc008fe06
	ISST_IF_CLOS_PARAM              = 0xc008fe07
	ISST_IF_CLOS_ASSOC              = 0xc008fe08
	ISST_IF_PERF_LEVELS             = 0xc008fe09
	ISST_IF_PERF_SET_LEVEL          = 0x4008fe0a
	ISST_IF_PERF_SET_FEATURE        = 0x4008fe0b
	ISST_IF_GET_PERF_LEVEL_INFO     = 0x8008fe0c
	ISST_IF_GET_PERF_LEVEL_CPU_MASK = 0x8008fe0d
	ISST_IF_GET_BASE_FREQ_INFO      = 0x8008fe0e
	ISST_IF_GET_BASE_FREQ_CPU_MASK  = 0x8008fe0f
	ISST_IF_GET_TURBO_FREQ_INFO     = 0x8008fe10
)
View Source
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
)
View Source
const (
	ISST_IF_MSR_COMMAND = 0xc008fe04
)

Variables

This section is empty.

Functions

func DevPath

func DevPath() string

DevPath returns the path to the isst_interface device.

func GetPlatformAPIVersion

func GetPlatformAPIVersion() (int, error)

GetPlatformAPIVersion gets the ISST API version.

func GetPunitCPUId

func GetPunitCPUId(cpu uint16) (uint16, error)

GetPunitCPUId returns the PUNIT CPU id for a given Linux logical CPU.

func Ioctl

func Ioctl(ioctl uintptr, req uintptr) error

Ioctl executes an ioctl on the linux isst_if device driver.

func SendMMIOCmd

func SendMMIOCmd(cpu uint16, reg uint32, value uint32, doWrite bool) (uint32, error)

SendMMIOCmd sends one MMIO command to PUNIT.

func SendMSRCmd

func SendMSRCmd(cpu uint16, msr uint64, write bool, data *uint64) error

SendMSRCmd reads or writes one MSR via the ISST interface. If write is false, data is populated with the MSR value on return.

func SendMboxCmd

func SendMboxCmd(cpu uint16, cmd uint16, subCmd uint16, parameter uint32, reqData uint32) (uint32, error)

SendMboxCmd sends one mailbox command to PUNIT.

func SetLogger

func SetLogger(l *slog.Logger)

SetLogger sets the logger instance used by the package.

func SlogHex

func SlogHex(key string, val uint32) slog.Attr

SlogHex returns a slog.Attr with a hex-formatted uint32.

Types

type BaseFreqInfo

type BaseFreqInfo struct {
	Socket_id              uint8
	Power_domain_id        uint8
	Level                  uint16
	High_base_freq_mhz     uint16
	Low_base_freq_mhz      uint16
	Tjunction_max_c        uint16
	Thermal_design_power_w uint16
}

type CPUMap

type CPUMap struct {
	Logical_cpu  uint32
	Physical_cpu uint32
}

type CPUMaps

type CPUMaps struct {
	Cmd_count uint32
	Cpu_map   [1]CPUMap
}

type ClosAssoc

type ClosAssoc struct {
	Socket_id       uint8
	Power_domain_id uint8
	Logical_cpu     uint16
	Clos            uint16
}

type ClosAssocCmds

type ClosAssocCmds struct {
	Cmd_count     uint16
	Get_set       uint16
	Punit_cpu_map uint16
	Assoc_info    [1]ClosAssoc
}

type ClosParam

type ClosParam struct {
	Get_set         uint8
	Socket_id       uint8
	Power_domain_id uint8
	Clos            uint8
	Min_freq_mhz    uint16
	Max_freq_mhz    uint16
	Prop_prio       uint8
	Pad_cgo_0       [1]byte
}

type CorePower

type CorePower struct {
	Get_set         uint8
	Socket_id       uint8
	Power_domain_id uint8
	Enable          uint8
	Supported       uint8
	Priority_type   uint8
}

type IoReg

type IoReg struct {
	Read_write  uint32
	Logical_cpu uint32
	Reg         uint32
	Value       uint32
}

type IoRegs

type IoRegs struct {
	Req_count uint32
	Io_reg    [1]IoReg
}

type MboxCmd

type MboxCmd struct {
	Logical_cpu uint32
	Parameter   uint32
	Req_data    uint32
	Resp_data   uint32
	Command     uint16
	Sub_command uint16
	Reserved    uint32
}

type MboxCmds

type MboxCmds struct {
	Cmd_count uint32
	Mbox_cmd  [1]MboxCmd
}

type MsrCmd

type MsrCmd struct {
	Read_write  uint32
	Logical_cpu uint32
	Msr         uint64
	Data        uint64
}

type MsrCmds

type MsrCmds struct {
	Cmd_count uint32
	Msr_cmd   [1]MsrCmd
}

type PerfFeatureControl

type PerfFeatureControl struct {
	Socket_id       uint8
	Power_domain_id uint8
	Feature         uint8
}

type PerfLevelControl

type PerfLevelControl struct {
	Socket_id       uint8
	Power_domain_id uint8
	Level           uint8
}

type PerfLevelCpuMask

type PerfLevelCpuMask struct {
	Socket_id       uint8
	Power_domain_id uint8
	Level           uint8
	Punit_cpu_map   uint8
	Mask            uint64
	Cpu_buffer_size uint16
	Cpu_buffer      [1]int8
	Pad_cgo_0       [5]byte
}

type PerfLevelDataInfo

type PerfLevelDataInfo struct {
	Socket_id              uint8
	Power_domain_id        uint8
	Level                  uint16
	Tdp_ratio              uint16
	Base_freq_mhz          uint16
	Base_freq_avx2_mhz     uint16
	Base_freq_avx512_mhz   uint16
	Base_freq_amx_mhz      uint16
	Thermal_design_power_w uint16
	Tjunction_max_c        uint16
	Max_memory_freq_mhz    uint16
	Cooling_type           uint16
	P0_freq_mhz            uint16
	P1_freq_mhz            uint16
	Pn_freq_mhz            uint16
	Pm_freq_mhz            uint16
	P0_fabric_freq_mhz     uint16
	P1_fabric_freq_mhz     uint16
	Pn_fabric_freq_mhz     uint16
	Pm_fabric_freq_mhz     uint16
	Max_buckets            uint16
	Max_trl_levels         uint16
	Bucket_core_counts     [8]uint16
	Trl_freq_mhz           [6][8]uint16
}

type PerfLevelInfo

type PerfLevelInfo struct {
	Socket_id       uint8
	Power_domain_id uint8
	Max_level       uint8
	Feature_rev     uint8
	Level_mask      uint8
	Current_level   uint8
	Feature_state   uint8
	Locked          uint8
	Enabled         uint8
	Sst_tf_support  uint8
	Sst_bf_support  uint8
}

type PlatformInfo

type PlatformInfo struct {
	Api_version        uint16
	Driver_version     uint16
	Max_cmds_per_ioctl uint16
	Mbox_supported     uint8
	Mmio_supported     uint8
}

type TpmiInstanceCount

type TpmiInstanceCount struct {
	Socket_id  uint8
	Count      uint8
	Valid_mask uint16
}

type TurboFreqInfo

type TurboFreqInfo struct {
	Socket_id          uint8
	Power_domain_id    uint8
	Level              uint16
	Max_clip_freqs     uint16
	Max_buckets        uint16
	Max_trl_levels     uint16
	Lp_clip_freq_mhz   [6]uint16
	Bucket_core_counts [8]uint16
	Trl_freq_mhz       [6][8]uint16
}

Jump to

Keyboard shortcuts

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