Age | Commit message (Collapse) | Author |
|
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>
|
|
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-Id: I88d8b479c1025659a90c84d8f635998d791c4a49
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
|
|
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>
|
|
Rename SP_VERSION macros to MM_VERSION, which is the name used in the MM
specification [1]. Also, a few more helper macros have been added.
MM-specific definitions have been moved to their own header file.
[1] http://infocenter.arm.com/help/topic/com.arm.doc.den0060a/DEN0060A_ARM_MM_Interface_Specification.pdf
Change-Id: Ieb01bce8f5e9658b16c3650b3db074e10a8f732d
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
|
|
MM_COMMUNICATE is the name used in the MM specification.
Change-Id: Ida2ac8b3dead00157ad1ec3904d93bde76760361
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
|
|
The defines have been renamed to match the names used in the
documentation.
Change-Id: I1b2dc9087953aa283790da2c9e895869a2c36a81
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
|
|
The test exercises all invalid transitions from all event handler
states. The state machine is exercised on all CPUs serially. Refer to
sections 6.1 and 6.1.2 of the SDEI v1.0 specification.
The functions sdei_trigger_event() and sdei_handler_done() are made
public so that this test case can make use of them.
Change-Id: Iecd2792f253c7833b1c4b128dc2dc7430ceccaca
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
|
|
Wrappers are introduced for STATUS, ROUTING_SET, CONTEXT, COMPLETE and
COMPLETE_AND_RESUME.
Change-Id: I0a998ca579f2f2430d0b5649ec087a980849a509
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
|
|
The current implementation is not wrong, but it's good to match the spec
regarding types used at interfaces.
Change-Id: I9d125be2fcff0f3c4cc6a2757edd8058a7af4bab
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
|
|
This is an optional PSCI feature that allows to the caller
a bigger control about the type of reset used.
Change-Id: Ie7eddce11277e6f558f1c24cbc0dde5beb71d3de
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
|
|
This is an optional PSCI feature that allows the caller to
ask if some specific memory region is protected by the mem_protect
feature.
Change-Id: I75d4a6402d9c4db1bc4c266746e58cc96b73b91c
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
|
|
Mem_protect is an optional PSCI feature that allows to the
caller to enable a mechanism that overwrite all the visible
memory of the caller when the system boots. This mechanism
is intented to protect secrets stored in memory after a
reset.
Change-Id: I00aa04f8b0d07412d9da491b0114e6d95359e5b3
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
|
|
This image performs some boot tests to make sure that the Secure
Partition Manager works correctly. It is introduced as an example of how
to implement and build a Secure Partition using the Trusted Firmware
build system.
This image uses position-independent code so that it can be placed in
all places where the Trusted Firmware supports having a Secure
Partition.
This image is only available for fvp in AArch64 mode.
To compile it:
CROSS_COMPILE=aarch64-linux-gnu- make PLAT=fvp cactus
Change-Id: I636b5e3299ecd4dbae2815a08c7f343a24053568
Co-authored-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Co-authored-by: Douglas Raillard <douglas.raillard@arm.com>
Co-authored-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
|
|
Change-Id: Iebe05d3d896a101bd46cc9b1c44ab0712cbf4226
Signed-off-by: Dimitris Papastamos <dimitris.papastamos@arm.com>
|
|
The code was checking against a specific version, but there were tests
that were designed to work with 1.x or 0.x versions of PSCI. This
patch adds tftf_is_valid_psci_version() which validates a version code
against all the valid codes defined in the specification of PSCI 1.1,
and sets the current version to 1.1.
Change-Id: Ie11cb0311f9be2cfa0d1bee51dd59e8977a3aa28
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
|
|
Add test for STD SMC abortion in addition to the already existing
resumption test.
Also update tsp.h to include the STD SMC ABORT FID.
Change-Id: I27e2efcd9dfef5857cdf0f6a67940b96dd1627fe
Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
|
|
`PMF_ARM_TIF_IMPL_ID` should be set to 0x41. The code left shifts it
by 24 bit positions.
Change-Id: I50f1148dc92fa3d469d4a10b22500993ccb94dad
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
|
|
A new STD SM call has been added to the SPD: TSP_ABORT_DONE. This patch
updates TSP_NUM_FID to account for it.
Change-Id: Iddce48cf4bce8d13948c2c9dc156412fc763c96a
Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
|
|
Change-Id: I4e6fd9d07ae591e15271d3edff3bc2717321e02a
Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
|
|
This patch adds the TFTF framework support for AArch32. TFTF runs
in HYP mode when compiled for AArch32. The entrypoint, exception
and architecture files are added as part of this patch.
Change-Id: I24d8e6eff9411c2bc536e0ad45f4e375d6e56101
|
|
At present, the SMC function ID constants are explicitly suffixed
for AArch64. This patch renames them so that they appear
architecture-agnostic. The final value of these constants however
are defined according to the architecture TFTF is built for.
Test cases which use these macros have been modified accordingly.
Change-Id: I0ad64003908683dfda472e66135fdce0ffe66897
|
|
These test cases make NODE_HW_STATE PSCI calls for both online and
offline CPUs and clusters, and verify that the returned state from power
controller match expected values. These also perform parameter
validation.
Change-Id: I02a412571a584cafa36e8dfe0ddf6ed53760573b
|
|
The `Query Standard Service Call Count` test in TFTF used to depend on
a hardcoded call count number and it expected the same from the firmware
when queried. But the call count varies depending on the build options
the firmware is built with. Hence the test now just checks whether the call
succeeded and prints the call count reported by firmware without verifying
it.
Change-Id: I583050537bbc1bd3bce3631625ca391816e499b4
|
|
From PSCI 1.0, it is not compulsory to track `AFFINITY_INFO` status
for a power domain above level 0. An implementation can return
PSCI_E_INVALID_PARAMS or a return value as per older PSCI
specification. This patch updates the affinity info tests to
support both specifications as per PSCI version information.
Similarly, PSCI 1.0 added a new error code which is returned
when entry point address of a CPU_ON call is invalid. This
patch adds a new test to validate this scenario. Also, it fixes
the CPU_ON call on a already on CPU test which was passing an
invalid entrypoint and testing a wrong scenario.
Change-Id: I84a229f4d4099a8127d35d50fc36caeeca6e44c1
|
|
This patch adds the necessary platform and framework support for
extended state-id power state format. Also the existing suspend
tests have been reworked to use the new framework. The framework
detects the correct power state format during cold boot and
implements helper functions to create the power state function
in the detected format.
Change-Id: Ie729d947a0f2693aa7e943544a2c4c006e526c63
|
|
Increase the number of PSCI calls implemented in the Trusted Firmware,
as SYSTEM_SUSPEND is now supported. This fixes the test querying the
Standard Service.
Change-Id: Ie2f29f045f8d4e673879a73b2f7a4bad86d74b0b
|
|
This patch adds a test which exercises the PSCI MIGRATE_INFO_TYPE
API in the following 2 scenarios:
1) When no Trusted OS is present
In this case,
a) either the EL3 firmware doesn't implement the MIGRATE_INFO_TYPE
call
b) or the MIGRATE_INFO_TYPE call should report that the Trusted OS
is not present.
In both cases, the MIGRATE call should not be supported.
2) When a Trusted OS is present and it is the TSP
In this case, the MIGRATE_INFO_TYPE call should report that the
TSP is MP-capable and hence the MIGRATE call should not be
supported.
The test doesn't support any other Trusted OS than the TSP. It will be
skipped for any other TOS.
Change-Id: I6d4970db2fb7f29ac8b473caf2028af03f66ba17
|
|
Change-Id: I9fec87b4c5bd74683be69b1730f62cca475aae53
|
|
TF_PSCI_NUM_CALLS is now the number of PSCI calls implemented
in the Trusted Firmware (used to be called PSCI_NUM_CALLS).
PSCI_NUM_CALLS is now the total number of PSCI calls defined
in the PSCI specification.
Change-Id: If506d4a8a0ca7898134158aa6359e9a8ca95b34c
|
|
Recent modifications in the Trusted Firmware means that
some tests now fail. This patch makes the required changes
to align with the Trusted Firmware. More precisely:
- Bump expected PSCI version to 1.0 (was 0.2).
This fixes the PSCI_VERSION test.
- Increase the number of PSCI calls implemented in the
Trusted Firmware, as PSCI_FEATURES is now supported.
This fixes the test querying the Standard Service.
Change-Id: Id59e4a84810b89e975f0f2fa6964ecdbf4be17b6
|
|
PSCI_AFF_PRESENT and PSCI_AFF_ABSENT constants are used to mark the
presence or absence of an affinity instance in the topology tree.
These constants are not standardised by the PSCI specification,
they are just related to the way the topology code is implemented.
Therefore, they don't belong to the header file 'psci.h'.
This patch moves these 2 constants out of 'psci.h' and rename them
into AFFINITY_STATE_PRESENT/ABSENT.
Change-Id: I5a58043bc4802af83f122e609ad4408033309bac
|
|
Define the PSCI_VERSION constant, which is formed from the major
and minor components of the version number.
Change-Id: I3199796d04e99537d10318e9906cc13850355140
|
|
The idea is to easily recognise SMC functions IDs constants and
other SMC-related constants like specific bits of SMC arguments.
Also rename VERSION SMC calls into REVISION to be aligned with the
terms used in the SMCCC.
Change-Id: I2c05c49b567db28d871a69565afa4ef226bea596
|
|
This is a first, rough attempt at cleaning the framework's directory
hierarchy.
Basically, almost everything is moved to individual directories
under lib/. What's left under framework/ are the core features of
the framework, i.e. things that test cases won't ever need.
This patch also introduces some cleanups.
The following functions are removed:
- tftf_platform_get_time()
We'll need such a function in the future to measure tests execution
time but there's no reason for it to be platform-specific, we can
use the Generic Timer instead when we get to it.
Tracked by GENFW-506.
- tftf_platform_reset()
We'll need a function to reset the platform in the future but at
the moment it is not used.
Tracked by GENFW-500.
- tftf_platform_core_whoami()
Not needed. A CPU can just call read_mpidr_el1() to get its MPID,
then platform_get_core_pos() to get the corresponding linear ID.
See GENFW-483.
- tftf_is_core_enabled()
Superseded by plat_get_aff_state().
- tftf_core_participates_in_testcase()
Superseded by the platform API to query the platform topology.
Move the following defintions out of framework/helpers.c:
- Move mp_printf() in lib/utils/mp_printf.c
- Move MMU functions into plat_common.c as default implementations
of these platform functions.
What's left in helpers.c then are helper functions to write test
results into NVM so rename the file into nvm_results_helpers.c.
Remove bl_common.h as it contains only Trusted Firmware specific
definitions.
Rename tests_api.h into tftf_lib.h. Also move some of its
declarations into new header files: irq.h, systimer.h, sgi.h.
Remove tftf_common.h and move its declarations to tftf_lib.h.
Rename rt_services/ into runtime_services/.
The test cases' directory hierarchy needs to be restructured as well,
this will come in a subsequent patch.
Change-Id: I143c4c888586301594f6b6339d6e48cbbd817570
|