1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * Copyright (C) 2020-2023 Intel Corporation 4 */ 5 6 #ifndef __IVPU_FW_H__ 7 #define __IVPU_FW_H__ 8 9 struct ivpu_device; 10 struct ivpu_bo; 11 struct vpu_boot_params; 12 13 struct ivpu_fw_info { 14 const struct firmware *file; 15 struct ivpu_bo *mem; 16 struct ivpu_bo *mem_shave_nn; 17 struct ivpu_bo *mem_log_crit; 18 struct ivpu_bo *mem_log_verb; 19 u64 runtime_addr; 20 u32 runtime_size; 21 u64 image_load_offset; 22 u32 image_size; 23 u32 shave_nn_size; 24 u64 entry_point; /* Cold or warm boot entry point for next boot */ 25 u64 cold_boot_entry_point; 26 }; 27 28 int ivpu_fw_init(struct ivpu_device *vdev); 29 void ivpu_fw_fini(struct ivpu_device *vdev); 30 int ivpu_fw_load(struct ivpu_device *vdev); 31 void ivpu_fw_boot_params_setup(struct ivpu_device *vdev, struct vpu_boot_params *bp); 32 ivpu_fw_is_cold_boot(struct ivpu_device * vdev)33static inline bool ivpu_fw_is_cold_boot(struct ivpu_device *vdev) 34 { 35 return vdev->fw->entry_point == vdev->fw->cold_boot_entry_point; 36 } 37 38 #endif /* __IVPU_FW_H__ */ 39