]> Gentwo Git Trees - linux/.git/commit
accel/ivpu: Split FW runtime and global memory buffers
authorKarol Wachowski <karol.wachowski@linux.intel.com>
Thu, 25 Sep 2025 07:42:09 +0000 (09:42 +0200)
committerKarol Wachowski <karol.wachowski@linux.intel.com>
Thu, 25 Sep 2025 19:03:57 +0000 (21:03 +0200)
commit2007e210b6a188efc35160ff9f2780581fe56941
tree05a101ea82ba1c30d24e38824ca96193c88c60db
parent063db451832b8849faf1b0b8404b3a6a39995b29
accel/ivpu: Split FW runtime and global memory buffers

Split firmware boot parameters (4KB) and FW version (4KB) into dedicated
buffer objects, separating them from the FW runtime memory buffer. This
creates three distinct buffers with independent allocation control.

This enables future modifications, particularly allowing the FW
image memory to be moved into a read-only buffer.

Fix user range starting address from incorrect 0x88000000 (2GB + 128MB)
overlapping global aperture on 37XX to intended 0xa0000000 (2GB + 512MB).
This caused no issues as FW aligned this range to 512MB anyway, but
corrected for consistency.

Convert ivpu_hw_range_init() from inline helper to function with overflow
validation to prevent potential security issues from address range
arithmetic overflows.

Improve readability of ivpu_fw_parse() function, remove unrelated constant
defines and validate firmware header values based on vdev->hw->ranges.

Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Link: https://lore.kernel.org/r/20250925074209.1148924-1-karol.wachowski@linux.intel.com
drivers/accel/ivpu/ivpu_drv.c
drivers/accel/ivpu/ivpu_fw.c
drivers/accel/ivpu/ivpu_fw.h
drivers/accel/ivpu/ivpu_gem.c
drivers/accel/ivpu/ivpu_gem.h
drivers/accel/ivpu/ivpu_hw.c
drivers/accel/ivpu/ivpu_hw.h
drivers/accel/ivpu/ivpu_mmu_context.c
drivers/accel/ivpu/ivpu_pm.c