Age | Commit message (Collapse) | Author |
|
Add basic support to warp7 with SoC iMX7S. warp7 is an IoT platform
with single cortex-A7 processor.
Signed-off-by: Jun Nie <jun.nie@linaro.org>
|
|
Align timer register access to cp15. So that memory map is not necessary
for the test code.
Signed-off-by: Jun Nie <jun.nie@linaro.org>
|
|
some ARMv7 SoC does not support hypervisor mode. Add branch to
handle non-hypervisor version SoC instead of trigger panic.
Signed-off-by: Jun Nie <jun.nie@linaro.org>
|
|
Add support to ARMv7 with handling ARMv7 IRQ stack
and replacing ARMv8 specific instructions.
Signed-off-by: Jun Nie <jun.nie@linaro.org>
|
|
|
|
|
|
Split the function console_getc into console_getc and console_core_getc
like the rest of the console driver interfaces.
Change-Id: If1defe6ab99c3f72245a1e02b57d886fe92c2b2c
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
|
|
The autogen rule is not inside an 'eval' so it does not need a double
dollar for variable expansion. This made it print an empty string
like that:
AUTOGEN
Change-Id: I953fe72110d5edefbfd3bd2d4145af1d808b89d1
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
|
|
Move default values of build options in defaults.mk and include the
latter from the top Makefile.
Change-Id: I533d9f28649dbfe5b61a12975c3198e216b60d64
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
|
|
No functional change, just making the Makefile more concise and
aligned with the TF one.
Change-Id: I03385e4957ea992bbcb55a8e21b70d6297f0c00d
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
|
|
It seems more logical to choose the tests manifest inside the tests
makefile rather than in the top Makefile.
Change-Id: I25993550cc5c10b9e3e7b1ef841b616712a234fb
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
|
|
Note: This patch is based on TF commit 710ea1d01a10 ("Build: generate
.d file at the same time as object is created").
Currently, .d files are generated before any objects are built.
IS_ANYTHING_TO_BUILD flag is needed to avoid such processing for
non-build targets.
Instead just create a .d file simultaneously when the corresponding
object is created. No need to have separate rules for .d files.
This commit will also fix a bug; -D$(IMAGE) is defined for $(OBJ), but
not for $(PREREQUISITES). So, .d files are generated with different
macro sets from those for .o files, then wrong .d files are generated.
For example, with the following code:
#if IMAGE_TFTF
#include <some_file.h>
#endif
<some_file.h> is included when building TFTF but the .d file does not
pick up that dependency.
With this commit, the compiler will generate .o and .d at the same
time, guaranteeing they are generated under the same circumstances.
Change-Id: I7d4aa4bbd65a828e2c1860a099231ca70d3a0886
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
|
|
The new implementation of mem_protect generates a chicken-egg problem,
and the only way to push the TF and CI changes is to disable first the
TF change.
Change-Id: If5c65d83413f95d17f9b325c1d3c46e8a9575668
|
|
Stdint.h was defining the limits for fixed size c99 types
without worrying about 32 or 64 bits.
Change-Id: Iea4e55e6c581e702209fed93fb2150a11d7d6b8b
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
|
|
We should never call mp_printf() in ISRs because this function tries
to acquire the printf spinlock, which can put us in a deadlock
situation.
Imagine a test where:
1) We register an ISR for the timer interrupt. This ISR calls mp_printf().
2) We program the timer to fire in the near future.
3) We print something on the console.
Now, if the timer interrupt fires while we were printing on the console
(i.e. while holding the printf lock) then the ISR will never be able to
acquire the lock again and that will just lock up the system.
This also applies to the INFO/VERBOSE/... macros which call into
mp_printf().
This patch removes all prints from ISRs in existing tests.
Change-Id: Idffc02dbdf0f730790b1f1602e50b805073acc27
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
|
|
Commit I7f7f3c413cafcdc9b7efea42ca361151b8f40982 introduced a typo which
was not caught by the CI system before merging. This commit fixes it.
Change-Id: I49177b71a6afec77076e956caec449555198d7a5
|
|
Reduces the size of the ppi_desc_table from 32 to 16 (since the
MIN_PPI_ID is 16, entries [0-15] were unused.) Accesses to the table
have been modified to take into account the MIN_PPI_ID offset.
In the same way, reduces the size of the spi_desc_table by 32 since the
MIN_SPI_ID is 32, entries [0-31] were unused. Accesses to the table
have been modified to take into account the MIN_SPI_ID offset.
Change-Id: I7f7f3c413cafcdc9b7efea42ca361151b8f40982
|
|
The current version of plat_get_core_pos uses an incorrect algorithm
to calculate the linear position of a core / PE from its MPIDR.
This patch corrects the algorithm to:
(ClusterId * FVP_MAX_CPUS_PER_CLUSTER) * FVP_MAX_PE_PER_CPU
+ (CPUId * FVP_MAX_PE_PER_CPU)
+ ThreadId
Change-Id: Ida862a99a74c2a7f85b813ba270404224aa78987
Signed-off-by: David Cunado <david.cunado@arm.com>
|
|
Change-Id: I1c90856346941df4f49811755991c9a0683ce6b2
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
|
|
Service ID #42 is not recognized by Cactus (it used to be in a
previous version of the code) so the test fails.
Introduce a new service ID (#2) that just makes Cactus return
success. This service may be used to simply check the communication
channel between a client and Cactus.
Use this new service ID from TFTF instead of ID #42.
Note that using this new service over the existing "sleep" service has
2 advantages:
- It speeds up the tests. The timer service is mostly useful for
testing the interrupt routing model but there's no point using it
in the MM_COMMUNICATE tests.
- It may be concurrently called from different CPUs. This is not the
case of the "sleep" service, which involves a shared buffer.
Change-Id: Ifa4391b69314845066912777b1db03ab78239547
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
|
|
Return SPM_INVALID_PARAMETER when Cactus receives an unknown service
ID in the payload of an MM_COMMUNICATE call. Previously, it was just
printing a message and returning success.
Change-Id: I0c892f5ff2d3e7637f2fc98476211369fab67881
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
|
|
Change-Id: I3af1aded9f42344874cd1f0bd5140db22d74ad26
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
|
|
The goal is to easily build a version of Cactus that speaks the
MM_COMMUNICATE legacy language, without interfering with the new
SPCI/SPRT interfaces.
This patch introduces the notion of "profile" for Cactus. For now, the
only profile is "legacy". In a subsequent patch we will introduce a
profile for SPCI/SPRT. Profiles are specified on the command line when
building Cactus, e.g.:
> make CACTUS_PROFILE=legacy cactus
The initialisation code is shared amongst all profiles but then each
profile is supposed to provide its own version of the
secure_services_loop() function, which is called from cactus_main().
The profile name is printed in the version string at boot time.
The cactus_sleep() function has been moved to the cactus_helpers.c
file because it will be shared amongst the legacy and SPCI/SPRT
profiles.
Change-Id: Iab1d0ec972f9bd5b818eec6eed131fd0ea328c51
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
|
|
Move the SPM legacy tests based on MM_COMMUNICATE calls into their own
sub-directory. Take them out of the default tests manifest. To compile
a TFTF binary that includes these tests, one must now explicitly use
the SPM legacy test manifest:
> make TESTS_FILE=tests/tests-spm-legacy.xml
This paves the way to future patches that will add support for
different flavours of Cactus.
Change-Id: I4ac2b7d0ce772c005205fee1526ebe9a10e56a9b
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
|
|
In SMCCC v1.2, this features call returns -1 when not supported, 0
when the mitigation is required and 1 when the mitigation is not
required.
Change-Id: Ibbaff05d8e8bcb2143ef090d2b6d4a59aeb23fb6
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
|
|
The Unkonwn SMC path may get tested implicitly by other tests, but it's
good to have a directed one. This patch adds a test case that makes
an SMC calls with function identifier known to fall in the reserved
range, so the return value of 'unknown SMC' is expected.
Change-Id: I3e82d48b69ca7e6fea4367ae2d6b1d30e80a079e
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
|
|
Split tests-common.xml in several individual tests manifests that
focus on one feature to test.
This has 2 advantages.
1. It is easier to maintain small tests manifests rather than a
single, big one that contains all tests and keeps growing and
growing over time.
2. It is now possible to run tests in isolation, e.g. only SDEI tests
by selecting the SDEI tests manifest.
This patch also includes the "Performance" tests in the common tests.
Change-Id: I9b722bcb1658740476605be5157825a9e160bcbf
|
|
Commit 3ef07dcf8b1c ("Disable PSCI system suspend tests on AArch32 Juno.")
has missed some PSCI system suspend tests that are part of the
tests-extensive.xml test manifest.
Change-Id: If413b275d149ee2e4f52437f6c395d85df818d9c
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
|
|
PSCI system suspend is not supported on AArch32 Juno.
Change-Id: I62c7182735097204ebb1ac8675dd48aa3859f8b5
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
|
|
The UINTN type was meant to represent a 'native' integer, i.e. a 32-bit
integer on 32-bit platforms and a 64-bit integer on 64-bit platforms.
The type has been removed because it was used inconsistently across the
codebase.
Change-Id: Id45afde5c110ae807ce8fbbaa1cc48cff61ff76d
|
|
This way it is easier to understand the code and it is still valid even
if the page size changes.
Change-Id: I731ad0aa99a012eae4990ea95f507661a35ab818
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
|
|
This patch add a strong implementation of platform_get_core_pos
that supports CPUs that are multi-threaded. It checks the MT
field of the MPIDR value and shifts the affinities accordingly
so that the correect PE index is provided.
NOTE the code has hardcoded the number of PEs per CPU as 1 but
this may change when truly multi-threaded CPUs are made available.
Change-Id: I18174a65e9e089848943310b63fee916362cad13
Signed-off-by: David Cunado <david.cunado@arm.com>
|
|
Change-Id: I8819c306c2a5b0f37fbe0e496a3650ea9984007c
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
|
|
Change-Id: I9f91932715a558b4571b33101bfc23686baa55d1
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
|
|
According to the SMC Calling Convention (ARM DEN0028B):
The Unknown SMC Function Identifier is a sign-extended value of
(-1) that is returned in R0, W0 or X0 register.
The value wasn't sign-extended because it was defined as a 32-bit
unsigned value (0xffffffff).
SMC_PREEMPTED has been redefined as -2 for the same reason.
Change-Id: I4f2e0250a20bc6c996bf491bcd8b153a354f7f98
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
|
|
Change the default value of the USE_NVM build flag to 0.
The idea behind storing test results in NVM was that it makes it
possible to retrieve them post-mortem if some TFTF test crashes badly
or hangs the board and you have to power it off. But we never got to
develop the tooling that enables this use case.
Also, when NVM support is enabled, it allows to resume an interrupted
test session wherever you left it. At least that's the theory but in
practice it seems to have cause more issues than it has helped.
Until we make it easy to use the features enabled by USE_NVM=1, we
might as well disable NVM support, as this significantly slows tests
down.
Change-Id: Ib1021cb18a19538e1b004ae6c34d1b6460f0b673
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
|
|
The MAX_ADDR macro is incorrectly defined as DRAM_SIZE + MAX_SIZE
instead of DRAM_BASE + MAX_SIZE. This results in failures for the
mem_protect_check test cases which use MAX_ADDR as the base address.
So fix the incorrect definition of the MAX_ADDR macro.
Change-Id: I3102b06efb66ffa5313b9f48f7eef9ec6fd90dc1
Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
|
|
Change-Id: I88d8b479c1025659a90c84d8f635998d791c4a49
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
|
|
A pending interrupt doesn't have to be handled right after enabling
interrupts, but the tests wrongly assume that they have to. This patch
changes the behaviour of the tests so that the error message is just a
VERBOSE print, in case it is helpful for debugging other problems with
the tests.
Change-Id: I26ad42f871eb8b0d5f870950dd2e226f2e3c680d
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
|
|
This size is the same for Juno and FVP and it is defined in TF
include/plat/arm/common/arm_def.h, but TFTF had different values
for them.
Change-Id: I979518ca2c2398de6b3bdf9d2844db0c9fa05160
|
|
This patch introduces a new test in TFTF that checks that a non-secure
interrupt (in this case, a non-secure timer interrupt) cannot
interrupt a fast secure service request handled in a secure partition
(in this case, Cactus).
Change-Id: Iaf9d1a5afde9e1211a37eb60a23f25515bf48990
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
|
|
With the old system `checkpatch.pl` gets one sole input that consists on
the commit message and commit diff of each commit between BASE_COMMIT
and HEAD. It also filters out changes in some files, which makes `git
format-patch` completely ignore that commit, even the commit message.
With the new system the commit message and commit diff are analyzed
separately. This means that, even if all the files modified by a commit
are filtered out, the commit message will still be analyzed.
Also, all commits are analyzed individually. This way it's easier to
know which commit caused the problem, and there are no warnings about
repeated "Signed-off-by" lines.
Change-Id: I1f8e141772e8d58d9b75d4747c82023ef30e6652
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
|
|
Change-Id: I529d7ffa79308aa91d45807ba5d79c4053d1094d
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
|
|
Add some traces to inform the user that a test is finished. Also print
its result. Print the end of the test session.
The final report will still summarize/repeat everything but the user
now also gets this information as we go along. This is also useful
for tests automation with LAVA.
Change-Id: I8d3b1afd42da1a90d7c203c7deb1d59b18fe6375
|
|
Add support for the first fast secure service in Cactus: the timer
sleep secure service, which allows a caller to request Cactus to
sleep for a certain amount of time.
Change-Id: I85263d33ca570ef08ecc51164ba89d288d1a2cbc
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
|
|
The MM_COMMUNICATE SMC interface supports passing a communication
buffer for additional payload data from normal world to the secure
partition. This commit adds support to use it.
On the TFTF side, the memory mappings have been changed to map this
memory buffer area. This allows TFTF tests to fill in this buffer to
pass data associated to secure service requests. The number of
translation tables had to be increased to map this new memory region.
On Cactus' side, the secure services loop has been modified to read
the communication buffer for MM_COMMUNICATE messages.
A common data structure has been defined, that corresponds to the
type of information that TFTF and Cactus will exchange through
MM_COMMUNICATE messages. The structure might evolve in the future
as we get a better idea of the kind of data that need to be passed
for secure services requests.
The existing MM_COMMUNICATE tests in TFTF have been modified to
pass a valid communication buffer address with a dummy ID.
Change-Id: I2df80a3e64f77eb229783802201a01008d3f9c2f
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
|
|
Change-Id: I143dcb4432d2fdadf0a5d244d1395ad456a8a1f2
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
|
|
This patch modifies the build system so that attempting to build
Cactus for any other platform than AArch64 FVP will fail.
Change-Id: I0b5979223def81139afaca3209699085f26f3a3e
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
|
|
This test doesn't work on some configurations of FVP, so it has been
disabled until a fix can be applied.
Change-Id: Ia94af9cdafe0d82e9f891bcd1bdb9ff8792cb9a2
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
|
|
This patch fixes and adds some comments around the system timer
definitions. It also removes the definitions related to CNTNSAR
and CNTACR, as they were not used in TFTF.
Change-Id: Idffcb614c2125c0f8edd2a4359d66cb374de8a72
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
|