0001
0002
0003
0004 #ifndef __LINUX_PECI_CPU_H
0005 #define __LINUX_PECI_CPU_H
0006
0007 #include <linux/types.h>
0008
0009 #include "../../arch/x86/include/asm/intel-family.h"
0010
0011 #define PECI_PCS_PKG_ID 0
0012 #define PECI_PKG_ID_CPU_ID 0x0000
0013 #define PECI_PKG_ID_PLATFORM_ID 0x0001
0014 #define PECI_PKG_ID_DEVICE_ID 0x0002
0015 #define PECI_PKG_ID_MAX_THREAD_ID 0x0003
0016 #define PECI_PKG_ID_MICROCODE_REV 0x0004
0017 #define PECI_PKG_ID_MCA_ERROR_LOG 0x0005
0018 #define PECI_PCS_MODULE_TEMP 9
0019 #define PECI_PCS_THERMAL_MARGIN 10
0020 #define PECI_PCS_DDR_DIMM_TEMP 14
0021 #define PECI_PCS_TEMP_TARGET 16
0022 #define PECI_PCS_TDP_UNITS 30
0023
0024 struct peci_device;
0025
0026 int peci_temp_read(struct peci_device *device, s16 *temp_raw);
0027
0028 int peci_pcs_read(struct peci_device *device, u8 index,
0029 u16 param, u32 *data);
0030
0031 int peci_pci_local_read(struct peci_device *device, u8 bus, u8 dev,
0032 u8 func, u16 reg, u32 *data);
0033
0034 int peci_ep_pci_local_read(struct peci_device *device, u8 seg,
0035 u8 bus, u8 dev, u8 func, u16 reg, u32 *data);
0036
0037 int peci_mmio_read(struct peci_device *device, u8 bar, u8 seg,
0038 u8 bus, u8 dev, u8 func, u64 address, u32 *data);
0039
0040 #endif