Home
last modified time | relevance | path

Searched hist:"7 b701d1bd6a4e9ac525b9a35a3d1a08c27010934" (Results 1 – 2 of 2) sorted by relevance

/optee_os/core/arch/arm/plat-rcar/
H A Dlink.mk7b701d1bd6a4e9ac525b9a35a3d1a08c27010934 Fri Apr 09 19:03:26 UTC 2021 Volodymyr Babchuk <volodymyr_babchuk@epam.com> core/link.mk, plat-rcar: introduce SRECFLAGS variable

.srec files are used to flash OPTEE on Rcar Gen3 using serial
mode. Serial mode downloader in Rcar does not recognize S2 records in
.srec files that objcopy generates by default. It allows only S3
records. Also, it requires correct load address present in .srec
files.

So, we need to provide additional flags to objcopy during tee.srec
file generation. This change introduces makefile variable SRECFLAGS
that can be used exactly for this task. Also it provides the correct
flags for rcar platform.

Note: at the begging tee.srec file was generated directly from tee.elf
and had correct load addresses. As the load address is wider than 24
bits, objcopy automatically used S3 records. But, later tee-raw.bin
were introduced and I changed source for tee.srec, so now it is
generated from tee-raw.bin. As tee-raw.bin have no load address
information this leads to incorrect tee.srec file.

Strictly speaking, only --adjust-vma option is required. As current
load address is wider than 24 bits, objcopy will switch to S3 records
automatically. But I prefer to have --srec-forceS3 option anyways: for
that unlikely chance that CFG_TZDRAM_START would be changed to
something much lower.

Fixes: e66c2639b6b ("plat: rcar: generate .srec file using gen_tee_bin")

Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
/optee_os/core/arch/arm/kernel/
H A Dlink.mk7b701d1bd6a4e9ac525b9a35a3d1a08c27010934 Fri Apr 09 19:03:26 UTC 2021 Volodymyr Babchuk <volodymyr_babchuk@epam.com> core/link.mk, plat-rcar: introduce SRECFLAGS variable

.srec files are used to flash OPTEE on Rcar Gen3 using serial
mode. Serial mode downloader in Rcar does not recognize S2 records in
.srec files that objcopy generates by default. It allows only S3
records. Also, it requires correct load address present in .srec
files.

So, we need to provide additional flags to objcopy during tee.srec
file generation. This change introduces makefile variable SRECFLAGS
that can be used exactly for this task. Also it provides the correct
flags for rcar platform.

Note: at the begging tee.srec file was generated directly from tee.elf
and had correct load addresses. As the load address is wider than 24
bits, objcopy automatically used S3 records. But, later tee-raw.bin
were introduced and I changed source for tee.srec, so now it is
generated from tee-raw.bin. As tee-raw.bin have no load address
information this leads to incorrect tee.srec file.

Strictly speaking, only --adjust-vma option is required. As current
load address is wider than 24 bits, objcopy will switch to S3 records
automatically. But I prefer to have --srec-forceS3 option anyways: for
that unlikely chance that CFG_TZDRAM_START would be changed to
something much lower.

Fixes: e66c2639b6b ("plat: rcar: generate .srec file using gen_tee_bin")

Reviewed-by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>