1
0
mirror of https://git.yoctoproject.org/meta-arm synced 2026-07-18 04:27:08 +00:00

Compare commits

..

346 Commits

Author SHA1 Message Date
Jon Mason 4a9d140e4e README: remove reference to meta-arm-autonomy
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-10-01 16:21:22 -04:00
Jon Mason 58952aa7ba CI: dev kernel allow failure
The dev kernel can frequently fail, and is not anything that is used in
production.  Allow failure to prevent CI issues but still notify that
there are potential issues.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-05-05 14:59:05 -04:00
Peter Hoyes 54e8f00795 CI: Add BUILD_ENABLE_REGEX option to conditionally enable builds
Mirrors of meta-arm may focus their development on a small subset of
MACHINEs so provide the option to restrict the boards that are built on
CI using the variable BUILD_ENABLE_REGEX. If set, it conditionally
enables builds; if unset there is no change in behavior.

This variable could be overridden in a scheduled build, to e.g. build
all the MACHINEs weekly.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-05-05 14:58:51 -04:00
Adam Johnston eb41589aa1 CI: Remove ts-smm-gateway from N1SDP
Installing SMM Gateway SP on the N1SDP may stop the platform from booting
for on-device testing in CI.

In n1sdp.yml, remove `ts-smm-gateway` if it has been added

Keep `ts-smm-gateway` in default SP set so it can still be tested with
`qemu-secureboot`

Signed-off-by: Adam Johnston <adam.johnston@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-04-26 08:55:36 -04:00
Ross Burton 7d50f71baa arm-bsp/external-system: fix the gen_module race, again
Apply the patch from scp-firmware to the third copy of the buggy
Makefiles which fail randomly under parallel builds.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-04-25 11:00:07 -04:00
Gowtham Suresh Kumar 04071ec9f5 arm-bsp/uefi_capsule: Move UEFI capsule to IMGDEPLOYDIR
The UEFI capsule generated is in the incorrect build directory.
This patch copies it to IMGDEPLOYDIR.

Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-02-28 10:00:16 -05:00
Gowtham Suresh Kumar 71f92f4df8 arm-bsp/uefi_capsule: Use json file to pass capsule config
This patch uses the json config file for UEFI capsule generation
as this is efficient and easily scalable to generate multiple
capsules.

Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-02-28 10:00:16 -05:00
Gowtham Suresh Kumar 50c462da2d arm/edk2-basetools: Convert edk2 basetools recipes to native only
The BBCLASSEXTEND configuration can generate native sdk and target
recipes as well. The cp command used in do_install will
create host contamination issues for these recipes, so this patch
makes the recipe native only.

Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-02-28 10:00:16 -05:00
Gowtham Suresh Kumar 2792359e0a arm-bsp/corstone1000-image: Generate UEFI capsule for corstone1000 platform
Inherits the UEFI capsule generation class and configures the capsule
variables for the wic.nopt image

Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-02-28 10:00:16 -05:00
Gowtham Suresh Kumar 7a16491373 arm-bsp/uefi_capsule: Add UEFI capsule generation class
This class currently supports only a single firmware binary. The
required capsule parameters needs to be set, if not the build fails.

Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-02-28 10:00:16 -05:00
Gowtham Suresh Kumar ccf216ce4d arm/edk2-basetools: Add edk2 base tool native recipe
The native recipe installs the UEFI capsule generation tool
along with the other base tools to native sysroot.

Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-02-28 10:00:16 -05:00
Emekcan Aras 4ec5d8b306 arm/trusted-firmware-m: Do not use release branches
TFM repos do not use release branches. TFM-test repo does not use master
branch and use detached head for the 1.6 release. This commits makes necessary
changes to be able to build tfm and tfm-test again for langdale.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-02-09 09:22:37 -05:00
Ross Burton deda0fe304 CI: pin to kas 3.2 as 3.2.1 fails
For some reason the kas 3.2.1 container fails:

No such file or directory: '/builds/engineering/yocto/meta-arm/ci/ci/base.yml'

Note the repeated /ci/, which is wrong.

Pin the kas container to 3.2 for now until this is resolved.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2023-02-09 12:39:17 +00:00
Daniel Díaz d338ac4535 arm-bsp/firmware-image-juno: Fix deployment of compressed Image
A recent commit compressed the kernel image (to Image.gz) and
by default enabled an initramfs image. In the case for when
such that (initramfs) is not desirable, the deploy step of the
Juno firmware will still try to install the Image file, (not
Image.gz), so this fails:

  ERROR: firmware-image-juno-1.0-r0 do_deploy: ExecutionError('/oe/build/tmp-glibc/work/juno-oe-linux/firmware-image-juno/1.0-r0/temp/run.do_deploy.360477', 1, None, None)
  ERROR: Logfile of failure stored in: /oe/build/tmp-glibc/work/juno-oe-linux/firmware-image-juno/1.0-r0/temp/log.do_deploy.360477
  Log data follows:
  | DEBUG: Executing python function sstate_task_prefunc
  | DEBUG: Python function sstate_task_prefunc finished
  | DEBUG: Executing shell function do_deploy
  | cp: cannot stat '/oe/build/tmp-glibc/deploy/images/juno/Image': No such file or directory
  | WARNING: /oe/build/tmp-glibc/work/juno-oe-linux/firmware-image-juno/1.0-r0/temp/run.do_deploy.360477:152 exit 1 from 'cp -L -f /oe/build/tmp-glibc/deploy/images/juno/Image /oe/build/tmp-glibc/work/juno-oe-linux/firmware-image-juno/1.0-r0/image/juno-firmware-19.06/SOFTWARE/'
  | WARNING: Backtrace (BB generated script):
  | 	#1: do_deploy, /oe/build/tmp-glibc/work/juno-oe-linux/firmware-image-juno/1.0-r0/temp/run.do_deploy.360477, line 152
  | 	#2: main, /oe/build/tmp-glibc/work/juno-oe-linux/firmware-image-juno/1.0-r0/temp/run.do_deploy.360477, line 163
  NOTE: recipe firmware-image-juno-1.0-r0: task do_deploy: Failed
  ERROR: Task (../meta-arm/meta-arm-bsp/recipes-bsp/images/firmware-image-juno.bb:do_deploy) failed with exit code '1'

This updates the else case for when an initramfs image is not
in use so that the right kernel image is deployed, by using
the KERNEL_IMAGETYPE variable, to use either version of the
kernel image.

Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-02-04 04:53:49 -05:00
Qi Feng 85746671a4 kas/fvp-baser-aemv8r64: Use langdale as kas default refspec
The default refspec for the repos used by kas is now langdale.

Signed-off-by: Qi Feng <qi.feng@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-02-01 06:00:07 -05:00
Peter Hoyes a590d6e1b8 classes: Set ARMLMD_LICENSE_FILE in the runfvp environment
For models that require a license, ARMLMD_LICENSE_FILE is used to define
the location of a license file or server. If the variable is not set in
Bitbake it will not be set in the model environment.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-01-23 09:00:20 -05:00
Peter Hoyes 7090a9bb8e classes: Prevent passing None to the runfvp environment
FVP_ENV_PASSTHROUGH may contain variables that have not been set.
d.getVar returns None in this case. Detect this and skip setting the
variable in the model environment.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-01-23 09:00:20 -05:00
Peter Hoyes 9d980336fd classes: Define FVP_ENV_PASSTHROUGH variable dependencies
Define FVP_ENV_PASSTHROUGH's vardeps to equal itself, so that the
fvpconf is regenerated if any of the defined variables change.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-01-23 09:00:20 -05:00
Peter Hoyes 65c36dc6c3 arm/lib: Add XAUTHORITY to runfvp environment
aa89fe3f ensured environment variables necessary for GUI applications
are passed through to the model despite runfvp env var restrictions. Add
XAUTHORITY to this list. This is useful when doing X-forwarding with
Kas, which creates its own home directory.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-01-23 09:00:20 -05:00
Jon Mason 0f6b032d59 arm-bsp/juno: Update kernel patches to the latest
Pulling in the latest juno kernel patches from
https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git

Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-01-18 12:40:44 -05:00
Jon Mason 47211c659e arm-bsp/juno: move to compressed initramfs image
Change u-boot and machine config to default to booting a compressed
initramfs.  This allows for easier testing.  A compressed image is
needed as the image is too big for the storage, and the error notifying
of such is vague.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-01-18 12:40:44 -05:00
Adam Johnston 13c7463c9f arm/trusted-services: Fix 'no such file' when building libts
The libts recipe assumes generated cmake file will be suffixed with
'-noconfig'. This is only true when building with the default type
i.e. "".

Check which target cmake file has been generated before trying to
patch it. This fixes 'no such file' error when building with an
explicit type (Debug, Release, etc).

Signed-off-by: Adam Johnston <adam.johnston@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-01-13 10:05:30 -05:00
Peter Hoyes fd414c303c arm/scp-firmware: Disable cppcheck
The SCP-firmware CMake compile step automatically attempts to execute
cppcheck if both:
 * cppcheck can be located using find_program
 * DISABLE_CPPCHECK is not defined

cppcheck is not readily available in OE-core and is not an essential
part of the compilation process for end-users, so explicitly disable the
cppcheck step by passing DISABLE_CPPCHECK to CMake.

Additionally, because the OE-core CMake toolchain file cannot be used,
find_program may locate cppcheck on the host machine, which will cause
the build to fail if it is not the recommended version (as it is in
recent Linux distros).

Issue-Id: SCM-5864
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Ia87a0cbbb67ac1d6f3b26cfb5747a85b46131f81
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-01-11 14:00:09 -05:00
Peter Hoyes b5fe2bf2b7 arm/scp-firmware: Ensure CMAKE_BUILD_TYPE is capitalized
If CMAKE_BUILD_TYPE=debug (lowercase), SCP-firmware builds with debug
compiler flags but BUILD_MODE_DEBUG is not defined in C code so features
that are conditionally enabled/disabled in debug mode are not active.

Pass capitalized "Debug" and "Release" strings to CMAKE_BUILD_TYPE to
ensure Debug mode is fully enabled when SCP_BUILD_RELEASE = "0".

SCP_BUILD_RELEASE = "1" (the default) for all machines in meta-arm-bsp
so they are unaffected.

Issue-Id: SCM-5864
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I93220420eedd2e3e6c169679efcaf4642dd5bc51
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-01-11 14:00:09 -05:00
Peter Hoyes 8b95c97a00 arm/classes: Ensure patch files are sorted in apply_local_src_patches
apply_local_src_patches.bbclass was added in a previous patch to handle
the application of patch files located inside the fetched source code.

find is used to collect the patch files which does not guarantee the
order of its output. Pipe the output of find into sort to ensure patch
files are applied in the correct order.

Issue-Id: SCM-5864
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I1082fb7a726a7745289a5aa8bb6447bef57a94b0
Signed-off-by: Jon Mason <jon.mason@arm.com>
2023-01-10 09:00:07 -05:00
Ross Burton 898a4aa99b CI: fix builds with clang
meta-clang has a langdale branch now, so use that instead of master.

linux-yocto needs to use non-clang objcopy, apply the change locally
until the commit has been merged into meta-clang's langdale branch.

perf needs some patches backported to langdale, until that has been done
use gcc to build perf.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2023-01-03 17:19:59 +00:00
Peter Hoyes 025124814e arm/fvpboot: Disable timing annotation by default
Timing Annotation is a feature of the model that enables high-level
performance estimations to be made [1]. It is not needed to demonstrate
a functioning software stack so set FASTSIM_DISABLE_TA to 1 in the model
environment to disable this feature. This also improves model
performance.

[1] https://developer.arm.com/documentation/100965/1119/Timing-Annotation

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-12-16 07:00:12 -05:00
Jon Mason a0e5349c24 CI: define DEFAULT_TAG and CPU_REQUEST
DEFAULT_TAG and CPU_REQUEST are being used to help with internal Gitlab
pipeline setups know which type of machines to run on, but has no value
outside of Arm Corp.  Gitlab CI allows for variables to be overridden
by default.  So, we can give it a default value of NULL/empty and have
everything work internally and externally by default.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-12-15 17:15:30 +00:00
Ross Burton 7ac3f9f155 CI: use the .setup fragment in machine-coverage
Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-12-15 13:03:14 +00:00
Ross Burton 1e540d9f49 CI: no need to install telnet
The kas 3.1 container has telnet in. We can also remove python3-subunit
once kas 3.2 is released.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-12-15 13:03:14 +00:00
Ross Burton 3d68b6a0a9 CI: add tags to all jobs
Tag all jobs with the DEFAULT_TAG variable so each instance can control
what tags the jobs have, whilst still explicitly tagging the jobs which
need specific tags (such as x86_64 for jobs which need to run x86-only
binaries)

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-12-15 13:03:14 +00:00
Ross Burton 63a2b36141 CI: add variables needed for k8s runners
The Kas container needs to use the entrypoint as that is where the user
changes from root to a normal user.

Also set the KUBERNETES_CPU_REQUEST to the variable CPU_REQUEST as this
needs to be tuned per-deployment.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-12-15 13:03:14 +00:00
Robbie Cao d7660ca618 arm/fvp-base-r-aem: upgrade to version 11.20.15
Update version in documentation.

Issue-Id: SCM-4874
Signed-off-by: Robbie Cao <robbie.cao@arm.com>
Change-Id: Ic66bdcdc5c6309331f80faab6eaf2e3e936a5da4
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-12-14 03:00:14 -05:00
Adrián Herrera Arcila 26847ac52f ci: add meta-atp to check-layers
Signed-off-by: Adrián Herrera Arcila <adrian.herrera@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-12-09 13:07:47 -05:00
Adrián Herrera Arcila 5937b4a793 atp: fix machine overrides in recipes
Ensure meta-atp recipes are only performed if a compatible machine is
selected.

Signed-off-by: Adrián Herrera Arcila <adrian.herrera@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-12-09 13:07:47 -05:00
Adrián Herrera Arcila cb55a84894 atp: separate recipe for gem5 models
Previously, meta-atp extended the original gem5 recipe to add the ATP
Engine models; the .bbappend was complex, because it pulled from two
sources, and it was not possible to make machine-based overrides, as it
is a native recipe.

To solve this, we use the recent EXTRAS feature to add the gem5 models
from a different recipe.

Signed-off-by: Adrián Herrera Arcila <adrian.herrera@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-12-09 13:07:47 -05:00
Adrián Herrera Arcila e8334d3309 gem5: support for EXTRAS
External models can be added to gem5 through EXTRAS:
https://www.gem5.org/documentation/general_docs/building/EXTRAS

Added GEM5_EXTRAS to the gem5-native recipe to support it.

Signed-off-by: Adrián Herrera Arcila <adrian.herrera@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-12-09 13:07:47 -05:00
Adrian Herrera fe7c4c6ee0 atp: move m5readfile to meta-gem5
The m5 readfile recipe provides general utility for gem5 users to
run any script on OS boot. We hence move it to the meta-gem5 layer.

Signed-off-by: Adrian Herrera <adrian.herrera@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-12-09 13:07:47 -05:00
Adrian Herrera 5e00e21286 atp: decouple m5readfile from m5ops
By making m5readfile into its own recipe, we avoid modifications to the
m5ops recipe when using the meta-atp layer, which break the Yocto
compatibility of the layer.

Signed-off-by: Adrian Herrera <adrian.herrera@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-12-09 13:07:47 -05:00
Adrián Herrera Arcila ee80cc19e4 atp: fix failing test_readme
Test failed because there was no reference to maintainers in the
meta-atp README.

Following the common structure of other layers in the meta-arm
repository, the README in meta-atp now refers to the top-level README,
and a documentation directory contains the guidance that was present in
the original meta-atp README.

Signed-off-by: Adrián Herrera Arcila <adrian.herrera@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-12-09 13:07:47 -05:00
Vishnu Banavath ca4b469ac5 arm-bsp/optee: register DRAM1 for N1SDP target
N1SDP has 2 DRAM's. This change is to register 2nd DRAM which starts at
0x8080000000. Linux uses 1KB of this memory to share data with optee-os.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-12-05 15:00:08 -05:00
Peter Hoyes e89020b5e4 arm/fvp: Backport shlex.join from Python 3.8
721bec25 "arm/fvp: Join cli arguments in verbose logging" changed the
verbose output of FVPRunner to print the generated arguments using
shlex.join instead of as a list. However, this function is only
available in Python >= 3.8, whereas OE-core currently supports Python
3.6.

To fix this, backport its one-line implementation to a local function
shlex_join and update the call site.

Issue-Id: SCM-5314
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I56cab9dddcd0a91272464be15742a6ee726dad41
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-12-01 11:03:40 -05:00
Ross Burton 4f1e45b6bd CI: revert a meta-clang change which breaks pixman (thus, xserver)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-28 15:47:19 -05:00
Diego Sueiro 5a2018ae99 arm/trusted-firmware-m: Fix local source patches application
As TF-M ships patches that it needs applied to mbedcrypto, we apply them as
part of do_patch by using a postfunc. There is an issue when do_patch is
executed after do_deploy_source_date_epoch_setscene and apply_local_patches
tries to apply the patches already applied.

To fix this, make usage of the apply_local_src_patches bbclass.

Change-Id: Ia115b540b37ad3a2cce30e1e0461abd1f5a6ccc1
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-28 11:43:30 -05:00
Diego Sueiro 0f10564eaf arm/classes: Introduce apply_local_src_patches bbclass
This class is to be inherited by recipes where there are patches located inside
the fetched source code which need to be applied.

The following variables need to be set:
LOCAL_SRC_PATCHES_INPUT_DIR is the directory from where the patches are located
LOCAL_SRC_PATCHES_DEST_DIR is the directory where the patches will be applied

Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I8f9c16a5fbc9d5569cba60136560f1951408bd60
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-28 11:43:30 -05:00
Rui Miguel Silva df7ac03ac8 kas/corstone500.yml: pin repos to langdale
Pin repos by default to langdale release branches.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-28 08:00:17 -05:00
Peter Hoyes 17828e6e8b runfvp: Fix verbose output when using --console
Start a new thread to simultaneously log the output of FVP and the
telnet output if the --verbose flag is passed to runfvp. So that
ConsolePortParser can read the same stream, use itertools.tee to
temporarily duplicate the stream.

Use a custom log format string with an escape character to ensure that
log output always starts at the beginning of a line when interleaved
with console output.

Issue-Id: SCM-5314
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I3e815d9d899425e0d2af619524f09f2eda87562c
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-23 11:20:03 -05:00
Peter Hoyes 33dbc4f690 arm/oeqa: Log the FVP output in OEFVPSSHTarget
It is often useful to inspect the FVP output after running the tests.

Refactor OEFVPSerialTarget._create_logfile into
OEFVPSSHTarget._create_log_filename, so that all FVP test controllers
are able to create secondary log files.

Pass a filehandle to the stdout argument of run_fvp so that the FVP
output is asynchronously logged to a file. Change the port parsing logic
to read back from the same log file instead of reading the stdout
directly.

Issue-Id: SCM-5314
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I2ddb423fa0d896c13d3e96884858c680c4d34555
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-23 11:20:03 -05:00
Peter Hoyes 8eba0eecec arm/lib: Decouple console parsing from the FVPRunner
To simplify the FVPRunner class, create a separate ConsolePortParser
class to handle reading an iterator of lines and parsing port numbers
for FVP consoles. Use this in runfvp and the test targets.

This refactor also allows the stream being monitored to be changed more
easily, e.g. to a log file.

Issue-Id: SCM-5314
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Iade3a4c803fb355b04af7afa298d0a41fe707d94
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-23 11:20:03 -05:00
Peter Hoyes c6418d6d59 arm/lib: Factor out asyncio in FVPRunner
FVPRunner relies heavily on asyncio, despite there being very little
concurrent work happening. Additionally, while the runfvp entry point
starts an asyncio runner, it is not practical to have a single asyncio
runtime during testimage, which is fully synchronous.

Refactor to use subprocess.Popen and related functionality. The process
object has a similar interface to its async equivalent.

Cascade the API changes to runfvp and the test target classes.

Issue-Id: SCM-5314
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I3e7517e8bcbb3b93c41405d43dbd8bd24a9e7eb8
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-23 11:20:03 -05:00
Peter Hoyes f3fc634bbf arm/fvp: Join cli arguments in verbose logging
It is sometimes helpful to copy and paste the cli arguments from the
verbose runfvp output (e.g. to test with a development FVP build), but
currently the arguments are printed as a Python list.  Use
shlex.join(cli) to safely join the arguments together in form that can
be reused directly in a shell.

Issue-Id: SCM-5314
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Ibb5c5ed45d02e241cb3858f68740fb9d4e89357a
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-23 11:20:03 -05:00
Emekcan Aras f2997ee1a7 kas/corstone1000-base.yml: set refspec for Corstone1000 release
Sets refspec for meta-openembedded and poky for upcoming
Corstone1000 release. These SHAs are tested.

Signed-off-by: Emekcan Aras <Emekcan.Aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-23 09:00:19 -05:00
Emekcan Aras 1549624dbf arm-bsp/documentation: corstone1000: update the user guide
Aligning the user guide with the latest Corstone1000 SW updates.

Signed-off-by: Emekcan Aras <Emekcan.Aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-23 09:00:16 -05:00
Emekcan fb43632e7c arm/fvp: Upgrade Corstone1000 FVP
Upgrades the Corstone1000 FVP to the latest release
version.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-23 09:00:16 -05:00
Vishnu Banavath ff9b6f29bf arm-bsp/documentation: corstone1000: 2022.11.10 RC: update the change log
Aligning the change log with the latest Corstone1000 SW updates.

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-10 11:07:20 -05:00
Vishnu Banavath 00ceaafc72 arm-bsp/documentation: corstone1000: 2022.11.10 RC: update the release notes
Aligning the release notes with the latest Corstone1000 SW updates.

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-10 11:07:20 -05:00
Abdellatif El Khlifi 8185ca9c20 arm-bsp/documentation: corstone1000: 2022.11.10 RC: update the user guide
Aligning the user guide with the latest Corstone1000 SW updates.

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-10 11:07:20 -05:00
Luca Fancellu 387f32242e arm,arm-bsp/recipes-kernel: don't use PN in arm-ffa-transport.inc
There are some cases where PN is not expanded into linux-yocto in the
arm-ffa-transport.inc file required from linux-yocto_%.bbappend,
because of the := usage, in those cases PN gets "defaultpkgname".

To fix the issue, rename "linux-yocto" folder into "files" and adjust
ARMFILESPATHS to point to that in linux-yocto_%.bbappend, prepend
ARMFILESPATHS to FILESEXTRAPATHS in arm-ffa-transport.inc.

Remove ARMFILESPATHS prepend from FILESEXTRAPATHS for corstone1000 in
meta-arm-bsp, because the platform has always the "arm-ffa" in
MACHINE_FEATURES, which causes ARMFILESPATHS to be prepended.

While there, remove the FILESEXTRAPATHS prepend of ARMFILESPATHS for
the n1sdp that will be added by arm-ffa-transport.inc only when
needed.

Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-08 08:18:55 -05:00
Ross Burton dd5a968d3d arm/linux-arm64-ack: fix buildpaths in the perf Python module
Use --prefix instead of --root when installing the Python modules to
ensure that build paths are not embedded in the compiled .pyc files.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-07 14:05:39 -05:00
Anton Antonov 99e1bf8229 arm-bsp/fvp-base: Enable virtio-rng support and unset preferred 5.15 kernel
Without virtio-rng enabled kernel 5.19 takes ages to finish
random number generator initialisation which causes
issues with ssh and other crypto related services.

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-07 11:00:12 -05:00
Emekcan a41572a032 arm-bsp/trusted-services: Fix GetNextVariable max_name_len in smm gateway
GetNextVariableName() should return EFI_BUFFER_TOO_SMALL
when NameSize is smaller than the actual NameSize. It
currently returns EFI_BUFFER_OUT_OF_RESOURCES due to setting
max_name_len incorrectly. This fixes max_name_len error by
replacing it with actual NameSize request by u-boot.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-07 07:45:38 -05:00
Emekcan 5fd87e47f6 arm-bsp/trusted-services: add checks for null attributes in smm gateway
As in EDK-2 and EDK-2 test code, setVariable() with 0
attributes means a delete variable requiest. Currently,
smm gateway doesn't handle this scenario. This commit
adds that support

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-07 07:45:38 -05:00
Rui Miguel Silva 8d35c5b539 arm-bsp/trusted-firmware-m: adjust ps assets for corstone1000
Enabling ESRT in trusted services increased the need for more
assets at protected storage level, since we now save FMP data
, capsule update, like Image Info as non volatile EFI
variables.

So, just change the default configuration for the corstone1000
to handle this.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-07 07:45:34 -05:00
Rui Miguel Silva 9e2de7dacc arm-bsp/trusted-services: psa test setup corstone1000
Reorder patch list headers, move psa api test patch that
should be applied to all psa api test from a crypto specific
directory to a more generic "psa-apitest" directory.

Create a inc file for the psa api test to make sure all out of
tree patches from trusted services are applied to all test
source directories, and move mm communicator buffer details to
each SP, and finally set it up differently as it
should/is expected to be at libts.

With this setup all psa-api test for crypto and attestation
passed.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-07 07:45:34 -05:00
Rui Miguel Silva 3651527f57 arm/trusted-services: check before applying patches
At the apply ts patch stage, first check if they are patches
to be applied. Because if not, this would break the apply
patch stage with an error.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-11-07 07:45:34 -05:00
Ross Burton 4ee457693e CI: track meta-openembedded's langdale branch
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-28 12:00:11 -04:00
Abdellatif El Khlifi 46e8092b6b kas: corstone1000: set branches to langdale
point poky/meta-openembedded to langdale

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-28 12:00:08 -04:00
Mohamed Omar Asaker f312adf47b arm-bsp/corstone1000: add msd configs for fvp
Signed-off-by: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-27 07:00:09 -04:00
Jon Mason d3541b1e29 CI: Remove host bitbake variables
Bitbake variables were being set in KAS for the unique Gitlab CI
configuration being used internally.  While this should not have been
significantly detrimental for other setups, this shouldn't be necessary
with proper runner setup.  Removing them here to all for a more generic
CI experience.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 13:33:55 -04:00
Satish Kumar 952dee0de9 arm-bsp/trusted-service: corstone1000: esrt support
Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 13:33:55 -04:00
Mohamed Omar Asaker 9e17830b84 arm-bsp/trusted-firmware-m: corstone1000 support FMP image info
Apply tfm patches to support FMP image info

Signed-off-by: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 13:33:55 -04:00
Mohamed Omar Asaker bb02720fd7 Revert "arm-bsp/trusted-firmware-m: corstone1000: bump tfm SHA"
This reverts commit 81181ed898.

Signed-off-by: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 13:33:55 -04:00
Mohamed Omar Asaker b4dfea8e28 Revert "arm-bsp/trusted-firmware-m: corstone1000: secure debug code checkout from yocto"
This reverts commit 37ba0b162a.

Signed-off-by: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 13:33:55 -04:00
Rui Miguel Silva e4a5809373 arm-bsp/corstone1000: apply ts patch to psa crypto api test
Apply shared patch to trusted services that is used to compile
psa crypto api tests to include change in packed-c request
message in the eaed update structure to be in sync with the
serialize/deserialize in TS side.

As at it, move the other corstone1000 specific patch file to
meta-arm-bsp where it should be.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 13:33:55 -04:00
Ross Burton 72f0580f70 CI: add documentation job
This job builds all of the Sphinx documentation it can find with fatal
warnings enabled.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-10-24 12:02:01 -04:00
Vishnu Banavath 950372e99d meta-arm-bsp/doc: add readthedocs for corstone1000
These changes are to add support for readthedocs for
corstone1000 platform. readthedocs server traces
any changes to to corstone1000 documents and will trigger
a build which will generate html file which can will be
rendered by corstone1000.docs.arm.com server

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 12:02:01 -04:00
Vishnu Banavath 0a7c6ae7e1 runfvp: corstone1000: add mmc card configuration
These changes are to pass appropriate MMC card configuration to
corstone1000 FVP.

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 12:02:01 -04:00
Ross Burton bd01053121 arm-bsp/linux-arm64-ack: fix malformed Upstream-Status tag
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 12:02:01 -04:00
Ross Burton 062aef06c7 arm-bsp/hafnium: add missing Upstream-Status
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 12:02:01 -04:00
Ross Burton 0245e6609c arm/hafnium: add missing Upstream-Status
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 12:02:01 -04:00
Rui Miguel Silva a42ee82eda arm/trusted-services: port crypto config
Port crypto config to psa arch test api suite.This
needs to move to arm-bsp since is corstone1000 specific
configuration

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 12:02:01 -04:00
Mohamed Omar Asaker be90d2e4b0 arm-bsp/u-boot: corstone1000: support 32bit ffa direct messaging
Signed-off-by: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-24 12:02:01 -04:00
Jon Mason 1935f51d0f CI: fix to langdale
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-19 14:30:01 -04:00
Ross Burton 75b883c363 arm/fvp-tc0: remove Total Compute 2020 FVP
This FVP doesn't support TC1, so remove it now that we don't support TC0.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-19 10:00:08 -04:00
Ross Burton c9874bebc7 arm-bsp/scp-firmware: remove TC0 patches
These patches are specific to TC0, and are not needed for TC1.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-19 10:00:08 -04:00
Ross Burton 75a8c07a63 arm-bsp: remove TC0
The Total Compute 2020 BSP is obsolete and unsupported, so remove it
from meta-arm.  The Total Compute team would like TC1 to be available in
langdale, but removed in mickledore.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-19 10:00:08 -04:00
Vishnu Banavath c7660b3548 arm-bsp/linux: add kernel file search path for N1SDP
This change is to add ARMFILESPATHS into serach path
for linux for N1SDP target.

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-17 21:01:04 -04:00
Rui Miguel Silva 63cf57290b arm-bsp/trusted-services: support for libmetal and openamp
Add support for libmetal and openamp as backend for se-proxy
and smm-gateway SP. For that also introduce a change to newlib
in memcpy optimization to avoid unaligned data-aborts in
__packed structures handling.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-17 21:01:04 -04:00
Rui Miguel Silva c3ada285de arm-bsp/optee: add log handler
Add log handler for SP sending logs over ffa to spmc.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-17 21:00:59 -04:00
Emekcan 13199c55c0 arm-bsp/kernel: Fix TEE driver bug for corstone1000
Fixes the Tee driver bug in corstone1000. It adds a
delay to fix a possible race-condition occurs during
FF-A calls. This is a temporary fix for the upcoming
release.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-14 10:01:33 -04:00
Satish Kumar 37ba0b162a arm-bsp/trusted-firmware-m: corstone1000: secure debug code checkout from yocto
Instead of checking out code through internal cmake,
the patch explicitly checkout the psa-adac code.

Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-14 08:00:09 -04:00
Satish Kumar 0f49cad85f arm-bsp/trusted-firmware-m: corstone1000: fix sournce dir of libmetal and openamp
The patch corrects the source dir for libmetal and openamp.

Devtool modify on tf-m will work after this fix.

Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-14 08:00:09 -04:00
Satish Kumar 81181ed898 arm-bsp/trusted-firmware-m: corstone1000: bump tfm SHA
The patch bumps the tfm SHA to
b065a6b28cc6c692b99e4f7e9387d96f51bf4d07

Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-14 08:00:09 -04:00
Satish Kumar 60af2fc053 arm-bsp/u-boot: corstone1000: esrt support
Signed-off-by: Satish Kumar <satish.kumar01@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-14 08:00:09 -04:00
Peter Hoyes d87c445b24 arm/lib: Do not log FVP return codes < 0
If a process is terminated using a signal, in Python its return code is
-N, where N is the signal number (e.g. -15 for SIGTERM). Currently, all
non-zero return codes are printed using logger.info, which gives the
impression of an abnormal termination even when the process was
explicitly terminated by FVPRunner.

Instead, only log return codes greater than zero.

Issue-Id: SCM-5314
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I1a1e9d8aa3f26c14b48be718498bcb14707950b7
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-14 06:00:08 -04:00
Anton Antonov 90f9e1241b arm/trusted-services: include documentation
Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-13 12:00:08 -04:00
Anton Antonov f8aba2d5f3 arm/trusted-services: Remove remaining patches merged upstream
Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-12 16:00:09 -04:00
Ross Burton cbcb1bf39d CI: restrict compression threading
On large systems, using all of the CPUs and 50% of the RAM when xz
compressing packages is actively harmful because it will happily use up
to that limit.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-11 09:20:18 -04:00
Anton Antonov dc4c85ccbb arm/trusted-services: Remove patches merged upstream
Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-11 08:00:07 -04:00
Jon Mason 545ba524b8 arm-bsp: zephyr removal
Since meta-zephyr is doing CI, there is no need to replicate that here.
Remove all of the zephyr references.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-10 10:00:10 -04:00
Davidson K b9073fdc99 arm-bsp/linux-arm64-ack: make it compatible with gcc-12 for TC
Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Change-Id: I924064547f4e1d2d506b58bf5aa84d5a4d2f9f8e
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-06 07:00:11 -04:00
Rupinderjit Singh 3921257e9b arm: update Android common kernel
Update ACK to 5.15 and remove the 5.10 recipe

Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
Change-Id: I7d86367533248312bb7a54ba39166ddee5a025ef
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-06 07:00:11 -04:00
Jon Mason 1bc064e020 CI: cleanups for targets and removed tests
Some of the removed tests are now working and some of the systems are
not testing against sato (as being done in base.yml).  Update these and
add some comments.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-05 10:00:09 -04:00
Jon Mason 09a3e899dc CI: trusted services as a feature instead of a machine
Trusted services is a feature, not a unique machine.  Modify the setup
to reflect this.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-05 10:00:09 -04:00
Emekcan 987966a587 arm-bsp/linux-yocto: update RPMSG_CTRL config for corstone1000
The rpmsg_chrdev driver has been replaced
by the rpmsg_ctrl driver. This commit
updates the defconfig to align with the
change.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-05 09:07:19 -04:00
Vishnu Banavath 797e43e09b arm-bsp/corstone500: upgrade kernel to v5.19
This change is to upgrade kernel to 5.19 for corstone500 target

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-05 09:05:57 -04:00
Adam Johnston bb1a229176 arm-bsp/linux-yocto: Upgrade kernel to v5.19 for N1SDP
This change is to upgrade the Linux kernel version to 5.19 for N1SDP
target to align with post N1SDP-2022.06.22 refresh

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Adam Johnston <adam.johnston@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-05 08:00:08 -04:00
Ross Burton 932db44b20 arm/optee-spdevkit: remove
The "secure parition development kit" is obsolete, newlib is used instead.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-04 13:18:48 -04:00
Anton Antonov 00bd768ab7 meta-arm/trusted-services: Use GCC toolchain for specific TS recipes only.
This commit also enables clang CI pipelines for TS.

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-04 13:18:37 -04:00
Rui Miguel Silva 38a3facd90 arm-bsp/corstone1000: bump kernel version to 5.19
Bump the kernel version to 5.19.9, remove backported ffa
related patch to previous version and fix issues in the arm
rpmsg driver.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-04 08:00:07 -04:00
Sumit Garg 6001998caa external-arm-toolchain: Enable 11.3.rel1 support
Enable support for 11.3.rel1 binary toolchain release. Also, update CI
to use it.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-03 23:33:48 -04:00
Sumit Garg df99894eaa arm-toolchain: update Arm GCC to 11.3
Along with that add a new variable ARM_GCC_SUB_VERSION as newer clubbed
Arm GNU toolchain releases includes a sub-version like the current
release being 11.3.rel1 where ARM_GCC_SUB_VERSION=rel1.

