Lines Matching full:firmware
31 #include <linux/firmware.h>
75 void *firmware; in expose_firmware_sysfs() local
81 firmware = vzalloc(size); in expose_firmware_sysfs()
82 if (!firmware) in expose_firmware_sysfs()
85 h = firmware; in expose_firmware_sysfs()
94 p = firmware + h->cfg_space_offset; in expose_firmware_sysfs()
96 memcpy(gvt->firmware.cfg_space, i915->vgpu.initial_cfg_space, in expose_firmware_sysfs()
98 memcpy(p, gvt->firmware.cfg_space, info->cfg_space_size); in expose_firmware_sysfs()
100 p = firmware + h->mmio_offset; in expose_firmware_sysfs()
102 memcpy(gvt->firmware.mmio, i915->vgpu.initial_mmio, in expose_firmware_sysfs()
105 memcpy(p, gvt->firmware.mmio, info->mmio_size); in expose_firmware_sysfs()
108 h->crc32 = crc32_le(0, firmware + crc32_start, size - crc32_start); in expose_firmware_sysfs()
111 firmware_attr.private = firmware; in expose_firmware_sysfs()
115 vfree(firmware); in expose_firmware_sysfs()
130 * intel_gvt_free_firmware - free GVT firmware
136 if (!gvt->firmware.firmware_loaded) in intel_gvt_free_firmware()
139 kfree(gvt->firmware.cfg_space); in intel_gvt_free_firmware()
140 vfree(gvt->firmware.mmio); in intel_gvt_free_firmware()
144 const struct firmware *fw) in verify_firmware()
186 gvt_dbg_core("Invalid firmware: %s [file] 0x%llx [request] 0x%llx\n", in verify_firmware()
194 * intel_gvt_load_firmware - load GVT firmware
202 struct intel_gvt_firmware *firmware = &gvt->firmware; in intel_gvt_load_firmware() local
204 const struct firmware *fw; in intel_gvt_load_firmware()
219 firmware->cfg_space = mem; in intel_gvt_load_firmware()
224 kfree(firmware->cfg_space); in intel_gvt_load_firmware()
228 firmware->mmio = mem; in intel_gvt_load_firmware()
234 gvt_dbg_core("request hw state firmware %s...\n", path); in intel_gvt_load_firmware()
252 memcpy(firmware->cfg_space, fw->data + h->cfg_space_offset, in intel_gvt_load_firmware()
254 memcpy(firmware->mmio, fw->data + h->mmio_offset, in intel_gvt_load_firmware()
258 firmware->firmware_loaded = true; in intel_gvt_load_firmware()