intel_huc_fw.c 751 字节
Newer Older
1
// SPDX-License-Identifier: MIT
2
/*
3
 * Copyright © 2014-2019 Intel Corporation
4 5
 */

6
#include "gt/intel_gt.h"
7 8 9 10 11 12 13 14 15 16
#include "intel_huc_fw.h"
#include "i915_drv.h"

/**
 * intel_huc_fw_upload() - load HuC uCode to device
 * @huc: intel_huc structure
 *
 * Called from intel_uc_init_hw() during driver load, resume from sleep and
 * after a GPU reset. Note that HuC must be loaded before GuC.
 *
17 18
 * The firmware image should have already been fetched into memory, so only
 * check that fetch succeeded, and then transfer the image to the h/w.
19 20 21 22 23
 *
 * Return:	non-zero code on error
 */
int intel_huc_fw_upload(struct intel_huc *huc)
{
24
	/* HW doesn't look at destination address for HuC, so set it to 0 */
25
	return intel_uc_fw_upload(&huc->fw, 0, HUC_UKERNEL);
26
}