Also, update CI to this release.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-03 23:33:48 -04:00
Jon Mason 0164b4ca7a Revert "CI: apply a patch so that meta-zephyr is compatible with langdale"
This reverts commit b64ea83aef.
2022-10-03 23:33:19 -04:00
Jon Mason b64ea83aef CI: apply a patch so that meta-zephyr is compatible with langdale
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-03 15:16:18 -04:00
Jon Mason 6983e2a2a9 ci: move features only needed by testimage from base
Move the features uniquely needed for system images to the testimage
file.  This should reduce the image size and amount of things needing to
be built for machines that do not run testimage.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-03 14:41:17 -04:00
Jon Mason 6655928c81 arm-bsp/fvp: move the fvp include file to the include directory
Move the FVP include file to the include directory, matching what is
done for corstone1000 and other machines in meta-arm-bsp.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-03 14:41:17 -04:00
Abdellatif El Khlifi 04a7ba3c77 arm/ffa-debugfs: drop use of the kernel module
ffa-debugfs kernel module is replaced with arm-ffa-user module

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Abdellatif El Khlifi 7a42f5c642 arm/secure-partitions: drop use of the recipe
secure-partitions recipe is replaced with the new design of
 trusted services recipes.

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Abdellatif El Khlifi 126eebcabd arm-bsp/linux: corstone1000: use arm-ffa machine feature
add arm-ffa machine feature which applies FF-A config fragment and kernel patch

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Abdellatif El Khlifi ddbf0addf1 arm-bsp/corstone1000-initramfs-image: add TS PSA API tests packages
Trusted Services PSA API tests commands allow testing the following
SE Proxy services: crypto, its, ps and iat

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Abdellatif El Khlifi 37a9dbc5b7 arm-bsp/trusted-services: corstone1000: add MHU-driver
Add an out of tree patch enabling MHU-driver

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Abdellatif El Khlifi 068c2f37c0 arm-bsp/machine: corstone1000: disable pulling the kernel into the initramfs
exclude kernel-image-* packages from the rootfs

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Abdellatif El Khlifi 36536b6055 arm-bsp/trusted-services: corstone1000: add secure partitions support
support for ts-smm-gateway and ts-se-proxy secure partitions

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Abdellatif El Khlifi 56d53d4393 arm-bsp/corstone1000-initramfs-image: remove obsolete packages
removing the following packages:

ffa-debugfs-mod
secure-partitions-psa-api-tests

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Abdellatif El Khlifi f483fcfc68 arm-bsp/optee-spdevkit: corstone1000: drop the support
optee-spdevkit no longer used. It has been replaced with newlib

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Abdellatif El Khlifi 8817e91e5d arm-bsp/optee-os: corstone1000: upgrade to v3.18
Upgrading optee-os uses the new Trusted Services support

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Abdellatif El Khlifi 607166e3bd arm-bsp/u-boot: corstone1000: upgrade FF-A support
update the FF-A patchset with the one sent to the u-boot mailing list

cover letter: https://lore.kernel.org/all/20220926101723.9965-1-abdellatif.elkhlifi@arm.com/

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Abdellatif El Khlifi 63c7e60c1e arm-bsp/u-boot: corstone1000: update initramfs bundle size
increase the size of the initramfs bundle used in the boot command

The new trusted services support increases the rootfs size.
When decompressed the initramfs bundle size is around 15M.

u-boot boot command needs to be updated with this size to be able to load
all the initramfs bundle.

When compressed the initramfs bundle size is around 5.4M
(Image.gz-initramfs--5.15.59)

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
2022-10-01 10:37:46 -04:00
Peter Hoyes fc26f65b1c arm-bsp/corstone1000: Refactor image signing to use new bbclass
The prevoius commit refactored trusted-firmware-m-sign-host-images.inc
into tfm_sign_image.bbclass.

Move the image signing logic from the TF-M bbappend to
corstone1000-image.bb, using the new bbclass.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Ib76dce2ba9102e343d0611d929250d1d8aee518b
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-03 10:33:43 -04:00
Peter Hoyes 97c7e9f08e arm/classes: Migrate TF-M image signing to bbclass
Introduce a new recipe for the TF-M signing scripts.

To make the functionality easier to reuse, move the logic that is
currently in trusted-firmware-m-sign-host-images.inc to
tfm_sign_image.bbclass. This bbclass DEPENDS on
trusted-firmware-m-scrpits-native.

tfm_sign_image.bbclass can be inherited in image recipes to sign
artifacts.

Issue-Id: SCM-4964
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I74aaab5db1a43fedf13ea2564c2f31af207ae924
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-03 10:33:43 -04:00
Peter Hoyes ff4a322c83 arm-bsp/trusted-firmware-m: Make branch names configurable
In order to support overriding the branch names in other layers, extract
the branch name for each repository and set using default assignment.

Issue-Id: SCM-4964
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I09d0c1f1d012c1abb84648ad974883bbdaa1db7a
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-03 10:33:43 -04:00
Emekcan 6ef4d3ef18 arm-bsp/external-system: Changing the RTX repo
Migrating RTX repo to a new namespace under
arm reference solution. The new repo also adds
corstone1000 as a product so this commits
also changes the PRODUCT variable.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-03 10:33:43 -04:00
Emekcan f25935371d arm-bsp/test: Changing the test app repository
Migrating the test repo to a new namespace under
arm reference solution.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-10-03 10:33:43 -04:00
Jon Mason 8d0410782e CI: Remove uniquely zephyr machines
Remove microbit-v1, qemu-cortex-a53, qemu-cortex-m3, and qemu-cortex-r5
from CI (and the tree in general).  These machines are part of the
meta-zephyr CI now and keeping them here is redundant.  However, keeping
zephyr builds for machines that also have TF-M.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-30 15:20:03 -04:00
Adam Johnston 7f05bd6431 arm-bsp/trusted-firmware-a: Update TF-A version for N1SDP
Update TF-A version to align with post-N1SDP-2022.06.22 refresh

Signed-off-by: Adam Johnston <adam.johnston@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-30 15:20:03 -04:00
Adam Johnston 4f6a200997 arm-bsp/edk2-firmware: Add edk2-platforms patches for N1SDP
This is to align edk2/edk2-platforms with N1SDP-2022.06.22 release

Signed-off-by: Adam Johnston <adam.johnston@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-30 15:20:03 -04:00
Adam Johnston d7ef05a2fe arm-bsp/edk2-firmware: Update edk2/edk2-platforms versions for N1SDP
Update edk2/edk2-platforms versions to align with N1SDP-2022.06.22 release.

Signed-off-by: Adam Johnston <adam.johnston@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-30 15:20:03 -04:00
Jon Mason 2c9cf62622 layers: convert to langdale compatibility
Now that langdale is available, convert all kirkstone references to it.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-29 18:05:36 -04:00
Ross Burton aa89fe3f08 runfvp: pass-through environment variables need for GUI applications
Since 820a55d3 the environment that the FVPs run in is limited, however
this broke the use of GUI applications for the terminals.

Passthrough DISPLAY and WAYLAND_DISPLAY automatically so these continue
to work.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-29 11:22:54 -04:00
Davidson K 3f59a344e6 arm-bsp/hafnium: enable Virtual Host Extension for TC
Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Change-Id: I348b80ee8d31f6ac7c528bcd80490fe83ac5f97d
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-29 11:22:54 -04:00
Davidson K a816bcc8ab arm-bsp/trusted-firmware-a: add firmware update support for TC
Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Change-Id: Ice2396de4705ed7859c2334678170ef7f17e4709
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-29 11:22:54 -04:00
Davidson K 0c002d467e arm-bsp/u-boot: add gnutls-native as dependency
Since U-Boot 2022.04 the host tool mkeficapsule requires gnutls.
Thus adding it to the dependency.

Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Change-Id: I8eff2e9bb9752bea5b885fcf3a69bf79c4f0c215
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-29 11:22:54 -04:00
Ross Burton 40c0c47134 Revert "Temporary use qemu 7.0.0 for TS CI pipelines"
This reverts commit f513237500.
2022-09-29 10:48:29 +01:00
Jiacheng Tang 1dc0baf421 arm/fvp-base-r-aem: upgrade to version 11.19.14
Update version in documentation.

Issue-Id: SCM-5168
Signed-off-by: Jiacheng Tang <jiacheng.tang@arm.com>
Change-Id: Iea0815fb7e99997f45f7882c47138f0f9dfac0ac
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-28 09:40:32 -04:00
Khem Raj 4cd8d73788 hafnium: Exclude from world builds
This does not build with clang from meta-clang and also does not build
with gcc either

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-28 09:40:32 -04:00
Xueliang Zhong 680954d6e9 arm-bsp/n1sdp: upgrade scp-firmware version
Upgraded N1SDP scp-firmware to N1SDP-2022.06.22 version.

Signed-off-by: Xueliang Zhong <xueliang.zhong@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-26 15:44:29 -04:00
Anton Antonov f513237500 Temporary use qemu 7.0.0 for TS CI pipelines
Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-26 11:12:38 -04:00
Emekcan 4a190f18de arm-bsp/images: Adding external system test to initramfs image
Adds the external system test application and the relevant
recipe into the corstone1000 initramfs image.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-26 11:12:38 -04:00
Emekcan 037011da64 arm-bsp/test: Adding a test app for external system
Adds a linux userspace test application and a recipe
to build it to test external system in corstone1000
platform.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-26 11:12:38 -04:00
Jon Mason 4c3a7eec7e arm-bsp/tc: remove hafnium clang patch
The newly added clang patch does not apply cleanly to the tc version of
hafnium.  Since there are no plans to use clang on tc, remove it for
this platform.

Also, use devtool to clean-up the clang patch in question.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-25 13:54:21 -04:00
Khem Raj 04b78e80b0 hafnium: Add a fix for clang-15 errors
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-23 00:00:07 -04:00
Khem Raj 75ccc7847d linux-yocto: Add bbappend for 5.19
Enable tee and arm-ffa driver on qemuarm/qemuarm64 by default

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-22 23:39:36 -04:00
Emekcan be8890bb03 arm-bsp/kernel: Add rpmsg_arm_mailbox to corstone1000
Adds out-of-tree rpmsg_arm_mailbox driver patches into linux
kernel to communicate with external system using MHUs in
corstone1000 platform. The host can communicate with external
system using the driver under /dev/rpmsg0_ctrl0.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-22 23:39:36 -04:00
Emekcan b573b29b76 arm-bsp/u-boot: Add external system MHUs to u-boot device tree
The host uses MHUs to send/receive data from the external system
in corstone1000. This commit adds MHU mailbox bindings into the
u-boot device tree to enable data communication between the host
and external system.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-22 23:39:36 -04:00
Jon Mason 9f532a8cbd arm/edk2-firmware: Work around clang issue
A new update to clang is causing warnings (which are errors because edk2
was Werror by default).  The error is:
clang-15: error: '-x c' after last input file has no effect [-Werror,-Wunused-command-line-argument]

Work around it by disabling this specific error.  Also, use devtool to
update the patch.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-22 23:39:36 -04:00
Jon Mason cf5bccb0d6 arm-bsp/n1sdp: update linux-yocto patches
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-22 23:39:36 -04:00
Khem Raj a0658a6682 ffa-debugfs-mod: Exclude from world builds
It installs arm_ffa_user.h and so does arm-ffa-user recipe, lets not
build ffa-debugfs-mod in world builds since it does not appear as much
in other package dependencies as arm-ffa-user

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-22 23:39:36 -04:00
Khem Raj 2c2ed8f727 trusted-services: Pin to use gcc
These recipes are not buildable with clang in its current state

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-21 21:00:10 -04:00
Khem Raj 7d8b252405 optee-os: Extend clang pragma fixes to core_mmu_v7.c for 3.18
3.18 builds are failing since the section stuff is also done in
core_mmu_v7.c therefore extend the patch to include this file as well

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-21 21:00:10 -04:00
Jon Mason c6bf835cef arm/hafnium: update to 2.7
Update the version, update the patches, and drop the ones no longer
necessary.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-21 09:48:56 -04:00
Jon Mason abc8b4fe16 arm/optee-client: move the 3.14 recipe to meta-arm-bsp
Only corstone1000 is using the legacy version of optee-client.  Move it
there to keep corstone1000 working, while removing it from meta-arm to
discourage use of the non-latest version.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-21 09:00:08 -04:00
Jon Mason 606e7d4c4e arm/optee: remove old versions
Remove versions not being used anymore and update patches as necessary

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-21 09:00:08 -04:00
Jon Mason dfd03ca1a3 arm/qemuarm-secureboot: remove optee-os version pin
The CPU issue that pinned qemuarm-secureboot is no longer present.
Remove the logic in the conf file that held it back to the older
version.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-21 09:00:08 -04:00
Jon Mason a3f22f90bb arm/optee-os: add ARMv7 changes to clang patch and update patches
ARMv7 does not have fixes for the clang issues already fixed for ARMv8.
Make the necessary changes in that patch for it to work.  Also, update
the patches (via devtool).

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-21 09:00:08 -04:00
Andrei Gherzan fde0575aea edk2-firmware: Fix configure sed typo
The configure sed operation will not behave as expected because '*'
match misses a preceeding '.'.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-20 10:39:04 -04:00
Davidson K a9a53e258a arm-bsp/tc: upgrade version of optee
Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Change-Id: Iacd32d18d5d2804e4050e4d1f8075efe0dd545fe
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-19 14:50:46 -04:00
Davidson K 3b48207cc7 arm-bsp/tc: upgrade version of hafnium
Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Change-Id: I7ccc2ab23955291bcf7d87384ba1ac94c1568443
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-19 14:50:46 -04:00
Davidson K 18e68367e0 arm-bsp/tc: upgrade version of trusted-firmware-a
Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Change-Id: I2100b5f0f7af23f59611f4e591efb09d3bcd6942
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-19 14:50:46 -04:00
Emekcan b086301d46 arm-bsp/kernel: Add external device driver
Adds external system device driver into linux.
User applications can control the external system
using the driver under /dev/extsys_ctrl in
corstone1000 platform.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-13 20:52:57 -04:00
Emekcan 1182b0d2ea arm-bsp/u-boot: Add external system driver to u-boot device tree
Corstone1000 needs a kernel driver to control the
external system (turn on/off, reset). This commit
adds the external system driver binding to the
u-boot device tree for corstone1000.

Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-13 20:52:57 -04:00
Peter Hoyes 820a55d348 arm/lib: Specify the FVP environment variables explicitly
It is sometimes useful to be able to configure the behavior of FVPs
using environment variables, e.g. for licensing or plugins.

Add a new FVP option: FVP_ENV_PASSTHROUGH, which allows the Bitbake
variables to be passed to the environment to be specified explicitly (in
a similar way to BB_ENV_PASSTHROUGH). This ensures that:

 * FVPs launched via runfvp have a reproducable environment
 * FVPs launched via testimage (which run from an isolated Bitbake task)
   can receive environment variables

Change the self-tests to use cwd instead of PATH to find the mock FVPs,
as the PATH environment variable is no longer passed through.

Issue-Id: SCM-4964
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Idf6ac6d41fda4cd5f950bc383c2fc1fa1acdf4e3
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-13 20:52:57 -04:00
Joe Slater 7c3e597b4c arm/packagegroup-ts-tests: fix parse error
PACKAGE_ARCH must be set before inheriting packagegroup.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-13 20:52:57 -04:00
Denys Dmytriyenko 261263a670 arm-toolchain/gcc,external-arm-toolchain: resolve conflict with gcc headers
Historically external-arm-toolchain recipe packaged all gcc headers from
${libdir}/gcc/${TARGET_SYS}/${BINV}/include - some would be picked up by
packages like gcc-sanitizers, libssp-dev. libquadmath-dev or libgomp-dev.
The rest would fall into catch-all libgcc-dev package.

Unfortunately, that could result in a conflict with a target gcc, which
also packages some of those files, like unwind.h or stddef.h, among others.

The conflict could be seen with this config:

EXTRA_IMAGE_FEATURES += "dev-pkgs tools-sdk"
TCMODE = "external-arm"
EXTERNAL_TOOLCHAIN = "/OE/toolchains/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu"

And the error message is:

Error: Transaction test error:
  file /usr/lib/gcc/aarch64-poky-linux/11.2.1/include/stddef.h conflicts between attempted installs of libgcc-s-dev-11.2.1-r0.1.cortexa57 and gcc-arm+11.2-r2022.02.1.cortexa57
  file /usr/lib/gcc/aarch64-poky-linux/11.2.1/include/unwind.h conflicts between attempted installs of libgcc-s-dev-11.2.1-r0.1.cortexa57 and gcc-arm+11.2-r2022.02.1.cortexa57

Modify external-arm-toolchain recipe according to how libgcc in OE-Core
handles those header files by removing and not packaging them:

https://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/gcc/libgcc-common.inc#n40

Also need to adjust gcc recipe to pick up unwind.h from EXTERNAL_TOOLCHAIN
location now, since libgcc-dev no longer carries it, and install it into
STAGING_LIBDIR_NATIVE, where OE-Core gcc-target.inc expects it from
gcc-cross:

https://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/gcc/gcc-target.inc#n164

Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-10 12:48:13 -04:00
Mohamed Omar Asaker 23266ea6fb arm-bsp/n1sdp-board-firmware: upgrade to N1SDP-2022.06.22
Signed-off-by: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-10 12:48:13 -04:00
Vishnu Banavath 7a13b2e3f9 arm-bsp/external-system:corstone1000: build and install external-system
This change is to enable build and installing external-system firmware
for corstone1000 platform.

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-09 15:54:01 -04:00
Jon Mason 9ce6539660 arm/optee-spdevkit: add version to file name
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-08 16:00:09 -04:00
Jon Mason 503bfcdc36 arm-bsp/optee: rename corstone1000 files
The corstone1000 optee files have an underbar when it should have a
hyphen in the naming scheme.  Change this to match other files.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-08 16:00:09 -04:00
Jon Mason 9418819358 arm-bsp/optee-os: add 3.10 recipe for corstone1000
A optee-os v3.10 recipe is necessary for corstone100, as it is actually
using 3.10 SHA and then trying to apply patches for 3.14 (which is
causing fuzz errors).  Create this and use it to avoid these issues.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-08 16:00:09 -04:00
Vishnu Banavath c27462f2ae arm-bsp/ffa-debugfs: update git SHA for v2.1.0
git sha on
https://git.gitlab.arm.com/linux-arm/linux-trusted-services/-/tree/v2.1.0
has been changed recently for v2.1.0 tag. This change is to update
ffa-debugfs-mod_2.1.0.bb to fetch correct git SHA.

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
2022-09-07 09:22:46 +01:00
Rui Miguel Silva c039d1601f arm-bsp: trusted-services: fix openamp build
With the latest gcc, there were some unresolved symbols on
opemamp linkage, add the implementation of that symbol for the
outline of atomics.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-06 13:00:10 -04:00
Ross Burton 1f7e8b6de9 gem5/linux-yocto: upgrade to 5.4.205 and fix buildpaths in binaries
Upgrade to the latest 5.4 release (.205), and backport two patches to
fix buildpath errors:

File /usr/src/debug/linux-yocto/5.4.205+gitAUTOINC+e8c675c7e1_8a59dfded8-r0/lib/oid_registry_data.c in package linux-yocto-src contains reference to TMPDIR
File /usr/src/debug/linux-yocto/5.4.205+gitAUTOINC+e8c675c7e1_8a59dfded8-r0/drivers/tty/vt/consolemap_deftbl.c in package linux-yocto-src contains reference to TMPDIR [buildpaths]

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-06 12:00:08 -04:00
Peter Hoyes 52f07a4b0b arm/oeqa: Make linuxboot test case timeout configurable
In complex stacks, e.g. with many cores or many init scripts, the time
to Linux shell may be more than 10 minutes. Make the boot timeout
configurable using TEST_FVP_LINUX_BOOT_TIMEOUT, leaving the default
value at 10 minutes.

Issue-Id: SCM-4958
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Ie074acd4b4509d0230d1f77a2a527d497bb295ce
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-09-01 06:00:07 -04:00
Anton Antonov a19249a385 Define qemuarm64-secureboot-ts CI pipeline and include it into meta-arm
qemuarm64-secureboot-ts pipeline is based on qemuarm64-secureboot machine
and additionaly includes:
- TS Crypto, Storage, ITS, Attestation and SMM-Gateway SPs into optee-os image
- TS demo/test tools
- TS psa-arch-tests

This commit also includes Trusted Services OEQA tests

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-31 14:53:49 -04:00
Anton Antonov 63b960c7c8 Include Trusted Services SPs into optee-os image
Required TS SPs can be included into optee-os image using MACHINE_FEATURES:

ts-its         - Internal Storage SP
ts-storage     - Storage SP
ts-crypto      - Crypto SP
ts-attestetion - Attestation SP
ts-se-proxy    - SE Proxy SP
ts-smm-gateway - SMM Gateway SP

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-31 14:53:49 -04:00
Anton Antonov 3076df522a psa-api-tests for Trusted Services
Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-31 14:53:49 -04:00
Anton Antonov 441d6f4c3f Trusted Services test/demo NWd tools
Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-31 14:53:49 -04:00
Anton Antonov 32e3759b0a ARM-FFA kernel drivers and kernel configs for Trusted Services
This commit includes:
- arm-ffa-tee and arm-ffa-user kernel drivers
- ARM_FFA_TRANSPORT kernel option
- Backported pacthes for kernel 5.15

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-31 14:53:49 -04:00
Anton Antonov 85494c88f3 Recipes for Trusted Services Secure Partitions
We define dedicated recipes for all supported TS SPs.

The recipes produce stripped.elf and DTB files for SPs.
These files are automatically included into optee-os image.
See meta-arm/recipes-security/trusted-services/optee-os-ts.inc

This approach allows us to:
- include only required SPs into an optee-os image using MACHINE_FEATURES
- use Yocto cmake bbclass
- fetch and build only required dependencies
- use simple SP specific bbapend files if required

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-31 14:53:49 -04:00
Anton Antonov 805054c292 Recipes for Trusted Services dependencies.
These recipes produce only -dev and -staticdev packages
which are used for building other TS recipes.

Nothing from these recipes is included into the final image.

Using dedicated recipes for dependencies allows us:
- fetch sources and build dependencies only once and only the required ones.
- simplify the dependencies recipes and use Yocto cmake bbclass
- troubleshoot/fix/update dependencies builds separately

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-31 14:53:49 -04:00
Jon Mason 8854f98d3c arm-bsp/corstone1000: use compressed kernel image
To fit the kernel image into the allotted space, a compressed kernel
image is now needed.  Use the Image.gz from the kernel build process
and change the relevant places to use the new image name.  This also
necessitates adding an unzip command to u-boot to uncompress it to
memory (and the loadm is still needed to setup the efi mem boot device).
Also, the unzipped image is larger than before.  So, increase the size
that loadm is copying.

This change shrinks the kernel image size from 7.8MB to 3.2MB

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-29 10:16:19 -04:00
Anton Antonov e16378f492 arm/tf-a-tests: work around RWX permission error on segment
Binutils 2.39 now warns when a segment has RXW permissions[1]:

- aarch64-poky-linux-musl-ld: tftf.elf has a LOAD segment with RWX permissions
- NOTE: recipe tf-a-tests-2.7.0-r0: task do_compile: Failed

There is a ticket filed upstream[2], so until that is resolved we can
disable this warning.

Also let's move a similar tf-a patch from trusted-firmware-a.inc to trusted-firmware-a_2.7.0.bb
as the patch is for tf-a version 2.7.0 only

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107
[2] https://developer.trustedfirmware.org/T996

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-29 08:55:29 -04:00
Anton Antonov 38daf1ff8c arm/optee-os: backport linker warning patches
When building for arm32 with GNU binutils 2.39, the linker outputs
warnings when generating some TEE core binaries.

 arm-poky-linux-gnueabi-ld.bfd: warning: atomic_a32.o: missing .note.GNU-stack section implies executable stack
 arm-poky-linux-gnueabi-ld.bfd: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
NOTE: recipe optee-os-tadevkit-3.18.0-r0: task do_compile: Failed

These patches are backport from upstream [1]

There are two versions of patches: for optee-os 3.14 and 3.18 to avoid patch fuzz warnings.

[1] https://github.com/OP-TEE/optee_os/pull/5499

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-26 06:00:09 -04:00
Anton Antonov e57163cf06 work around for too few arguments to function init_disassemble_info() error
binutils 2.39 changed the signature of init_disassemble_info(),
which now causes perf and bpftool to fail to compile.

Relevant binutils commit: [1]

There is a proper fix in development upstream[2].
This is a work-around for older kernels.

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=60a3da00bd5407f07d64dff82a4dae98230dfaac
[2] https://patchwork.kernel.org/project/netdevbpf/cover/20220801013834.156015-1-andres@anarazel.de/

Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
2022-08-23 22:59:57 -04:00
Jon Mason 0027806b53 arm/arm-bsp: Add yocto-kernel-cache bluetooth support
Add yocto kernel cache bluetooth entries for platforms that have that
machine feature enabled.  This is necessary, as kernel warnings about it
not being enabled are now occurring.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-23 15:26:18 -04:00
Anton Antonov ac4259011f arm/optee-os: backport RWX permission error patch
Signed-off-by: Anton Antonov <Anton.Antonov@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-22 13:00:08 -04:00
Ross Burton 977c5222d8 arm/trusted-firmware-a: work around RWX permission error on segment
Binutils 2.39 now warns when a segment has RXW permissions[1]:

  aarch64-none-elf-ld.bfd: warning: bl31.elf has a LOAD segment with RWX permissions

However, TF-A passes --fatal-warnings to LD, so this is a build failure.

There is a ticket filed upstream[2], so until that is resolved we can
disable this warning.

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107
[2] https://developer.trustedfirmware.org/T996

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-22 13:00:08 -04:00
Ross Burton 6ebafcc6d8 arm/trusted-firmware-a: remove redundant patches
These were integrated into the 2.7.0 release, but were not removed when
the recipe was upgraded.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-22 13:00:08 -04:00
Jon Mason 53870ee43e arm-bsp/fvp-base: set preferred kernel to 5.15
SSH tests are failing on the 5.19 kernel.  Temporarily set the kernel to
5.15 while debugging the issue.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-19 14:15:13 -04:00
Vishnu Banavath f85bec2a19 arm/optee: update optee-client to v3.18
This change is to update optee-client to v3.18

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-19 09:29:46 -04:00
Vishnu Banavath 5496260af7 arm-bsp/optee: add optee-os support for N1SDP target
These changes are to add support to build optee-os for N1SDP target.

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-16 10:00:08 -04:00
Vishnu Banavath 1badf7877f arm-bsp/trusted-firmware-a: Bump TF-A version for N1SDP
This change is to bump the TF-A hash which has changes required
for optee-os to boot. Also, drop patch related to bl size as the
changes are already merged to upstream TF-A.

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-16 10:00:08 -04:00
Jon Mason ba502ba11e arm/optee: Update to 3.18
Update all of the 3.17 recipes to 3.18 and remove the already upstreamed
patch.  optee-os was already at 3.18.  So, we only need to remove the
3.17 recipe.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-15 18:00:09 -04:00
Jon Mason 8058beeec1 atp/atp: drop package inherits
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-15 18:00:09 -04:00
Jon Mason 98c515f42e arm/fvp: use image-artifact-names as an image class
Per upstream commit, image-artifact-names must be used as an image
class

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-15 18:00:09 -04:00
Richard Purdie 2327cb3033 gem5/gem5-m5ops: Drop uneeded package inherit
package is always inheritted by the base classes so the recipe does not
need to do this. This became an error with recent bitbake changes, fix
things by removing it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-15 14:26:21 -04:00
Khem Raj 74cab68b96 optee-os: Add section attribute parameters when clang is used
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-15 14:26:05 -04:00
Khem Raj ee73c352cc gator-daemon: Define _GNU_SOURCE feature test macro
Needed for getting vasprintf API from libc

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-15 11:39:07 -04:00
Jon Mason 257c69f11f arm/qemuarm-secureboot: remove vmalloc from QB_KERNEL_CMDLINE_APPEND
The newly added vmalloc entry in qemuarm is causing issues with graphics
on qemuarm-secureboot.  Remove that by setting +QB_KERNEL_CMDLINE_APPEND
to empty.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-12 09:25:08 -04:00
Jon Mason 038ca93bed arm-bsp/juno: drop scmi patch
SCMI support was added to the latest kernel (kernel commit
96bb0954860a4c8b8c77d59fc53cd4cafac914f5).  So, remove this patch, as it
is no longer necessary

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-12 09:25:08 -04:00
Jon Mason 769a09da7c arm/linux-yocto: remove optee num pages kernel config variable
This kernel config variable has been removed from newer kernels (v5.19)
and is logging a warning of:
[INFO]: the following symbols were not found in the active configuration:
     - CONFIG_OPTEE_SHM_NUM_PRIV_PAGES

Remove the entry, as it is no longer needed

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-11 10:00:09 -04:00
Jon Mason 2a92d6294d arm/qemuarm64-secureboot: remove tfa memory patch
The TF-A memory patch was upstreamed and is not needed for newer kernels
(like v5.19)

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-11 10:00:09 -04:00
Jon Mason 7617120602 arm-bsp/fvp-base-arm32: Update kernel patch for v5.19
In newer kernels, vexpress has been rolled under the versatile umbrella.
Update the patch to refer to the new location

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-11 10:00:09 -04:00
Rui Miguel Silva dfe6d2f1eb arm-bsp/corstone1000: rebase u-boot patches on top v2022.07
Rebase the u-boot patches on top of current u-boot supported
version in poky, needed some adjustments at efi loader.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-09 15:00:08 -04:00
Rui Miguel Silva df1461b7d5 arm-bsp:corstone500: rebase u-boot patches on v2022.07
Rebase corstone500 on top of v2022.07, since the version is
the one used upstream.

Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
2022-08-09 09:32:25 -04:00
Peter Hoyes f83aad2ba9 docs: Introduce meta-arm OEQA documentation
Add documentation for how to use the OEQA framework to test targets in
meta-arm. Include instructions on using OEFVPTarget as well as the
OEFVPSerialTarget introduced by the recent refactor of runfvp.

Issue-Id: SCM-4954
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I146ec1c82214471fe9d18a999fd92efb38f652f9
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-05 11:00:12 -04:00
Peter Hoyes 74a36b024f docs: Update FVP_CONSOLES in runfvp documentation
The runfvp refactor to enable OEFVPSerialTarget created FVP_CONSOLES
which maps the names used for serial ports in test cases to the names
used for serial ports in the FVP stdout.

Refactor the FVP_CONSOLE section -> FVP_CONSOLES, noting the the
'default' console is still used for the --console runfvp flag.

Issue-Id: SCM-4954
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Ieb13d74cfd425900f44b4b2e6d125393e7b456ad
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-05 11:00:12 -04:00
Gowtham Suresh Kumar 44c58b3e55 arm-bsp/u-boot: drop EFI GetVariable() workarounds patches
The dropped u-boot patches are not required as the bug is
from the SMM Gateway SP. A patch for the secure partitions
has been added to fix the SMM Gateway behaviour. Patch
0048-Fix-UEFI-get_variable-with-small-buffer.patch has been
added in commit "arm-bsp/secure-partitions: fix SMM gateway
bug for EFI GetVariable()".

Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-05 11:00:08 -04:00
Gowtham Suresh Kumar 268f98c128 arm-bsp/secure-partitions: fix SMM gateway bug for EFI GetVariable()
The efiGetVariable() function when called from uboot with data size
set to 0 should return only the data size and not the actual data in
the end of the buffer based on the EFI 2.9 spec. This patch fixes
the bug.

Signed-off-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-05 11:00:08 -04:00
Peter Hoyes 20a629180c runfvp: Stop the FVP when telnet shuts down cleanly
At the moment, when using the --console flag, if telnet is shut down
cleanly (i.e. by typing "quit" at the prompt instead of Ctrl+C), runfvp
still waits on the FVP to exit of its own accord, so hangs.

Move the fvp.run() call so that when telnet quits, it immediately
proceeds to shut down the FVP.

