Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for SCP-firmware support #6789

Merged
merged 2 commits into from
Apr 21, 2024
Merged

Conversation

etienne-lms
Copy link
Contributor

These changes apply to the SCP-firmware OP-TEE currently points to (v2.13.0). They'll need to be considered also when we'll upgrade to a more recent version of SCP-firmware, as proposed in P-R #6769.

Copy link
Contributor

@jforissier jforissier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • For "drivers: include stdbool.h from stpmic1_regulator.h":
    Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
  • For the other commits, with CI fixed...
    Acked-by: Jerome Forissier <jerome.forissier@linaro.org>

@etienne-lms
Copy link
Contributor Author

Thanks for the review. I fixed the bug that made CI to fail. I'll apply the review tag if CI tests are happy.

@@ -167,6 +167,7 @@ endif
endif

cflags-lib-$(CFG_SCPFW_MOD_$4) += -DBUILD_HAS_MOD_$4
scpfw-cmake-flags-y += -DCFG_SCPFW_MOD_$4=$(CFG_SCPFW_MOD_$4)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vingu-linaro: considering your P-R #6769, the change above would deserve to factorize declaration of CMake directives in SCP-firmware as part of your M-R #948:
patch for SCP-firmware/arch/none/optee/CMakeLists.txt
(or maybe to apply in SCP-firmware/product/optee/common/CMakeList.txt):
0001-product-optee-declare-CFG_SCPFW_MOD_xxx-CMake-direct.patch.txt

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@etienne-lms: Yes, I have added it into my SCP-firmware MR. I will push this new MR soon and will put your 2 other patches on top of this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@etienne-lms etienne-lms force-pushed the scpfw-fix branch 2 times, most recently from 23ec2f1 to a0d1aff Compare April 16, 2024 12:23
@etienne-lms
Copy link
Contributor Author

etienne-lms commented Apr 16, 2024

I have removed the change that creates CMake CFG_SCPFW_MOD_<module-name> directives and the one that enables CFG_SCPFW_MOD_MSG_SMT for plat-stm32mp1. Indeed SCP-firmware v2.13.0 is not ready for these changes.

# CMake does not need to check the cross compilation toolchain since we do not
# compile any source file with CMake, we only generate some SCP-firmware
# files.
scpfw-cmake-flags-y = -DCMAKE_C_COMPILER_WORKS=1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be
scpfw-cmake-flags-y += -DCMAKE_C_COMPILER_WORKS=1
to not overwrite other cmake config
made the change in #6769

@etienne-lms
Copy link
Contributor Author

@jforissier, I've applied your review tag on the commit you acked but I changed the other commit: @vingu-linaro noticed to stddef.h was missing in the stpmic1_regulator.h.
Not a big change but I need to ask for review tags for commit "drivers: include standard header files from stpmic1_regulator.h"

@jforissier
Copy link
Contributor

For "drivers: include standard header files from stpmic1_regulator.h":

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>

Add missing inclusion of stdbool.h and stddef.h in stpmic1_regulator.h.
The issue was revealed when upgrading to latest SCP-firmware source tree.

Fixes: 9cb0d51 ("drivers: stpmic1: export regulators API in a specific header file")
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Enable CMake directive CMAKE_C_COMPILER_WORKS to prevent SCP-firmware
CMake configuration sequence to check the cross compilation toolchain
since it is not needed here: OP-TEE only uses CMake to configure
SCP-firmware, not to build source files. This change is required when
building OP-TEE with CFG_SCMI_SCPFW=y and using a CMake >= 3.27.0.

Suggested-by: Thomas Bourgoin <thomas.bourgoin@foss.st.com>
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
@etienne-lms
Copy link
Contributor Author

thanks. tag applied.

@jforissier jforissier merged commit 08204d7 into OP-TEE:master Apr 21, 2024
7 checks passed
@etienne-lms etienne-lms deleted the scpfw-fix branch May 27, 2024 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants