summaryrefslogtreecommitdiff
path: root/arch/arm/firmware/trusted_foundations.c
AgeCommit message (Collapse)Author
2019-04-17firmware: Move Trusted Foundations supportThierry Reding
Move the Trusted Foundations support out of arch/arm/firmware and into drivers/firmware where most other firmware support implementations are located. Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-04-09ARM: trusted_foundations: Provide information about whether firmware is ↵Dmitry Osipenko
registered Add a helper that provides information about whether Trusted Foundations firmware operations have been registered. Tested-by: Robert Yang <decatf@gmail.com> Tested-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-04-09ARM: trusted_foundations: Make prepare_idle call to take mode argumentDmitry Osipenko
The Trusted Foundations firmware call varies depending on the required suspend-mode. Make the firmware API to take the mode argument in order to expose all of the modes to firmware user. Tested-by: Robert Yang <decatf@gmail.com> Tested-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2019-04-09ARM: trusted_foundations: Support L2 cache maintenanceDmitry Osipenko
Implement L2 cache initialization firmware callback that should be invoked early during boot in order to set up the required outer cache driver's callbacks and add the callback required for L2X0 maintenance. Partially based on work done by Michał Mirosław [1]. [1] https://www.spinics.net/lists/arm-kernel/msg594765.html Tested-by: Robert Yang <decatf@gmail.com> Tested-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-07-11ARM: trusted_foundations: do not use naked functionStefan Agner
As documented in GCC naked functions should only use basic ASM syntax. The extended ASM or mixture of basic ASM and "C" code is not guaranteed. Currently this works because it was hard coded to follow and check GCC behavior for arguments and register placement. Furthermore with clang using parameters in Extended asm in a naked function is not supported: arch/arm/firmware/trusted_foundations.c:47:10: error: parameter references not allowed in naked functions : "r" (type), "r" (arg1), "r" (arg2) ^ Use a regular function to be more portable. This aligns also with the other SMC call implementations e.g. in qcom_scm-32.c and bcm_kona_smc.c. Cc: Dmitry Osipenko <digetx@gmail.com> Cc: Stephen Warren <swarren@nvidia.com> Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-02-18ARM: trusted_foundations: implement prepare_idle()Alexandre Courbot
Support the prepare_idle() firmware call, which is necessary to properly support CPU idling. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Stephen Warren <swarren@nvidia.com>
2013-12-13ARM: add basic support for Trusted FoundationsAlexandre Courbot
Trusted Foundations is a TrustZone-based secure monitor for ARM that can be invoked using the same SMC-based API on supported platforms. This patch adds initial basic support for Trusted Foundations using the ARM firmware API. Current features are limited to the ability to boot secondary processors. Note: The API followed by Trusted Foundations does *not* follow the SMC calling conventions. It has nothing to do with PSCI neither and is only relevant to devices that use Trusted Foundations (like most Tegra-based retail devices). Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>