mcctrl: support remote CPU MSR read/write operations

This commit is contained in:
Balazs Gerofi
2017-05-01 20:24:17 +09:00
parent 2d19ed9391
commit 9992fe0d72
7 changed files with 244 additions and 0 deletions

View File

@ -44,6 +44,7 @@
#include <linux/rwlock.h>
#include <linux/threads.h>
#include "sysfs.h"
#include "mcctrl_public.h"
#define SCD_MSG_PREPARE_PROCESS 0x1
#define SCD_MSG_PREPARE_PROCESS_ACKED 0x2
@ -95,6 +96,9 @@
#define SCD_MSG_PERF_CTRL 0x50
#define SCD_MSG_PERF_ACK 0x51
#define SCD_MSG_CPU_RW_REG 0x52
#define SCD_MSG_CPU_RW_REG_RESP 0x53
#define DMA_PIN_SHIFT 21
#define DO_USER_MODE
@ -106,6 +110,12 @@ struct coretable {
unsigned long addr;
};
enum mcctrl_os_cpu_operation {
MCCTRL_OS_CPU_READ_REGISTER,
MCCTRL_OS_CPU_WRITE_REGISTER,
MCCTRL_OS_CPU_MAX_OP
};
struct ikc_scd_packet {
int msg;
int err;
@ -131,6 +141,13 @@ struct ikc_scd_packet {
struct {
int ttid;
};
/* SCD_MSG_CPU_RW_REG */
struct {
struct mcctrl_os_cpu_register desc;
enum mcctrl_os_cpu_operation op;
void *resp;
};
};
char padding[12];
};