Linux Audio

Check our new training course

Embedded Linux training

Mar 31-Apr 8, 2025
Register
Loading...
Note: File does not exist in v4.6.
 1/* SPDX-License-Identifier: MIT */
 2/*
 3 * Copyright © 2014-2019 Intel Corporation
 4 */
 5
 6#ifndef _INTEL_HUC_H_
 7#define _INTEL_HUC_H_
 8
 9#include "i915_reg.h"
10#include "intel_uc_fw.h"
11#include "intel_huc_fw.h"
12
13struct intel_huc {
14	/* Generic uC firmware management */
15	struct intel_uc_fw fw;
16
17	/* HuC-specific additions */
18	struct i915_vma *rsa_data;
19
20	struct {
21		i915_reg_t reg;
22		u32 mask;
23		u32 value;
24	} status;
25};
26
27void intel_huc_init_early(struct intel_huc *huc);
28int intel_huc_init(struct intel_huc *huc);
29void intel_huc_fini(struct intel_huc *huc);
30int intel_huc_auth(struct intel_huc *huc);
31int intel_huc_check_status(struct intel_huc *huc);
32
33static inline int intel_huc_sanitize(struct intel_huc *huc)
34{
35	intel_uc_fw_sanitize(&huc->fw);
36	return 0;
37}
38
39static inline bool intel_huc_is_supported(struct intel_huc *huc)
40{
41	return intel_uc_fw_is_supported(&huc->fw);
42}
43
44static inline bool intel_huc_is_enabled(struct intel_huc *huc)
45{
46	return intel_uc_fw_is_enabled(&huc->fw);
47}
48
49static inline bool intel_huc_is_authenticated(struct intel_huc *huc)
50{
51	return intel_uc_fw_is_running(&huc->fw);
52}
53
54#endif