1 /* SPDX-License-Identifier: MIT */
3 * Copyright © 2023 Intel Corporation
6 #ifndef _XE_GSC_TYPES_H_
7 #define _XE_GSC_TYPES_H_
9 #include <linux/iosys-map.h>
10 #include <linux/mutex.h>
11 #include <linux/spinlock.h>
12 #include <linux/types.h>
13 #include <linux/workqueue.h>
15 #include "xe_uc_fw_types.h"
19 struct i915_gsc_proxy_component;
25 /** @fw: Generic uC firmware management */
28 /** @security_version: SVN found in the fetched blob */
31 /** @private: Private data for use by the GSC FW */
32 struct xe_bo *private;
34 /** @q: Default queue used for submissions to GSC FW */
35 struct xe_exec_queue *q;
37 /** @wq: workqueue to handle jobs for delayed load and proxy handling */
38 struct workqueue_struct *wq;
40 /** @work: delayed load and proxy handling work */
41 struct work_struct work;
43 /** @lock: protects access to the work_actions mask */
46 /** @work_actions: mask of actions to be performed in the work */
48 #define GSC_ACTION_FW_LOAD BIT(0)
49 #define GSC_ACTION_SW_PROXY BIT(1)
51 /** @proxy: sub-structure containing the SW proxy-related variables */
53 /** @component: struct for communication with mei component */
54 struct i915_gsc_proxy_component *component;
55 /** @mutex: protects the component binding and usage */
57 /** @component_added: whether the component has been added */
59 /** @bo: object to store message to and from the GSC */
61 /** @to_gsc: map of the memory used to send messages to the GSC */
62 struct iosys_map to_gsc;
63 /** @from_gsc: map of the memory used to recv messages from the GSC */
64 struct iosys_map from_gsc;
65 /** @to_csme: pointer to the memory used to send messages to CSME */
67 /** @from_csme: pointer to the memory used to recv messages from CSME */