X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/5ba3f43ea354af8ad55bea84372a2bc834d8757c..d26ffc64f583ab2d29df48f13518685602bc8832:/osfmk/arm/machine_routines.h diff --git a/osfmk/arm/machine_routines.h b/osfmk/arm/machine_routines.h index 3510649b4..cee6477b1 100644 --- a/osfmk/arm/machine_routines.h +++ b/osfmk/arm/machine_routines.h @@ -529,10 +529,6 @@ void set_fpscr(uint32_t); extern void init_vfp(void); extern boolean_t get_vfp_enabled(void); -#if (__ARM_VFP__ >= 3) -extern unsigned int get_mvfr0(void); -extern unsigned int get_mvfr1(void); -#endif extern void arm_debug_set_cp14(arm_debug_state_t *debug_state); extern void fiq_context_init(boolean_t enable_fiq); @@ -551,6 +547,9 @@ void rorgn_stash_range(void); void rorgn_lockdown(void); #endif /* defined(KERNEL_INTEGRITY_KTRR)*/ +#if __ARM_KERNEL_PROTECT__ +extern void set_vbar_el1(uint64_t); +#endif /* __ARM_KERNEL_PROTECT__ */ #endif /* MACH_KERNEL_PRIVATE */ extern uint32_t arm_debug_read_dscr(void); @@ -630,6 +629,26 @@ struct perfcontrol_work_interval { }; typedef struct perfcontrol_work_interval *perfcontrol_work_interval_t; +typedef enum { + WORK_INTERVAL_START, + WORK_INTERVAL_UPDATE, + WORK_INTERVAL_FINISH +} work_interval_ctl_t; + +struct perfcontrol_work_interval_instance { + work_interval_ctl_t ctl; + uint32_t create_flags; + uint64_t complexity; + uint64_t thread_id; + uint64_t work_interval_id; + uint64_t instance_id; /* out: start, in: update/finish */ + uint64_t start; + uint64_t finish; + uint64_t deadline; + uint64_t thread_group_id; + void *thread_group_data; +}; +typedef struct perfcontrol_work_interval_instance *perfcontrol_work_interval_instance_t; /* * Structure to export per-CPU counters as part of the CLPC callout. @@ -728,6 +747,11 @@ typedef void (*sched_perfcontrol_max_runnable_latency_t)(perfcontrol_max_runnabl */ typedef void (*sched_perfcontrol_work_interval_notify_t)(perfcontrol_state_t, perfcontrol_work_interval_t); +/* + * Start, update and finish work interval instance with optional complexity estimate. + */ +typedef void (*sched_perfcontrol_work_interval_ctl_t)(perfcontrol_state_t, perfcontrol_work_interval_instance_t); + /* * These callbacks are used when thread groups are added, removed or properties * updated. @@ -779,7 +803,6 @@ typedef void (*sched_perfcontrol_state_update_t)( perfcontrol_event event, uint32_t cpu_id, uint64_t timestamp, uint32_t flags, struct perfcontrol_thread_data *thr_data, __unused void *unused); - /* * Callers should always use the CURRENT version so that the kernel can detect both older * and newer structure layouts. New callbacks should always be added at the end of the @@ -795,6 +818,7 @@ typedef void (*sched_perfcontrol_state_update_t)( #define SCHED_PERFCONTROL_CALLBACKS_VERSION_4 (4) /* up-to deadline_passed */ #define SCHED_PERFCONTROL_CALLBACKS_VERSION_5 (5) /* up-to state_update */ #define SCHED_PERFCONTROL_CALLBACKS_VERSION_6 (6) /* up-to thread_group_flags_update */ +#define SCHED_PERFCONTROL_CALLBACKS_VERSION_7 (7) /* up-to work_interval_ctl */ #define SCHED_PERFCONTROL_CALLBACKS_VERSION_CURRENT SCHED_PERFCONTROL_CALLBACKS_VERSION_6 struct sched_perfcontrol_callbacks { @@ -810,6 +834,7 @@ struct sched_perfcontrol_callbacks { sched_perfcontrol_csw_t csw; sched_perfcontrol_state_update_t state_update; sched_perfcontrol_thread_group_flags_update_t thread_group_flags_update; + sched_perfcontrol_work_interval_ctl_t work_interval_ctl; }; typedef struct sched_perfcontrol_callbacks *sched_perfcontrol_callbacks_t;