Issue-Id: SCM-4954
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I2169c99586a1eebc2c6ab4b2e15fb0c769fc81a8
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-03 09:34:16 -04:00
Changqing Li 80d60e7b1c optee-os.inc: support multilib
Run command: bitbake optee-os && bitbake lib32-optee-os
bitbake lib32-optee-os will fail with following error since
bitbake optee-os already deploy same file under the path.
RROR: lib32-optee-os-3.12.0+gitAUTOINC+3d47a131bc-r0 do_deploy: The recipe lib32-optee-os is trying to install files into a shared area when those files already exist. Those files and their manifest location are:
  /build/tmp-glibc/deploy/images/qemuarm64/optee/tee.elf
    (matched in manifest-qemuarm64-optee-os.deploy)

Fix by deploy them to differernt dir

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-02 03:00:18 -04:00
Jon Mason 10034c0b88 arm-bsp/corestone1000: update trusted-service patches for devtool
Current secure-partitions patches do not apply cleanly with devtool.
Update them with the necessary changes to address this issue, and
regenerate them via devtool.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-01 11:00:08 -04:00
Qi Feng bac180f7a8 arm-bsp/fvp-baser-aemv8r64: Rebase u-boot patches onto v2022.07
- 0001-vexpress64-Add-BASER_FVP-vexpress-board-variant.patch

  Change to 0002-vexpress64-add-MPU-memory-map-for-the-BASER_FVP.patch.
  Only MPU memory map is preserved, other parts have been upstreamed.

- 0007-vexpress64-Configure-memory-using-device-tree.patch

  Deleted. Upstreamed in commit 1a1143a45457161e90ea4cd5f3b0561d924ed8fe

Signed-off-by: Qi Feng <qi.feng@arm.com>
Issue-Id: SCM-5030
Change-Id: I4aab3bab545e64e3a4a3a3fd67bcef79acdc41be
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-08-01 05:00:08 -04:00
Khem Raj 31452ae4cf optee-test: Use system openssl on musl
bundled libcrypto.a in optee-test sources is built using glibc based
toolchain and expects foritied _chk version of the libc functions e.g. __sprintf_chk
which wont work for musl. Therefore rely on freshly built openssl by OE
instead

Fixes errors like

arm-yoe-linux-musleabi/gcc/arm-yoe-linux-musleabi/12.1.0/ld: ../openssl/lib/arm/libcrypto.a(dso_dlfcn.o): in function `dlfcn_name_converter':
dso_dlfcn.c:(.text+0x19e): undefined reference to `__sprintf_chk'

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-30 13:00:08 -04:00
Vishnu Banavath 1a14fe181d arm/optee: support optee-os v3.18.0
This change is to add yocot recipe to support optee-os
3.18.0 version.
Also, move the SRC_URI:append and DEPENDS to optee-os.inc
as these are common accross different optee versions.

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-29 13:49:58 -04:00
Ross Burton 1eb9cd9416 arm/fvp: upgrade FVPs
Upgrade the FVPs to the latest releases, and do some cleanups for future
changes.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-29 13:49:58 -04:00
Jon Mason 6e4522e1c6 CI: remove zephyr specific testimage hacks
meta-zephyr recently was fixed to allow for autotest.  Remove all the
zephyr testing hacks and use that.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-27 13:00:08 -04:00
Peter Hoyes ef879b5fb8 arm/oeqa: Fix regex warning in linuxboot test case
The linuxboot test case prints the following in log.do_testimage, only
when executing testimage without a pycache:

  linuxboot.py:18: DeprecationWarning: invalid escape sequence \:
    self.target.expect(self.console, "login\:", timeout=10*60)

Fix the warning by escaping the ':' character correctly in the pexpect
regex.

Issue-Id: SCM-4957
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I8ad54c7df6b7d1d1ddeab31cf66daff1ab84e227
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-26 12:55:26 -04:00
Adam Johnston d11e253b11 arm-bsp/sdcard-image-n1sdp: Fix N1SDP dependencies
When enabling trusted boot, the UEFI binary was replaced with a FIP image (which
contains the UEFI binary), therefore the SD card image should depend on
trusted-firmware-a rather than edk2-firmware.

Signed-off-by: Adam Johnston <adam.johnston@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-26 11:08:08 -04:00
Jon Mason 0f831768d5 Revert "CI: add workaround for zephyr"
This reverts commit 0cdcb8eed4.
2022-07-26 10:54:36 -04:00
Jon Mason 64ddea9442 arm-bsp: add u-boot v2022.04 support
Upstream has updated u-boot to v2022.07, but the update is causing
problems with some machines.  Temporarily add a v2022.04 recipe until
the issues can be resolved.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-25 19:26:51 -04:00
Jon Mason 1590c21805 ci: do sato by default
Change to use sato by default.  Unfortunately, there are some bugs found
by this change.  For those systems, change it back to base until the
issues can be resolved.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-22 13:00:07 -04:00
Jon Mason da044c88cd CI: use uboot instead of none for juno
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-22 13:00:07 -04:00
Jon Mason 2ae5842553 ci/qemu-cortex-m3: remove common test
The common test has a timing issue, causing it to intermittently fail.
Since it is not unique to our environment, remove it to prevent false
positive regressions.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-22 13:00:07 -04:00
Ross Burton d9d1399b37 arm/trusted-services: ignore buildpath warnings
Latest oe-core has enabled the buildpaths QA check, which warns if the
build paths are present inside binaries. This is because build paths in
deployed binaries is both information leakage and non-reproducible.

Until this is fixed, skip this check.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-19 17:00:18 -04:00
Ross Burton eac1792393 arm/trusted-firmware-m: ignore buildpath warnings
Latest oe-core has enabled the buildpaths QA check, which warns if the
build paths are present inside binaries. This is because build paths in
deployed binaries is both information leakage and non-reproducible.

Until this is fixed, skip this check.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-19 17:00:18 -04:00
Ross Burton ee0a824a87 arm/trusted-firmware-a: ignore buildpath warnings
Latest oe-core has enabled the buildpaths QA check, which warns if the
build paths are present inside binaries. This is because build paths in
deployed binaries is both information leakage and non-reproducible.

Until this is fixed, skip this check.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-19 17:00:18 -04:00
Ross Burton 6c7399be0c arm/optee: ignore buildpath warnings
Latest oe-core has enabled the buildpaths QA check, which warns if the
build paths are present inside binaries. This is because build paths in
deployed binaries is both information leakage and non-reproducible.

Until this is fixed, skip this check.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-19 17:00:18 -04:00
Ross Burton 503d45e41a arm/linux-arm64-ack: fix buildpaths in the OID registry
Backport two patches from upstream to ensure the build doesn't contain
build paths.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-19 17:00:18 -04:00
Ross Burton 04aeb9e548 arm/hafnium: ignore buildpath warnings
Latest oe-core has enabled the buildpaths QA check, which warns if the
build paths are present inside binaries. This is because build paths in
deployed binaries is both information leakage and non-reproducible.

Until this is fixed, skip this check.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-19 17:00:18 -04:00
Ross Burton 411519915c arm/edk2-firmware: ignore buildpath warnings
Latest oe-core has enabled the buildpaths QA check, which warns if the
build paths are present inside binaries. This is because build paths in
deployed binaries is both information leakage and non-reproducible.

Until this is fixed in edk2-firmware, skip this check.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-19 17:00:18 -04:00
Ross Burton 53795134de CI: ignore buildpaths QA check in clang builds
If clang builds assembler code the debug symbols contain unmapped build
paths which trigger the buildpaths QA check. This bug has been filed
with upstream:

https://github.com/llvm/llvm-project/issues/56609

Until it is fixed, exclude buildpaths from clang builds so that CI can
pass.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-19 17:00:18 -04:00
Ross Burton 7d4ede3298 CI: use apt-get instead of apt wrapper
When used in a non-interactive context, apt prints a warning:

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Use apt-get directly to avoid putting warnings in the logs.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-19 17:00:18 -04:00
Adam Johnston 1abc39e269 arm-bsp/edk2-firmware: Add NT_FW_CONFIG to N1SDP to fix aborts when accessing virtual memory
NT_FW_CONFIG DTB contains platform information passed by TF-A boot
stage. This information is used for Virtual memory map generation
during PEI phase and passed on to DXE phase as a HOB, where it is used
in ConfigurationManagerDxe.

Signed-off-by: Adam Johnston <adam.johnston@arm.com>
2022-07-19 11:52:18 +00:00
Peter Hoyes 6481a473d8 arm/lib: Improve FVPRunner shutdown logic
We have encountered intermittent hanging during FVP shutdown, so improve
the termination logic by first issuing a terminate(), waiting a bit
then, if necessary, issuing a kill().

Move returncode logic to after the telnet/pexpect cleanup so it
actually runs.

Move pexpect.EOF logic into FVPRunner.stop so that it executes before
closing the pexpect handle.

Issue-Id: SCM-4957
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Iebb3c3c89367256b1e116e66ffdb6b742358bce4
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-18 11:42:29 -04:00
Peter Hoyes 7f611a0d2e arm/oeqa: Use linuxboot and OEFVPSerialTarget instead of noop
Create a new "linuxboot" test that uses the pexpect methods on
OEFVPSerialTarget to wait for a Linux login shell.

Switch to this test method for fvp-baser-aemv8r64, corstone500 and
corstone1000.

Issue-Id: SCM-4957
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Idd749652ee72e244b7a3831dd2295e0bfaed3bfa
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-12 07:00:13 -04:00
Peter Hoyes 30b1452025 arm/oeqa: Create new OEFVPSerialTarget with pexpect interface
Refactor OEFVPTarget into new base class, OEFVPSSHTarget. OEFVPTarget
extends OEFVPSSHTarget and additionally waits for a Linux login prompt
for compatibility with tests in OE-core.

OEFVPSerialTarget also extends OEFVPSSHTarget. It also exposes the
entire API of pexpect, with the first argument being the
FVP_TEST_CONSOLE varflag key. It logs each console output to separate
files inside the core-image-minimal work directory.

Issue-Id: SCM-4957
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I1b93f94471c6311da9ee71a48239640ee37de0af
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-12 07:00:13 -04:00
Peter Hoyes ff90c8ad54 arm/classes: Change FVP_CONSOLE to FVP_CONSOLES in fvpconf
So that the test target can connect to the desired console(s) as soon
as they appear in the FVP stdout, add the variable FVP_CONSOLES to the
fvpconf as a replcaement for FVP_CONSOLE. The varflags of this variable
define a mapping between FVP console names (e.g. terminal_0) and console
names in the tests (e.g. 'zephyr'). The console defined in
FVP_CONSOLE is automatically mapped as 'default' for backwards
compatibility.

This also enables greater reuse of test cases, as the "default" console
name can be remapped on a per-machine basis.

Issue-Id: SCM-4957
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I9d88b172bfc5a5459b9f5132f287c70816d7fb55
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-12 07:00:13 -04:00
Peter Hoyes b3ab04f813 arm/oeqa: Refactor OEFVPTarget to use FVPRunner and pexpect
Refactor OEFVPTarget to use the FVPRunner in meta-arm/lib instead of
calling runfvp in a new process.

Use pexpect to wait for the login prompt instead of parsing the FVP
output manually.

This patch introduces a dependency on pexpect for the meta-arm test
targets. It is already in the Yocto host dependency list and the Kas
container image, but may need to be installed on development machines.

Issue-Id: SCM-4957
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I7200e958c5701d82493287d021936afcf2f2bac9
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-12 07:00:13 -04:00
Peter Hoyes 5ec49f964b arm/oeqa: Add selftests for FVP library
Create basic tests for conffile and runner in meta-arm/lib/fvp

Issue-Id: SCM-4957
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I1684b0c99fb4fd5299df19f00abb30e8faab3495
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-12 07:00:13 -04:00
Peter Hoyes 306639bbd5 scripts,arm/lib: Refactor runfvp into FVPRunner
Refactor runfvp into a "fvp" library inside meta-arm. Split into
terminal, conffile and runner.

Issue-Id: SCM-4957
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I797f9a4eab810f3cc331b7db140f59c9911231fd
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-12 07:00:13 -04:00
Bertrand Marquis a25192f51d runfvp: ignore setpgid errors when spawned
When runfvp is spawned from an other process (for example except), it is
throwing a permission error.
To solve the problem, surround the call to setpgid with a try/except and
ignore the permission errors.

Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-07-07 05:00:08 -04:00
Adam Johnston 8a0a9c3d32 arm-bsp/sdcard-image-n1sdp: N1SDP trusted boot
This commit configures N1SDP firmware for TBBR bootflow as follows:
* uefi.bin replaced with with fip.bin
* load address adjusted for FIP image

Signed-off-by: Adam Johnston <adam.johnston@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-30 06:00:08 -04:00
Adam Johnston eaf0fdbdbf arm-bsp/scp-firmware: N1SDP trusted boot
This commit configures scp-firmware for TBBR bootflow as follows:
* Updates SCP FW to master
* BL31 replaced in the SCP firmware image with BL1

Signed-off-by: Adam Johnston <adam.johnston@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-30 06:00:08 -04:00
Adam Johnston 996e82250e arm-bsp/trusted-firmware-a: N1SDP trusted boot
This commit configures trusted-firmware-a for TBBR bootflow on N1SDP as follows:
* Trusted boot is enabled.
* Generation of root-of-trust is enabled
* All TB images (BLx, DTBs) are built
* uefi.bin is specified as the BL33 image
* BL2, BL31, BL33 are signed and stored in the FIP
* N1SDP platform sources are patched to increase max size BL2 and reduce max size of BL1

Signed-off-by: Adam Johnston <adam.johnston@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-30 06:00:08 -04:00
Adam Johnston 893c884b06 arm-bsp/n1sdp: revert "fix boot due to TF-A 2.7 update"
This reverts commit ea3479c27c.

Signed-off-by: Adam Johnston <adam.johnston@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-30 06:00:08 -04:00
Jon Mason cab723f015 arm/edk2-firmware: devtool changes
Make the changes necessary to allow for devtool to be used on edk2
sources.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-29 08:59:13 -04:00
Jon Mason 47264aff0b ci: update edk2 yml file to work with qemuarm/qemuarm64
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-24 14:00:07 -04:00
Jon Mason 493690f0d1 arm/edk2: add support for qemuarm and qemuarm64
Add basic support for running edk2 on qemuarm and qemuarm64.  This
necessitated the need to add ACPI and EFI to the default kernel configs
for these machines.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-24 14:00:07 -04:00
Leo Yan 6ef5382ffe optee-ftpm: Update to "main" branch
Since the github repository doesn't contain a "master" branch but has the
"main" branch now, this patch updates to the "main" branch so can
download the repository successfully.

CC: Ilias Apalodimas <ilias.apalodimas@linaro.org>
CC: Jerome Forissier <jerome.forissier@linaro.org>
CC: Peter Griffin <peter.griffin@linaro.org>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-23 09:39:34 -04:00
Jiamei Xie 84a0813ae1 arm-bsp/fvp-baser-aemv8r64: Use secure hypervisor physical timer in EL2
Arm generic timer provides different timers for different exception
levels and different secure states. Because Armv8-R AArch64 has secure
state only, the valid timer for hypervisor in EL2 is secure hypervisor
physical timer. But for platform fvp-baser-aemv8r64, before FVP 11.18,
the secure hypervisor physical timer could not work well in EL2, so we
had been using Non-secure physical timer in EL2 for hypervisor as a
workaround.

Since secure hypervisor physical timer issue has been fixed from FVP
11.18, we can use this correct timer in EL2 for hypervisor now. So we
update the device tree timer node to use secure hypervisor physical
timer interrupt for hypervisor.

About the interrupt assignments of FVP, please refer to
https://developer.arm.com/documentation/100964/latest/Base-Platform/Base---interrupt-assignments

Issue-Id: SCM-4596
Signed-off-by: Jiamei Xie <jiamei.xie@arm.com>
Change-Id: I9d4b9f4e0ed14c6c1567269c83696ceb9ff84ac8
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-22 09:41:20 -04:00
Peter Hoyes a4e153dd7b arm-bsp/docs: Update fvp-baser-aemv8r64 U-Boot version to 2022.04
Issue-Id: SCM-4388
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: Id75f5fd56c04039da3ff976c85776b5e1706939a
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-22 09:41:20 -04:00
Peter Hoyes cf2e519825 arm/fvp-base-r-aem: Upgrade to version 11.18.16
The new FVP includes the arch in the download filename, so refactor
FVP_ARCH in fvp-common.inc to make "Linux64" available in the recipe
file.

Update version and EULA URL in documentation.

Issue-Id: SCM-4388
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I3ddc29cd444b78634086f2aefe4f52799eb937b1
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-22 09:41:20 -04:00
Xueliang Zhong ea3479c27c arm-bsp/n1sdp: fix boot due to TF-A 2.7 update
N1SDP board cannot boot after recent TF-A 2.7 update in meta-arm.  This
is due to TF-A 2.7 not configured correctly for N1SDP board to support
trusted boot feature.

This patch temporarily brings back TF-A 2.6 recipes for fixing the N1SDP
boot.

A proper fix is in work progress to configure TF-A 2.7 correctly to
support trutsed boot on N1SDP.

Signed-off-by: Xueliang Zhong <xueliang.zhong@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-22 09:41:01 -04:00
Jon Mason 658de4e5e2 ci: work around zephyr test issues
zephyr uses icount to improve test accuracy on virtual hardware.  Do
the same here for the same reason for the platforms that actually test.
Also, the common test now appears to work for microbit-v1 and poll doe
snot work for qemu-cortex-m3

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-22 09:40:23 -04:00
Rupinderjit Singh 5cb7b14e03 arm-bsp/scp-firmware: Migrate SCP firmware recipes from Makefile to Cmake
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-20 13:12:37 -04:00
Ross Burton 391ba0be67 arm/trusted-firmware-a: rename to 2.7.0 to match upstream
The upstream version is 2.7.0, so use that name instead of just 2.7.

Also remove the unversioned bbappend which simply extended
FILESEXTRAPATHS, there's no need for this split now that we aim to have
~1 version of TF-A in the tree.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-16 11:36:25 -04:00
Ross Burton 60d9cb303d arm-bsp/trusted-firmware-a: remove SGI-575 workaround
The SGI-575 build is successful with branch protection enabled, so remove
this workaround.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-16 11:36:25 -04:00
Kamil Dziezyk eb0fa05262 arm/generic-arm64: Include generic-arm64-standard.scc into kernel config
To allow bitbake including the 'generic-arm64-standard.scc' into the kernel
configuration, it has to be included as a kmeta type source to the SRC_URI.

Issue-Id: SCM-4394
Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com>
Change-Id: Iaebd0c7758038843a1d0f37decbef057629bf0bb
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-16 09:38:35 -04:00
Ross Burton 7013204337 arm-toolchain/androidclang: move to libexecdir
Binaries shouldn't be in datadir, and now the RPATHs are being cleared
we can put them in libexecdir.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-16 08:00:07 -04:00
Ross Burton c4041b667d arm-toolchain/androidclang: strip meaningless RPATHS
As per [1], target builds of androidclang produce useless-rpath errors.

/usr/share/clang-r416183b/python3/lib/python3.9/lib-dynload/_posixsubprocess.cpython-39-x86_64-linux-gnu.so
contains probably-redundant RPATH /../lib [useless-rpaths]

Those RPATHs are of no use, so we can remove them entirely.

[1] https://errors.yoctoproject.org/Errors/Details/640604/

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-16 08:00:07 -04:00
Ross Burton 67b662a996 arm/edk2-firmware: upgrade to 2022.05
Add a patch to fix uninitialized varibles, detected by Clang when
building for Juno. However, whilst it now compiles it can't generate
firmware images correctly, so it has to remain forcing GCC.

Remove the workaround to force debug builds when using Clang, as this is
now fixed.

Drop upstreamed patches from sbsa-acs.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-06-15 08:23:20 -04:00
Jon Mason 36b43bc327 arm/optee: update to v3.17
Update the recipes to v3.17 and remove v3.16

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-14 17:00:09 -04:00
Jon Mason a355384290 arm/trusted-firmware-a: Update to 2.7.0
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-14 14:01:36 -04:00
Jon Mason 7aa3997684 arm-bsp: Remove old, unused u-boot recipes
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-14 14:01:14 -04:00
Jon Mason 9722278593 arm-bsp/fvp-base-arm32: rebase for u-boot 2022.04
This is not a clean rebase.  The patch had to be modified to apply and
work on v2022.04.  It is not very elegant, but it is functional.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-14 14:01:14 -04:00
Jon Mason 84f7dd6243 arm-bsp/fvp-base: get v2022.04 u-boot working
Recent modifications in u-boot moved the default location of the FDT.
Update the runfvp parameters to match this new location.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-14 14:01:14 -04:00
Jon Mason a2ff119a6c arm-bsp/corestone1000: Update to u-boot v2022.04
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-14 14:01:14 -04:00
Jon Mason 55feeb942e arm-bsp/tc: Update to u-boot v2022.04
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-14 14:01:14 -04:00
Jon Mason 170f0b43ba arm-bsp/juno: Update to u-boot v2022.04
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-14 14:01:14 -04:00
Xueliang Zhong ac2a323ab2 arm-bsp/n1sdp: upgrade board-firmware version
Upgraded N1SDP board-firmware to N1SDP-2021.10.12 version.

Signed-off-by: Xueliang Zhong <xueliang.zhong@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-14 14:01:14 -04:00
Ross Burton 1a41710d51 CI: remove armcompiler references
Arm Compiler has been removed, so remove it from the CI.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-08 06:00:13 -04:00
Ross Burton 24c4cfa2aa arm-toolchain/armcompiler: remove recipe
As far as we know nobody is actually using the Arm Compiler recipe: 6.17
does a network operation on every call to check the license and this
fails with the network isolation that do_compile has in kirkstone, and
6.18 is behind a loginwall so we cannot download it in a recipe.

Unless we have actual users asking for a recipe, remove it from the layer
to avoid confusion.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-08 06:00:13 -04:00
Ross Burton 5e67334060 arm/trusted-firmware-m: remove compiler options
The recipe supports the use of both Arm's binary GCC (aka GNU Arm
Embedded Compiler, or gnu-rm) and binary Clang (aka Arm Compiler).
However, armcompiler was never tested and doesn't work: 6.17 does a
network operation on every call to check the license which fails with
the network isolation in do_compile tasks, and 6.18 is behind a
loginwall so we can't automatically fetch it in a recipe.

Simplify the recipe to hardcode the use of gnu-rm, and remove the clang
support.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-08 06:00:13 -04:00
Ross Burton 7007a9c0ea arm-toolchain/gcc-arm-none-eabi: upgrade to 11.2-2022.02
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-08 06:00:09 -04:00
Ross Burton 5c9017f7fd arm-toolchain/gcc-aarch64-none-elf: upgrade to 11.2
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-08 06:00:09 -04:00
Ross Burton ab7144ff19 CI: upgrade external GCC to 11.2
Our CI is now running on Broadwell+ cores, so the 11.2 release of GCC
should work.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-08 06:00:09 -04:00
Peter Hoyes d9abae2a57 arm-bsp/conf: fvp-baser-aemv8r64 model parameter update
Add parameters required to boot with cache_state_modelled enabled:
 * bp.virtio_net.secure_accesses=1
 * bp.virtio_rng.secure_accesses=1
 * bp.virtioblockdevice.secure_accesses=1
 * cci400.force_on_from_start=1

Add bp.ve_sysregs.exit_on_shutdown=1 to match fvp-base.

Remove parameters that are not required to boot or are setting the
default value.

Alphabetize list.

Issue-Id: SCM-4304
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I0a696eff5bb83206e5501f651c487f16f695aa4c
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-07 05:00:08 -04:00
Peter Hoyes 3a7247176c arm-bsp/u-boot: fvp-baser-aemv8r64 cache_state_modelled fixes
Running the FVP_Base_AEMv8R model with the cache_state_modelled
parameter enabled exposed some defects in the U-Boot BSP patches for the
fvp-baser-aemv8r64:
 * The MPU memory attributes are inconsistent with the existing MMU
   attributes, causing a model hang when sending packets using
   virtio-net in U-Boot.
 * The instruction cache was left disabled after booting an EFI payload
   at S-EL1, causing some EFI apps (e.g. Grub) to hang when attempting
   to use dynamically loaded modules.

The cache_state_modelled FVP parameter is enabled by default in the
model (for simulation accuracy) but is disabled by default in the
machine conf (for simulation speed).

Add two additional machine-specific U-Boot patches to fix the above
issues.

Issue-Id: SCM-4641
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I5ab13c9fdadd82456ac3f3e3703df36590d52fb7
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-07 05:00:08 -04:00
Peter Hoyes 3d91266704 arm-bsp/u-boot: Update fvp-baser-aemv8r64 patches for v2022.04
The backports are now merged, so remove patches 1 through 5 and
renumber.

Upstream now requires CONFIG_DEFAULT_DEVICE_TREE to be defined, even if
unused, so backport relevant portions of upstream BASER_FVP patch into
the board suppport patch.

Issue-Id: SCM-4304
Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
Change-Id: I327e8aba3463f088bba40e83893c6f15beabb250
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-07 05:00:08 -04:00
Jon Mason 56287f9505 arm-bsp: add u-boot v2022.01 support
Upstream has updated u-boot to v2022.04, but the update is causing
problems with some machines.  Temporarily add a v2022.01 recipe until
the issues can be resolved.

u-boot and zephyr hacking

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-01 15:00:07 -04:00
Jon Mason 0cdcb8eed4 CI: add workaround for zephyr
GCC 12 is causing problems in newlib, which is causing problems for
zephyr.  Add a workaround until those issues can be resolved.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-01 15:00:07 -04:00
Jon Mason c8780e8063 CI: use upstream master branch
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-06-01 15:00:07 -04:00
Jon Mason 0c4c33de09 CI: make qemuarm-secureboot builds more thorough
Build all the things that qemuarm64-secureboot builds, removing those
that fail to compile.  Unfortunately, musl doesn't play nicely with
optee-test.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-23 16:44:22 -04:00
Ross Burton 232dc039d0 arm-toolchain/layer.conf: remove BB_DANGLINGAPPENDS_WARNONLY
This appears to be historical from when the toolchain was in meta-linaro.

It isn't needed anymore, there's one bbappend in meta-arm-toolchain for
grub which is part of oe-core, so will never be dangling.

This variable has a global effect, so leaving it in here has a negative
impact on users.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-23 13:17:59 -04:00
Ross Burton f41c961992 arm-bsp/linux-yocto: move 5.4 kernel recipe to meta-gem5
The only user of the old 5.4 kernel is meta-gem5, so move it into that
layer to keep it separate.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-23 13:17:59 -04:00
Abdellatif El Khlifi 005648c3f7 kas: corstone1000: drop the use of the FVP script
FVP script is replaced with the runfvp command.

Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-23 08:00:08 -04:00
Abdellatif El Khlifi eeee4d0010 kas: corstone1000: drop use of meta-arm-image
meta-arm-image is no longer supported.

Signed-off-by: Harry Moulton <harry.moulton@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-23 08:00:08 -04:00
Jon Mason 96941ae4ce arm/machine: use QB_GRAPHICS
QB_OPT_APPEND is being used for the graphics parameters, use QB_GRAPHICS
instead.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-18 09:50:01 -04:00
Jon Mason 8445f99eb0 arm-autonomy: remove README
meta-arm-autonomy has been EOLed for a release now.  Remove the README
and directory.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-18 09:39:58 -04:00
Jon Mason 1b7f2975e4 arm/linux-yocto: remove tcpci for generic-arm64
Per the comment, it's not necessary post 5.12.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-18 09:39:58 -04:00
Jon Mason e50f5221a3 arm/scp: remove support for version 2.9
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-18 09:39:58 -04:00
emeara01 c42e8bbf4e arm-bsp/trusted-firmware-a: increase BL2 size for TC
The new mbedtls version (v2.28) increase the size of TF-A slightly.
This commit increases the size of BL2 for TC, so that TF-A with updated
mbedtls version can fit.

Signed-off-by: Emekcan Aras <Emekcan.Aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-18 09:39:55 -04:00
emeara01 aa4d137309 arm-bsp/trusted-firmware-a: corstone1000: fix FF-A Version in SPMC manifest
FF-A version is defined 1.1 in corstone1000_spmc_manifest.dts. However, SPMC
does not support FF-A version 1.1 at the moment. This commit fixes FF-A version
issue by defining 1.0 again.

Signed-off-by: Emekcan Aras <Emekcan.Aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-18 09:39:55 -04:00
emeara01 36ccb480e9 arm/trusted-firmware-a: upgrade mbedtls to 2.28
The latest TF-A version requires mbedtls v2.28. This
commit upgrades mbedtls to v2.28 for TF-A recipe.
An upstreamed patch included to the base recipe from TF-A master
that fixes the build issues beween TF-A 2.6 and Mbedtls 2.28.

Signed-off-by: Emekcan Aras <Emekcan.Aras@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-18 09:39:55 -04:00
Ross Burton a52f85a2af Revert "arm-toolchain/external-arm-toolchain: set the version in the recipe"
This reverts commit ac83feb7cd.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-18 08:00:09 -04:00
Ross Burton 16fe716dc6 Revert "arm-toolchain/external-arm-toolchain: add back 10.3"
This reverts commit 5fec85b41d.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-18 08:00:09 -04:00
Ross Burton 047d2b391c CI: remove preferred version from external-gccarm
I misunderstood how the external-arm-toolchain recipes were working, the
latest revision of the recipe works with both 10.3 and 11.2.

Clean up my mess by dropping the PREFERRED_VERSION from the CI, and revert
the addition of versioned recipes.  Simply using the right tarball is
sufficient.

Thanks to Sumit Garg for noticing my mistake.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-18 08:00:09 -04:00
Jon Mason 35023b28c7 sbsa-acs: fix patch not applying issue
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-17 09:39:19 -04:00
Ross Burton 4c6ccb833c CI: use external-arm-toolchain 10.3
The 11.2 release of the Arm GCC uses Broadwell-onwards instructions, but
our CI (and many other users) have pre-Broadwell hardware.

Until 11.3 is released which fixes this, go back to using 10.3 for our CI.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-17 09:39:12 -04:00
Ross Burton 5fec85b41d arm-toolchain/external-arm-toolchain: add back 10.3
Add back the 10.3 release of external-arm-toolchain.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-17 09:39:12 -04:00
Ross Burton ac83feb7cd arm-toolchain/external-arm-toolchain: set the version in the recipe
We need to support multiple versions of external-arm-toolchain, partly as
different versions have different layouts on disk, and partly because
11.2 doesn't work on pre-Broadwell hardware.

Rename this recipe so the version is in the filename, and dynamically
set PKGV instead of PV so PREFERRED_VERSION is easier to use.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-17 09:39:12 -04:00
Ross Burton a3a6597cfd arm/linux-yocto: refresh skip-unavailable-memory.patch
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-17 08:27:01 -04:00
Ross Burton 9ef44ec196 arm/linux-yocto: fix boot failure in qemuarm64-secureboot
The boot crash that appears to be triggered by the ZONE_DMA patches has
been root-caused, so work around the problem whilst upstream figure out
the best way to fix.

Also, upgrade qemuarm64-secureboot to 5.15 instead of pinning back to
5.10.

Signed-off-by: Ross Burton <ross.burton@arm.com>
2022-05-16 11:16:18 -04:00
Khem Raj 53f1a7544d sbsa-acs: Fix build with gcc12
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-14 18:37:35 -04:00
Khem Raj 9c07b0c0d0 optee-spdevkit: Disable for 32bit arm
FFA secure partitions aren't supported on 32-bit Arm currently

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-14 18:37:19 -04:00
Khem Raj 62db19b371 optee-spdevkit: Apply the sysroot patches
These patches are needed for getting right C runtime library

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-14 18:37:19 -04:00
Ross Burton 79a20dc1d7 arm-bsp/optee-os-tadevkit: remove unused bbappend
TC uses 3.14, so remove the unused 3.16 bbappend.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-13 11:00:08 -04:00
Ross Burton 155a2f9ed4 arm-bsp/optee-client: remove bbappends
These bbappends do nothing, so remove them.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-13 11:00:08 -04:00
Ross Burton 7e09d10e23 arm-bsp/optee-os: remove 3.16 bbappend
Corstone-1000 and TotalCompute uses 3.14, so remove the 3.16 bbappend.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-13 11:00:08 -04:00
Ross Burton 6286e0d54c arm-bsp/optee-test: clean up bbappends
The 3.14 bbappend sets DEPENDS which are redundant as they're already
set in the base recipe.

Remove the unused 3.16 bbappend.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-13 11:00:08 -04:00
Ross Burton 4b94d77f69 arm-bsp/optee-os: set PV correctly for the corstone1000 build
The corstone1000 build of optee-os has a bbappend which uses a specific
non-upstream branch of optee-os which is actually based on 3.10, so set
PV appropriately in the recipe and update the PREFERRED_VERSION in
corstone1000.inc.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-13 11:00:08 -04:00
Vishnu Banavath f68fa49bca arm-bsp/tf-a-tests: Add recipe to build and install TFTF
TFTF is TF-A tests that runs at NS-EL2. This is primarily developed to
test the TF-A interfaces exposed to NS code.

Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-11 10:00:09 -04:00
Khem Raj cb2eb8e373 hafnium: Fix build when _Noreturn is not available
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Jon Mason <jon.mason@arm.com>
Cc: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-10 19:00:07 -04:00
Khem Raj 03f5819187 optee: Pass HOST_CC_ARCH for locating compiler runtime
This option is used to find the right path and file name of the C
runtime e.g. libgcc or compiler-rt, when using clang it needs to know if
compiler is using hard-float or not, since the compiler-rt file names
are different for these two ABIs libclang_rt.builtins-arm.a or libclang_rt.builtins-armhf.a
The option is computed in HOST_CC_ARCH for OE, this fixes build with
clang+llvm-runtime

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-10 18:00:07 -04:00
Ross Burton e651e248a7 CI: use kirkstone branches for meta-clang and meta-virtualization
These branches have kirkstone branches now, so use them.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-10 07:00:08 -04:00
Jon Mason faf7e47a38 ci: add qemuarm-secureboot
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-06 11:47:58 -04:00
Sumit Garg 7e4cbdb508 linux-yocto: tee.cfg: Enable TEE based fTPM driver
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-06 09:30:50 -04:00
Sumit Garg 152f94fa56 Add new target: "qemuarm-secureboot"
Add a new 32 bit target as "qemuarm-secureboot" on similar lines as
"qemuarm64-secureboot". The boot flow looks like:

