1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2020-2024 Intel Corporation
9 #include "vpu_jsm_api.h"
11 #define FW_VERSION_HEADER_SIZE SZ_4K
12 #define FW_VERSION_STR_SIZE SZ_256
16 struct vpu_boot_params
;
19 const struct firmware
*file
;
21 char version
[FW_VERSION_STR_SIZE
];
23 struct ivpu_bo
*mem_shave_nn
;
24 struct ivpu_bo
*mem_log_crit
;
25 struct ivpu_bo
*mem_log_verb
;
28 u64 image_load_offset
;
31 u64 entry_point
; /* Cold or warm boot entry point for next boot */
32 u64 cold_boot_entry_point
;
34 u32 trace_destination_mask
;
35 u64 trace_hw_component_mask
;
37 u32 primary_preempt_buf_size
;
38 u32 secondary_preempt_buf_size
;
44 int ivpu_fw_init(struct ivpu_device
*vdev
);
45 void ivpu_fw_fini(struct ivpu_device
*vdev
);
46 void ivpu_fw_load(struct ivpu_device
*vdev
);
47 void ivpu_fw_boot_params_setup(struct ivpu_device
*vdev
, struct vpu_boot_params
*bp
);
49 static inline bool ivpu_fw_is_cold_boot(struct ivpu_device
*vdev
)
51 return vdev
->fw
->entry_point
== vdev
->fw
->cold_boot_entry_point
;
54 #endif /* __IVPU_FW_H__ */