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

Make fvp work for anything other than aarch64 when being set as the test machine #574

Merged
merged 4 commits into from
Nov 25, 2024

Conversation

simpal01
Copy link
Collaborator

The current picolibc changes can't handle fvp being set as the test machine for anything other than aarch64. If fvp isn't set, it defaults to qemu, which works for now because the ARM fvp doesn't require anything special.
However, when adding new aarch64 big-endian variants, one of the picolibc patches includes test-machine as an option in the Meson build scripts. Consequently, the library's CMake needs to set this option using -Dtest-machine=${TEST_EXECUTOR}. This means that for the armv8.1m library variant,we are explicitly passing the FPU, which can cause the error fvp: requested test machine not found since fvps are only defined for the aarch64 case.

…est machine

The current picolibc changes can't handle fvp being
set as the test machine for anything other than aarch64.
If fvp isn't set, it defaults to qemu, which works for
now because the ARM fvp doesn't require anything special.
However, when adding new aarch64 big-endian variants,
one of the picolibc patches includes test-machine as an
option in the Meson build scripts. Consequently, the library's
CMake needs to set this option using -Dtest-machine=${TEST_EXECUTOR}.
This means that for the armv8.1m library variant,
we are explicitly passing the FPU, which can cause the error
fvp: requested test machine not found since fvps are only
defined for the aarch64 case.
…s the test machine

Add  -Dtest-machine=${TEST_EXECUTOR} to use the correct bootcode.
@dcandler
Copy link
Collaborator

While this does solve the problem, it looks like it means an fvp version of the startup code will now be produced for everything, even though for non-AArch64 it's identical to the standard code. That duplication of work seems very inefficient: if the same code works for both test executors, it makes more sense to me to use it for both instead of generating two versions for the sake of satisfying an expected filename.

…g set as the test machine

Limiting the changes to arm and aarch64 rather
than adding in the general meson.build file.
@simpal01
Copy link
Collaborator Author

While this does solve the problem, it looks like it means an fvp version of the startup code will now be produced for everything, even though for non-AArch64 it's identical to the standard code. That duplication of work seems very inefficient: if the same code works for both test executors, it makes more sense to me to use it for both instead of generating two versions for the sake of satisfying an expected filename.

At the moment we don't have a separate boot code changes for non-aarch64. But we will need separate QEMU/FVP startup code for A-profile AArch32, and probably R-profile AArch32 in the future. Building one bootcode object for M-profile could be an option, but building two objects would simplify things, and the bootcode objects are small so the compile time or distribution size is not going to be a big problem.

@simpal01 simpal01 merged commit 1f255ac into ARM-software:main Nov 25, 2024
1 check passed
simpal01 added a commit to simpal01/LLVM-embedded-toolchain-for-Arm that referenced this pull request Nov 26, 2024
Remove -Dtest-machine=${TEST_EXECUTOR} as it is already
been done through the patch:
 ARM-software#574
@simpal01 simpal01 deleted the make-fvp-work-for-non-aarch64 branch November 26, 2024 18:15
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.

2 participants