History log of /optee_os/core/kernel/transfer_list.c (Results 1 – 8 of 8)
Revision Date Author Comments
# 91f02c8c 16-Jul-2025 Raymond Mao <raymond.mao@linaro.org>

core: kernel: align the address of transfer entry

Fix two issues in transfer_list_add() and transfer_list_add_with_align(),
which cause incompliance with the Firmware Handoff spec v1.0 [1].

1. Avoi

core: kernel: align the address of transfer entry

Fix two issues in transfer_list_add() and transfer_list_add_with_align(),
which cause incompliance with the Firmware Handoff spec v1.0 [1].

1. Avoid adding entries at an unaligned address.
2. Remove the implicit padding at the end of a transfer entry which is
included by 'tl->size'.

[1] https://github.com/FirmwareHandoff/firmware_handoff/releases/tag/v1.0

Fixes: a12225022bd5 ("core: add transfer list API")
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 0cd8ec0f 10-Apr-2025 Raymond Mao <raymond.mao@linaro.org>

core: kernel: remove the last appended void transfer entry

transfer_list_set_data_size() appends a void entry for the following
entries to meet the alignment requirement even when it is the last
one

core: kernel: remove the last appended void transfer entry

transfer_list_set_data_size() appends a void entry for the following
entries to meet the alignment requirement even when it is the last
one, thus add a check before appending.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>

show more ...


# 95b0e915 25-Mar-2025 Raymond Mao <raymond.mao@linaro.org>

core: kernel: fix bug in transfer_list_add()

Fix the missing cast on the target address when doing memmove.
Get the address of entry data via transfer_list_entry_data()
instead of adding offset.

Fi

core: kernel: fix bug in transfer_list_add()

Fix the missing cast on the target address when doing memmove.
Get the address of entry data via transfer_list_entry_data()
instead of adding offset.

Fixes: a12225022bd5 ("core: add transfer list API")
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...


# bf27365d 21-Jan-2025 Raymond Mao <raymond.mao@linaro.org>

core: fix potential crash when setting transfer entry size

Fix a potential crash when the rounded up end-of-entry exceeds the
boundary of the old end-of-transfer-list when setting the size of
a tran

core: fix potential crash when setting transfer entry size

Fix a potential crash when the rounded up end-of-entry exceeds the
boundary of the old end-of-transfer-list when setting the size of
a transfer entry.

The crash happens when the specified entry is the last one in the
transfer list and its rounded up end 'old_ev' exceeds the
'tl_old_ev' which is not rounded up, leading to a negative value
with (tl_old_ev - old_ev).

Logically, 'tl_old_ev > old_ev' is the only case that indicates
there are subsequent entries to be moved.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 76d6685e 17-Dec-2024 Etienne Carriere <etienne.carriere@foss.st.com>

tree-wide: use power-of-2 rounding macros where applicable

Use ROUNDUP2(), ROUNDUP2_OVERFLOW(), ROUNDUP2_DIV() and ROUNDDOWN2() at
places where the rounding argument is a variable value and we want

tree-wide: use power-of-2 rounding macros where applicable

Use ROUNDUP2(), ROUNDUP2_OVERFLOW(), ROUNDUP2_DIV() and ROUNDDOWN2() at
places where the rounding argument is a variable value and we want to
leverage the implementation of these routines optimized for a
power-of-2 rounding argument.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 508e2476 29-Nov-2023 Raymond Mao <raymond.mao@linaro.org>

core: update transfer list header and signature

Add tl->flags and TL_FLAGS_HAS_CHECKSUM to align to the latest FW
Handoff spec update.
Bypass checksum verifying and updating if TL_FLAGS_HAS_CHECKSUM

core: update transfer list header and signature

Add tl->flags and TL_FLAGS_HAS_CHECKSUM to align to the latest FW
Handoff spec update.
Bypass checksum verifying and updating if TL_FLAGS_HAS_CHECKSUM bit
is not set in tl->flags.
Update TL signature to 4a0f_b10b to align to the latest FW Handoff
spec update.

Note: It causes Transfer List ABI breakage due to FW Handoff spec
stays with same rev number (v0.9) with above changes.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# 86dbb179 27-Nov-2023 Raymond Mao <raymond.mao@linaro.org>

core: remove unused bytes from transfer list

Only marks the minimum bytes required by alignment as 'TL_TAG_EMPTY'
and release the rest of unused bytes from transfer list when downsizing
the data of

core: remove unused bytes from transfer list

Only marks the minimum bytes required by alignment as 'TL_TAG_EMPTY'
and release the rest of unused bytes from transfer list when downsizing
the data of a transfer entry.
Function transfer_list_set_data_size() will remove the unused bytes
from the transfer list so that the freed space is allocable when adding
new transfer entries.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# a1222502 20-Sep-2023 Raymond Mao <raymond.mao@linaro.org>

core: add transfer list API

Introduce Transfer List API into kernel to implement Firmware
Handoff specification

Link: https://github.com/FirmwareHandoff/firmware_handoff
Signed-off-by: Raymond Mao

core: add transfer list API

Introduce Transfer List API into kernel to implement Firmware
Handoff specification

Link: https://github.com/FirmwareHandoff/firmware_handoff
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...