Skip to content

Commit

Permalink
Merge branch 'main' into no-unaligned-access
Browse files Browse the repository at this point in the history
  • Loading branch information
simpal01 authored Nov 26, 2024
2 parents 7514e69 + 00a466f commit 3787d94
Show file tree
Hide file tree
Showing 10 changed files with 227 additions and 16 deletions.
20 changes: 20 additions & 0 deletions arm-multilib/json/multilib.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
"json": "aarch64a.json",
"flags": "--target=aarch64-unknown-none-elf -fno-exceptions -fno-rtti"
},
{
"variant": "aarch64a_be_exn_rtti",
"json": "aarch64a_be_exn_rtti.json",
"flags": "--target=aarch64_be-unknown-none-elf"
},
{
"variant": "aarch64a_be",
"json": "aarch64a_be.json",
"flags": "--target=aarch64_be-unknown-none-elf -fno-exceptions -fno-rtti"
},
{
"variant": "aarch64a_strictalign_exn_rtti",
"json": "aarch64a_strictalign_exn_rtti.json",
Expand Down Expand Up @@ -60,6 +70,16 @@
"json": "armv7a_soft_nofp.json",
"flags": "--target=armv7-unknown-none-eabi -mfpu=none -fno-exceptions -fno-rtti"
},
{
"variant": "armv7a_soft_nofp_strictly_aligned_exn_rtti",
"json": "armv7a_soft_nofp_strictly_aligned_exn_rtti.json",
"flags": "--target=armv7-unknown-none-eabi -mfpu=none -mno-unaligned-access"
},
{
"variant": "armv7a_soft_nofp_strictly_aligned",
"json": "armv7a_soft_nofp_strictly_aligned.json",
"flags": "--target=armv7-unknown-none-eabi -mfpu=none -mno-unaligned-access -fno-exceptions -fno-rtti"
},
{
"variant": "armv7a_hard_vfpv3_d16_exn_rtti",
"json": "armv7a_hard_vfpv3_d16_exn_rtti.json",
Expand Down
40 changes: 40 additions & 0 deletions arm-multilib/json/variants/aarch64a_be.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"args": {
"common": {
"TARGET_ARCH": "aarch64a",
"VARIANT": "aarch64a_be",
"COMPILE_FLAGS": "-march=armv8-a -mbig-endian",
"ENABLE_EXCEPTIONS": "OFF",
"ENABLE_RTTI": "OFF",
"TEST_EXECUTOR": "fvp",
"FVP_MODEL": "aem-a",
"FVP_CONFIG": "v8a-aarch64 big-endian",
"BOOT_FLASH_ADDRESS": "0x80000000",
"BOOT_FLASH_SIZE": "0x1000",
"FLASH_ADDRESS": "0x80001000",
"FLASH_SIZE": "0xfff000",
"RAM_ADDRESS": "0x81000000",
"RAM_SIZE": "0x1000000",
"STACK_SIZE": "8K"
},
"picolibc": {
"PICOLIBC_BUILD_TYPE": "release",
"ENABLE_CXX_LIBS": "ON",
"ENABLE_LIBC_TESTS": "ON",
"ENABLE_COMPILER_RT_TESTS": "OFF",
"ENABLE_LIBCXX_TESTS": "OFF"
},
"newlib": {
"ENABLE_CXX_LIBS": "ON",
"ENABLE_LIBC_TESTS": "OFF",
"ENABLE_COMPILER_RT_TESTS": "OFF",
"ENABLE_LIBCXX_TESTS": "OFF"
},
"llvmlibc": {
"ENABLE_CXX_LIBS": "OFF",
"ENABLE_LIBC_TESTS": "OFF",
"ENABLE_COMPILER_RT_TESTS": "OFF",
"ENABLE_LIBCXX_TESTS": "OFF"
}
}
}
40 changes: 40 additions & 0 deletions arm-multilib/json/variants/aarch64a_be_exn_rtti.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"args": {
"common": {
"TARGET_ARCH": "aarch64a",
"VARIANT": "aarch64a_be_exn_rtti",
"COMPILE_FLAGS": "-march=armv8-a -mbig-endian",
"ENABLE_EXCEPTIONS": "ON",
"ENABLE_RTTI": "ON",
"TEST_EXECUTOR": "fvp",
"FVP_MODEL": "aem-a",
"FVP_CONFIG": "v8a-aarch64 big-endian",
"BOOT_FLASH_ADDRESS": "0x80000000",
"BOOT_FLASH_SIZE": "0x1000",
"FLASH_ADDRESS": "0x80001000",
"FLASH_SIZE": "0xfff000",
"RAM_ADDRESS": "0x81000000",
"RAM_SIZE": "0x1000000",
"STACK_SIZE": "8K"
},
"picolibc": {
"PICOLIBC_BUILD_TYPE": "release",
"ENABLE_CXX_LIBS": "ON",
"ENABLE_LIBC_TESTS": "ON",
"ENABLE_COMPILER_RT_TESTS": "OFF",
"ENABLE_LIBCXX_TESTS": "OFF"
},
"newlib": {
"ENABLE_CXX_LIBS": "ON",
"ENABLE_LIBC_TESTS": "OFF",
"ENABLE_COMPILER_RT_TESTS": "OFF",
"ENABLE_LIBCXX_TESTS": "OFF"
},
"llvmlibc": {
"ENABLE_CXX_LIBS": "OFF",
"ENABLE_LIBC_TESTS": "OFF",
"ENABLE_COMPILER_RT_TESTS": "OFF",
"ENABLE_LIBCXX_TESTS": "OFF"
}
}
}
41 changes: 41 additions & 0 deletions arm-multilib/json/variants/armv7a_soft_nofp_strictly_aligned.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"args": {
"common": {
"TARGET_ARCH": "armv7a",
"VARIANT": "armv7a_soft_nofp_strictly_aligned",
"COMPILE_FLAGS": "-mfloat-abi=soft -march=armv7a -mfpu=none -mno-unaligned-access",
"ENABLE_EXCEPTIONS": "OFF",
"ENABLE_RTTI": "OFF",
"TEST_EXECUTOR": "qemu",
"QEMU_MACHINE": "none",
"QEMU_CPU": "cortex-a7",
"QEMU_PARAMS": "-m 1G",
"BOOT_FLASH_ADDRESS": "0x00000000",
"BOOT_FLASH_SIZE": "0x1000",
"FLASH_ADDRESS": "0x20000000",
"FLASH_SIZE": "0x1000000",
"RAM_ADDRESS": "0x21000000",
"RAM_SIZE": "0x1000000",
"STACK_SIZE": "4K"
},
"picolibc": {
"PICOLIBC_BUILD_TYPE": "release",
"ENABLE_CXX_LIBS": "ON",
"ENABLE_LIBC_TESTS": "ON",
"ENABLE_COMPILER_RT_TESTS": "ON",
"ENABLE_LIBCXX_TESTS": "ON"
},
"newlib": {
"ENABLE_CXX_LIBS": "ON",
"ENABLE_LIBC_TESTS": "OFF",
"ENABLE_COMPILER_RT_TESTS": "OFF",
"ENABLE_LIBCXX_TESTS": "OFF"
},
"llvmlibc": {
"ENABLE_CXX_LIBS": "OFF",
"ENABLE_LIBC_TESTS": "OFF",
"ENABLE_COMPILER_RT_TESTS": "OFF",
"ENABLE_LIBCXX_TESTS": "OFF"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"args": {
"common": {
"TARGET_ARCH": "armv7a",
"VARIANT": "armv7a_soft_nofp_strictly_aligned_exn_rtti",
"COMPILE_FLAGS": "-mfloat-abi=soft -march=armv7a -mfpu=none -mno-unaligned-access",
"ENABLE_EXCEPTIONS": "ON",
"ENABLE_RTTI": "ON",
"TEST_EXECUTOR": "qemu",
"QEMU_MACHINE": "none",
"QEMU_CPU": "cortex-a7",
"QEMU_PARAMS": "-m 1G",
"BOOT_FLASH_ADDRESS": "0x00000000",
"BOOT_FLASH_SIZE": "0x1000",
"FLASH_ADDRESS": "0x20000000",
"FLASH_SIZE": "0x1000000",
"RAM_ADDRESS": "0x21000000",
"RAM_SIZE": "0x1000000",
"STACK_SIZE": "4K"
},
"picolibc": {
"PICOLIBC_BUILD_TYPE": "release",
"ENABLE_CXX_LIBS": "ON",
"ENABLE_LIBC_TESTS": "ON",
"ENABLE_COMPILER_RT_TESTS": "ON",
"ENABLE_LIBCXX_TESTS": "ON"
},
"newlib": {
"ENABLE_CXX_LIBS": "ON",
"ENABLE_LIBC_TESTS": "OFF",
"ENABLE_COMPILER_RT_TESTS": "OFF",
"ENABLE_LIBCXX_TESTS": "OFF"
},
"llvmlibc": {
"ENABLE_CXX_LIBS": "OFF",
"ENABLE_LIBC_TESTS": "OFF",
"ENABLE_COMPILER_RT_TESTS": "OFF",
"ENABLE_LIBCXX_TESTS": "OFF"
}
}
}
5 changes: 5 additions & 0 deletions arm-runtimes/test-support/run_fvp.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,26 @@
class FVP:
model_exe: str
tarmac_plugin: str
crypto_plugin: str
cmdline_param: str

MODELS = {
"corstone-310": FVP(
"Corstone-310/models/Linux64_GCC-9.3/FVP_Corstone_SSE-310",
"Corstone-310/plugins/Linux64_GCC-9.3/TarmacTrace.so",
"FastModelsPortfolio_11.27/plugins/Linux64_GCC-9.3/Crypto.so",
"cpu0.semihosting-cmd_line",
),
"aem-a": FVP(
"Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3/FVP_Base_RevC-2xAEMvA",
"Base_RevC_AEMvA_pkg/plugins/Linux64_GCC-9.3/TarmacTrace.so",
"FastModelsPortfolio_11.27/plugins/Linux64_GCC-9.3/Crypto.so",
"cluster0.cpu0.semihosting-cmd_line",
),
"aem-r": FVP(
"AEMv8R_base_pkg/models/Linux64_GCC-9.3/FVP_BaseR_AEMv8R",
"AEMv8R_base_pkg/plugins/Linux64_GCC-9.3/TarmacTrace.so",
"FastModelsPortfolio_11.27/plugins/Linux64_GCC-9.3/Crypto.so",
"cluster0.cpu0.semihosting-cmd_line",
),
}
Expand Down Expand Up @@ -56,6 +60,7 @@ def run_fvp(
command.extend(["--config-file", path.join(fvp_config_dir, config + ".cfg")])
command.extend(["--application", image])
command.extend(["--parameter", f"{model.cmdline_param}={shlex.join(arguments)}"])
command.extend(["--plugin", path.join(fvp_install_dir, model.crypto_plugin)])
if tarmac_file is not None:
command.extend([
"--plugin",
Expand Down
19 changes: 15 additions & 4 deletions docs/building-from-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,22 @@ which will prompt you to agree to their licenses. Some of the packages do not
have installers, instead they place their license file into the
`fvp/license_terms` directory, which you should read before continuing.

The installer for the cryptography plugin requires a graphical display to run:
it cannot run in a pure terminal session such as you might start via SSH. Also,
it will prompt for a directory to install the plugin into. You should enter the
pathname `fvp/install` relative to the root of your checkout. The installer
will automatically append a subdirectory `FastModelsPortfolio_11.27` to the end
of that, and respond with a warning such as 'Directory [...] not found (but in
patch mode). Continue installation?' Say yes to this prompt, and continue
clicking 'Next' until installation is complete.

For non-interactive use (for example in CI systems), `get_fvps.sh` can be run
with the `--non-interactive` option, which causes it to implcitly accept all of
the EULAs. If you have previously downloaded and installed the FVPs outside of
the source tree, you can set the `-DFVP_INSTALL_DIR=...` cmake option to set
the path to them.
with the `--non-interactive` option, which causes it to implicitly accept all
of the EULAs and set up the correct install directories.

If you have previously downloaded and installed the FVPs outside of the source
tree, you can set the `-DFVP_INSTALL_DIR=...` cmake option to set the path to
them.

If the FVPs are not installed, tests which need them will be skipped, but QEMU
tests will still be run, and all library variants will still be built.
Expand Down
1 change: 1 addition & 0 deletions fvp/config/big-endian.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cluster0.cpu0.CFGEND=1
27 changes: 15 additions & 12 deletions fvp/get_fvps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@ set -euxo pipefail
args=$(getopt --options "" --longoptions "non-interactive" -- "${@}") || exit
eval "set -- ${args}"

INSTALLER_FLAGS_CORSTONE=""
INSTALLER_FLAGS_CRYPTO=""
# Change into the directory containing this script. We'll make
# "download" and "install" subdirectories below that.
cd "$(dirname "$0")"

INSTALLER_FLAGS_CORSTONE=()
INSTALLER_FLAGS_CRYPTO=()

while true; do
case "${1}" in
(--non-interactive)
INSTALLER_FLAGS_CORSTONE="--i-agree-to-the-contained-eula --no-interactive --force"
INSTALLER_FLAGS_CRYPTO="--i-accept-the-end-user-license-agreement --basepath \"$(dirname \"$0\")\""
INSTALLER_FLAGS_CORSTONE=(--i-agree-to-the-contained-eula --no-interactive --force)
INSTALLER_FLAGS_CRYPTO=(--i-accept-the-end-user-license-agreement --basepath "$PWD/install")
shift 1
;;
(--)
Expand All @@ -34,17 +38,15 @@ while true; do
esac
done

URL_CORSONE_310='https://developer.arm.com/-/media/Arm%20Developer%20Community/Downloads/OSS/FVP/Corstone-310/FVP_Corstone_SSE-310_11.24_13_Linux64.tgz?rev=c370b571bdff42d3a0152471eca3d798&hash=1E388EE3B6E8F675D02D2832DBE61946DEC0386A'
URL_CORSTONE_310='https://developer.arm.com/-/media/Arm%20Developer%20Community/Downloads/OSS/FVP/Corstone-310/FVP_Corstone_SSE-310_11.24_13_Linux64.tgz?rev=c370b571bdff42d3a0152471eca3d798&hash=1E388EE3B6E8F675D02D2832DBE61946DEC0386A'
URL_BASE_AEM_A='https://developer.arm.com/-/cdn-downloads/permalink/Fixed-Virtual-Platforms/FM-11.27/FVP_Base_RevC-2xAEMvA_11.27_19_Linux64.tgz'
URL_BASE_AEM_R='https://developer.arm.com/-/cdn-downloads/permalink/Fixed-Virtual-Platforms/FM-11.27/FVP_Base_AEMv8R_11.27_19_Linux64.tgz'
URL_CRYPTO='https://developer.arm.com/-/cdn-downloads/permalink/Fast-Models-Crypto-Plug-in/FM-11.27/FastModels_crypto_11.27.019_Linux64.tgz'

cd "$(dirname "$0")"

mkdir -p download
pushd download
DOWNLOAD_DIR="$(pwd)"
wget --content-disposition --no-clobber "${URL_CORSONE_310}"
wget --content-disposition --no-clobber "${URL_CORSTONE_310}"
wget --content-disposition --no-clobber "${URL_BASE_AEM_A}"
wget --content-disposition --no-clobber "${URL_BASE_AEM_R}"
wget --content-disposition --no-clobber "${URL_CRYPTO}"
Expand All @@ -55,7 +57,7 @@ pushd install

if [ ! -d "Corstone-310" ]; then
tar -xf ${DOWNLOAD_DIR}/FVP_Corstone_SSE-310_11.24_13_Linux64.tgz
./FVP_Corstone_SSE-310.sh --destination ./Corstone-310 $INSTALLER_FLAGS_CORSTONE
./FVP_Corstone_SSE-310.sh --destination ./Corstone-310 "${INSTALLER_FLAGS_CORSTONE[@]}"
fi

if [ ! -d "Base_RevC_AEMvA_pkg" ]; then
Expand All @@ -72,9 +74,10 @@ if [ ! -d "FastModelsPortfolio_11.27" ]; then
tar -xf ${DOWNLOAD_DIR}/FastModels_crypto_11.27.019_Linux64.tgz
# SDDKW-93582: Non-interactive installation fails if cwd is different.
pushd FastModels_crypto_11.27.019_Linux64
# This installer doesn't allow providing a default path for interactive
# installation.
./setup.bin $INSTALLER_FLAGS_CRYPTO
# This installer doesn't allow providing a default path for
# interactive installation. The user will have to enter the install
# directory as the target by hand.
./setup.bin "${INSTALLER_FLAGS_CRYPTO[@]}"
popd
fi

Expand Down
9 changes: 9 additions & 0 deletions test/multilib/armv7a.test
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
# CHECK: arm-none-eabi/armv7a_soft_nofp_exn_rtti{{$}}
# CHECK-EMPTY:

# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=none -mno-unaligned-access | FileCheck --check-prefix=CHECK-NOUNALIGNED %s
# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=none -mno-unaligned-access -marm | FileCheck --check-prefix=CHECK-NOUNALIGNED %s
# RUN: %clang -print-multi-directory --target=armv7a-none-eabi -mfpu=none -mno-unaligned-access -mthumb| FileCheck --check-prefix=CHECK-NOUNALIGNED %s
# RUN: %clang -print-multi-directory --target=armv7ve-none-eabi -mfpu=none -mno-unaligned-access | FileCheck --check-prefix=CHECK-NOUNALIGNED %s
# RUN: %clang -print-multi-directory --target=armv7ve-none-eabi -mfpu=none -mno-unaligned-access -marm | FileCheck --check-prefix=CHECK-NOUNALIGNED %s
# RUN: %clang -print-multi-directory --target=armv7ve-none-eabi -mfpu=none -mno-unaligned-access -mthumb| FileCheck --check-prefix=CHECK-NOUNALIGNED %s
# CHECK-NOUNALIGNED: arm-none-eabi/armv7a_soft_nofp_strictly_aligned_exn_rtti{{$}}
# CHECK-NOUNALIGNED-EMPTY:

# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3-d16 | FileCheck --check-prefix=VFPV3 %s
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=neon-vfpv3 | FileCheck --check-prefix=VFPV3 %s
# RUN: %clang -print-multi-directory --target=armv7a-none-eabihf -mfpu=vfpv3 | FileCheck --check-prefix=VFPV3 %s
Expand Down

0 comments on commit 3787d94

Please sign in to comment.