summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-09-12warp7: add support to warp7 plat with iMX7S SoClinaro-warp7-prJun Nie
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>
2018-09-11Align timer register access to cp15Jun Nie
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>
2018-09-11Aarch32: Add support for non-hyp caseJun Nie
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>
2018-09-11Aarch32: Add support to ARMv7Jun Nie
Add support to ARMv7 with handling ARMv7 IRQ stack and replacing ARMv8 specific instructions. Signed-off-by: Jun Nie <jun.nie@linaro.org>
2018-05-10readme typodanh-arm
2018-05-10Create README.mddanh-arm
2018-05-08pl011: Reorganize getc implementationAntonio Nino Diaz
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>
2018-04-27Build: Fix display in autogen ruleSandrine Bailleux
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>
2018-04-27Build: Introduce defaults.mkSandrine Bailleux
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>
2018-04-27Build: Refactor build optionsSandrine Bailleux
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>
2018-04-27Build: Move TESTS_FILE definition in tests.mkSandrine Bailleux
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>
2018-04-27Build: generate .d file at the same time as .oSandrine Bailleux
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>
2018-04-23Disable mem_protect testsRoberto Vargas
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
2018-04-18Define stdint.h types for 32 bitsRoberto Vargas
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>
2018-04-12Remove calls to mp_printf() in ISRsSandrine Bailleux
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>
2018-04-11lib/irq: remove bug (typo) in tftf_irq_update_handler()Jonathan Wright
Commit I7f7f3c413cafcdc9b7efea42ca361151b8f40982 introduced a typo which was not caught by the CI system before merging. This commit fixes it. Change-Id: I49177b71a6afec77076e956caec449555198d7a5
2018-04-10lib/irq: fix size of ppi_desc_table and spi_desc_table arraysJonathan Wright
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
2018-04-05FVP: Fix function for translating MPIDR to linear indexDavid Cunado
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>
2018-03-26Cactus: Add new Cactus version for SPCI and SPRTAntonio Nino Diaz
Change-Id: I1c90856346941df4f49811755991c9a0683ce6b2 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-03-23Cactus (legacy): Fix MM_COMMUNICATE calls testSandrine Bailleux
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>
2018-03-23Cactus (legacy): Return error for invalid service IDsSandrine Bailleux
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>
2018-03-19Add SMCCC v1.2 test caseDimitris Papastamos
Change-Id: I3af1aded9f42344874cd1f0bd5140db22d74ad26 Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
2018-03-19Cactus: Move legacy MM_COMMUNICATE code in a sub-directorySandrine Bailleux
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>
2018-03-19TFTF: Isolate SPM Legacy testsSandrine Bailleux
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>
2018-03-16Fixup `SMCCC_ARCH_FEATURES(SMCCC_ARCH_WORKAROUND_1)` return valueDimitris Papastamos
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>
2018-03-15Add a test for Unknown SMCJeenu Viswambharan
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>
2018-03-09Reorganize tests manifest files.Sandrine Bailleux
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
2018-03-08Disable extensive PSCI system suspend tests on AArch32 Juno.Sandrine Bailleux
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>
2018-03-07Disable PSCI system suspend tests on AArch32 Juno.Sandrine Bailleux
PSCI system suspend is not supported on AArch32 Juno. Change-Id: I62c7182735097204ebb1ac8675dd48aa3859f8b5 Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2018-03-01Remove type UINTN from the codebaseJonathan Wright
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
2018-02-28Replace magic numbers in linkerscripts by PAGE_SIZEAntonio Nino Diaz
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>
2018-02-23Support shifted affinitiesDavid Cunado
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>
2018-02-20Add AMUv1 test casesDimitris Papastamos
Change-Id: I8819c306c2a5b0f37fbe0e496a3650ea9984007c Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
2018-02-20Add AMUv1 framework bitsDimitris Papastamos
Change-Id: I9f91932715a558b4571b33101bfc23686baa55d1 Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
2018-02-20Redefine SMC_UNKNOWN as -1 instead of 0xFFFFFFFFAntonio Nino Diaz
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>
2018-02-14Disable NVM support by defaultSandrine Bailleux
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>
2018-02-13mem_protect_check: fix the value of MAX_ADDR macroChandni Cherukuri
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>
2018-02-13Implement latency test for SMCCC_ARCH_WORKAROUND_1Dimitris Papastamos
Change-Id: I88d8b479c1025659a90c84d8f635998d791c4a49 Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
2018-02-09Don't fail preemtion tests if SGI aren't handledAntonio Nino Diaz
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>
2018-02-08Fix DRAM_TZ_SIZE for JunoRoberto Vargas
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
2018-01-30SPM: Test that NS interrupt do not interrupt secure servicesSandrine Bailleux
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>
2018-01-26Analyze coding style of patches individuallyAntonio Nino Diaz
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>
2018-01-23Add .bin files to .gitignoreSandrine Bailleux
Change-Id: I529d7ffa79308aa91d45807ba5d79c4053d1094d Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2018-01-23Increase user feedbackSandrine Bailleux
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
2018-01-22Cactus: Implement timer sleep secure serviceSandrine Bailleux
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>
2018-01-22FVP: Add support for comm. buffer in MM_COMMUNICATESandrine Bailleux
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>
2018-01-22SPM: Use fixed-width types in boot info structuresSandrine Bailleux
Change-Id: I143dcb4432d2fdadf0a5d244d1395ad456a8a1f2 Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2018-01-17Build Cactus for AArch64 FVP onlySandrine Bailleux
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>
2018-01-16Disable test of IRQ preemption after CPU_SUSPENDAntonio Nino Diaz
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>
2018-01-15Minor modifications around the system timer defsSandrine Bailleux
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>