| 1 |
|
| 2 | |
| 3 | * intel_tpmi.h: Intel TPMI core external interface
|
| 4 |
|
| 5 |
|
| 6 | #ifndef _INTEL_TPMI_H_
|
| 7 | #define _INTEL_TPMI_H_
|
| 8 |
|
| 9 | #include <linux/bitfield.h>
|
| 10 |
|
| 11 | struct oobmsm_plat_info;
|
| 12 |
|
| 13 | #define TPMI_VERSION_INVALID 0xff
|
| 14 | #define TPMI_MINOR_VERSION(val) FIELD_GET(GENMASK(4, 0), val)
|
| 15 | #define TPMI_MAJOR_VERSION(val) FIELD_GET(GENMASK(7, 5), val)
|
| 16 |
|
| 17 | |
| 18 | * List of supported TMPI IDs.
|
| 19 | * Some TMPI IDs are not used by Linux, so the numbers are not consecutive.
|
| 20 |
|
| 21 | enum intel_tpmi_id {
|
| 22 | TPMI_ID_RAPL = 0,
|
| 23 | TPMI_ID_PEM = 1,
|
| 24 | TPMI_ID_UNCORE = 2,
|
| 25 | TPMI_ID_SST = 5,
|
| 26 | TPMI_ID_PLR = 0xc,
|
| 27 | TPMI_CONTROL_ID = 0x80,
|
| 28 | TPMI_INFO_ID = 0x81,
|
| 29 | };
|
| 30 |
|
| 31 | #define TPMI_CORE_INIT 0
|
| 32 | #define TPMI_CORE_EXIT 1
|
| 33 |
|
| 34 | int tpmi_register_notifier(struct notifier_block *nb);
|
| 35 | int tpmi_unregister_notifier(struct notifier_block *nb);
|
| 36 |
|
| 37 | struct oobmsm_plat_info *tpmi_get_platform_data(struct auxiliary_device *auxdev);
|
| 38 | struct resource *tpmi_get_resource_at_index(struct auxiliary_device *auxdev, int index);
|
| 39 | int tpmi_get_resource_count(struct auxiliary_device *auxdev);
|
| 40 | int tpmi_get_feature_status(struct auxiliary_device *auxdev, int feature_id, bool *read_blocked,
|
| 41 | bool *write_blocked);
|
| 42 | struct dentry *tpmi_get_debugfs_dir(struct auxiliary_device *auxdev);
|
| 43 | #endif
|