BL1 (TF-A) -> BL2 (TF-A) -> OP-TEE -> u-boot -> Linux

Along with this enable support for OP-TEE based firmware TPM.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-06 09:30:50 -04:00
Ross Burton 28d6f6667b arm-bsp/corstone1000-*-image: mark these as corstone1000-specific
We don't want world builds failing as they try to build these for machines
other than Corstone 1000.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-06 09:29:50 -04:00
Ross Burton 80facbb124 arm/optee: remove redundant ${S} in LIC_FILES_CHKSUM
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-06 09:29:50 -04:00
Ross Burton c65eed7160 arm-toolchain/arm-binary-toolchain: ensure toolchains don't provide any system libraries
Use PRIVATE_LIBS to ensure that the Arm binary toolchains don't provide
their own libraries to the entire system.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-06 09:29:50 -04:00
Rupinderjit Singh 7793860123 arm-bsp/scp-firmware: upgrade TC to version 2.10
* Removed 0001-tc0-fix-sensor-data-api-call.patch as it has now been upstreamed.
* updated 0003-tc0-rename-platform-variant-to-platform-feature-set.patch to fix merge error.

Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
Change-Id: I71eafbea9e1f0b9f01a504fe0c8b81e43c24d613
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-05 09:23:45 -04:00
Arunachalam Ganapathy cdb6c65f0a arm-bsp/linux: TC: Add Trusty FFA adoption patches
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I5c152ca026dce2a7470d6ee7cfd84fa6b3f2e30a
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 13:00:25 -04:00
Arunachalam Ganapathy b36889fe71 arm-bsp/linux: TC: Add backport of Trusty driver
Backport of trusty driver. This adds Trusty driver from
android-trusty-5.10

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I5477ecfc1b67fc3786dbd062711d8cc8d4963744
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 13:00:25 -04:00
Arunachalam Ganapathy ad88391e95 arm-bsp/linux: TC: Add fixes in FFA driver
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I43498b3e66651d4ed8d2cedb7455f678ddf012d1
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 13:00:25 -04:00
Arunachalam Ganapathy 1ce52a31ae arm-bsp/linux: TC: Update backport patches of FFA driver
This updates the existing FFA driver to the latest upstream version.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: Idabf2d97cd497edc6c41e7132e1e82be8e717c59
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 13:00:25 -04:00
Ben Horgan 006503d94f arm-bsp/hafnium: TC: Support for trusty as a secure partition
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Change-Id: I2bbb77aa2f220f013cff53efe557df9960d237e3
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 13:00:25 -04:00
Arunachalam Ganapathy 559ecba813 arm-bsp/trusted-firmware-a: TC: Add Trusty SP support
This patch updates the SHA and include patches that enables Trusty
to run as SP on SEL2 SPMC.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I5586bb3aa592658be9421a4de23f44a69bfb0b2e
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 13:00:25 -04:00
Arunachalam Ganapathy 7ade3a68b2 arm-bsp/hafnium: TC: update SHA and remove upstreamed patches
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I33a7cc01040c6a2392d87763da9c0adc0c5bbe2d
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 13:00:25 -04:00
Arunachalam Ganapathy 55d4a414e7 arm-bsp/u-boot: TC: Upgrade to 2022.01 and add patch for secure DRAM size
- Upgrade U-boot to 2022.01
- Remove 8GB DRAM increase patch that is merged
- Add patch that update secure DRAM size

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I32735cb5e8cba67ac1c6082aadf9a55f7bf51e8a
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 13:00:25 -04:00
Arunachalam Ganapathy c9bb1eab44 arm-bsp/optee: TC: Set preferred version of OP-TEE to v3.14
This also adds missing optee-os-tadevkit, optee-test append files

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I1a217d9db7378f3ec711e984193b07ebb692e382
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 13:00:25 -04:00
Arunachalam Ganapathy 35445203d2 arm/optee: Add optee 3.14 recipes
Add back v3.14 optee-examples, optee-test, and optee-os-tadevkit for
TC platform compatibility. These files were removed as part of v3.16
upgrade.

Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: Ia12774125909e7f8bfc20a9797c25b04dd850ae7
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 13:00:25 -04:00
Ross Burton 68b1e2d3e3 arm-bsp/trusted-firmware-m: move corstone1000 to TF-M 1.6.0.
Move the TFM_PLATFORM assignment to the bbappend.

Drop the SRCREV changes, these are all incorporated into the 1.6.0
release.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 10:00:09 -04:00
Ross Burton 83df1de709 arm/trusted-firmware-m: upgrade to 1.6.0.
Upgrade all SRCREVs, and drop the merged patch to use cbor2.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-04 10:00:09 -04:00
Jon Mason 5ea8300b09 arm-bsp/trusted-firmware-m: corstone1000: remove unused patches
commit ab339b24d4 removed the reference to
these patches but did not remove them.  Removing now to clean-up the
tree.

Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-03 12:00:15 -04:00
Jon Mason b935fc6153 arm-bsp/trusted-firmware-a: corstone1000: remove unused patch files
commit 24db3b56ba removed references to
the patches, but did not remove the patches.

Suggested-by: Denys Dmytriyenko <denis@denix.org>
Signed-off-by: Jon Mason <jon.mason@arm.com>
2022-05-03 12:00:15 -04:00
631 changed files with 35771 additions and 20872 deletions
+45 -36
View File
@@ -43,6 +43,21 @@ stages:
extends: .setup
variables:
KUBERNETES_CPU_REQUEST: $CPU_REQUEST
rules:
# Don't run MR pipelines
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
# Don't run pipelines for tags
- if: $CI_COMMIT_TAG
when: never
# Don't run if BUILD_ENABLE_REGEX is set, but the job doesn't match the regex
- if: '$BUILD_ENABLE_REGEX != null && $CI_JOB_NAME !~ $BUILD_ENABLE_REGEX'
when: never
# Allow the dev kernels to fail and not fail the overall build
- if: '$KERNEL == "linux-yocto-dev"'
allow_failure: true
# Catch all for everything else
- if: '$KERNEL != "linux-yocto-dev"'
script:
- KASFILES=$(./ci/jobs-to-kas "$CI_JOB_NAME")
- kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf'
@@ -54,17 +69,6 @@ stages:
paths:
- $CI_PROJECT_DIR/work/build/tmp/work*/**/temp/log.do_*.*
# Workaround for Zephyr not currectly handling TESTIMAGE_AUTO
.build_and_test:
extends: .setup
script:
- KASFILES=$(./ci/jobs-to-kas "$CI_JOB_NAME")
- kas shell --update --force-checkout $KASFILES -c 'cat conf/*.conf'
- kas build $KASFILES
- kas build $KASFILES -c testimage
- ./ci/check-warnings $KAS_WORK_DIR/build/warnings.log
#
# Prep stage, update repositories once
#
@@ -80,6 +84,7 @@ update-repos:
# Available options for building are
# TOOLCHAINS: [gcc, clang, armgcc, external-gccarm]
# TCLIBC: [glibc, musl]
# FIRMWARE: [uboot, edk2]
# VIRT: [none, xen]
# TESTING: testimage
@@ -147,13 +152,7 @@ juno:
parallel:
matrix:
- TOOLCHAINS: [gcc, clang]
FIRMWARE: [none, edk2]
microbit-v1:
extends: .build_and_test
parallel:
matrix:
- TESTING: testimage-zephyr
FIRMWARE: [uboot, edk2]
musca-b1:
extends: .build
@@ -167,18 +166,6 @@ n1sdp:
matrix:
- TOOLCHAINS: [gcc, armgcc]
qemu-cortex-a53:
extends: .build
qemu-cortex-m3:
extends: .build_and_test
parallel:
matrix:
- TESTING: testimage-zephyr
qemu-cortex-r5:
extends: .build
qemu-generic-arm64:
extends: .build
parallel:
@@ -192,19 +179,31 @@ qemuarm64-secureboot:
matrix:
- TOOLCHAINS: [gcc, clang]
TCLIBC: [glibc, musl]
TS: [none, trusted-services]
TESTING: testimage
qemuarm64:
extends: .build
parallel:
matrix:
- TOOLCHAINS: [gcc, clang]
EFI: [uboot, edk2]
TESTING: testimage
- VIRT: xen
qemuarm-secureboot:
extends: .build
parallel:
matrix:
- TOOLCHAINS: [gcc, clang]
TESTING: testimage
qemuarm:
extends: .build
parallel:
matrix:
- TOOLCHAINS: [gcc, clang]
EFI: [uboot, edk2]
TESTING: testimage
- VIRT: xen
@@ -217,11 +216,6 @@ qemuarmv5:
sgi575:
extends: .build
tc0:
extends: .build
tags:
- x86_64
tc1:
extends: .build
tags:
@@ -244,7 +238,7 @@ check-layers:
"yocto-check-layer-wrapper $CI_PROJECT_DIR/$LAYER --dependency $CI_PROJECT_DIR/meta-* $KAS_WORK_DIR/meta-openembedded/meta-oe --no-auto-dependency"
parallel:
matrix:
- LAYER: [meta-arm, meta-arm-bsp, meta-arm-toolchain, meta-gem5]
- LAYER: [meta-arm, meta-arm-bsp, meta-arm-toolchain, meta-gem5, meta-atp]
pending-updates:
extends: .setup
@@ -275,3 +269,18 @@ metrics:
script:
- kas shell --update --force-checkout ci/base.yml --command \
"$CI_PROJECT_DIR/ci/patchreview $CI_PROJECT_DIR/meta-* --verbose --metrics $CI_PROJECT_DIR/metrics.txt"
documentation:
extends: .setup
script:
- |
sudo pip3 install -r meta-arm-bsp/documentation/requirements.txt
for CONF in meta-*/documentation/*/conf.py ; do
SOURCE_DIR=$(dirname $CONF)
MACHINE=$(basename $SOURCE_DIR)
sphinx-build -vW $SOURCE_DIR build-docs/$MACHINE
done
test -d build-docs/
artifacts:
paths:
- build-docs/
+1 -5
View File
@@ -6,10 +6,6 @@ This repository contains the Arm layers for OpenEmbedded.
This layer contains general recipes for the Arm architecture, such as firmware, FVPs, and Arm-specific integration.
* meta-arm-autonomy
This layer is the distribution for a reference stack for autonomous systems.
* meta-arm-bsp
This layer contains machines for Arm reference platforms, for example FVP Base, N1SDP, and Juno.
@@ -20,7 +16,7 @@ This repository contains the Arm layers for OpenEmbedded.
* meta-atp
This layer contains recipes for the Adaptive Traffic Generation integration into meta-gem5.
This layer contains recipes for the [AMBA Adaptive Traffic Profiles (ATP)](https://developer.arm.com/documentation/ihi0082/latest) generation integration into meta-gem5.
* meta-gem5
@@ -0,0 +1,26 @@
This causes illegal instruction faults in pixman, so xserver crashes.
https://github.com/kraj/meta-clang/issues/696
From 8659c5c5bec39dd43a1988b19d4cf30507a44679 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@arm.com>
Date: Mon, 28 Nov 2022 16:52:50 +0000
Subject: [PATCH] Revert "pixman: Do not use clang assembler for now"
This reverts commit 84dbafa42d8141b00da75d6664aef07c252a52ee.
---
conf/nonclangable.conf | 1 -
1 file changed, 1 deletion(-)
diff --git a/conf/nonclangable.conf b/conf/nonclangable.conf
index 04112f4..b5db848 100644
--- a/conf/nonclangable.conf
+++ b/conf/nonclangable.conf
@@ -347,5 +347,4 @@ DEPENDS:append:pn-pixman:mips:toolchain-clang = " openmp"
#| .endfunc
#| ^
CFLAGS:append:pn-pixman:arm:toolchain-clang = " -no-integrated-as"
-CFLAGS:append:pn-pixman:aarch64:toolchain-clang = " -no-integrated-as"
--
2.34.1
+1 -1
View File
@@ -3,4 +3,4 @@ header:
local_conf_header:
cc: |
GCCVERSION = "arm-11.2"
GCCVERSION = "arm-11.3"
+3 -9
View File
@@ -5,7 +5,7 @@ distro: poky
defaults:
repos:
refspec: kirkstone
refspec: langdale
repos:
meta-arm:
@@ -26,10 +26,7 @@ env:
local_conf_header:
base: |
BB_SERVER_TIMEOUT = "60"
CONF_VERSION = "2"
BB_NUMBER_THREADS = "16"
PARALLEL_MAKE = "-j16"
LICENSE_FLAGS_ACCEPTED += "Arm-FVP-EULA"
setup: |
PACKAGE_CLASSES = "package_ipk"
@@ -38,13 +35,10 @@ local_conf_header:
PACKAGECONFIG:append:pn-perf = " coresight"
INHERIT += "rm_work"
DISTRO_FEATURES:remove = "ptest"
kvm: |
QEMU_USE_KVM = ""
perf: |
CORE_IMAGE_EXTRA_INSTALL += "perf"
sshkeys: |
CORE_IMAGE_EXTRA_INSTALL += "ssh-pregen-hostkeys"
machine: unset
target:
- core-image-base
- core-image-sato
+9
View File
@@ -4,7 +4,16 @@ header:
repos:
meta-clang:
url: https://github.com/kraj/meta-clang
patches:
pixman:
repo: meta-arm
path: ci/0001-Revert-pixman-Do-not-use-clang-assembler-for-now.patch
local_conf_header:
clang: |
TOOLCHAIN = "clang"
# Backport d89e06ad94a46f6810d0a8787004b71b8ecaf87d to langdale
OBJCOPY:pn-linux-yocto:toolchain-clang = "${HOST_PREFIX}objcopy"
# Perf needs fixes backported, use GCC for now
# https://lore.kernel.org/linux-perf-users/Y5d4k7fDxfRP7hcN@kernel.org/T/#t
TOOLCHAIN:pn-perf = "gcc"
+3 -1
View File
@@ -3,11 +3,13 @@ header:
includes:
- ci/base.yml
- ci/meta-openembedded.yml
local_conf_header:
perf: |
# Intentionally blank to prevent perf from being added to the image in base.yml
distro: poky-tiny
target:
- perf
- corstone1000-image
- perf
+1
View File
@@ -8,6 +8,7 @@ local_conf_header:
INHERIT += "fvpboot"
IMAGE_FEATURES:remove = " ssh-server-dropbear"
perf: |
# Intentionally blank to prevent perf from being added to the image in base.yml
machine: corstone500
+8
View File
@@ -7,3 +7,11 @@ local_conf_header:
MACHINE_FEATURES += "efi"
TFA_UBOOT = "0"
TFA_UEFI = "1"
EXTRA_IMAGEDEPENDS += "edk2-firmware"
EFI_PROVIDER ?= "grub-efi"
QB_DEFAULT_BIOS = "QEMU_EFI.fd"
WKS_FILE ?= "efi-disk.wks.in"
failing_tests: |
TEST_SUITES:remove = "xorg"
+2
View File
@@ -14,3 +14,5 @@ local_conf_header:
# Tell testimage to connect to localhost:8122, and forward that to SSH in the FVP.
TEST_TARGET_IP = "127.0.0.1:8122"
FVP_CONFIG[bp.virtio_net.hostbridge.userNetPorts] = "8122=22"
failing_tests: |
TEST_SUITES:remove = "xorg"
+2
View File
@@ -14,3 +14,5 @@ local_conf_header:
# Tell testimage to connect to localhost:8022, and forward that to SSH in the FVP.
TEST_TARGET_IP = "localhost:8022"
FVP_CONFIG[bp.virtio_net.hostbridge.userNetPorts] ?= "8022=22"
failing_tests: |
TEST_SUITES:remove = "xorg"
-1
View File
@@ -17,4 +17,3 @@ target:
- nativesdk-fvp-sgi575
- nativesdk-fvp-corstone500
- nativesdk-fvp-corstone1000
- nativesdk-fvp-tc0
+19 -23
View File
@@ -1,9 +1,8 @@
#!/bin/bash
set -u -e
set -u
BASENAME=gcc-arm
VER=${VER:-10.3-2021.07}
HOST_ARCH=${HOST_ARCH:-$(uname -m)}
HOST_ARCH=$(uname -m)
VER="11.3.rel1"
DOWNLOAD_DIR=$1
TOOLCHAIN_DIR=$2
@@ -12,39 +11,36 @@ TOOLCHAIN_LINK_DIR=$3
# These should be already created by .gitlab-ci.yml, but do here if run outside of that env
mkdir -p $DOWNLOAD_DIR $TOOLCHAIN_DIR $TOOLCHAIN_LINK_DIR
download() {
TRIPLE=$1
URL=https://developer.arm.com/-/media/Files/downloads/gnu-a/$VER/binrel/$BASENAME-$VER-$HOST_ARCH-$TRIPLE.tar.xz
wget -P $DOWNLOAD_DIR -nc $URL
}
if [ $HOST_ARCH = "aarch64" ]; then
# AArch64 Linux hosted cross compilers
#AArch64 Linux hosted cross compilers
# AArch32 target with hard float
download arm-none-linux-gnueabihf
#AArch32 target with hard float (arm-none-linux-gnueabihf)
wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu/$VER/binrel/arm-gnu-toolchain-$VER-$HOST_ARCH-arm-none-linux-gnueabihf.tar.xz
elif [ $HOST_ARCH = "x86_64" ]; then
# x86_64 Linux hosted cross compilers
#x86_64 Linux hosted cross compilers
# AArch32 target with hard float
download arm-none-linux-gnueabihf
#AArch32 target with hard float (arm-linux-none-gnueabihf)
wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu/$VER/binrel/arm-gnu-toolchain-$VER-$HOST_ARCH-arm-none-linux-gnueabihf.tar.xz
# AArch64 GNU/Linux target
download aarch64-none-linux-gnu
#AArch64 GNU/Linux target (aarch64-none-linux-gnu)
wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu/$VER/binrel/arm-gnu-toolchain-$VER-$HOST_ARCH-aarch64-none-linux-gnu.tar.xz
#AArch64 GNU/Linux target (aarch64_be-none-linux-gnu)
wget -P $DOWNLOAD_DIR -nc https://developer.arm.com/-/media/Files/downloads/gnu/$VER/binrel/arm-gnu-toolchain-$VER-$HOST_ARCH-aarch64_be-none-linux-gnu.tar.xz
else
echo "ERROR - Unknown build arch of $HOST_ARCH"
exit 1
fi
for i in arm aarch64; do
if [ ! -d $TOOLCHAIN_DIR/$BASENAME-$VER-$HOST_ARCH-$i-none-linux-gnu*/ ]; then
if [ ! -f $DOWNLOAD_DIR/$BASENAME-$VER-$HOST_ARCH-$i-none-linux-gnu*.tar.xz ]; then
for i in arm aarch64 aarch64_be; do
if [ ! -d $TOOLCHAIN_DIR/arm-gnu-toolchain-$VER-$HOST_ARCH-$i-none-linux-gnu*/ ]; then
if [ ! -f $DOWNLOAD_DIR/arm-gnu-toolchain-$VER-$HOST_ARCH-$i-none-linux-gnu*.tar.xz ]; then
continue
fi
tar -C $TOOLCHAIN_DIR -axvf $DOWNLOAD_DIR/$BASENAME-$VER-$HOST_ARCH-$i-none-linux-gnu*.tar.xz
tar -C $TOOLCHAIN_DIR -axvf $DOWNLOAD_DIR/arm-gnu-toolchain-$VER-$HOST_ARCH-$i-none-linux-gnu*.tar.xz
fi
# Setup a link for the toolchain to use local to the building machine (e.g., not in a shared location)
ln -s $TOOLCHAIN_DIR/$BASENAME-$VER-$HOST_ARCH-$i-none-linux-gnu* $TOOLCHAIN_LINK_DIR/$i
ln -s $TOOLCHAIN_DIR/arm-gnu-toolchain-$VER-$HOST_ARCH-$i-none-linux-gnu* $TOOLCHAIN_LINK_DIR/$i
done
+1 -1
View File
@@ -18,7 +18,7 @@ for i in $(echo $1 | cut -s -d ':' -f 2 | sed 's/[][,]//g'); do
# defaults, we can simply ignore those parameters. They are necessary
# to pass in so that matrix can correctly setup all of the permutations
# of each individual run.
if [[ $i == 'none' || $i == 'gcc' || $i == 'glibc' ]]; then
if [[ $i == 'none' || $i == 'gcc' || $i == 'glibc' || $i == 'uboot' ]]; then
continue
fi
FILES+=":ci/$i.yml"
-13
View File
@@ -1,13 +0,0 @@
header:
version: 11
includes:
- ci/meta-openembedded.yml
repos:
meta-zephyr:
url: https://git.yoctoproject.org/git/meta-zephyr
layers:
meta-zephyr-core:
target:
- zephyr-kernel-test-all
-7
View File
@@ -1,7 +0,0 @@
header:
version: 11
includes:
- ci/base.yml
- ci/meta-zephyr.yml
machine: microbit-v1
+1 -6
View File
@@ -2,14 +2,9 @@ header:
version: 11
includes:
- ci/base.yml
- ci/meta-zephyr.yml
local_conf_header:
nonbuilding_tests: |
ZEPHYRTESTS:remove = "common sleep poll device queue"
- ci/meta-openembedded.yml
machine: musca-b1
target:
- trusted-firmware-m
- zephyr-kernel-test-all
+1 -6
View File
@@ -2,14 +2,9 @@ header:
version: 11
includes:
- ci/base.yml
- ci/meta-zephyr.yml
local_conf_header:
nonbuilding_tests: |
ZEPHYRTESTS:remove = "common sleep poll device queue"
- ci/meta-openembedded.yml
machine: musca-s1
target:
- trusted-firmware-m
- zephyr-kernel-test-all
+4
View File
@@ -4,3 +4,7 @@ header:
- ci/base.yml
machine: n1sdp
local_conf_header:
unsupported_trusted_services: |
MACHINE_FEATURES:remove = "ts-smm-gateway"
-9
View File
@@ -1,9 +0,0 @@
header:
version: 11
includes:
- ci/base.yml
- ci/meta-zephyr.yml
# FIXME - testimage fails all tests currently, but all the tests build
machine: qemu-cortex-a53
-20
View File
@@ -1,20 +0,0 @@
header:
version: 11
includes:
- ci/base.yml
- ci/meta-zephyr.yml
repos:
meta-zephyr:
layers:
meta-zephyr-bsp:
local_conf_header:
tclibc: |
TCLIBC = "newlib"
nonbuilding_tests: |
ZEPHYRTESTS:remove = "context pending poll sleep"
qemu_opts: |
QB_OPT_APPEND = "-icount shift=3,align=off,sleep=on -rtc clock=vm"
machine: qemu-cortex-m3
-11
View File
@@ -1,11 +0,0 @@
header:
version: 11
includes:
- ci/base.yml
- ci/meta-zephyr.yml
local_conf_header:
nonbuilding_tests: |
ZEPHYRTESTS:remove = "common poll sleep queue device"
machine: qemu-cortex-r5
+1 -1
View File
@@ -10,5 +10,5 @@ local_conf_header:
machine: qemu-generic-arm64
target:
- core-image-base
- core-image-sato
- sbsa-acs
+12
View File
@@ -0,0 +1,12 @@
header:
version: 11
includes:
- ci/base.yml
machine: qemuarm-secureboot
target:
- core-image-base
- optee-examples
- optee-test
- optee-os-tadevkit
-6
View File
@@ -5,14 +5,8 @@ header:
machine: qemuarm64-secureboot
local_conf_header:
failing_tests: |
# software IO TLB: Cannot allocate buffer
DEFAULT_TEST_SUITES:remove = "parselogs"
target:
- core-image-base
- optee-examples
- optee-test
- optee-spdevkit
- optee-os-tadevkit
-9
View File
@@ -1,9 +0,0 @@
header:
version: 11
includes:
- ci/base.yml
machine: tc0
target:
- tc-artifacts-image
-8
View File
@@ -1,8 +0,0 @@
header:
version: 11
local_conf_header:
testimage: |
IMAGE_CLASSES += "testimage"
TEST_TARGET = "QemuTargetZephyr"
TEST_SUITES = "zephyr"
+6
View File
@@ -5,9 +5,15 @@ local_conf_header:
testimage: |
IMAGE_CLASSES += "testimage"
TESTIMAGE_AUTO = "1"
kvm: |
QEMU_USE_KVM = ""
slirp: |
TEST_RUNQEMUPARAMS = "slirp"
TEST_SERVER_IP = "127.0.0.1"
QEMU_USE_SLIRP = "1"
sshd: |
IMAGE_FEATURES:append = " ssh-server-dropbear"
sshkeys: |
CORE_IMAGE_EXTRA_INSTALL += "ssh-pregen-hostkeys"
universally_failing_tests: |
TEST_SUITES:remove = "opkg"
+14
View File
@@ -0,0 +1,14 @@
header:
version: 11
includes:
- ci/meta-openembedded.yml
local_conf_header:
trusted_services: |
TEST_SUITES:append = " trusted_services"
# Include TS Crypto, Storage, ITS, Attestation and SMM-Gateway SPs into optee-os image
MACHINE_FEATURES:append = " arm-ffa ts-crypto ts-storage ts-its ts-attestation ts-smm-gateway"
# Include TS demo/test tools into image
IMAGE_INSTALL:append = " packagegroup-ts-tests"
# Include TS PSA Arch tests into image
IMAGE_INSTALL:append = " packagegroup-ts-tests-psa"
-1
View File
@@ -22,7 +22,6 @@ repositories = (
"https://git.yoctoproject.org/git/poky",
"https://git.openembedded.org/meta-openembedded",
"https://git.yoctoproject.org/git/meta-virtualization",
"https://git.yoctoproject.org/git/meta-zephyr",
"https://github.com/kraj/meta-clang",
)
+1 -1
View File
@@ -4,7 +4,7 @@ OE-Core's [oeqa][OEQA] framework provides a method of performing runtime tests o
Tests can be configured to run automatically post-build by setting the variable `TESTIMAGE_AUTO="1"`, e.g. in your Kas file or local.conf.
There are two main methods of testing, using different test "targets".
There are two main methods of testing, using different test "targets". Both test targets generate an additional log file with the prefix 'fvp_log' in the image recipe's `${WORKDIR}/testimage` containing the FVP's stdout.
## OEFVPTarget
+53
View File
@@ -0,0 +1,53 @@
# The Trusted Services: framework for developing root-of-trust services
meta-arm layer includes recipes for [Trusted Services][1] Secure Partitions and Normal World applications
in `meta-arm/recipes-security/trusted-services`
## Secure Partitions recipes
We define dedicated recipes for all supported Trusted Services (TS) Secure Partitions.
These recipes produce ELF and DTB files for SPs.
These files are automatically included into optee-os image accordingly to defined MACHINE_FEATURES.
### How to include TS SPs
To include TS SPs into optee-os image you need to add into MACHINE_FEATURES
features for each [Secure Partition][2] you would like to include:
| Secure Partition | MACHINE_FEATURE |
| ----------------- | --------------- |
| Attestation | ts-attesation |
| Crypto | ts-crypto |
| Internal Storage | ts-its |
| Protected Storage | ts-storage |
| se-proxy | ts-se-proxy |
| smm-gateway | ts-smm-gateway |
Other steps depend on your machine/platform definition:
1. For communications between Secure and Normal Words Linux kernel option `CONFIG_ARM_FFA_TRANSPORT=y`
is required. If your platform doesn't include it already you can add `arm-ffa` into MACHINE_FEATURES.
2. optee-os might require platform specific OP-TEE build parameters (for example what SEL the SPM Core is implemented at).
You can find examples in `meta-arm/recipes-security/optee/optee-os_%.bbappend` for qemuarm64-secureboot machine
and in `meta-arm-bsp/recipes-security/optee/optee-os-n1sdp.inc` and `meta-arm-bsp/recipes-security/optee/optee-os-corstone1000-common.inc`
for N1SDP and Corstone1000 platforms accordingly.
3. trusted-firmware-a might require platform specific TF-A build parameters (SPD and SPMC details on the platform).
See `meta-arm/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend` for qemuarm64-secureboot machine
and in `meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-n1sdp.inc` and
`meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-corstone1000.inc` for N1SDP and Corstone1000 platforms.
## Normal World applications
Optionally for testing purposes you can add `packagegroup-ts-tests` and `packagegroup-ts-tests-psa` package groups into your image.
They include [Trusted Services test and demo tools][3]
## OEQA Trusted Services tests
meta-arm also includes Trusted Service OEQA tests which can be used for automated testing.
See `ci/trusted-services.yml` for an example how to include them into an image.
[1] https://trusted-services.readthedocs.io/en/integration/overview/introduction.html
[2] https://trusted-services.readthedocs.io/en/integration/developer/deployments/secure-partitions.html
[3] https://trusted-services.readthedocs.io/en/integration/developer/deployments/test-executables.html
+3 -1
View File
@@ -5,7 +5,7 @@ distro: poky-tiny
defaults:
repos:
refspec: kirkstone
refspec: langdale
repos:
meta-arm:
@@ -16,6 +16,7 @@ repos:
poky:
url: https://git.yoctoproject.org/git/poky
refspec: 79434a17eb4835e85fcd477baec08c8ce49a4c14
layers:
meta:
meta-poky:
@@ -23,6 +24,7 @@ repos:
meta-openembedded:
url: https://git.openembedded.org/meta-openembedded
refspec: c5668905a6d8a78fb72c2cbf8b20e91e686ceb86
layers:
meta-oe:
meta-python:
+1 -3
View File
@@ -5,7 +5,7 @@ distro: poky-tiny
defaults:
repos:
refspec: master
refspec: langdale
repos:
meta-arm:
@@ -16,7 +16,6 @@ repos:
poky:
url: https://git.yoctoproject.org/git/poky
refspec: master
layers:
meta:
meta-poky:
@@ -24,7 +23,6 @@ repos:
meta-openembedded:
url: https://git.openembedded.org/meta-openembedded
refspec: master
layers:
meta-oe:
meta-python:
+1 -1
View File
@@ -6,7 +6,7 @@ machine: fvp-baser-aemv8r64
defaults:
repos:
refspec: master
refspec: langdale
repos:
meta-arm:
-23
View File
@@ -1,23 +0,0 @@
meta-arm-autonomy Yocto Layer
=============================
The meta-arm-autonomy layer is being deprecated from master, with bug fixes
only being applied to the following branches. Additionally, all support and
maintenance of meta-arm-autonomy will stop as per the schedule below.
honister: End-of-life scheduled to June 2022
hardknot: End-of-life scheduled to December 2021
gatesgarth: End-of-life scheduled to October 2021
dunfell: End-of-life scheduled to October 2021
master: End-of-life scheduled to October 2021 and code removed
Contributing
------------
This project has not put in place a process for contributions currently. If you
would like to contribute, please contact the maintainers
Maintainer(s)
-------------
* Diego Sueiro <diego.sueiro@arm.com>
+1 -1
View File
@@ -9,7 +9,7 @@ BBFILE_COLLECTIONS += "meta-arm-bsp"
BBFILE_PATTERN_meta-arm-bsp = "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-arm-bsp = "5"
LAYERSERIES_COMPAT_meta-arm-bsp = "kirkstone"
LAYERSERIES_COMPAT_meta-arm-bsp = "langdale"
LAYERDEPENDS_meta-arm-bsp = "core meta-arm"
# This won't be used by layerindex-fetch, but works everywhere else
@@ -33,9 +33,18 @@ FVP_CONFIG[se.nvm.update_raw_image] ?= "0"
# Boot image
FVP_DATA ?= "board.flash0=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.wic.nopt@0x68100000"
# External system (cortex-M3)
FVP_CONFIG[extsys_harness0.extsys_flashloader.fname] ?= "${DEPLOY_DIR_IMAGE}/es_flashfw.bin"
# FVP Terminals
FVP_TERMINALS[host.host_terminal_0] ?= "Normal World Console"
FVP_TERMINALS[host.host_terminal_1] ?= "Secure World Console"
FVP_TERMINALS[se.secenc_terminal] ?= "Secure Enclave Console"
FVP_TERMINALS[extsys0.extsys_terminal] ?= "Cortex M3"
# MMC card configuration
FVP_CONFIG[board.msd_mmc.card_type] ?= "SDHC"
FVP_CONFIG[board.msd_mmc.p_fast_access] ?= "0"
FVP_CONFIG[board.msd_mmc.diagnostics] ?= "2"
FVP_CONFIG[board.msd_mmc.p_max_block_count] ?= "0xFFFF"
FVP_CONFIG[board.msd_config.pl180_fifo_depth] ?= "16"
+2 -2
View File
@@ -12,7 +12,7 @@ require conf/machine/include/arm/armv7a/tune-cortexa5.inc
# apply.
#
PREFERRED_PROVIDER_virtual/kernel:forcevariable = "linux-yocto"
PREFERRED_VERSION_linux-yocto ?= "5.15%"
PREFERRED_VERSION_linux-yocto ?= "5.19%"
EXTRA_IMAGEDEPENDS += "trusted-firmware-a u-boot"
@@ -26,7 +26,7 @@ SERIAL_CONSOLES = "115200;ttyAMA0"
UBOOT_MACHINE = "corstone500_defconfig"
UBOOT_IMAGE_ENTRYPOINT = "0x84000000"
UBOOT_IMAGE_LOADADDRESS = "0x84000000"
PREFERRED_VERSION_u-boot ?= "2022.01"
PREFERRED_VERSION_u-boot ?= "2022.07"
# making sure EXTRA_IMAGEDEPENDS will be used while creating the image
WKS_FILE_DEPENDS:append = " ${EXTRA_IMAGEDEPENDS}"
@@ -4,11 +4,11 @@
#@NAME: Armv7-A Base Platform FVP machine
#@DESCRIPTION: Machine configuration for Armv7-A Base Platform FVP model
require conf/machine/fvp-common.inc
require conf/machine/include/fvp-common.inc
require conf/machine/include/arm/arch-armv7a.inc
# FVP u-boot configuration
PREFERRED_VERSION_u-boot ?= "2021.10"
PREFERRED_VERSION_u-boot ?= "2022.04"
UBOOT_MACHINE = "vexpress_aemv8a_aarch32_defconfig"
KERNEL_IMAGETYPE = "zImage"
+5 -1
View File
@@ -4,12 +4,16 @@
#@NAME: Armv8-A Base Platform FVP machine
#@DESCRIPTION: Machine configuration for Armv8-A Base Platform FVP model
require conf/machine/fvp-common.inc
require conf/machine/include/fvp-common.inc
require conf/machine/include/arm/arch-armv8a.inc
TUNE_FEATURES = "aarch64"
PREFERRED_VERSION_u-boot ?= "2022.04"
# FVP u-boot configuration
UBOOT_MACHINE = "vexpress_aemv8a_semi_defconfig"
KERNEL_IMAGETYPE = "Image"
FVP_CONFIG[bp.virtio_rng.enabled] ?= "1"
@@ -9,8 +9,7 @@ require conf/machine/include/arm/armv8r/arch-armv8r64.inc
EXTRA_IMAGEDEPENDS += "boot-wrapper-aarch64"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
PREFERRED_VERSION_linux-yocto ?= "5.15%"
PREFERRED_VERSION_linux-yocto-rt ?= "5.15%"
PREFERRED_VERSION_u-boot ?= "2022.07"
KERNEL_IMAGETYPE = "Image"
KERNEL_DEVICETREE = "arm/fvp-baser-aemv8r64.dtb"
@@ -10,8 +10,6 @@ TFA_BL2_BINARY = "bl2-corstone1000.bin"
TFA_FIP_BINARY = "fip-corstone1000.bin"
# TF-M
PREFERRED_VERSION_trusted-firmware-m ?= "1.5%"
TFM_PLATFORM = "arm/corstone1000"
EXTRA_IMAGEDEPENDS += "virtual/trusted-firmware-m"
# TF-M settings for signing host images
@@ -20,11 +18,11 @@ TFA_BL2_RE_SIGN_BIN_SIZE = "0x2d000"
TFA_FIP_RE_IMAGE_LOAD_ADDRESS = "0x68130000"
TFA_FIP_RE_SIGN_BIN_SIZE = "0x00200000"
RE_LAYOUT_WRAPPER_VERSION = "0.0.7"
TFM_SIGN_PRIVATE_KEY = "${S}/bl2/ext/mcuboot/root-RSA-3072_1.pem"
TFM_SIGN_PRIVATE_KEY = "${libdir}/tfm-scripts/root-RSA-3072_1.pem"
RE_IMAGE_OFFSET = "0x1000"
# u-boot
PREFERRED_VERSION_u-boot ?= "2022.01"
PREFERRED_VERSION_u-boot ?= "2022.07"
EXTRA_IMAGEDEPENDS += "u-boot"
UBOOT_CONFIG ??= "EFI"
@@ -35,19 +33,23 @@ UBOOT_BOOTARGS = "earlycon=pl011,0x1a510000 console=ttyAMA0 loglevel=9"
UBOOT_ARCH = "arm"
UBOOT_EXTLINUX = "0"
# optee
PREFERRED_VERSION_optee-os ?= "3.14%"
PREFERRED_VERSION_optee-client ?= "3.14%"
#optee
PREFERRED_VERSION_optee-os ?= "3.18.%"
PREFERRED_VERSION_optee-client ?= "3.18.%"
EXTRA_IMAGEDEPENDS += "optee-os"
OPTEE_ARCH = "arm64"
OPTEE_BINARY = "tee-pager_v2.bin"
# Trusted Services(TS)
EXTRA_IMAGEDEPENDS += "secure-partitions"
# Include smm-gateway and se-proxy SPs into optee-os binary
MACHINE_FEATURES += "ts-smm-gateway ts-se-proxy"
TS_PLATFORM = "arm/corstone1000"
# External System(Cortex-M3)
EXTRA_IMAGEDEPENDS += "external-system"
# Linux kernel
PREFERRED_PROVIDER_virtual/kernel:forcevariable = "linux-yocto"
PREFERRED_VERSION_linux-yocto = "5.15%"
PREFERRED_VERSION_linux-yocto = "5.19%"
KERNEL_IMAGETYPE = "Image.gz"
INITRAMFS_IMAGE_BUNDLE ?= "1"
@@ -55,6 +57,9 @@ INITRAMFS_IMAGE_BUNDLE ?= "1"
#telling the build system which image is responsible of the generation of the initramfs rootfs
INITRAMFS_IMAGE = "corstone1000-initramfs-image"
# add FF-A support in the kernel
MACHINE_FEATURES += "arm-ffa"
# prevent the kernel image from being included in the intramfs rootfs
PACKAGE_EXCLUDE = "kernel-image-*"
@@ -40,7 +40,7 @@ FVP_CONFIG[cluster0.has_arm_v8-4] = "1"
FVP_CONFIG[cluster1.has_arm_v8-4] = "1"
FVP_CONSOLE ?= "terminal_0"
FVP_DATA ?= "cluster0.cpu0=${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}@0x80080000 \
cluster0.cpu0=${DEPLOY_DIR_IMAGE}/fvp-base-revc.dtb@0x83000000"
cluster0.cpu0=${DEPLOY_DIR_IMAGE}/fvp-base-revc.dtb@0x8fc00000"
FVP_TERMINALS[bp.terminal_0] ?= "Console"
FVP_TERMINALS[bp.terminal_1] ?= ""
FVP_TERMINALS[bp.terminal_2] ?= ""
+6 -2
View File
@@ -6,7 +6,7 @@ MACHINEOVERRIDES =. "tc:"
# Das U-boot
UBOOT_MACHINE ?= "total_compute_defconfig"
PREFERRED_VERSION_u-boot ?= "2021.10"
PREFERRED_VERSION_u-boot ?= "2022.04"
UBOOT_RD_LOADADDRESS = "0x88000000"
UBOOT_RD_ENTRYPOINT = "0x88000000"
UBOOT_LOADADDRESS = "0x80080000"
@@ -23,7 +23,11 @@ UBOOT_SIGN_KEYDIR = "${DEPLOY_DIR_IMAGE}/keys"
FIT_GENERATE_KEYS = "1"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-arm64-ack"
PREFERRED_VERSION_linux-arm64-ack ?= "5.10"
# OP-TEE
PREFERRED_VERSION_optee-os ?= "3.18%"
PREFERRED_VERSION_optee-client ?= "3.18%"
PREFERRED_VERSION_optee-test ?= "3.18%"
# Cannot use the default zImage on arm64
KERNEL_IMAGETYPE = "Image"
+1 -1
View File
@@ -18,7 +18,7 @@ IMAGE_FSTYPES += "tar.bz2 ext4 cpio.gz"
SERIAL_CONSOLES = "115200;ttyAMA0"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
PREFERRED_VERSION_u-boot ?= "2020.07"
PREFERRED_VERSION_u-boot ?= "2022.04"
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot"
EXTRA_IMAGEDEPENDS += "trusted-firmware-a virtual/bootloader firmware-image-juno"
+1 -6
View File
@@ -16,13 +16,8 @@ IMAGE_CLASSES += "qemuboot"
QB_SYSTEM_NAME = "qemu-system-arm"
QB_MACHINE = "-machine musca-b1"
QB_CPU = "-cpu cortex-m33"
QB_OPT_APPEND = "-nographic -vga none"
QB_GRAPHICS = "-nographic -vga none"
QB_MEM = "512k"
QB_RNG = ""
# Zephyr RTOS settings
ZEPHYR_BOARD = "v2m_musca_b1"
ZEPHYR_INHERIT_CLASSES += "zephyr-qemuboot"
ARCH:musca-b1 = "arm"
TFM_PLATFORM = "arm/musca_b1/sse_200"
+1 -6
View File
@@ -15,13 +15,8 @@ IMAGE_CLASSES += "qemuboot"
QB_SYSTEM_NAME = "qemu-system-arm"
QB_MACHINE = "-machine musca-s1"
QB_CPU = "-cpu cortex-m33"
QB_OPT_APPEND = "-nographic -vga none"
QB_GRAPHICS = "-nographic -vga none"
QB_MEM = "512k"
QB_RNG = ""
# Zephyr RTOS settings
ZEPHYR_BOARD = "v2m_musca_s1"
ZEPHYR_INHERIT_CLASSES += "zephyr-qemuboot"
ARCH:musca-s1 = "arm"
TFM_PLATFORM = "arm/musca_s1"
+4 -3
View File
@@ -19,19 +19,20 @@ WKS_FILE_DEPENDS:append = " ${EXTRA_IMAGEDEPENDS}"
# Use kernel provided by yocto
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
PREFERRED_VERSION_linux-yocto ?= "5.15%"
PREFERRED_VERSION_linux-yocto ?= "5.19%"
# RTL8168E Gigabit Ethernet Controller is attached to the PCIe interface
MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "linux-firmware-rtl8168"
EXTRA_IMAGEDEPENDS += "trusted-firmware-a"
PREFERRED_VERSION_trusted-firmware-a ?= "2.7%"
EXTRA_IMAGEDEPENDS += "virtual/control-processor-firmware"
#UEFI EDK2 firmware
EXTRA_IMAGEDEPENDS += "edk2-firmware"
#optee
PREFERRED_VERSION_optee-os ?= "3.18.%"
#grub-efi
EFI_PROVIDER ?= "grub-efi"
MACHINE_FEATURES += "efi"
@@ -1,22 +0,0 @@
#@TYPE: Machine
#@NAME: qemu_cortex_r5
#@DESCRIPTION: Machine for Zephyr BOARD qemu_cortex_r5
require conf/machine/include/qemu.inc
require conf/machine/include/arm/armv7r/tune-cortexr5.inc
# GLIBC will not work with Cortex-R.
TCLIBC = "newlib"
# For runqemu
QB_SYSTEM_NAME = "qemu-system-aarch64"
QB_MACHINE = "-machine xlnx-zcu102"
QB_CPU = "-cpu cortex-r5"
QB_MEM = "-m 64k"
QB_OPT_APPEND = "-nographic -vga none"
QB_RNG = ""
# Zephyr RTOS settings
ZEPHYR_BOARD = "qemu_cortex_r5"
ZEPHYR_INHERIT_CLASSES += "zephyr-qemuboot"
ARCH:qemu-cortex-r5 = "arm"
-7
View File
@@ -1,7 +0,0 @@
# Configuration for TC0
#@TYPE: Machine
#@NAME: TC0
#@DESCRIPTION: Machine configuration for TC0
require conf/machine/include/tc.inc
@@ -0,0 +1,164 @@
..
# Copyright (c) 2022, Arm Limited.
#
# SPDX-License-Identifier: MIT
##########
Change Log
##########
This document contains a summary of the new features, changes and
fixes in each release of Corstone-1000 software stack.
******************
Version 2022.11.23
******************
Changes
=======
- Booting the External System (Cortex-M3) with RTX RTOS
- Adding MHU communication between the HOST (Cortex-A35) and the External System
- Adding a Linux application to test the External System
- Adding ESRT (EFI System Resource Table) support
- Upgrading the SW stack recipes
- Upgrades for the U-Boot FF-A driver and MM communication
Corstone-1000 components versions
=======================================
+-------------------------------------------+------------+
| arm-ffa-tee | 1.1.1 |
+-------------------------------------------+------------+
| arm-ffa-user | 5.0.0 |
+-------------------------------------------+------------+
| corstone1000-external-sys-tests | 1.0 |
+-------------------------------------------+------------+
| external-system | 0.1.0 |
+-------------------------------------------+------------+
| linux-yocto | 5.19 |
+-------------------------------------------+------------+
| u-boot | 2022.07 |
+-------------------------------------------+------------+
| optee-client | 3.18.0 |
+-------------------------------------------+------------+
| optee-os | 3.18.0 |
+-------------------------------------------+------------+
| trusted-firmware-a | 2.7.0 |
+-------------------------------------------+------------+
| trusted-firmware-m | 1.6.0 |
+-------------------------------------------+------------+
| ts-newlib | 4.1.0 |
+-------------------------------------------+------------+
| ts-psa-{crypto, iat, its. ps}-api-test | 451aa087a4 |
+-------------------------------------------+------------+
| ts-sp-{se-proxy, smm-gateway} | 3d4956770f |
+-------------------------------------------+------------+
Yocto distribution components versions
=======================================
+-------------------------------------------+---------------------+
| meta-arm | langdale |
+-------------------------------------------+---------------------+
| poky | langdale |
+-------------------------------------------+---------------------+
| meta-openembedded | langdale |
+-------------------------------------------+---------------------+
| busybox | 1.35.0 |
+-------------------------------------------+---------------------+
| musl | 1.2.3+git37e18b7bf3 |
+-------------------------------------------+---------------------+
| gcc-arm-none-eabi-native | 11.2-2022.02 |
+-------------------------------------------+---------------------+
| gcc-cross-aarch64 | 12.2 |
+-------------------------------------------+---------------------+
| openssl | 3.0.5 |
+-------------------------------------------+---------------------+
******************
Version 2022.04.04
******************
Changes
=======
- Linux distro openSUSE, raw image installation and boot in the FVP.
- SCT test support in FVP.
- Manual capsule update support in FVP.
******************
Version 2022.02.25
******************
Changes
=======
- Building and running psa-arch-tests on Corstone-1000 FVP
- Enabled smm-gateway partition in Trusted Service on Corstone-1000 FVP
- Enabled MHU driver in Trusted Service on Corstone-1000 FVP
- Enabled OpenAMP support in SE proxy SP on Corstone-1000 FVP
******************
Version 2022.02.21
******************
Changes
=======
- psa-arch-tests: recipe is dropped and merged into the secure-partitons recipe.
- psa-arch-tests: The tests are align with latest tfm version for psa-crypto-api suite.
******************
Version 2022.01.18
******************
Changes
=======
- psa-arch-tests: change master to main for psa-arch-tests
- U-Boot: fix null pointer exception for get_image_info
- TF-M: fix capsule instability issue for Corstone-1000
******************
Version 2022.01.07
******************
Changes
=======
- Corstone-1000: fix SystemReady-IR ACS test (SCT, FWTS) failures.
- U-Boot: send bootcomplete event to secure enclave.
- U-Boot: support populating Corstone-1000 image_info to ESRT table.
- U-Boot: add ethernet device and enable configs to support bootfromnetwork SCT.
******************
Version 2021.12.15
******************
Changes
=======
- Enabling Corstone-1000 FPGA support on:
- Linux 5.10
- OP-TEE 3.14
- Trusted Firmware-A 2.5
- Trusted Firmware-M 1.5
- Building and running psa-arch-tests
- Adding openamp support in SE proxy SP
- OP-TEE: adding smm-gateway partition
- U-Boot: introducing Arm FF-A and MM support
******************
Version 2021.10.29
******************
Changes
=======
- Enabling Corstone-1000 FVP support on:
- Linux 5.10
- OP-TEE 3.14
- Trusted Firmware-A 2.5
- Trusted Firmware-M 1.4
- Linux kernel: enabling EFI, adding FF-A debugfs driver, integrating ARM_FFA_TRANSPORT.
- U-Boot: Extending EFI support
- python3-imgtool: adding recipe for Trusted-firmware-m
- python3-imgtool: adding the Yocto recipe used in signing host images (based on MCUBOOT format)
--------------
*Copyright (c) 2022, Arm Limited. All rights reserved.*
@@ -0,0 +1,52 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
# -- Project information -----------------------------------------------------
project = 'corstone1000'
copyright = '2020-2022, Arm Limited'
author = 'Arm Limited'
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'docs/infra']
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
#html_static_path = ['_static']
Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

