1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
5 #ifndef CHANNEL_COMMANDS_H_
6 #define CHANNEL_COMMANDS_H_
17 #define CPU_POWER_CONNECT 2
19 #define PKT_POLICY_REMOVE 4
21 /* CPU Power Command Scaling */
22 #define CPU_POWER_SCALE_UP 1
23 #define CPU_POWER_SCALE_DOWN 2
24 #define CPU_POWER_SCALE_MAX 3
25 #define CPU_POWER_SCALE_MIN 4
26 #define CPU_POWER_ENABLE_TURBO 5
27 #define CPU_POWER_DISABLE_TURBO 6
29 /* Generic Power Command Response */
30 #define CPU_POWER_CMD_ACK 1
31 #define CPU_POWER_CMD_NACK 2
36 #define VM_MAX_NAME_SZ 32
38 #define MAX_VCPU_PER_VM 8
40 struct t_boost_status {
44 struct timer_profile {
45 int busy_hours[HOURS];
46 int quiet_hours[HOURS];
47 int hours_to_use_traffic_profile[HOURS];
50 enum workload {HIGH, MEDIUM, LOW};
59 uint32_t min_packet_thresh;
60 uint32_t avg_max_packet_thresh;
61 uint32_t max_max_packet_thresh;
64 #define CORE_TYPE_VIRTUAL 0
65 #define CORE_TYPE_PHYSICAL 1
67 struct channel_packet {
68 uint64_t resource_id; /**< core_num, device */
69 uint32_t unit; /**< scale down/up/min/max */
70 uint32_t command; /**< Power, IO, etc */
71 char vm_name[VM_MAX_NAME_SZ];
73 uint64_t vfid[MAX_VFS];
74 int nb_mac_to_monitor;
75 struct traffic traffic_policy;
76 uint8_t vcpu_to_control[MAX_VCPU_PER_VM];
78 struct timer_profile timer_policy;
80 enum workload workload;
81 enum policy_to_use policy_to_use;
82 struct t_boost_status t_boost_status;
90 #endif /* CHANNEL_COMMANDS_H_ */