1 /* SPDX-License-Identifier: MIT */
3 * Copyright(c) 2019-2022, Intel Corporation. All rights reserved.
5 #ifndef __INTEL_GSC_DEV_H__
6 #define __INTEL_GSC_DEV_H__
8 #include <linux/types.h>
10 struct drm_i915_private;
12 struct mei_aux_device;
14 #define INTEL_GSC_NUM_INTERFACES 2
16 * The HECI1 bit corresponds to bit15 and HECI2 to bit14.
17 * The reason for this is to allow growth for more interfaces in the future.
19 #define GSC_IRQ_INTF(_x) BIT(15 - (_x))
22 * struct intel_gsc - graphics security controller
24 * @intf: gsc interface
25 * @intf.adev: MEI aux. device for this @intf
26 * @intf.gem_obj: scratch memory GSC operations
27 * @intf.irq: IRQ for this device (%-1 for no IRQ)
28 * @intf.id: this interface's id number/index
31 struct intel_gsc_intf {
32 struct mei_aux_device *adev;
33 struct drm_i915_gem_object *gem_obj;
36 } intf[INTEL_GSC_NUM_INTERFACES];
39 void intel_gsc_init(struct intel_gsc *gsc, struct drm_i915_private *i915);
40 void intel_gsc_fini(struct intel_gsc *gsc);
41 void intel_gsc_irq_handler(struct intel_gt *gt, u32 iir);
43 #endif /* __INTEL_GSC_DEV_H__ */