@@ -0,0 +1,16 @@
..
# Copyright (c) 2022, Arm Limited.
#
# SPDX-License-Identifier: MIT
################
ARM Corstone1000
################
.. toctree::
:maxdepth: 1
software-architecture
user-guide
release-notes
change-log
@@ -0,0 +1,177 @@
..
# Copyright (c) 2022, Arm Limited.
#
# SPDX-License-Identifier: MIT
#############
Release notes
#############
*************************
Disclaimer
*************************
You expressly assume all liabilities and risks relating to your use or operation
of Your Software and Your Hardware designed or modified using the Arm Tools,
including without limitation, Your software or Your Hardware designed or
intended for safety-critical applications. Should Your Software or Your Hardware
prove defective, you assume the entire cost of all necessary servicing, repair
or correction.
**************************
Release notes - 2022.11.23
**************************
Known Issues or Limitations
---------------------------
- The external-system can not be reset individually on (or using) AN550_v1 FPGA release. However, the system-wide reset still applies to the external-system.
- FPGA supports Linux distro install and boot through installer. However, FVP only supports openSUSE raw image installation and boot.
- Due to the performance uplimit of MPS3 FPGA and FVP, some Linux distros like Fedora Rawhide can not boot on Corstone-1000 (i.e. user may experience timeouts or boot hang).
- Below SCT FAILURE is a known issues in the FVP:
UEFI Compliant - Boot from network protocols must be implemented -- FAILURE
- Below SCT FAILURE is a known issue when a terminal emulator (in the system where the user connects to serial ports) does not support 80x25 or 80x50 mode:
EFI_SIMPLE_TEXT_OUT_PROTOCOL.SetMode - SetMode() with valid mode -- FAILURE
- Known limitations regarding ACS tests: The behavior after running ACS tests on FVP is not consistent. Both behaviors are expected and are valid;
The system might boot till the Linux prompt. Or, the system might wait after finishing the ACS tests.
In both cases, the system executes the entire test suite and writes the results as stated in the user guide.
Platform Support
-----------------
- This software release is tested on Corstone-1000 FPGA version AN550_v1
https://developer.arm.com/downloads/-/download-fpga-images
- This software release is tested on Corstone-1000 Fast Model platform (FVP) version 11.19_21
https://developer.arm.com/tools-and-software/open-source-software/arm-platforms-software/arm-ecosystem-fvps
**************************
Release notes - 2022.04.04
**************************
Known Issues or Limitations
---------------------------
- FPGA support Linux distro install and boot through installer. However,
FVP only support openSUSE raw image installation and boot.
- Due to the performance uplimit of MPS3 FPGA and FVP, some Linux distros like Fedora Rawhide
cannot boot on Corstone-1000 (i.e. user may experience timeouts or boot hang).
- Below SCT FAILURE is a known issues in the FVP:
UEFI Compliant - Boot from network protocols must be implemented -- FAILURE
Platform Support
-----------------
- This software release is tested on Corstone-1000 FPGA version AN550_v1
- This software release is tested on Corstone-1000 Fast Model platform (FVP) version 11.17_23
https://developer.arm.com/tools-and-software/open-source-software/arm-platforms-software/arm-ecosystem-fvps
**************************
Release notes - 2022.02.25
**************************
Known Issues or Limitations
---------------------------
- The following tests only work on Corstone-1000 FPGA: ACS tests (SCT, FWTS,
BSA), manual capsule update test, Linux distro install and boot.
Platform Support
----------------
- This software release is tested on Corstone-1000 FPGA version AN550_v1
- This software release is tested on Corstone-1000 Fast Model platform (FVP) version 11.17_23
https://developer.arm.com/tools-and-software/open-source-software/arm-platforms-software/arm-ecosystem-fvps
Release notes - 2022.02.21
--------------------------
Known Issues or Limitations
---------------------------
- The following tests only work on Corstone-1000 FPGA: ACS tests (SCT, FWTS,
BSA), manual capsule update test, Linux distro install and boot, psa-arch-test.
Platform Support
----------------
- This software release is tested on Corstone-1000 FPGA version AN550_v1
- This software release is tested on Corstone-1000 Fast Model platform (FVP) version 11.16.21
https://developer.arm.com/tools-and-software/open-source-software/arm-platforms-software/arm-ecosystem-fvps
Release notes - 2022.01.18
--------------------------
Known Issues or Limitations
---------------------------
- Before running each SystemReady-IR tests: ACS tests (SCT, FWTS, BSA), manual
capsule update test, Linux distro install and boot, etc., the SecureEnclave
flash must be cleaned. See user-guide "Clean Secure Flash Before Testing"
section.
Release notes - 2021.12.15
--------------------------
Software Features
------------------
The following components are present in the release:
- Yocto version Honister
- Linux kernel version 5.10
- U-Boot 2021.07
- OP-TEE version 3.14
- Trusted Firmware-A 2.5
- Trusted Firmware-M 1.5
- OpenAMP 347397decaa43372fc4d00f965640ebde042966d
- Trusted Services a365a04f937b9b76ebb2e0eeade226f208cbc0d2
Platform Support
----------------
- This software release is tested on Corstone-1000 FPGA version AN550_v1
- This software release is tested on Corstone-1000 Fast Model platform (FVP) version 11.16.21
https://developer.arm.com/tools-and-software/open-source-software/arm-platforms-software/arm-ecosystem-fvps
Known Issues or Limitations
---------------------------
- The following tests only work on Corstone-1000 FPGA: ACS tests (SCT, FWTS,
BSA), manual capsule update test, Linux distro install and boot, and
psa-arch-tests.
- Only the manual capsule update from UEFI shell is supported on FPGA.
- Due to flash size limitation and to support A/B banks,the wic image provided
by the user should be smaller than 15MB.
- The failures in PSA Arch Crypto Test are known limitations with crypto
library. It requires further investigation. The user can refer to `PSA Arch Crypto Test Failure Analysis In TF-M V1.5 Release <https://developer.trustedfirmware.org/w/tf_m/release/psa_arch_crypto_test_failure_analysis_in_tf-m_v1.5_release/>`__
for the reason for each failing test.
Release notes - 2021.10.29
--------------------------
Software Features
-----------------
This initial release of Corstone-1000 supports booting Linux on the Cortex-A35
and TF-M/MCUBOOT in the Secure Enclave. The following components are present in
the release:
- Linux kernel version 5.10
- U-Boot 2021.07
- OP-TEE version 3.14
- Trusted Firmware-A 2.5
- Trusted Firmware-M 1.4
Platform Support
----------------
- This Software release is tested on Corstone-1000 Fast Model platform (FVP) version 11.16.21
https://developer.arm.com/tools-and-software/open-source-software/arm-platforms-software/arm-ecosystem-fvps
Known Issues or Limitations
---------------------------
- No software support for external system(Cortex M3)
- No communication established between A35 and M0+
- Very basic functionality of booting Secure Enclave, Trusted Firmware-A , OP-TEE , u-boot and Linux are performed
Support
-------
For technical support email: support-subsystem-iot@arm.com
For all security issues, contact Arm by email at arm-security@arm.com.
--------------
*Copyright (c) 2022, Arm Limited. All rights reserved.*
@@ -0,0 +1,239 @@
..
# Copyright (c) 2022, Arm Limited.
#
# SPDX-License-Identifier: MIT
######################
Software architecture
######################
*****************
ARM corstone1000
*****************
ARM corstone1000 is a reference solution for IoT devices. It is part of
Total Solution for IoT which consists of hardware and software reference
implementation.
Corstone1000 software plus hardware reference solution is PSA Level-2 ready
certified (`PSA L2 Ready`_) as well as System Ready IR certified(`SRIR cert`_).
More information on the corstone1000 subsystem product and design can be
found at:
`Arm corstone1000 Software`_ and `Arm corstone1000 Technical Overview`_.
This readme explicitly focuses on the software part of the solution and
provides internal details on the software components. The reference
software package of the platform can be retrieved following instructions
present in the user-guide document.
***************
Design Overview
***************
The software architecture of corstone1000 platform is a reference
implementation of Platform Security Architecture (`PSA`_) which provides
framework to build secure IoT devices.
The base system architecture of the platform is created from three
different tyes of systems: Secure Enclave, Host and External System.
Each subsystem provides different functionality to overall SoC.
.. image:: images/CorstoneSubsystems.png
:width: 720
:alt: CorstoneSubsystems
The Secure Enclave System, provides PSA Root of Trust (RoT) and
cryptographic functions. It is based on an Cortex-M0+ processor,
CC312 Cryptographic Accelerator and peripherals, such as watchdog and
secure flash. Software running on the Secure Enclave is isolated via
hardware for enhanced security. Communication with the Secure Encalve
is achieved using Message Hnadling Units (MHUs) and shared memory.
On system power on, the Secure Enclaves boots first. Its software
comprises of two boot loading stages, both based on mcuboot, and
TrustedFirmware-M(`TF-M`_) as runtime software. The software design on
Secure Enclave follows Firmware Framework for M class
processor (`FF-M`_) specification.
The Host System is based on ARM Cotex-A35 processor with standardized
peripherals to allow for the booting of a Linux OS. The Cortex-A35 has
the TrustZone technology that allows secure and non-secure security
states in the processor. The software design in the Host System follows
Firmware Framework for A class procseeor (`FF-A`_) specification.
The boot process follows Trusted Boot Base Requirement (`TBBR`_).
The Host Subsystem is taken out of reset by the Secure Enclave system
during its final stages of the initialization. The Host subsystem runs
FF-A Secure Partitions(based on `Trusted Services`_) and OPTEE-OS
(`OPTEE-OS`_) in the secure world, and u-boot(`u-boot repo`_) and
linux (`linux repo`_) in the non-secure world. The communication between
non-secure and the secure world is performed via FF-A messages.
An external system is intended to implement use-case specific
functionality. The system is based on Cortex-M3 and run RTX RTOS.
Communictaion between external system and Host(cortex-A35) is performed
using MHU as transport mechanism and rpmsg messaging system.
Overall, the corstone1000 architecture is designed to cover a range
of Power, Performance, and Area (PPA) applications, and enable extension
for use-case specific applications, for example, sensors, cloud
connectivitiy, and edge computing.
*****************
Secure Boot Chain
*****************
For the security of a device, it is essential that only authorized
software should run on the device. The corstone1000 boot uses a
Secure Boot Chain process where an already authenticated image verifies
and loads the following software in the chain. For the boot chain
process to work, the start of the chain should be trusted, forming the
Root of Trust (RoT) of the device. The RoT of the device is immutable in
nature and encoded into the device by the device owner before it
is deployed into the field. In Corstone1000, the BL1 image of the secure
enclave and content of the CC312 OTP (One Time Programmable) memory
forms the RoT. The BL1 image exists in ROM (Read Only Memory).
.. image:: images/SecureBootChain.png
:width: 870
:alt: SecureBootChain
It is a lengthy chain to boot the software on corstone1000. On power on,
the secure enclave starts executing BL1 code from the ROM which is the RoT
of the device. Authentication of an image involves the steps listed below:
- Load image from flash to dynamic RAM.
- The public key present in the image header is validated by comparing with the hash. Depending on the image, the hash of the public key is either stored in the OTP or part of the software which is being already verfied in the previous stages.
- The image is validated using the public key.
In the secure enclave, BL1 authenticates the BL2 and passes the execution
control. BL2 authenticates the initial boot loader of the host (Host BL2)
and TF-M. The execution control is now passed to TF-M. TF-M being the run
time executable of secure enclaves initializes itself and, in the end,
brings the host CPU out of rest. The host follows the boot standard defined
in the `TBBR`_ to authenticate the secure and non-secure software.
***************
Secure Services
***************
corstone1000 is unique in providing a secure environment to run a secure
workload. The platform has Trustzone technology in the Host subsystem but
it also has hardware isolated secure enclave environment to run such secure
workloads. In corstone1000, known Secure Services such as Crypto, Protected
Storage, Internal Trusted Storage and Attestation are available via PSA
Functional APIs in TF-M. There is no difference for a user communicating to
these services which are running on a secure enclave instead of the
secure world of the host subsystem. The below diagram presents the data
flow path for such calls.
.. image:: images/SecureServices.png
:width: 930
:alt: SecureServices
The SE Proxy SP (Secure Enclave Proxy Secure Partition) is a proxy partition
managed by OPTEE which forwards such calls to the secure enclave. The
solution relies on OpenAMP which uses shared memory and MHU interrupts as
a doorbell for communication between two cores. corstone1000 implements
isolation level 2. Cortex-M0+ MPU (Memory Protection Unit) is used to implement
isolation level 2.
For a user to define its own secure service, both the options of the host
secure world or secure encalve are available. It's a trade-off between
lower latency vs higher security. Services running on a secure enclave are
secure by real hardware isolation but have a higher latency path. In the
second scenario, the services running on the secure world of the host
subsystem have lower latency but virtual hardware isolation created by
Trustzone technology.
**********************
Secure Firmware Update
**********************
Apart from always booting the authorized images, it is also essential that
the device only accepts the authorized images in the firmware update
process. corstone1000 supports OTA (Over the Air) firmware updates and
follows Platform Security Firmware Update sepcification (`FWU`_).
As standardized into `FWU`_, the external flash is divided into two
banks of which one bank has currently running images and the other bank is
used for staging new images. There are four updatable units, i.e. Secure
Enclave's BL2 and TF-M, and Host's FIP (Firmware Image Package) and Kernel
Image. The new images are accepted in the form of a UEFI capsule.
.. image:: images/ExternalFlash.png
:width: 690
:alt: ExternalFlash
The Metadata Block in the flash has the below firmware update state machine.
TF-M runs an OTA service that is responsible for accepting and updating the
images in the flash. The communication between the UEFI Capsule update
subsystem and the OTA service follows the same data path explained above.
The OTA service writes the new images to the passive bank after successful
capsule verification. It changes the state of the system to trial state and
triggers the reset. Boot loaders in Secure Enclave and Host read the Metadata
block to get the information on the boot bank. In the successful trial stage,
the acknowledgment from the host moves the state of the system from trial to
regular. Any failure in the trial stage or system hangs leads to a system
reset. This is made sure by the use of watchdog hardware. The Secure Enclave's
BL1 has the logic to identify multiple resets and eventually switch back to the
previous good bank. The ability to revert to the previous bank is crucial to
guarantee the availability of the device.
.. image:: images/SecureFirmwareUpdate.png
:width: 430
:alt: SecureFirmwareUpdate
******************************
UEFI Runtime Support in u-boot
******************************
Implementation of UEFI boottime and runtime APIs require variable storage.
In corstone1000, these UEFI variables are stored in the Protected Storage
service. The below diagram presents the data flow to store UEFI variables.
The u-boot implementation of the UEFI subsystem uses the FF-A driver to
communicate with the SMM Service in the secure world. The backend of the
SMM service uses the proxy PS from the SE Proxy SP. From there on, the PS
calls are forwarded to the secure enclave as explained above.
.. image:: images/UEFISupport.png
:width: 590
:alt: UEFISupport
***************
References
***************
`ARM corstone1000 Search`_
`Arm security features`_
--------------
*Copyright (c) 2022, Arm Limited. All rights reserved.*
.. _Arm corstone1000 Technical Overview: https://developer.arm.com/documentation/102360/0000
.. _Arm corstone1000 Software: https://developer.arm.com/Tools%20and%20Software/Corstone-1000%20Software
.. _Arm corstone1000 Search: https://developer.arm.com/search#q=corstone-1000
.. _Arm security features: https://www.arm.com/architecture/security-features/platform-security
.. _linux repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
.. _FF-A: https://developer.arm.com/documentation/den0077/latest
.. _FF-M: https://developer.arm.com/-/media/Files/pdf/PlatformSecurityArchitecture/Architect/DEN0063-PSA_Firmware_Framework-1.0.0-2.pdf?revision=2d1429fa-4b5b-461a-a60e-4ef3d8f7f4b4&hash=3BFD6F3E687F324672F18E5BE9F08EDC48087C93
.. _FWU: https://developer.arm.com/documentation/den0118/a/
.. _OPTEE-OS: https://github.com/OP-TEE/optee_os
.. _PSA: https://www.psacertified.org/
.. _PSA L2 Ready: https://www.psacertified.org/products/corstone-1000/
.. _SRIR cert: https://armkeil.blob.core.windows.net/developer/Files/pdf/certificate-list/arm-systemready-ir-certification-arm-corstone-1000.pdf
.. _TBBR: https://developer.arm.com/documentation/den0006/latest
.. _TF-M: https://www.trustedfirmware.org/projects/tf-m/
.. _Trusted Services: https://www.trustedfirmware.org/projects/trusted-services/
.. _u-boot repo: https://github.com/u-boot/u-boot.git
File diff suppressed because it is too large Load Diff
@@ -27,9 +27,9 @@ The fvp-baser-aemv8r64 Yocto MACHINE supports the following BSP components,
where either a standard or Real-Time Linux kernel (PREEMPT\_RT) can be built
and run:
- FVP_Base_AEMv8R: v11.19.14
- FVP_Base_AEMv8R: v11.20.15
- boot-wrapper-aarch64: provides PSCI support
- U-Boot: v2022.01 - provides UEFI services
- U-Boot: v2022.07 - provides UEFI services
- Linux kernel: linux-yocto-5.15
- Linux kernel with PREEMPT\_RT support: linux-yocto-rt-5.15
+1 -12
View File
@@ -4,9 +4,6 @@
For a description of the hardware, go to
https://developer.arm.com/tools-and-software/development-boards/iot-test-chips-and-boards/musca-b-test-chip-board
For current supported hardware by Zephyr, go to
https://docs.zephyrproject.org/2.3.0/boards/arm/v2m_musca/doc/index.html
For emulated hardware, go to
https://www.qemu.org/docs/master/system/arm/musca.html
@@ -14,13 +11,5 @@ https://www.qemu.org/docs/master/system/arm/musca.html
In the local.conf file, MACHINE should be set as follows:
MACHINE ?= "musca-b1"
To build for Zephyr:
```bash$ bitbake-layers layerindex-fetch meta-zephyr```
```bash$ bitbake zephyr-philosophers```
To build the trusted firmware-m (and not Zephyr):
To build the trusted firmware-m:
```bash$ bitbake trusted-firmware-m```
## Running
To run Zephyr on the QEMU based machine, execute the following command
```bash$ runqemu qemu-musca-b1```
@@ -0,0 +1,12 @@
# Copyright (c) 2022, Arm Limited.
#
# SPDX-License-Identifier: MIT
# Read The Docs specific
jinja2==3.1.1
# Required to build the documentation
sphinx==4.5.0
sphinx_rtd_theme==1.0.0
sphinx-copybutton==0.5.0
docutils==0.17.1
-32
View File
@@ -1,32 +0,0 @@
# TC0 Platform Support in meta-arm-bsp
## Overview
The Total Compute platform provides an envelope for all of Arm's latest IP and
software solutions, optimised to work together. Further information can be
found on the Total Compute community page:
https://community.arm.com/developer/tools-software/oss-platforms/w/docs/606/total-compute
The user guide for TC0 platform with detailed instructions for
syncing and building the source code and running on TC0 Fixed Virtual Platform
for poky and android distributions is available at:
https://git.linaro.org/landing-teams/working/arm/arm-reference-platforms.git/tree/docs/tc0/user-guide.rst
## Building
In the local.conf file, MACHINE should be set as follows:
MACHINE = "tc0"
To build the required binaries for tc0, run the commmand:
```bash$ bitbake tc-artifacts-image```
Trusted-firmware-a is the final component to be built with the rest of the
components dependent of it, therefore building tc-artifacts-image which depends
on trusted-firmware-a will build all the required binaries.
## Running
To run the produced binaries in a TC0 Fixed Virtual Platform please get
the run scripts at:
https://git.linaro.org/landing-teams/working/arm/model-scripts.git/
and follow the instructions in the user-guide.rst available in:
https://git.linaro.org/landing-teams/working/arm/arm-reference-platforms.git/tree/docs/tc0/user-guide.rst
@@ -0,0 +1,48 @@
SUMMARY = "External system Cortex-M3 Firmware"
DESCRIPTION = "Firmware to be loaded and run in External System Harness in\
support to the main application CPU."
HOMEPAGE = "https://git.linaro.org/landing-teams/working/arm/external-system.git"
DEPENDS = "gcc-arm-none-eabi-native"
INHIBIT_DEFAULT_DEPS="1"
LICENSE = "BSD-3-Clause & Apache-2.0"
LIC_FILES_CHKSUM = "file://license.md;md5=e44b2531cd6ffe9dece394dbe988d9a0 \
file://cmsis/LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e"
SRC_URI = "gitsm://git.gitlab.arm.com/arm-reference-solutions/corstone1000/external_system/rtx.git;protocol=https;branch=master \
file://race.patch"
SRCREV = "8c9dca74b104ff6c9722fb0738ba93dd3719c080"
PV .= "+git${SRCPV}"
COMPATIBLE_MACHINE = "(corstone1000)"
# PRODUCT is passed to the Makefile to specify the platform to be used.
PRODUCT = "corstone-1000"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
LDFLAGS[unexport] = "1"
do_compile() {
oe_runmake -C ${S} V=y \
BUILD_PATH=${B} \
PRODUCT=${PRODUCT} \
CROSS_COMPILE=arm-none-eabi- \
all
}
do_compile[cleandirs] = "${B}"
do_install() {
install -D -p -m 0644 ${B}/product/${PRODUCT}/firmware/release/bin/firmware.bin ${D}/firmware/es_flashfw.bin
}
FILES:${PN} = "/firmware"
SYSROOT_DIRS += "/firmware"
inherit deploy
do_deploy() {
cp -rf ${D}/firmware/* ${DEPLOYDIR}/
}
addtask deploy after do_install
@@ -0,0 +1,66 @@
Upstream-Status: Submitted [https://gitlab.arm.com/arm-reference-solutions/corstone1000/external_system/rtx/-/issues/1]
Signed-off-by: Ross Burton <ross.burton@arm.com>
From 34e1c04534607f5605255f39fb46e26261fc9c4e Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@arm.com>
Date: Tue, 8 Sep 2020 11:49:08 +0100
Subject: [PATCH] tools/gen_module_code: atomically rewrite the generated files
The gen_module rule in rules.mk is marked as .PHONY, so make will
execute it whenever it is mentioned. This results in gen_module_code
being executed 64 times for a Juno build.
However in heavily parallel builds there's a good chance that
gen_module_code is writing a file whilst the compiler is reading it
because make also doesn't know what files are generated by
gen_module_code.
The correct fix is to adjust the Makefiles so that the dependencies are
correct but this isn't trivial, so band-aid the problem by atomically
writing the generated files.
Change-Id: I82d44f9ea6537a91002e1f80de8861d208571630
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
tools/gen_module_code.py | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/tools/gen_module_code.py b/tools/gen_module_code.py
index 7b3953845..ee099b713 100755
--- a/tools/gen_module_code.py
+++ b/tools/gen_module_code.py
@@ -17,6 +17,7 @@
import argparse
import os
import sys
+import tempfile
DEFAULT_PATH = 'build/'
@@ -53,13 +54,21 @@
def generate_file(path, filename, content):
full_filename = os.path.join(path, filename)
- with open(full_filename, 'a+') as f:
- f.seek(0)
- if f.read() != content:
+
+ try:
+ with open(full_filename) as f:
+ rewrite = f.read() != content
+ except FileNotFoundError:
+ rewrite = True
+
+ if rewrite:
+ with tempfile.NamedTemporaryFile(prefix="gen-module-code",
+ dir=path,
+ delete=False,
+ mode="wt") as f:
print("[GEN] {}...".format(full_filename))
- f.seek(0)
- f.truncate()
f.write(content)
+ os.replace(f.name, full_filename)
def generate_header(path, modules):
@@ -0,0 +1,252 @@
From c8bd941579fb062359b683b184b851eea2ddb761 Mon Sep 17 00:00:00 2001
From: Ben Horgan <ben.horgan@arm.com>
Date: Fri, 4 Mar 2022 16:48:14 +0000
Subject: [PATCH 1/5] feat: emulate cntp timer register accesses using cnthps
Upstream-Status: Inappropriate [Experimental feature]
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Change-Id: I67508203273baf3bd8e6be2d99717028db945715
---
Makefile | 3 +-
src/arch/aarch64/hypervisor/BUILD.gn | 1 +
src/arch/aarch64/hypervisor/cpu.c | 11 ++-
src/arch/aarch64/hypervisor/handler.c | 6 ++
src/arch/aarch64/hypervisor/timer_el1.c | 104 ++++++++++++++++++++++++
src/arch/aarch64/hypervisor/timer_el1.h | 20 +++++
src/arch/aarch64/msr.h | 8 ++
7 files changed, 150 insertions(+), 3 deletions(-)
create mode 100644 src/arch/aarch64/hypervisor/timer_el1.c
create mode 100644 src/arch/aarch64/hypervisor/timer_el1.h
diff --git a/Makefile b/Makefile
index c9fb16f..6371a8a 100644
--- a/Makefile
+++ b/Makefile
@@ -59,7 +59,8 @@ CHECKPATCH := $(CURDIR)/third_party/linux/scripts/checkpatch.pl \
# debug_el1.c : uses XMACROS, which checkpatch doesn't understand.
# perfmon.c : uses XMACROS, which checkpatch doesn't understand.
# feature_id.c : uses XMACROS, which checkpatch doesn't understand.
-CHECKPATCH_IGNORE := "src/arch/aarch64/hypervisor/debug_el1.c\|src/arch/aarch64/hypervisor/perfmon.c\|src/arch/aarch64/hypervisor/feature_id.c"
+# timer_el1.c : uses XMACROS, which checkpatch doesn't understand.
+CHECKPATCH_IGNORE := "src/arch/aarch64/hypervisor/debug_el1.c\|src/arch/aarch64/hypervisor/perfmon.c\|src/arch/aarch64/hypervisor/feature_id.c\|src/arch/aarch64/hypervisor/timer_el1.c"
OUT ?= out/$(PROJECT)
OUT_DIR = out/$(PROJECT)
diff --git a/src/arch/aarch64/hypervisor/BUILD.gn b/src/arch/aarch64/hypervisor/BUILD.gn
index 6068d1e..de1a414 100644
--- a/src/arch/aarch64/hypervisor/BUILD.gn
+++ b/src/arch/aarch64/hypervisor/BUILD.gn
@@ -45,6 +45,7 @@ source_set("hypervisor") {
"handler.c",
"perfmon.c",
"psci_handler.c",
+ "timer_el1.c",
"vm.c",
]
diff --git a/src/arch/aarch64/hypervisor/cpu.c b/src/arch/aarch64/hypervisor/cpu.c
index c6cebdd..cb41e6e 100644
--- a/src/arch/aarch64/hypervisor/cpu.c
+++ b/src/arch/aarch64/hypervisor/cpu.c
@@ -91,13 +91,20 @@ void arch_regs_reset(struct vcpu *vcpu)
if (is_primary) {
/*
* cnthctl_el2 is redefined when VHE is enabled.
- * EL1PCTEN, don't trap phys cnt access.
- * EL1PCEN, don't trap phys timer access.
+ * EL1PCTEN, don't trap phys cnt access. Except when in
+ * secure world without vhe.
+ * EL1PCEN, don't trap phys timer access. Except when in
+ * secure world without vhe.
*/
if (has_vhe_support()) {
cnthctl |= (1U << 10) | (1U << 11);
} else {
+#if SECURE_WORLD == 1
+ cnthctl &= ~(1U << 0);
+ cnthctl &= ~(1U << 1);
+#else
cnthctl |= (1U << 0) | (1U << 1);
+#endif
}
}
diff --git a/src/arch/aarch64/hypervisor/handler.c b/src/arch/aarch64/hypervisor/handler.c
index cd64d68..c9068c5 100644
--- a/src/arch/aarch64/hypervisor/handler.c
+++ b/src/arch/aarch64/hypervisor/handler.c
@@ -34,6 +34,7 @@
#include "psci_handler.h"
#include "smc.h"
#include "sysregs.h"
+#include "timer_el1.h"
/**
* Hypervisor Fault Address Register Non-Secure.
@@ -1276,6 +1277,11 @@ void handle_system_register_access(uintreg_t esr_el2)
inject_el1_unknown_exception(vcpu, esr_el2);
return;
}
+ } else if (timer_el1_is_register_access(esr_el2)) {
+ if (!timer_el1_process_access(vcpu, vm_id, esr_el2)) {
+ inject_el1_unknown_exception(vcpu, esr_el2);
+ return;
+ }
} else {
inject_el1_unknown_exception(vcpu, esr_el2);
return;
diff --git a/src/arch/aarch64/hypervisor/timer_el1.c b/src/arch/aarch64/hypervisor/timer_el1.c
new file mode 100644
index 0000000..c30e554
--- /dev/null
+++ b/src/arch/aarch64/hypervisor/timer_el1.c
@@ -0,0 +1,104 @@
+/*
+ * Copyright 2022 The Hafnium Authors.
+ *
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the LICENSE file or at
+ * https://opensource.org/licenses/BSD-3-Clause.
+ */
+
+#include "timer_el1.h"
+
+#include "hf/dlog.h"
+
+#include "msr.h"
+#include "sysregs.h"
+
+/*
+ * Physical timer (CNTP) register encodings as defined in
+ * table D13-8 of the ARMv8 ARM (DDI0487F).
+ * TYPE, op0, op1, crn, crm, op2
+ * The register names are the concatenation of
+ * "CNTP_", TYPE and "_EL2".
+ */
+#define CNTP_REGISTERS \
+ X(CTL, 3, 3, 14, 2, 1) \
+ X(CVAL, 3, 3, 14, 2, 2) \
+ X(TVAL, 3, 3, 14, 2, 0) \
+
+bool timer_el1_is_register_access(uintreg_t esr)
+{
+ uintreg_t sys_register = GET_ISS_SYSREG(esr);
+ bool is_timer_access;
+ switch (sys_register) {
+#define X(type, op0, op1, crn, crm, op2) \
+ case (GET_ISS_ENCODING(op0, op1, crn, crm, op2)): \
+ is_timer_access = true; \
+ break;
+ CNTP_REGISTERS
+#undef X
+ case (GET_ISS_ENCODING(3, 3, 14, 0, 1)):
+ is_timer_access = true;
+ break;
+ default:
+ is_timer_access = false;
+ }
+
+ return is_timer_access;
+}
+
+/* Accesses to CNTP timer emulated with CNTHPS */
+bool timer_el1_process_access(struct vcpu *vcpu, ffa_vm_id_t vm_id,
+ uintreg_t esr)
+{
+ uintreg_t sys_register = GET_ISS_SYSREG(esr);
+ uintreg_t rt_register = GET_ISS_RT(esr);
+ uintreg_t value;
+
+ if (ISS_IS_READ(esr)) {
+ switch (sys_register) {
+#define X(type, op0, op1, crn, crm, op2) \
+ case (GET_ISS_ENCODING(op0, op1, crn, crm, op2)): \
+ value = read_msr(MSR_CNTHPS_##type##_EL2); \
+ vcpu->regs.r[rt_register] = value; \
+ break;
+ CNTP_REGISTERS
+#undef X
+ case (GET_ISS_ENCODING(3, 3, 14, 0, 1)):
+ value = read_msr(cntpct_el0);
+ vcpu->regs.r[rt_register] = value;
+ break;
+ default:
+ dlog_notice(
+ "Unsupported timer register "
+ "read: "
+ "op0=%d, op1=%d, crn=%d, crm=%d, op2=%d, "
+ "rt=%d.\n",
+ GET_ISS_OP0(esr), GET_ISS_OP1(esr),
+ GET_ISS_CRN(esr), GET_ISS_CRM(esr),
+ GET_ISS_OP2(esr), GET_ISS_RT(esr));
+ break;
+ }
+ } else {
+ value = vcpu->regs.r[rt_register];
+ switch (sys_register) {
+#define X(type, op0, op1, crn, crm, op2) \
+ case (GET_ISS_ENCODING(op0, op1, crn, crm, op2)): \
+ write_msr(MSR_CNTHPS_##type##_EL2, value); \
+ break;
+ CNTP_REGISTERS
+#undef X
+ default:
+ dlog_notice(
+ "Unsupported timer register "
+ "write: "
+ "op0=%d, op1=%d, crn=%d, crm=%d, op2=%d, "
+ "rt=%d, value=%d.\n",
+ GET_ISS_OP0(esr), GET_ISS_OP1(esr),
+ GET_ISS_CRN(esr), GET_ISS_CRM(esr),
+ GET_ISS_OP2(esr), GET_ISS_RT(esr), value);
+ break;
+ }
+ }
+
+ return true;
+}
diff --git a/src/arch/aarch64/hypervisor/timer_el1.h b/src/arch/aarch64/hypervisor/timer_el1.h
new file mode 100644
index 0000000..04a43b6
--- /dev/null
+++ b/src/arch/aarch64/hypervisor/timer_el1.h
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2022 The Hafnium Authors.
+ *
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the LICENSE file or at
+ * https://opensource.org/licenses/BSD-3-Clause.
+ */
+
+#pragma once
+
+#include "hf/arch/types.h"
+
+#include "hf/cpu.h"
+
+#include "vmapi/hf/ffa.h"
+
+bool timer_el1_is_register_access(uintreg_t esr);
+
+bool timer_el1_process_access(struct vcpu *vcpu, ffa_vm_id_t vm_id,
+ uintreg_t esr);
diff --git a/src/arch/aarch64/msr.h b/src/arch/aarch64/msr.h
index cd6778b..55e7833 100644
--- a/src/arch/aarch64/msr.h
+++ b/src/arch/aarch64/msr.h
@@ -126,3 +126,11 @@
#define MSR_ELR_EL12 S3_5_C4_C0_1
#endif
+
+/*
+ * Secure EL2 Physical timer (CNTHPS) register encodings as defined in
+ * table D13-8 of the ARMv8 ARM (DDI0487F).
+ */
+#define MSR_CNTHPS_CTL_EL2 S3_4_C14_C5_1
+#define MSR_CNTHPS_CVAL_EL2 S3_4_C14_C5_2
+#define MSR_CNTHPS_TVAL_EL2 S3_4_C14_C5_0
--
2.17.1
@@ -1,36 +0,0 @@
From dace8802ae6332eb4ca29faf288b96c83fadb2ae Mon Sep 17 00:00:00 2001
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Date: Tue, 28 Sep 2021 11:22:27 +0100
Subject: [PATCH 1/2] fix: fail mapping if start address exceeds page table
mapping limit
Currently the end address is capped to stay within bounds of page
table range. If in case the start address is beyond bounds of
page table then no mapping is made but the mm_map_root incorrectly
returns success.
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I858ac653aafff62e9a2cf5771a32dc38690cd899
Upstream-Status: Pending [Not submitted to upstream yet]
---
src/mm.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/mm.c b/src/mm.c
index 6f15748..c57e24e 100644
--- a/src/mm.c
+++ b/src/mm.c
@@ -472,6 +472,10 @@ static bool mm_ptable_identity_map(struct mm_ptable *t, paddr_t pa_begin,
*/
CHECK(root_level >= 2);
+ if (begin >= ptable_end) {
+ return false;
+ }
+
/* Cap end to stay within the bounds of the page table. */
if (end > ptable_end) {
end = ptable_end;
--
2.30.2
@@ -1,197 +0,0 @@
From 45187e2f9c73ea96e69d1f46f0c24ff31d7f9298 Mon Sep 17 00:00:00 2001
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Date: Tue, 28 Sep 2021 11:25:25 +0100
Subject: [PATCH 2/2] Extend Stage 1 mapping limit
As Stage 1 mappings are limited to 512GB, registering FF-A RxTx buffers
fails when the physical address of these buffers exceeds 512GB. This
fix removes the limitation and allows Stage 1 mapping up to the
supported PA range.
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I4cb8d68fc18e0edf4a7ee06ae636849d552d72a9
Upstream-Status: Pending [Not submitted to upstream yet]
---
inc/hf/arch/mm.h | 7 ++++++-
src/arch/aarch64/mm.c | 38 ++++++++++++++++++++++++++------------
src/arch/fake/mm.c | 9 +++++++--
src/mm.c | 8 +++++++-
4 files changed, 46 insertions(+), 16 deletions(-)
diff --git a/inc/hf/arch/mm.h b/inc/hf/arch/mm.h
index ef64dd3..d277369 100644
--- a/inc/hf/arch/mm.h
+++ b/inc/hf/arch/mm.h
@@ -162,7 +162,12 @@ uint32_t arch_mm_stage1_attrs_to_mode(uint64_t attrs);
/**
* Initializes the arch specific memory management.
*/
-bool arch_mm_init(paddr_t table);
+bool arch_mm_init(void);
+
+/**
+ * Set ptable base address.
+ */
+void arch_mm_set_ptable(paddr_t table);
/**
* Return the arch specific mm mode for send/recv pages of given VM ID.
diff --git a/src/arch/aarch64/mm.c b/src/arch/aarch64/mm.c
index 7256c28..0ee0bb6 100644
--- a/src/arch/aarch64/mm.c
+++ b/src/arch/aarch64/mm.c
@@ -141,6 +141,7 @@ struct arch_mm_config {
uintreg_t hcr_el2;
} arch_mm_config;
+static uint8_t mm_s1_max_level;
static uint8_t mm_s2_max_level;
static uint8_t mm_s2_root_table_count;
@@ -676,12 +677,7 @@ uint32_t arch_mm_stage2_attrs_to_mode(uint64_t attrs)
uint8_t arch_mm_stage1_max_level(void)
{
- /*
- * For stage 1 we hard-code this to 2 for now so that we can
- * save one page table level at the expense of limiting the
- * physical memory to 512GB.
- */
- return 2;
+ return mm_s1_max_level;
}
uint8_t arch_mm_stage2_max_level(void)
@@ -735,10 +731,16 @@ uint64_t arch_mm_combine_table_entry_attrs(uint64_t table_attrs,
return block_attrs;
}
+void
+arch_mm_set_ptable(paddr_t table)
+{
+ arch_mm_config.ttbr0_el2 = pa_addr(table);
+}
+
/**
* This is called early in initialization without MMU or caches enabled.
*/
-bool arch_mm_init(paddr_t table)
+bool arch_mm_init(void)
{
static const int pa_bits_table[16] = {32, 36, 40, 42, 44, 48};
uint64_t features = read_msr(id_aa64mmfr0_el1);
@@ -784,6 +786,13 @@ bool arch_mm_init(paddr_t table)
mm_s2_max_level = 1;
}
+ if (pa_bits >= 40) {
+ mm_s1_max_level = 3;
+ } else {
+ /* Setting to 2 covers physical memory upto 512GB */
+ mm_s1_max_level = 2;
+ }
+
/*
* Since the shallowest possible tree is used, the maximum number of
* concatenated tables must be used. This means if no more than 4 bits
@@ -800,6 +809,10 @@ bool arch_mm_init(paddr_t table)
"Stage 2 has %d page table levels with %d pages at the root.\n",
mm_s2_max_level + 1, mm_s2_root_table_count);
+ dlog_info("Stage 1 has %d page table levels with %d pages at the "
+ "root.\n", mm_s1_max_level + 1,
+ arch_mm_stage1_root_table_count());
+
/*
* If the PE implements S-EL2 then VTCR_EL2.NSA/NSW bits are significant
* in secure state. In non-secure state, NSA/NSW behave as if set to
@@ -818,8 +831,6 @@ bool arch_mm_init(paddr_t table)
}
arch_mm_config = (struct arch_mm_config){
- .ttbr0_el2 = pa_addr(table),
-
.vtcr_el2 =
(1U << 31) | /* RES1. */
(nsa_nsw << 29) | /* NSA/NSW. */
@@ -879,14 +890,16 @@ bool arch_mm_init(paddr_t table)
<< 24) | /* IRGN1, normal mem, WB RA WA Cacheable. */
(1UL << 23) | /* EPD1 - Disable TTBR1_EL2 translation */
(0UL << 22) | /* TTBR0_EL2.ASID defines ASID */
- (25UL << 16) | /* T1SZ, input address is 2^39 bytes. */
+ ((64 - pa_bits) << 16) | /* T1SZ, input address is *
+ 2^pa_bits bytes. */
(0UL << 14) | /* TG0, granule size, 4KB. */
(3UL << 12) | /* SH0, inner shareable. */
(1UL
<< 10) | /* ORGN0, normal mem, WB RA WA Cacheable. */
(1UL
<< 8) | /* IRGN0, normal mem, WB RA WA Cacheable. */
- (25UL << 0) | /* T0SZ, input address is 2^39 bytes. */
+ ((64 - pa_bits) << 0) | /* T0SZ, input address is *
+ 2^pa_bits bytes. */
0;
} else {
arch_mm_config.tcr_el2 =
@@ -896,7 +909,8 @@ bool arch_mm_init(paddr_t table)
(3 << 12) | /* SH0, inner shareable. */
(1 << 10) | /* ORGN0, normal mem, WB RA WA Cacheable. */
(1 << 8) | /* IRGN0, normal mem, WB RA WA Cacheable. */
- (25 << 0) | /* T0SZ, input address is 2^39 bytes. */
+ ((64 - pa_bits) << 0) | /* T0SZ, input address is *
+ 2^pa_bits bytes. */
0;
}
return true;
diff --git a/src/arch/fake/mm.c b/src/arch/fake/mm.c
index e06a8b7..8ac63fa 100644
--- a/src/arch/fake/mm.c
+++ b/src/arch/fake/mm.c
@@ -161,13 +161,18 @@ uint32_t arch_mm_stage1_attrs_to_mode(uint64_t attrs)
return attrs >> PTE_ATTR_MODE_SHIFT;
}
-bool arch_mm_init(paddr_t table)
+bool arch_mm_init(void)
{
/* No initialization required. */
- (void)table;
return true;
}
+void arch_mm_set_ptable(paddr_t table)
+{
+ /* No initialization required. */
+ (void)table;
+}
+
uint32_t arch_mm_extra_attributes_from_vm(ffa_vm_id_t id)
{
(void)id;
diff --git a/src/mm.c b/src/mm.c
index c57e24e..aa0c512 100644
--- a/src/mm.c
+++ b/src/mm.c
@@ -1114,6 +1114,10 @@ bool mm_init(struct mpool *ppool)
dlog_info("data: %#x - %#x\n", pa_addr(layout_data_begin()),
pa_addr(layout_data_end()));
+ if (!arch_mm_init()) {
+ return false;
+ }
+
/* ASID 0 is reserved for use by the hypervisor. */
if (!mm_ptable_init(&ptable, 0, MM_FLAG_STAGE1, ppool)) {
dlog_error("Unable to allocate memory for page table.\n");
@@ -1133,5 +1137,7 @@ bool mm_init(struct mpool *ppool)
mm_identity_map(stage1_locked, layout_data_begin(), layout_data_end(),
MM_MODE_R | MM_MODE_W, ppool);
- return arch_mm_init(ptable.root);
+ arch_mm_set_ptable(ptable.root);
+
+ return true;
}
--
2.30.2
@@ -0,0 +1,159 @@
From 380f2cf944dd5db36c168a11d31a46ad14cdcb6d Mon Sep 17 00:00:00 2001
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Date: Tue, 26 Apr 2022 14:43:58 +0100
Subject: [PATCH 4/5] feat: emulate interrupt controller register access
This emulates ICC_SGI1R_EL1 and ICC_IGRPEN1_EL1 register
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I0c11f034f3676067597461a183a341c809adcaa4
Upstream-Status: Inappropriate [Experimental feature]
---
src/arch/aarch64/hypervisor/handler.c | 5 ++
src/arch/aarch64/hypervisor/perfmon.c | 84 +++++++++++++++++++++++++++
src/arch/aarch64/hypervisor/perfmon.h | 5 ++
src/arch/aarch64/msr.h | 3 +
4 files changed, 97 insertions(+)
diff --git a/src/arch/aarch64/hypervisor/handler.c b/src/arch/aarch64/hypervisor/handler.c
index c9068c5..b9aa5d8 100644
--- a/src/arch/aarch64/hypervisor/handler.c
+++ b/src/arch/aarch64/hypervisor/handler.c
@@ -1282,6 +1282,11 @@ void handle_system_register_access(uintreg_t esr_el2)
inject_el1_unknown_exception(vcpu, esr_el2);
return;
}
+ } else if (intr_ctrl_is_register_access(esr_el2)) {
+ if (!intr_ctrl_el1_process_access(vcpu, vm_id, esr_el2)) {
+ inject_el1_unknown_exception(vcpu, esr_el2);
+ return;
+ }
} else {
inject_el1_unknown_exception(vcpu, esr_el2);
return;
diff --git a/src/arch/aarch64/hypervisor/perfmon.c b/src/arch/aarch64/hypervisor/perfmon.c
index f13b035..05e216c 100644
--- a/src/arch/aarch64/hypervisor/perfmon.c
+++ b/src/arch/aarch64/hypervisor/perfmon.c
@@ -116,6 +116,10 @@
X(PMEVTYPER30_EL0 , 3, 3, 14, 15, 6) \
X(PMCCFILTR_EL0 , 3, 3, 14, 15, 7)
+#define INTR_CTRL_REGISTERS \
+ X(ICC_IGRPEN1_EL1 , 3, 0, 12, 12, 7) \
+ X(ICC_SGI1R_EL1 , 3, 0, 12, 11, 5) \
+
/* clang-format on */
/**
@@ -232,3 +236,83 @@ uintreg_t perfmon_get_pmccfiltr_el0_init_value(ffa_vm_id_t vm_id)
return 0;
}
+
+bool intr_ctrl_is_register_access(uintreg_t esr)
+{
+ uintreg_t op0 = GET_ISS_OP0(esr);
+ uintreg_t op1 = GET_ISS_OP1(esr);
+ uintreg_t crn = GET_ISS_CRN(esr);
+ uintreg_t crm = GET_ISS_CRM(esr);
+
+ if (op0 == 3 && op1 == 0 && crn == 12 && crm == 12) {
+ return true;
+ }
+
+ if (op0 == 3 && op1 == 0 && crn == 12 && crm == 11) {
+ return true;
+ }
+
+ return false;
+}
+
+bool intr_ctrl_el1_process_access(struct vcpu *vcpu, ffa_vm_id_t vm_id,
+ uintreg_t esr)
+{
+ uintreg_t sys_register = GET_ISS_SYSREG(esr);
+ uintreg_t rt_register = GET_ISS_RT(esr);
+ uintreg_t value;
+
+ /* +1 because Rt can access register XZR */
+ CHECK(rt_register < NUM_GP_REGS + 1);
+
+ if (ISS_IS_READ(esr)) {
+ switch (sys_register) {
+#define X(reg_name, op0, op1, crn, crm, op2) \
+ case (GET_ISS_ENCODING(op0, op1, crn, crm, op2)): \
+ value = read_msr(reg_name); \
+ break;
+ INTR_CTRL_REGISTERS
+#undef X
+ default:
+ value = vcpu->regs.r[rt_register];
+ dlog_notice(
+ "Unsupported interrupt control register "
+ "read: "
+ "op0=%d, op1=%d, crn=%d, crm=%d, op2=%d, "
+ "rt=%d.\n",
+ GET_ISS_OP0(esr), GET_ISS_OP1(esr),
+ GET_ISS_CRN(esr), GET_ISS_CRM(esr),
+ GET_ISS_OP2(esr), GET_ISS_RT(esr));
+ break;
+ }
+ if (rt_register != RT_REG_XZR) {
+ vcpu->regs.r[rt_register] = value;
+ }
+ } else {
+ if (rt_register != RT_REG_XZR) {
+ value = vcpu->regs.r[rt_register];
+ } else {
+ value = 0;
+ }
+ switch (sys_register) {
+#define X(reg_name, op0, op1, crn, crm, op2) \
+ case (GET_ISS_ENCODING(op0, op1, crn, crm, op2)): \
+ write_msr(reg_name, value); \
+ break;
+ INTR_CTRL_REGISTERS
+#undef X
+ default:
+ dlog_notice(
+ "Unsupported interrupt control register "
+ "write: "
+ "op0=%d, op1=%d, crn=%d, crm=%d, op2=%d, "
+ "rt=%d.\n",
+ GET_ISS_OP0(esr), GET_ISS_OP1(esr),
+ GET_ISS_CRN(esr), GET_ISS_CRM(esr),
+ GET_ISS_OP2(esr), GET_ISS_RT(esr));
+ break;
+ }
+ }
+
+ return true;
+}
diff --git a/src/arch/aarch64/hypervisor/perfmon.h b/src/arch/aarch64/hypervisor/perfmon.h
index 81669ba..c90d45b 100644
--- a/src/arch/aarch64/hypervisor/perfmon.h
+++ b/src/arch/aarch64/hypervisor/perfmon.h
@@ -70,3 +70,8 @@ bool perfmon_process_access(struct vcpu *vcpu, ffa_vm_id_t vm_id,
uintreg_t esr_el2);
uintreg_t perfmon_get_pmccfiltr_el0_init_value(ffa_vm_id_t vm_id);
+
+bool intr_ctrl_is_register_access(uintreg_t esr);
+
+bool intr_ctrl_el1_process_access(struct vcpu *vcpu, ffa_vm_id_t vm_id,
+ uintreg_t esr);
diff --git a/src/arch/aarch64/msr.h b/src/arch/aarch64/msr.h
index 55e7833..82aa884 100644
--- a/src/arch/aarch64/msr.h
+++ b/src/arch/aarch64/msr.h
@@ -134,3 +134,6 @@
#define MSR_CNTHPS_CTL_EL2 S3_4_C14_C5_1
#define MSR_CNTHPS_CVAL_EL2 S3_4_C14_C5_2
#define MSR_CNTHPS_TVAL_EL2 S3_4_C14_C5_0
+
+#define ICC_IGRPEN1_EL1 S3_0_C12_C12_7
+#define ICC_SGI1R_EL1 S3_0_C12_C11_5
--
2.17.1
@@ -0,0 +1,27 @@
From e918cc5179241e1d35ba4b465b035b74b88e55d2 Mon Sep 17 00:00:00 2001
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Date: Fri, 29 Apr 2022 20:07:50 +0100
Subject: [PATCH] tc: increase heap pages
Upstream-Status: Pending
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
---
/BUILD.gn | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a//BUILD.gn b//BUILD.gn
index 5d84d13..4ea0890 100644
--- a//BUILD.gn
+++ b//BUILD.gn
@@ -233,7 +233,7 @@ aarch64_toolchains("secure_tc") {
gicd_base_address = "0x30000000"
gicr_base_address = "0x30080000"
gicr_frames = 8
- heap_pages = 60
+ heap_pages = 120
max_cpus = 8
max_vms = 16
branch_protection = "standard"
--
2.30.2
@@ -0,0 +1,320 @@
From 1e24b45a8ff34af45dda45c57f8403452d384f99 Mon Sep 17 00:00:00 2001
From: Olivier Deprez <olivier.deprez@arm.com>
Date: Mon, 8 Aug 2022 19:14:23 +0200
Subject: [PATCH] feat: disable alignment check for EL0 partitions
Relax hw alignment check specifically for (S-)EL0 partitions when
Hafnium runs with VHE enabled. EL1 partitions have a specific control
for EL1 and EL0 with respect to alignment check.
Create a hyp_state structure (from already defined flying registers)
within the vCPU context to hold the Hypervisor EL2 static configuration
applied when a vCPU runs. This state is switched back and forth when
running the Hypervisor or the VM.
Add SCTLR_EL2 to this context. An EL0 partition context is initialized
with SCTLR_EL2.A=0 such that alignment check is disabled when EL0 runs
in the EL2&0 translation regime. SCTLR_EL2.A is set back when returning
to the Hypervisor such that Hypervisor execution runs with aligment
check enabled at EL2.
Remove HCR_EL2 saving from vCPU exit path provided this register state
is static and doesn't change while a vCPU runs.
The rationale for such change is to permit running upstream SW stacks
such as the EDKII/StandaloneMm [1] for which default build assumes
unaligned accesses are permitted. Similar query exists for running
Trusted Services on top of Hafnium [2].
[1] https://github.com/tianocore/edk2/tree/master/StandaloneMmPkg
[2] https://trusted-services.readthedocs.io/en/integration/
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I2906f4c712425fcfb31adbf89e2e3b9ca293f181
Upstream-Status: Submitted [https://review.trustedfirmware.org/c/hafnium/hafnium/+/16195]
---
src/arch/aarch64/hypervisor/cpu.c | 9 ++++---
src/arch/aarch64/hypervisor/exceptions.S | 32 ++++++++++++++++--------
src/arch/aarch64/hypervisor/feature_id.c | 6 ++---
src/arch/aarch64/hypervisor/handler.c | 18 +++++++------
src/arch/aarch64/inc/hf/arch/types.h | 9 +++++--
src/arch/aarch64/mm.c | 2 +-
src/arch/aarch64/sysregs.c | 11 ++++++--
src/arch/aarch64/sysregs.h | 2 +-
8 files changed, 59 insertions(+), 30 deletions(-)
diff --git a/src/arch/aarch64/hypervisor/cpu.c b/src/arch/aarch64/hypervisor/cpu.c
index d2df77d..a000159 100644
--- a/src/arch/aarch64/hypervisor/cpu.c
+++ b/src/arch/aarch64/hypervisor/cpu.c
@@ -115,7 +115,9 @@ void arch_regs_reset(struct vcpu *vcpu)
}
}
- r->hcr_el2 = get_hcr_el2_value(vm_id, vcpu->vm->el0_partition);
+ r->hyp_state.hcr_el2 =
+ get_hcr_el2_value(vm_id, vcpu->vm->el0_partition);
+ r->hyp_state.sctlr_el2 = get_sctlr_el2_value(vcpu->vm->el0_partition);
r->lazy.cnthctl_el2 = cnthctl;
if (vcpu->vm->el0_partition) {
CHECK(has_vhe_support());
@@ -125,10 +127,11 @@ void arch_regs_reset(struct vcpu *vcpu)
* are ignored and treated as 0. There is no need to mask the
* VMID (used as asid) to only 8 bits.
*/
- r->ttbr0_el2 = pa_addr(table) | ((uint64_t)vm_id << 48);
+ r->hyp_state.ttbr0_el2 =
+ pa_addr(table) | ((uint64_t)vm_id << 48);
r->spsr = PSR_PE_MODE_EL0T;
} else {
- r->ttbr0_el2 = read_msr(ttbr0_el2);
+ r->hyp_state.ttbr0_el2 = read_msr(ttbr0_el2);
r->lazy.vtcr_el2 = arch_mm_get_vtcr_el2();
r->lazy.vttbr_el2 = pa_addr(table) | ((uint64_t)vm_id << 48);
#if SECURE_WORLD == 1
diff --git a/src/arch/aarch64/hypervisor/exceptions.S b/src/arch/aarch64/hypervisor/exceptions.S
index 539e196..d3732f8 100644
--- a/src/arch/aarch64/hypervisor/exceptions.S
+++ b/src/arch/aarch64/hypervisor/exceptions.S
@@ -20,6 +20,9 @@
#define ID_AA64PFR0_SVE_SHIFT (32)
#define ID_AA64PFR0_SVE_LENGTH (4)
+#define SCTLR_EL2_A_SHIFT (1)
+#define HCR_EL2_TGE_SHIFT (27)
+
/**
* Saves the volatile registers into the register buffer of the current vCPU.
*/
@@ -51,8 +54,6 @@
mrs x1, elr_el2
mrs x2, spsr_el2
stp x1, x2, [x18, #VCPU_REGS + 8 * 31]
- mrs x1, hcr_el2
- str x1, [x18, #VCPU_REGS + 8 * 33]
.endm
/**
@@ -871,12 +872,13 @@ vcpu_restore_volatile_and_run:
msr elr_el2, x1
msr spsr_el2, x2
- ldr x1, [x0, #VCPU_REGS + 8 * 33]
+ ldp x1, x2, [x0, #VCPU_REGS + 8 * 33]
msr hcr_el2, x1
+ msr ttbr0_el2, x2
isb
- ldr x1, [x0, #VCPU_REGS + 8 * 34]
- msr ttbr0_el2, x1
+ ldr x1, [x0, #VCPU_REGS + 8 * 35]
+ msr sctlr_el2, x1
isb
/* Restore x0..x3, which we have used as scratch before. */
@@ -886,15 +888,17 @@ vcpu_restore_volatile_and_run:
#if ENABLE_VHE
enable_vhe_tge:
+ mrs x0, id_aa64mmfr1_el1
+ tst x0, #0xf00
+ b.eq 1f
+
/**
* Switch to host mode ({E2H, TGE} = {1,1}) when VHE is enabled.
* Note that E2H is always set when VHE is enabled.
*/
- mrs x0, id_aa64mmfr1_el1
- tst x0, #0xf00
- b.eq 1f
- orr x1, x1, #(1 << 27)
- msr hcr_el2, x1
+ mrs x0, hcr_el2
+ orr x0, x0, #(1 << HCR_EL2_TGE_SHIFT)
+ msr hcr_el2, x0
isb
/**
@@ -905,6 +909,14 @@ enable_vhe_tge:
ldr x0, [x0]
msr ttbr0_el2, x0
isb
+
+ /**
+ * Enable alignment check while Hypervisor runs.
+ */
+ mrs x0, sctlr_el2
+ orr x0, x0, #(1 << SCTLR_EL2_A_SHIFT)
+ msr sctlr_el2, x0
+ isb
1:
ret
#endif
diff --git a/src/arch/aarch64/hypervisor/feature_id.c b/src/arch/aarch64/hypervisor/feature_id.c
index ed3bf8f..57f3262 100644
--- a/src/arch/aarch64/hypervisor/feature_id.c
+++ b/src/arch/aarch64/hypervisor/feature_id.c
@@ -175,7 +175,7 @@ void feature_set_traps(struct vm *vm, struct arch_regs *regs)
~(ID_AA64MMFR1_EL1_VH_MASK << ID_AA64MMFR1_EL1_VH_SHIFT);
if (features & HF_FEATURE_RAS) {
- regs->hcr_el2 |= HCR_EL2_TERR;
+ regs->hyp_state.hcr_el2 |= HCR_EL2_TERR;
vm->arch.tid3_masks.id_aa64mmfr1_el1 &=
~ID_AA64MMFR1_EL1_SPEC_SEI;
vm->arch.tid3_masks.id_aa64pfr0_el1 &= ~ID_AA64PFR0_EL1_RAS;
@@ -221,14 +221,14 @@ void feature_set_traps(struct vm *vm, struct arch_regs *regs)
}
if (features & HF_FEATURE_LOR) {
- regs->hcr_el2 |= HCR_EL2_TLOR;
+ regs->hyp_state.hcr_el2 |= HCR_EL2_TLOR;
vm->arch.tid3_masks.id_aa64mmfr1_el1 &= ~ID_AA64MMFR1_EL1_LO;
}
if (features & HF_FEATURE_PAUTH) {
/* APK and API bits *enable* trapping when cleared. */
- regs->hcr_el2 &= ~(HCR_EL2_APK | HCR_EL2_API);
+ regs->hyp_state.hcr_el2 &= ~(HCR_EL2_APK | HCR_EL2_API);
vm->arch.tid3_masks.id_aa64isar1_el1 &= ~ID_AA64ISAR1_EL1_GPI;
vm->arch.tid3_masks.id_aa64isar1_el1 &= ~ID_AA64ISAR1_EL1_GPA;
diff --git a/src/arch/aarch64/hypervisor/handler.c b/src/arch/aarch64/hypervisor/handler.c
index cd5146b..8a3d628 100644
--- a/src/arch/aarch64/hypervisor/handler.c
+++ b/src/arch/aarch64/hypervisor/handler.c
@@ -272,9 +272,9 @@ noreturn void sync_current_exception_noreturn(uintreg_t elr, uintreg_t spsr)
static void set_virtual_irq(struct arch_regs *r, bool enable)
{
if (enable) {
- r->hcr_el2 |= HCR_EL2_VI;
+ r->hyp_state.hcr_el2 |= HCR_EL2_VI;
} else {
- r->hcr_el2 &= ~HCR_EL2_VI;
+ r->hyp_state.hcr_el2 &= ~HCR_EL2_VI;
}
}
@@ -283,14 +283,15 @@ static void set_virtual_irq(struct arch_regs *r, bool enable)
*/
static void set_virtual_irq_current(bool enable)
{
- uintreg_t hcr_el2 = current()->regs.hcr_el2;
+ struct vcpu *vcpu = current();
+ uintreg_t hcr_el2 = vcpu->regs.hyp_state.hcr_el2;
if (enable) {
hcr_el2 |= HCR_EL2_VI;
} else {
hcr_el2 &= ~HCR_EL2_VI;
}
- current()->regs.hcr_el2 = hcr_el2;
+ vcpu->regs.hyp_state.hcr_el2 = hcr_el2;
}
/**
@@ -300,9 +301,9 @@ static void set_virtual_irq_current(bool enable)
static void set_virtual_fiq(struct arch_regs *r, bool enable)
{
if (enable) {
- r->hcr_el2 |= HCR_EL2_VF;
+ r->hyp_state.hcr_el2 |= HCR_EL2_VF;
} else {
- r->hcr_el2 &= ~HCR_EL2_VF;
+ r->hyp_state.hcr_el2 &= ~HCR_EL2_VF;
}
}
@@ -311,14 +312,15 @@ static void set_virtual_fiq(struct arch_regs *r, bool enable)
*/
static void set_virtual_fiq_current(bool enable)
{
- uintreg_t hcr_el2 = current()->regs.hcr_el2;
+ struct vcpu *vcpu = current();
+ uintreg_t hcr_el2 = vcpu->regs.hyp_state.hcr_el2;
if (enable) {
hcr_el2 |= HCR_EL2_VF;
} else {
hcr_el2 &= ~HCR_EL2_VF;
}
- current()->regs.hcr_el2 = hcr_el2;
+ vcpu->regs.hyp_state.hcr_el2 = hcr_el2;
}
#if SECURE_WORLD == 1
diff --git a/src/arch/aarch64/inc/hf/arch/types.h b/src/arch/aarch64/inc/hf/arch/types.h
index 6379d73..6b8b24f 100644
--- a/src/arch/aarch64/inc/hf/arch/types.h
+++ b/src/arch/aarch64/inc/hf/arch/types.h
@@ -79,8 +79,13 @@ struct arch_regs {
uintreg_t r[NUM_GP_REGS];
uintreg_t pc;
uintreg_t spsr;
- uintreg_t hcr_el2;
- uintreg_t ttbr0_el2;
+
+ /* Hypervisor configuration while a vCPU runs. */
+ struct {
+ uintreg_t hcr_el2;
+ uintreg_t ttbr0_el2;
+ uintreg_t sctlr_el2;
+ } hyp_state;
/*
* System registers.
diff --git a/src/arch/aarch64/mm.c b/src/arch/aarch64/mm.c
index 8ee65ca..487ae35 100644
--- a/src/arch/aarch64/mm.c
+++ b/src/arch/aarch64/mm.c
@@ -886,7 +886,7 @@ bool arch_mm_init(paddr_t table)
#endif
(0xff << (8 * STAGE1_NORMALINDX)),
- .sctlr_el2 = get_sctlr_el2_value(),
+ .sctlr_el2 = get_sctlr_el2_value(false),
.vstcr_el2 = (1U << 31) | /* RES1. */
(0 << 30) | /* SA. */
(0 << 29) | /* SW. */
diff --git a/src/arch/aarch64/sysregs.c b/src/arch/aarch64/sysregs.c
index e8c154b..087ba4e 100644
--- a/src/arch/aarch64/sysregs.c
+++ b/src/arch/aarch64/sysregs.c
@@ -159,7 +159,7 @@ uintreg_t get_cptr_el2_value(void)
/**
* Returns the value for SCTLR_EL2 for the CPU.
*/
-uintreg_t get_sctlr_el2_value(void)
+uintreg_t get_sctlr_el2_value(bool is_el0_partition)
{
uintreg_t sctlr_el2_value = 0;
@@ -173,7 +173,14 @@ uintreg_t get_sctlr_el2_value(void)
/* MMU-related bits. */
sctlr_el2_value |= SCTLR_EL2_M;
- sctlr_el2_value |= SCTLR_EL2_A;
+
+ /*
+ * Alignment check enabled, but in the case of an EL0 partition
+ * with VHE enabled.
+ */
+ if (!(has_vhe_support() && is_el0_partition)) {
+ sctlr_el2_value |= SCTLR_EL2_A;
+ }
sctlr_el2_value |= SCTLR_EL2_C;
sctlr_el2_value |= SCTLR_EL2_SA;
sctlr_el2_value |= SCTLR_EL2_I;
diff --git a/src/arch/aarch64/sysregs.h b/src/arch/aarch64/sysregs.h
index babd237..6fdab58 100644
--- a/src/arch/aarch64/sysregs.h
+++ b/src/arch/aarch64/sysregs.h
@@ -668,7 +668,7 @@ uintreg_t get_mdcr_el2_value(void);
uintreg_t get_cptr_el2_value(void);
-uintreg_t get_sctlr_el2_value(void);
+uintreg_t get_sctlr_el2_value(bool is_el0_partition);
/**
* Branch Target Identification mechanism support in AArch64 state.
--
2.34.1
@@ -0,0 +1,44 @@
From 02c8afc4f7315b4e12098ffeb8bd5e64e4891e78 Mon Sep 17 00:00:00 2001
From: Davidson K <davidson.kumaresan@arm.com>
Date: Thu, 7 Oct 2021 12:20:08 +0530
Subject: [PATCH] feat(vhe): set STAGE1_NS while mapping memory from NWd to SWd
If the memory is shared by a VM executing in non secure world, attribute
MM_MODE_NS had to be set while mapping that in a S-EL0 SP executing in
secure world. It will not be needed for a S-EL1 SP since the NS bit is
available only for the stage 1 translations and the stage 1 translations
for a S-EL1 SP will be handled by a trusted OS running in S-EL1.
Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Change-Id: I074e2d5a50a659bd3c097d797c4901f08d210b1b
Upstream-Status: Pending [Not submitted to upstream yet]
---
src/ffa_memory.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/ffa_memory.c b/src/ffa_memory.c
index 048cca9..8910cc7 100644
--- a/src/ffa_memory.c
+++ b/src/ffa_memory.c
@@ -2483,6 +2483,18 @@ struct ffa_value ffa_memory_retrieve(struct vm_locked to_locked,
memory_to_attributes = ffa_memory_permissions_to_mode(
permissions, share_state->sender_orig_mode);
+
+ if (to_locked.vm->el0_partition) {
+ /*
+ * Get extra mapping attributes for the given VM ID.
+ * If the memory is shared by a VM executing in non secure
+ * world, attribute MM_MODE_NS had to be set while mapping
+ * that in a SP executing in secure world.
+ */
+ memory_to_attributes |= arch_mm_extra_attributes_from_vm(
+ retrieve_request->sender);
+ }
+
ret = ffa_retrieve_check_update(
to_locked, memory_region->sender, share_state->fragments,
share_state->fragment_constituent_counts,
--
2.34.1
@@ -0,0 +1,34 @@
From c235511a06a54bcccec97b3067c1004d3957b1d8 Mon Sep 17 00:00:00 2001
From: Davidson K <davidson.kumaresan@arm.com>
Date: Thu, 8 Sep 2022 10:47:10 +0530
Subject: [PATCH] feat(vhe): enable vhe and disable branch protection for TC
Signed-off-by: Davidson K <davidson.kumaresan@arm.com>
Change-Id: I60cd607d9f2bf0114b482980e7ca68e24aaf4d1f
Upstream-Status: Pending [Not submitted to upstream yet]
---
BUILD.gn | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/BUILD.gn b/BUILD.gn
index 62ba763..f26ce03 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -238,7 +238,6 @@ aarch64_toolchains("secure_tc") {
heap_pages = 120
max_cpus = 8
max_vms = 16
- branch_protection = "standard"
toolchain_args = {
plat_ffa = "//src/arch/aarch64/plat/ffa:spmc"
plat_psci = "//src/arch/aarch64/plat/psci:spmc"
@@ -247,5 +246,6 @@ aarch64_toolchains("secure_tc") {
secure_world = "1"
pl011_base_address = "0x7ff80000"
enable_mte = "1"
+ enable_vhe = "1"
}
}
--
2.34.1
@@ -3,8 +3,23 @@
COMPATIBLE_MACHINE = "(tc?)"
HAFNIUM_PLATFORM = "secure_tc"
# Intermediate SHA with 2.7 baseline version
SRCREV = "dd0561820946fe23bcd57cc129140437f72102a5"
PV = "2.7+git${SRCPV}"
FILESEXTRAPATHS:prepend:tc := "${THISDIR}/files/tc:"
SRC_URI:remove = "file://0001-Fix-build-with-clang-15.patch"
SRC_URI:append = " \
file://0001-fix-fail-mapping-if-start-address-exceeds-page-table.patch \
file://0002-Extend-Stage-1-mapping-limit.patch \
"
file://0001-feat-emulate-cntp-timer-register-accesses-using-cnth.patch \
file://0002-feat-emulate-interrupt-controller-register-access.patch \
file://0003-tc-increase-heap-pages.patch;patchdir=project/reference \
file://0004-feat-disable-alignment-check-for-EL0-partitions.patch \
file://0005-feat-vhe-set-STAGE1_NS-while-mapping-memory-from-NWd.patch \
file://0006-feat-vhe-enable-vhe-and-disable-branch-protection-fo.patch;patchdir=project/reference \
"
do_compile() {
PATH="${S}/prebuilts/linux-x64/clang/bin:$PATH" oe_runmake -C ${S}
}
@@ -3,9 +3,35 @@ DESCRIPTION = "This is the main image which is the container of all the binaries
generated for the Corstone1000 platform."
LICENSE = "MIT"
COMPATIBLE_MACHINE = "corstone1000"
inherit image
inherit wic_nopt
inherit wic_nopt tfm_sign_image
inherit uefi_capsule
PACKAGE_INSTALL = ""
IMAGE_FSTYPES += "wic wic.nopt"
IMAGE_FSTYPES += "wic wic.nopt uefi_capsule"
UEFI_FIRMWARE_BINARY = "${PN}-${MACHINE}.${CAPSULE_IMGTYPE}"
UEFI_CAPSULE_CONFIG = "${THISDIR}/files/${PN}-capsule-update-image.json"
CAPSULE_IMGTYPE = "wic.nopt"
do_sign_images() {
# Sign TF-A BL2
sign_host_image ${RECIPE_SYSROOT}/firmware/${TFA_BL2_BINARY} \
${TFA_BL2_RE_IMAGE_LOAD_ADDRESS} ${TFA_BL2_RE_SIGN_BIN_SIZE}
# Update BL2 in the FIP image
cp ${RECIPE_SYSROOT}/firmware/${TFA_FIP_BINARY} .
fiptool update --tb-fw ${TFM_IMAGE_SIGN_DIR}/signed_${TFA_BL2_BINARY} \
${TFM_IMAGE_SIGN_DIR}/${TFA_FIP_BINARY}
# Sign the FIP image
sign_host_image ${TFM_IMAGE_SIGN_DIR}/${TFA_FIP_BINARY} \
${TFA_FIP_RE_IMAGE_LOAD_ADDRESS} ${TFA_FIP_RE_SIGN_BIN_SIZE}
}
do_sign_images[depends] = "\
trusted-firmware-a:do_populate_sysroot \
fiptool-native:do_populate_sysroot \
"
@@ -3,6 +3,8 @@ DESCRIPTION = "This is the main Linux image which includes an initramfs kernel/r
LICENSE = "MIT"
COMPATIBLE_MACHINE = "corstone1000"
IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
inherit core-image
@@ -21,8 +23,8 @@ IMAGE_FEATURES:remove = "package-management"
# all optee packages
IMAGE_INSTALL += "optee-client"
# FF-A Debugfs driver
IMAGE_INSTALL += "ffa-debugfs-mod"
# external system linux userspace test application
IMAGE_INSTALL += "corstone1000-external-sys-tests"
# psa-arch-tests linux userspace application
IMAGE_INSTALL += "secure-partitions-psa-api-tests"
# TS PSA API tests commands for crypto, its, ps and iat
IMAGE_INSTALL += "packagegroup-ts-tests-psa"
@@ -0,0 +1,11 @@
{
"Payloads": [
{
"FwVersion": "5",
"Guid": "e2bb9c06-70e9-4b14-97a3-5a7913176e3f",
"LowestSupportedVersion": "1",
"Payload": "$UEFI_FIRMWARE_BINARY",
"UpdateImageIndex": "0"
}
]
}
@@ -2,7 +2,7 @@ SUMMARY = "Board Firmware binaries for N1SDP"
SECTION = "firmware"
LICENSE = "STM-SLA0044-Rev5"
LIC_FILES_CHKSUM = "file://LICENSES/STM.TXT;md5=4b8dab81d0bfc0a5f63c9a983402705b"
LIC_FILES_CHKSUM = "file://LICENSES/MB/STM.TXT;md5=1b74d8c842307d03c116f2d71cbf868a"
inherit deploy
@@ -11,9 +11,9 @@ INHIBIT_DEFAULT_DEPS = "1"
PACKAGE_ARCH = "${MACHINE_ARCH}"
COMPATIBLE_MACHINE = "n1sdp"
SRC_URI = "git://git.linaro.org/landing-teams/working/arm/n1sdp-board-firmware.git;protocol=https;branch=master"
SRC_URI = "git://git.gitlab.arm.com/arm-reference-solutions/board-firmware.git;protocol=https;branch=n1sdp"
SRCREV = "9a095cbdf8ef59a7433e2769e4e2e92782b68c50"
SRCREV = "6d5253584a9c2fdc2edbdc39bf6f2436215d1382"
S = "${WORKDIR}/git"
@@ -25,6 +25,7 @@ do_install() {
cp -Rp --no-preserve=ownership ${S}/* ${D}${INSTALL_DIR}
}
FILES:${PN}-staticdev += " ${INSTALL_DIR}/LIB/sensor.a"
FILES:${PN} = "${INSTALL_DIR}"
SYSROOT_DIRS += "${INSTALL_DIR}"
@@ -1,65 +0,0 @@
From 33a2173e13453ecc4f766f0e69302524401df1b0 Mon Sep 17 00:00:00 2001
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Date: Mon, 14 Feb 2022 08:28:46 +0000
Subject: [PATCH 1/4] tc0: fix sensor data api call
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I827abeeac8317e4dd466cc0c4d493cdc90e7e39d
Upstream-Status: Pending [Not submitted to upstream yet]
---
module/thermal_mgmt/src/mod_thermal_mgmt.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/module/thermal_mgmt/src/mod_thermal_mgmt.c b/module/thermal_mgmt/src/mod_thermal_mgmt.c
index dbd45c74..6e2ff5ba 100644
--- a/module/thermal_mgmt/src/mod_thermal_mgmt.c
+++ b/module/thermal_mgmt/src/mod_thermal_mgmt.c
@@ -20,7 +20,7 @@
#include <fwk_mm.h>
#include <fwk_module.h>
#include <fwk_status.h>
-#include <fwk_thread.h>
+#include <fwk_core.h>
#include <stdint.h>
#include <stdlib.h>
@@ -372,7 +372,7 @@ static int read_temperature(void)
.id = mod_thermal_event_id_read_temp,
};
- return fwk_thread_put_event(&event);
+ return fwk_put_event(&event);
#else
int status;
uint64_t value;
@@ -574,22 +574,22 @@ static int thermal_mgmt_process_event(
struct fwk_event *resp_event)
{
struct mod_sensor_event_params *params;
- uint64_t value;
+ struct mod_sensor_data ms_data;
int status;
if (fwk_id_is_equal(event->id, mod_thermal_event_id_read_temp)) {
/* Temperature-reading event */
status =
- mod_ctx.sensor_api->get_value(mod_ctx.config->sensor_id, &value);
+ mod_ctx.sensor_api->get_data(mod_ctx.config->sensor_id, &ms_data);
if (status == FWK_SUCCESS) {
- mod_ctx.cur_temp = (uint32_t)value;
+ mod_ctx.cur_temp = (uint32_t)ms_data.value;
}
} else if (fwk_id_is_equal(event->id, mod_sensor_event_id_read_request)) {
/* Response event from Sensor HAL */
params = (struct mod_sensor_event_params *)event->params;
- if (params->status == FWK_SUCCESS) {
- mod_ctx.cur_temp = (uint32_t)params->value;
+ if (params->sensor_data->status == FWK_SUCCESS) {
+ mod_ctx.cur_temp = (uint32_t)params->sensor_data->value;
status = FWK_SUCCESS;
} else {
status = FWK_E_DEVICE;
--
2.30.2
@@ -1,92 +0,0 @@
From 736bd8aeceefd474c15a97e4a4ec99f07ef9a82c Mon Sep 17 00:00:00 2001
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Date: Fri, 11 Feb 2022 18:28:43 +0000
Subject: [PATCH 2/4] tc0: fix mpmm config
Do not enable MPMM in standard features set.
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I7b273a2055452e2e8cd78a0d932514a6f2947ec5
Upstream-Status: Pending [Not submitted to upstream yet]
---
product/tc0/scp_ramfw/config_mpmm.c | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/product/tc0/scp_ramfw/config_mpmm.c b/product/tc0/scp_ramfw/config_mpmm.c
index 3bfe99d3..13d866a5 100644
--- a/product/tc0/scp_ramfw/config_mpmm.c
+++ b/product/tc0/scp_ramfw/config_mpmm.c
@@ -27,7 +27,6 @@ enum core_pd_idx {
CORE7_IDX
};
-#if defined(PLATFORM_VARIANT) && (PLATFORM_VARIANT == TC0_VARIANT_STD)
static struct mod_mpmm_pct_table k_pct[] = {
{ .cores_online = 4,
.default_perf_limit = 1153 * 1000000UL,
@@ -115,7 +114,6 @@ static struct mod_mpmm_pct_table m_pct[] = {
},
} },
};
-#endif
static struct mod_mpmm_pct_table m_elp_pct[] = {
{ .cores_online = 1,
@@ -132,7 +130,6 @@ static struct mod_mpmm_pct_table m_elp_pct[] = {
} },
};
-#if defined(PLATFORM_VARIANT) && (PLATFORM_VARIANT == TC0_VARIANT_STD)
static const struct mod_mpmm_core_config k_core_config[] = {
[0] = {
.pd_id = FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_POWER_DOMAIN, CORE0_IDX),
@@ -180,7 +177,6 @@ static const struct mod_mpmm_core_config m_core_config[] = {
.core_starts_online = false,
},
};
-#endif
static const struct mod_mpmm_core_config m_elp_core_config[] = {
[0] = {
@@ -191,7 +187,6 @@ static const struct mod_mpmm_core_config m_elp_core_config[] = {
},
};
-#if defined(PLATFORM_VARIANT) && (PLATFORM_VARIANT == TC0_VARIANT_STD)
static const struct mod_mpmm_domain_config k_domain_conf[] = {
[0] = {
.perf_id = FWK_ID_ELEMENT_INIT(
@@ -219,7 +214,6 @@ static const struct mod_mpmm_domain_config m_domain_conf[] = {
},
[1] = {0},
};
-#endif
static const struct mod_mpmm_domain_config m_elp_domain_conf[] = {
[0] = {
@@ -236,14 +230,6 @@ static const struct mod_mpmm_domain_config m_elp_domain_conf[] = {
};
static const struct fwk_element element_table[] = {
-#if defined(PLATFORM_VARIANT) && (PLATFORM_VARIANT == TC0_VAR_EXPERIMENT_POWER)
- [0] = {
- .name = "MPMM_MATTERHORN_ELP_ARM_ELEM",
- .sub_element_count = 1,
- .data = m_elp_domain_conf,
- },
- [1] = { 0 },
-#else
[0] = {
.name = "MPMM_KLEIN_ELEM",
.sub_element_count = 4,
@@ -260,7 +246,6 @@ static const struct fwk_element element_table[] = {
.data = m_elp_domain_conf,
},
[3] = { 0 },
-#endif
};
static const struct fwk_element *mpmm_get_element_table(fwk_id_t module_id)
--
2.30.2
@@ -1,202 +0,0 @@
From 50e63f11762348bcd95d809af248f620f03d9ce4 Mon Sep 17 00:00:00 2001
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Date: Fri, 11 Feb 2022 18:16:54 +0000
Subject: [PATCH 3/4] tc0: rename platform variant to platform feature set
THe PLATFORM_VARIANT flag was added to differentiate the software
features enabled in SCP firmware. But this flag misleads to a new
variant of same platform. This commits renames PLATFORM_VARIANT to
PLATFORM_FEATURE_SET
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I93c0bc3e11fe18192bb8246df851345bdc473974
Upstream-Status: Pending [Not submitted to upstream yet]
---
product/tc0/doc/{variants.md => features.md} | 28 +++++++++-----------
product/tc0/scp_ramfw/CMakeLists.txt | 26 +++---------------
product/tc0/scp_ramfw/Firmware.cmake | 2 +-
product/tc0/scp_ramfw/config_scmi_perf.c | 8 +++---
product/tc0/scp_romfw/CMakeLists.txt | 6 ++---
product/tc0/scp_romfw/Firmware.cmake | 2 +-
6 files changed, 25 insertions(+), 47 deletions(-)
rename product/tc0/doc/{variants.md => features.md} (77%)
diff --git a/product/tc0/doc/variants.md b/product/tc0/doc/features.md
similarity index 77%
rename from product/tc0/doc/variants.md
rename to product/tc0/doc/features.md
index fbf616db..3ef520e2 100644
--- a/product/tc0/doc/variants.md
+++ b/product/tc0/doc/features.md
@@ -1,4 +1,4 @@
-# TC0 Platform Variants
+# TC0 Platform Features
Copyright (c) 2022, Arm Limited. All rights reserved.
@@ -7,30 +7,27 @@ Copyright (c) 2022, Arm Limited. All rights reserved.
Documentation for TC0 platform can be found at [1].
+### Standard
+
+The standard build provides all the features described in [1].
+For this default features, it's not required to provide any extra parameters in
+the build commands.
+
+### MPMM/Power/Performance (Experimental)
+
For the purpose of experimenting some of the software features that have been
-introduced in SCP-firmware a new variant of TC0 has been created.
-The variant(s) can be chosen at build time by adding:
+introduced in SCP-firmware of TC0. This can be enabled at build time, by adding:
```sh
make -f Makefile.cmake \
PRODUCT=tc0 \
MODE=<debug,release> \
- EXTRA_CONFIG_ARGS+=-DSCP_PLATFORM_VARIANT=<0,1>
+ EXTRA_CONFIG_ARGS+=-DSCP_PLATFORM_FEATURE_SET=1
```
-
-### Variant 0 (Standard build)
-
-The standard build provides all the features described in [1].
-For this default variant, it's not required to provide any extra parameters in
-the build commands.
-
-
-### Variant 1 (Power/Performance testing)
-
-This variant adds support for the following software features:
+This adds support for the following software features:
- Traffic Cop
- MPMM (Maximum Power Mitigation Mechanism)
- Thermal Management
@@ -63,7 +60,6 @@ Once built, the features above will act as:
## Limitations
-- The "variant" option is available only with the CMake build.
- The Thermal functionality is limited at this time cause the constant
temperature being sampled.
diff --git a/product/tc0/scp_ramfw/CMakeLists.txt b/product/tc0/scp_ramfw/CMakeLists.txt
index 96310320..ce3178ee 100644
--- a/product/tc0/scp_ramfw/CMakeLists.txt
+++ b/product/tc0/scp_ramfw/CMakeLists.txt
@@ -11,25 +11,13 @@
add_executable(tc0-bl2)
+set(SCP_PLATFORM_FEATURE_SET ${SCP_PLATFORM_FEATURE_SET_INIT} CACHE STRING "1")
-# SCP_PLATFORM_VARIANT options:
-# - 'TC0_VARIANT_STD' for TC0 standard build
-# - 'TC0_VAR_EXPERIMENT_POWER' for TC0 with power/performance plugins used for
-# evaluation purposes
-
-
-target_compile_definitions(tc0-bl2 PUBLIC -DTC0_VARIANT_STD=0)
-target_compile_definitions(tc0-bl2 PUBLIC -DTC0_VAR_EXPERIMENT_POWER=1)
-
-
-set(SCP_PLATFORM_VARIANT ${SCP_PLATFORM_VARIANT_INIT} CACHE STRING "1")
-
-
-if (SCP_PLATFORM_VARIANT STREQUAL "1")
- message(NOTICE "SCP_PLATFORM_VARIANT set to EXPERIMENT_POWER (tc0-bl2)\n")
+if (SCP_PLATFORM_FEATURE_SET STREQUAL "1")
+ message(NOTICE "TC0 platform features MPMM/POWER/PERFORMANCE is experimental (tc0-bl2)\n")
target_compile_definitions(tc0-bl2
- PUBLIC -DPLATFORM_VARIANT=TC0_VAR_EXPERIMENT_POWER)
+ PUBLIC -DTC0_FEATURES_MPMM_POWER_PERF)
set(SCP_ENABLE_PLUGIN_HANDLER TRUE PARENT_SCOPE)
set(SCP_ENABLE_FAST_CHANNELS TRUE PARENT_SCOPE)
@@ -56,12 +44,6 @@ if (SCP_PLATFORM_VARIANT STREQUAL "1")
list(PREPEND SCP_MODULE_PATHS
"${CMAKE_CURRENT_LIST_DIR}/../module/tc0_power_model")
target_sources(tc0-bl2 PRIVATE "config_tc0_power_model.c")
-
-else()
- message(NOTICE "SCP_PLATFORM_VARIANT set to STANDARD (tc0-bl2)\n")
-
- target_compile_definitions(tc0-bl2
- PUBLIC -DPLATFORM_VARIANT=TC0_VARIANT_STD)
endif()
diff --git a/product/tc0/scp_ramfw/Firmware.cmake b/product/tc0/scp_ramfw/Firmware.cmake
index 11d8eaab..4a555296 100644
--- a/product/tc0/scp_ramfw/Firmware.cmake
+++ b/product/tc0/scp_ramfw/Firmware.cmake
@@ -27,7 +27,7 @@ set(SCP_ENABLE_FAST_CHANNELS_INIT FALSE)
set(SCP_ENABLE_PLUGIN_HANDLER_INIT FALSE)
-set(SCP_PLATFORM_VARIANT_INIT 0)
+set(SCP_PLATFORM_FEATURE_SET_INIT 0)
set(SCP_ARCHITECTURE "armv7-m")
diff --git a/product/tc0/scp_ramfw/config_scmi_perf.c b/product/tc0/scp_ramfw/config_scmi_perf.c
index a4a47b3a..3e91939a 100644
--- a/product/tc0/scp_ramfw/config_scmi_perf.c
+++ b/product/tc0/scp_ramfw/config_scmi_perf.c
@@ -129,7 +129,7 @@ static const struct mod_scmi_perf_domain_config domains[] = {
},
};
-#if defined(PLATFORM_VARIANT) && (PLATFORM_VARIANT == TC0_VAR_EXPERIMENT_POWER)
+#ifdef TC0_FEATURES_MPMM_POWER_PERF
static const struct mod_scmi_plugin_config plugins_table[] = {
[0] = {
.id = FWK_ID_MODULE_INIT(FWK_MODULE_IDX_TRAFFIC_COP),
@@ -156,9 +156,9 @@ const struct fwk_module_config config_scmi_perf = {
#else
.fast_channels_alarm_id = FWK_ID_NONE_INIT,
#endif
-#if defined(PLATFORM_VARIANT) && (PLATFORM_VARIANT == TC0_VAR_EXPERIMENT_POWER)
- .plugins = plugins_table,
- .plugins_count = FWK_ARRAY_SIZE(plugins_table),
+#ifdef TC0_FEATURES_MPMM_POWER_PERF
+ .plugins = plugins_table,
+ .plugins_count = FWK_ARRAY_SIZE(plugins_table),
#endif
})
};
diff --git a/product/tc0/scp_romfw/CMakeLists.txt b/product/tc0/scp_romfw/CMakeLists.txt
index f9f40ad3..09cd2f5d 100644
--- a/product/tc0/scp_romfw/CMakeLists.txt
+++ b/product/tc0/scp_romfw/CMakeLists.txt
@@ -48,6 +48,6 @@ target_include_directories(tc0-bl1
PUBLIC $<TARGET_PROPERTY:cmsis::core-m,INTERFACE_INCLUDE_DIRECTORIES>)
cmake_dependent_option(
- SCP_PLATFORM_VARIANT "Choose platform software variant?"
- "${SCP_PLATFORM_VARIANT_INIT}" "DEFINED SCP_PLATFORM_VARIANT_INIT"
- "${SCP_PLATFORM_VARIANT}")
+ SCP_PLATFORM_FEATURE_SET "Choose platform software features?"
+ "${SCP_PLATFORM_FEATURE_SET_INIT}" "DEFINED SCP_PLATFORM_FEATURE_SET_INIT"
+ "${SCP_PLATFORM_FEATURE_SET}")
diff --git a/product/tc0/scp_romfw/Firmware.cmake b/product/tc0/scp_romfw/Firmware.cmake
index ab4468be..e1360159 100644
--- a/product/tc0/scp_romfw/Firmware.cmake
+++ b/product/tc0/scp_romfw/Firmware.cmake
@@ -21,7 +21,7 @@ set(SCP_ENABLE_NOTIFICATIONS_INIT TRUE)
set(SCP_ENABLE_IPO_INIT FALSE)
-set(SCP_PLATFORM_VARIANT_INIT 0)
+set(SCP_PLATFORM_FEATURE_SET_INIT 0)
set(SCP_ARCHITECTURE "armv7-m")
--
2.30.2
@@ -1,114 +0,0 @@
From 3e737dd47b228bdeffb06e39bffec7a4a436b244 Mon Sep 17 00:00:00 2001
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Date: Wed, 9 Feb 2022 16:02:10 +0000
Subject: [PATCH 4/4] tc0: support platform feature set options in firmware.mk
Support existing platform feature set options that is in cmake to
firmware.mk. Two feature set for TC0 are
0. Standard
1. MPMM/Power/Performance (Experimental)
Build option to select the feature set is using:
make PRODUCT=tc0 MODE=<debug,release> SCP_PLATFORM_FEATURE_SET=<0,1>
The default value is set to 0 (Standard).
Refer product/tc0/doc/features.md for more details.
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I4028686a8f8461e0e2c29e15d5e52eb1d37ca60a
Upstream-Status: Pending [Not submitted to upstream yet]
---
product/tc0/scp_ramfw/firmware.mk | 41 +++++++++++++++++++++++++++++--
product/tc0/scp_romfw/firmware.mk | 12 +++++++++
2 files changed, 51 insertions(+), 2 deletions(-)
diff --git a/product/tc0/scp_ramfw/firmware.mk b/product/tc0/scp_ramfw/firmware.mk
index ec6e6679..d7515f5b 100644
--- a/product/tc0/scp_ramfw/firmware.mk
+++ b/product/tc0/scp_ramfw/firmware.mk
@@ -9,8 +9,24 @@ BS_FIRMWARE_CPU := cortex-m3
BS_FIRMWARE_HAS_NOTIFICATION := yes
BS_FIRMWARE_HAS_RESOURCE_PERMISSIONS := yes
BS_FIRMWARE_USE_NEWLIB_NANO_SPECS := yes
-BS_FIRMWARE_HAS_FAST_CHANNELS := no
-BS_FIRMWARE_HAS_PERF_PLUGIN_HANDLER := no
+
+DEFAULT_SCP_PLATFORM_FEATURE_SET := 0
+
+export SCP_PLATFORM_FEATURE_SET ?= $(DEFAULT_SCP_PLATFORM_FEATURE_SET)
+ifneq ($(filter-out 0 1, $(SCP_PLATFORM_FEATURE_SET)),)
+ $(error "Invalid for SCP_PLATFORM_FEATURE_SET parameter. Valid options are \
+ 0 or 1. Aborting...")
+endif
+
+ifeq ($(SCP_PLATFORM_FEATURE_SET),0)
+ BS_FIRMWARE_HAS_PERF_PLUGIN_HANDLER := no
+ BS_FIRMWARE_HAS_FAST_CHANNELS := no
+else
+ DEFINES += TC0_FEATURES_MPMM_POWER_PERF
+ BS_FIRMWARE_HAS_PERF_PLUGIN_HANDLER := yes
+ BS_FIRMWARE_HAS_FAST_CHANNELS := yes
+ $(info "TC0 platform features POWER/PERFORMANCE is experimental")
+endif
BS_FIRMWARE_MODULES := \
armv7m_mpu \
@@ -44,6 +60,16 @@ ifeq ($(BS_FIRMWARE_HAS_RESOURCE_PERMISSIONS),yes)
BS_FIRMWARE_MODULES += resource_perms
endif
+ifeq ($(SCP_PLATFORM_FEATURE_SET),1)
+BS_FIRMWARE_MODULES += \
+ traffic_cop \
+ mpmm \
+ sensor \
+ reg_sensor \
+ thermal_mgmt \
+ tc0_power_model
+endif
+
BS_FIRMWARE_SOURCES := \
config_system_power.c \
config_armv7m_mpu.c \
@@ -75,4 +101,15 @@ ifeq ($(BS_FIRMWARE_HAS_RESOURCE_PERMISSIONS),yes)
BS_FIRMWARE_SOURCES += config_resource_perms.c
endif
+ifeq ($(SCP_PLATFORM_FEATURE_SET),1)
+ BS_FIRMWARE_SOURCES += \
+ config_traffic_cop.c \
+ config_mpmm.c \
+ config_sensor.c \
+ config_reg_sensor.c \
+ config_thermal_mgmt.c \
+ config_tc0_power_model.c
+endif
+
+
include $(BS_DIR)/firmware.mk
diff --git a/product/tc0/scp_romfw/firmware.mk b/product/tc0/scp_romfw/firmware.mk
index 9977712f..0012b9fa 100644
--- a/product/tc0/scp_romfw/firmware.mk
+++ b/product/tc0/scp_romfw/firmware.mk
@@ -9,6 +9,18 @@ BS_FIRMWARE_CPU := cortex-m3
BS_FIRMWARE_HAS_NOTIFICATION := yes
BS_FIRMWARE_USE_NEWLIB_NANO_SPECS := yes
+DEFAULT_SCP_PLATFORM_FEATURE_SET := 0
+
+export SCP_PLATFORM_FEATURE_SET ?= $(DEFAULT_SCP_PLATFORM_FEATURE_SET)
+ifneq ($(filter-out 0 1, $(SCP_PLATFORM_FEATURE_SET)),)
+ $(error "Invalid for SCP_PLATFORM_FEATURE_SET parameter. Valid options are \
+ 0 or 1. Aborting...")
+endif
+
+ifeq ($(SCP_PLATFORM_FEATURE_SET),1)
+ $(info "TC0 platform features POWER/PERFORMANCE is experimental")
+endif
+
BS_FIRMWARE_MODULE_HEADERS_ONLY := \
power_domain \
timer
--
2.30.2
@@ -5,3 +5,12 @@ COMPATIBLE_MACHINE = "juno"
SCP_PLATFORM = "juno"
FW_TARGETS = "scp"
FW_INSTALL:append = " romfw_bypass"
do_install:append() {
for TYPE in ${FW_INSTALL}; do
if [ "$TYPE" = "romfw_bypass" ]; then
install -D "${B}/${TYPE}/${FW_TARGETS}/bin/${SCP_PLATFORM}-bl1-bypass.bin" "${D}/firmware/${FW}_${TYPE}.bin"
install -D "${B}/${TYPE}/${FW_TARGETS}/bin/${SCP_PLATFORM}-bl1-bypass" "${D}/firmware/${FW}_${TYPE}.elf"
fi
done
}
@@ -3,14 +3,20 @@
SCP_PLATFORM = "n1sdp"
SCP_LOG_LEVEL = "INFO"
# master branch at n1sdp: Introduce trusted board boot
SRCREV = "3e4c34ceccc1c960eb3a4adaa922f2a0c6b36be3"
SRCREV = "de7e464ecd77130147103cf48328099c2d0e6289"
PV .= "+git${SRCPV}"
COMPATIBLE_MACHINE:n1sdp = "n1sdp"
DEPENDS += "fiptool-native"
DEPENDS += "trusted-firmware-a"
DEPENDS += "n1sdp-board-firmware"
# The n1sdp sensor library is needed for building SCP N1SDP Platform
# https://github.com/ARM-software/SCP-firmware/tree/master/product/n1sdp
EXTRA_OECMAKE:append = " \
-DSCP_N1SDP_SENSOR_LIB_PATH=${RECIPE_SYSROOT}/n1sdp-board-firmware_source/LIB/sensor.a \
"
do_install:append() {
fiptool \
@@ -1,20 +1,6 @@
# TC specific SCP configuration
# Intermediate SHA with 2.9 baseline version
# This has support for SCP features MPMM/POWER/PERFORMANCE for TC0
SRCREV = "027b567fde5e3767fb1678bda28cf59fa7aac06d"
PV = "2.9.0+git${SRCPV}"
COMPATIBLE_MACHINE = "(tc1)"
FILESEXTRAPATHS:prepend := "${THISDIR}/files/tc:"
SRC_URI:append:tc = " \
file://0001-tc0-fix-sensor-data-api-call.patch \
file://0002-tc0-fix-mpmm-config.patch \
file://0003-tc0-rename-platform-variant-to-platform-feature-set.patch \
file://0004-tc0-support-platform-feature-set-options-in-firmware.patch \
"
COMPATIBLE_MACHINE = "(tc?)"
SCP_PLATFORM:tc0 = "tc0"
SCP_PLATFORM:tc1 = "tc1"
FW_TARGETS = "scp"
@@ -2,6 +2,9 @@
MACHINE_SCP_REQUIRE ?= ""
MACHINE_SCP_REQUIRE:juno = "scp-firmware-juno.inc"
MACHINE_SCP_REQUIRE:n1sdp = "scp-firmware-n1sdp.inc"
MACHINE_SCP_REQUIRE:sgi575 = "scp-firmware-sgi575.inc"
MACHINE_SCP_REQUIRE:tc = "scp-firmware-tc.inc"
require ${MACHINE_SCP_REQUIRE}
@@ -1,9 +0,0 @@
# Include machine specific SCP configurations
MACHINE_SCP_REQUIRE ?= ""
MACHINE_SCP_REQUIRE:juno = "scp-firmware-juno.inc"
MACHINE_SCP_REQUIRE:sgi575 = "scp-firmware-sgi575.inc"
MACHINE_SCP_REQUIRE:tc = "scp-firmware-tc.inc"
require ${MACHINE_SCP_REQUIRE}
@@ -1,34 +0,0 @@
From 366215a3705228a12efe9f92f1d1033f34ee89fa Mon Sep 17 00:00:00 2001
From: Rupinderjit Singh <rupinderjit.singh@arm.com>
Date: Thu, 21 Apr 2022 14:45:23 +0100
Subject: [PATCH] Enable CI-700 interconnect
Signed-off-by: Rupinderjit Singh <rupinderjit.singh@arm.com>
Change-Id: Ie56d47a0b65274a467e98b9ecd3caf25dfe10544
Upstream-Status: Submitted [https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/14918]
---
fdts/tc.dts | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/fdts/tc.dts b/fdts/tc.dts
index 7c0e84260..d0985851d 100644
--- a/fdts/tc.dts
+++ b/fdts/tc.dts
@@ -461,6 +461,12 @@
status = "okay";
};
+ cmn-pmu {
+ compatible = "arm,ci-700";
+ reg = <0x0 0x50000000 0x0 0x10000000>;
+ interrupts = <0x0 460 0x4>;
+ };
+
dp0: display@2cc00000 {
#address-cells = <1>;
#size-cells = <0>;
--
2.25.1
@@ -0,0 +1,34 @@
Upstream-Status: Inappropriate
Signed-off-by: Emekcan Aras <Emekcan.Aras@arm.com>
From a31aee0988ef64724ec5866f10709f51f8cb3237 Mon Sep 17 00:00:00 2001
From: emeara01 <emekcan.aras@arm.com>
Date: Wed, 11 May 2022 14:37:06 +0100
Subject: [PATCH] Fix FF-A version in SPMC manifest
OPTEE does not support FF-A version 1.1 in SPMC at the moment.
This commit corrects the FF-A version in corstone1000_spmc_manifest.dts.
This patch will not be upstreamed and will be dropped once
OPTEE version is updated for Corstone1000.
Signed-off-by: Emekcan Aras <Emekcan.Aras@arm.com>
---
.../corstone1000/common/fdts/corstone1000_spmc_manifest.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plat/arm/board/corstone1000/common/fdts/corstone1000_spmc_manifest.dts b/plat/arm/board/corstone1000/common/fdts/corstone1000_spmc_manifest.dts
index 8e49ab83f..5baa1b115 100644
--- a/plat/arm/board/corstone1000/common/fdts/corstone1000_spmc_manifest.dts
+++ b/plat/arm/board/corstone1000/common/fdts/corstone1000_spmc_manifest.dts
@@ -20,7 +20,7 @@
attribute {
spmc_id = <0x8000>;
maj_ver = <0x1>;
- min_ver = <0x1>;
+ min_ver = <0x0>;
exec_state = <0x0>;
load_address = <0x0 0x2002000>;
entrypoint = <0x0 0x2002000>;
--
2.17.1
@@ -1,40 +0,0 @@
From 80b1efa92486a87f9e82dbf665ef612291148de8 Mon Sep 17 00:00:00 2001
From: Adam Johnston <adam.johnston@arm.com>
Date: Tue, 14 Jun 2022 11:19:30 +0000
Subject: [PATCH] arm-bsp/trusted-firmware-a: N1SDP trusted boot
Increase max size of BL2 on N1SDP by 4KB to enable trusted boot
Decrease max size of BL1 on N1SDP by 8KB so BL1/BL2 fits above BL31 progbits
Signed-off-by: Adam Johnston <adam.johnston@arm.com>
Upstream-Status: Pending [Flagged to upstream]
---
plat/arm/board/n1sdp/include/platform_def.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plat/arm/board/n1sdp/include/platform_def.h b/plat/arm/board/n1sdp/include/platform_def.h
index c9b81bafa..7468a31ed 100644
--- a/plat/arm/board/n1sdp/include/platform_def.h
+++ b/plat/arm/board/n1sdp/include/platform_def.h
@@ -91,7 +91,7 @@
* PLAT_ARM_MAX_BL1_RW_SIZE is calculated using the current BL1 RW debug size
* plus a little space for growth.
*/
-#define PLAT_ARM_MAX_BL1_RW_SIZE 0xE000
+#define PLAT_ARM_MAX_BL1_RW_SIZE 0xC000
/*
* PLAT_ARM_MAX_ROMLIB_RW_SIZE is define to use a full page
@@ -110,7 +110,7 @@
* little space for growth.
*/
#if TRUSTED_BOARD_BOOT
-# define PLAT_ARM_MAX_BL2_SIZE 0x20000
+# define PLAT_ARM_MAX_BL2_SIZE 0x21000
#else
# define PLAT_ARM_MAX_BL2_SIZE 0x14000
#endif
--
2.35.1
@@ -1,7 +1,7 @@
From 923deccc1de17b05826143e476b840253bb2bb7b Mon Sep 17 00:00:00 2001
From 008cfc6457c239466ca62610d59aaf1a78f6b2f6 Mon Sep 17 00:00:00 2001
From: Tudor Cretu <tudor.cretu@arm.com>
Date: Fri, 21 May 2021 14:56:37 +0000
Subject: [PATCH] plat: tc: Increase maximum BL2 size.
Subject: [PATCH 1/7] plat: tc: Increase maximum BL2 size.
BL2 size gets increased due to the firmware update changes.
Increase the MAX_BL2_SIZE by 8Kb.
@@ -10,11 +10,11 @@ Signed-off-by: Tudor Cretu <tudor.cretu@arm.com>
Change-Id: I1cb28b0eb7f834426873ff9f4c40bd496413806f
Upstream-Status: Pending [Not submitted to upstream yet]
---
plat/arm/board/tc/include/platform_def.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
plat/arm/board/tc/include/platform_def.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/plat/arm/board/tc/include/platform_def.h b/plat/arm/board/tc/include/platform_def.h
index ccabced9e..f45457b9f 100644
index 745d91cab..cd77773aa 100644
--- a/plat/arm/board/tc/include/platform_def.h
+++ b/plat/arm/board/tc/include/platform_def.h
@@ -120,9 +120,9 @@
@@ -22,12 +22,12 @@ index ccabced9e..f45457b9f 100644
*/
#if TRUSTED_BOARD_BOOT
-# define PLAT_ARM_MAX_BL2_SIZE 0x20000
+# define PLAT_ARM_MAX_BL2_SIZE 0x22000
+# define PLAT_ARM_MAX_BL2_SIZE 0x25000
#else
-# define PLAT_ARM_MAX_BL2_SIZE 0x14000
+# define PLAT_ARM_MAX_BL2_SIZE 0x16000
+# define PLAT_ARM_MAX_BL2_SIZE 0x19000
#endif
/*
@@ -130,7 +130,7 @@
* calculated using the current BL31 PROGBITS debug size plus the sizes of
@@ -35,9 +35,9 @@ index ccabced9e..f45457b9f 100644
*/
-#define PLAT_ARM_MAX_BL31_SIZE 0x3F000
+#define PLAT_ARM_MAX_BL31_SIZE 0x4F000
/*
* Size of cacheable stacks
--
2.17.1
2.30.2
@@ -0,0 +1,46 @@
From 2f8b0cc6be3787717247d1c02a45181a5ac6f125 Mon Sep 17 00:00:00 2001
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Date: Mon, 11 Apr 2022 14:36:54 +0100
Subject: [PATCH 2/7] Makefile: add trusty_sp_fw_config build option
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: Ief90ae9113d32265ee2200f35f3e517b7b9a4bea
Upstream-Status: Pending [Not submitted to upstream yet]
---
Makefile | 4 ++++
docs/plat/arm/arm-build-options.rst | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/Makefile b/Makefile
index 3941f8698..a20d647a2 100644
--- a/Makefile
+++ b/Makefile
@@ -531,6 +531,10 @@ ifneq (${SPD},none)
DTC_CPPFLAGS += -DOPTEE_SP_FW_CONFIG
endif
+ ifeq ($(findstring trusty_sp,$(ARM_SPMC_MANIFEST_DTS)),trusty_sp)
+ DTC_CPPFLAGS += -DTRUSTY_SP_FW_CONFIG
+ endif
+
ifeq ($(TS_SP_FW_CONFIG),1)
DTC_CPPFLAGS += -DTS_SP_FW_CONFIG
endif
diff --git a/docs/plat/arm/arm-build-options.rst b/docs/plat/arm/arm-build-options.rst
index 339ebbe33..3c9a41fb8 100644
--- a/docs/plat/arm/arm-build-options.rst
+++ b/docs/plat/arm/arm-build-options.rst
@@ -107,6 +107,10 @@ Arm Platform Build Options
device tree. This flag is defined only when ``ARM_SPMC_MANIFEST_DTS`` manifest
file name contains pattern optee_sp.
+- ``TRUSTY_SP_FW_CONFIG``: DTC build flag to include Trusty as SP in
+ tb_fw_config device tree. This flag is defined only when
+ ``ARM_SPMC_MANIFEST_DTS`` manifest file name contains pattern trusty_sp.
+
- ``TS_SP_FW_CONFIG``: DTC build flag to include Trusted Services (Crypto and
internal-trusted-storage) as SP in tb_fw_config device tree.
--
2.30.2
@@ -0,0 +1,30 @@
From 0060b1a4fbe3bc9992f59a2d4cb986821f7bcf13 Mon Sep 17 00:00:00 2001
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Date: Mon, 11 Apr 2022 18:31:01 +0100
Subject: [PATCH 3/7] fix(plat/arm): increase sp max image size
Increase ARM_SP_MAX_SIZE to support Trusty image.
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I9ef9e755769445aee998062a7fba508fad50b33e
Upstream-Status: Pending [Not submitted to upstream yet]
---
include/plat/arm/common/fconf_arm_sp_getter.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/plat/arm/common/fconf_arm_sp_getter.h b/include/plat/arm/common/fconf_arm_sp_getter.h
index aa628dfd3..3ed953d1c 100644
--- a/include/plat/arm/common/fconf_arm_sp_getter.h
+++ b/include/plat/arm/common/fconf_arm_sp_getter.h
@@ -13,7 +13,7 @@
/* arm_sp getter */
#define arm__sp_getter(prop) arm_sp.prop
-#define ARM_SP_MAX_SIZE U(0xb0000)
+#define ARM_SP_MAX_SIZE U(0x2000000)
#define ARM_SP_OWNER_NAME_LEN U(8)
struct arm_sp_t {
--
2.30.2
@@ -0,0 +1,69 @@
From 000e19d360a5ad9abd7d823af86a364bac2afc58 Mon Sep 17 00:00:00 2001
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Date: Mon, 11 Apr 2022 17:38:17 +0100
Subject: [PATCH 4/7] fix(plat/tc): increase tc_tzc_dram1_size
Increase TC_TZC_DRAM1_SIZE for Trusty image and its memory size.
Update OP-TEE reserved memory range in DTS
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: Iad433c3c155f28860b15bde2398df653487189dd
Upstream-Status: Pending [Not submitted to upstream yet]
---
fdts/tc.dts | 4 ++--
plat/arm/board/tc/include/platform_def.h | 10 ++++++----
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/fdts/tc.dts b/fdts/tc.dts
index 20992294b..af64504a4 100644
--- a/fdts/tc.dts
+++ b/fdts/tc.dts
@@ -213,8 +213,8 @@
linux,cma-default;
};
- optee@0xfce00000 {
- reg = <0x00000000 0xfce00000 0 0x00200000>;
+ optee@0xf8e00000 {
+ reg = <0x00000000 0xf8e00000 0 0x00200000>;
no-map;
};
};
diff --git a/plat/arm/board/tc/include/platform_def.h b/plat/arm/board/tc/include/platform_def.h
index cd77773aa..35d8fd24e 100644
--- a/plat/arm/board/tc/include/platform_def.h
+++ b/plat/arm/board/tc/include/platform_def.h
@@ -31,7 +31,7 @@
*/
#define TC_TZC_DRAM1_BASE (ARM_AP_TZC_DRAM1_BASE - \
TC_TZC_DRAM1_SIZE)
-#define TC_TZC_DRAM1_SIZE UL(0x02000000) /* 32 MB */
+#define TC_TZC_DRAM1_SIZE UL(0x06000000) /* 96 MB */
#define TC_TZC_DRAM1_END (TC_TZC_DRAM1_BASE + \
TC_TZC_DRAM1_SIZE - 1)
@@ -68,7 +68,9 @@
* max size of BL32 image.
*/
#if defined(SPD_spmd)
-#define PLAT_ARM_SPMC_BASE TC_TZC_DRAM1_BASE
+#define TC_EL2SPMC_LOAD_ADDR (TC_TZC_DRAM1_BASE + 0x04000000)
+
+#define PLAT_ARM_SPMC_BASE TC_EL2SPMC_LOAD_ADDR
#define PLAT_ARM_SPMC_SIZE UL(0x200000) /* 2 MB */
#endif
@@ -259,8 +261,8 @@
(TZC_REGION_ACCESS_RDWR(TZC_NSAID_DEFAULT))
/*
- * The first region below, TC_TZC_DRAM1_BASE (0xfd000000) to
- * ARM_SCP_TZC_DRAM1_END (0xffffffff) will mark the last 48 MB of DRAM as
+ * The first region below, TC_TZC_DRAM1_BASE (0xf9000000) to
+ * ARM_SCP_TZC_DRAM1_END (0xffffffff) will mark the last 112 MB of DRAM as
* secure. The second and third regions gives non secure access to rest of DRAM.
*/
#define TC_TZC_REGIONS_DEF \
--
2.30.2
@@ -0,0 +1,169 @@
From a04466ceb81a04c5179e8064837c34a89c2b11bd Mon Sep 17 00:00:00 2001
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Date: Mon, 11 Apr 2022 14:43:15 +0100
Subject: [PATCH 5/7] feat(plat/tc): add spmc manifest with trusty sp
Add SPMC manifest with Trusty SP. Define Trusty's load address,
vcpu count, memory size.
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: If4363580a478776d233f7f391a30e1cb345453c2
Upstream-Status: Pending [Not submitted to upstream yet]
---
.../tc/fdts/tc_spmc_trusty_sp_manifest.dts | 120 ++++++++++++++++++
plat/arm/board/tc/fdts/tc_tb_fw_config.dts | 7 +-
2 files changed, 126 insertions(+), 1 deletion(-)
create mode 100644 plat/arm/board/tc/fdts/tc_spmc_trusty_sp_manifest.dts
diff --git a/plat/arm/board/tc/fdts/tc_spmc_trusty_sp_manifest.dts b/plat/arm/board/tc/fdts/tc_spmc_trusty_sp_manifest.dts
new file mode 100644
index 000000000..e2ea7b811
--- /dev/null
+++ b/plat/arm/board/tc/fdts/tc_spmc_trusty_sp_manifest.dts
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2022, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+/dts-v1/;
+
+/ {
+ compatible = "arm,ffa-core-manifest-1.0";
+ #address-cells = <2>;
+ #size-cells = <1>;
+
+ attribute {
+ spmc_id = <0x8000>;
+ maj_ver = <0x1>;
+ min_ver = <0x1>;
+ exec_state = <0x0>;
+ load_address = <0x0 0xfd000000>;
+ entrypoint = <0x0 0xfd000000>;
+ binary_size = <0x80000>;
+ };
+
+ hypervisor {
+ compatible = "hafnium,hafnium";
+ vm1 {
+ is_ffa_partition;
+ debug_name = "trusty";
+ load_address = <0xf901f000>;
+ vcpu_count = <8>;
+ mem_size = <0x3f00000>; /* 64MB TZC DRAM - 1MB align */
+ };
+#ifdef TS_SP_FW_CONFIG
+ vm2 {
+ is_ffa_partition;
+ debug_name = "internal-trusted-storage";
+ load_address = <0xfee00000>;
+ vcpu_count = <1>;
+ mem_size = <2097152>; /* 2MB TZC DRAM */
+ };
+ vm3 {
+ is_ffa_partition;
+ debug_name = "crypto";
+ load_address = <0xfec00000>;
+ vcpu_count = <1>;
+ mem_size = <2097152>; /* 2MB TZC DRAM */
+ };
+#endif
+ };
+
+ cpus {
+ #address-cells = <0x2>;
+ #size-cells = <0x0>;
+
+ CPU0:cpu@0 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x0>;
+ enable-method = "psci";
+ };
+
+ /*
+ * SPMC (Hafnium) requires secondary cpu nodes are declared in
+ * descending order
+ */
+ CPU7:cpu@700 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x700>;
+ enable-method = "psci";
+ };
+
+ CPU6:cpu@600 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x600>;
+ enable-method = "psci";
+ };
+
+ CPU5:cpu@500 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x500>;
+ enable-method = "psci";
+ };
+
+ CPU4:cpu@400 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x400>;
+ enable-method = "psci";
+ };
+
+ CPU3:cpu@300 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x300>;
+ enable-method = "psci";
+ };
+
+ CPU2:cpu@200 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x200>;
+ enable-method = "psci";
+ };
+
+ CPU1:cpu@100 {
+ device_type = "cpu";
+ compatible = "arm,armv8";
+ reg = <0x0 0x100>;
+ enable-method = "psci";
+ };
+ };
+
+ /* 96MB of TC_TZC_DRAM1_BASE */
+ memory@f9000000 {
+ device_type = "memory";
+ reg = <0x0 0xf9000000 0x6000000>;
+ };
+};
diff --git a/plat/arm/board/tc/fdts/tc_tb_fw_config.dts b/plat/arm/board/tc/fdts/tc_tb_fw_config.dts
index 4c6ccef25..a72772fb3 100644
--- a/plat/arm/board/tc/fdts/tc_tb_fw_config.dts
+++ b/plat/arm/board/tc/fdts/tc_tb_fw_config.dts
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020-2021, Arm Limited. All rights reserved.
+ * Copyright (c) 2020-2022, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -47,6 +47,11 @@
uuid = "486178e0-e7f8-11e3-bc5e-0002a5d5c51b";
load-address = <0xfd280000>;
};
+#elif TRUSTY_SP_FW_CONFIG
+ trusty {
+ uuid = "40ee25f0-a2bc-304c-8c4c-a173c57d8af1";
+ load-address = <0xf901f000>;
+ };
#else
cactus-primary {
uuid = "b4b5671e-4a90-4fe1-b81f-fb13dae1dacb";
--
2.30.2
@@ -0,0 +1,50 @@
From 96151af7eed28d63fdaa1ac6de2d14a9c71f1d4a Mon Sep 17 00:00:00 2001
From: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Date: Wed, 30 Mar 2022 12:14:49 +0000
Subject: [PATCH 6/7] feat(plat/tc): update dts with trusty compatible string
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: Ic6661df479e114bf3f464165c14df5fa02dc0139
Upstream-Status: Pending [Not submitted to upstream yet]
---
fdts/tc.dts | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/fdts/tc.dts b/fdts/tc.dts
index af64504a4..dc86958bf 100644
--- a/fdts/tc.dts
+++ b/fdts/tc.dts
@@ -555,4 +555,30 @@
compatible = "arm,trace-buffer-extension";
interrupts = <1 2 4>;
};
+
+ trusty {
+ #size-cells = <0x02>;
+ #address-cells = <0x02>;
+ ranges = <0x00>;
+ compatible = "android,trusty-v1";
+
+ virtio {
+ compatible = "android,trusty-virtio-v1";
+ };
+
+ test {
+ compatible = "android,trusty-test-v1";
+ };
+
+ log {
+ compatible = "android,trusty-log-v1";
+ };
+
+ irq {
+ ipi-range = <0x08 0x0f 0x08>;
+ interrupt-ranges = <0x00 0x0f 0x00 0x10 0x1f 0x01 0x20 0x3f 0x02>;
+ interrupt-templates = <0x01 0x00 0x8001 0x01 0x01 0x04 0x8001 0x01 0x00 0x04>;
+ compatible = "android,trusty-irq-v1";
+ };
+ };
};
--
2.30.2

Some files were not shown because too many files have changed in this diff Show More