commit | f1c74b4b18c17241c1559c0b0c91e3a1139ff2f4 | [log] [tgz] |
---|---|---|
author | Jens Wiklander <jens.wiklander@linaro.org> | Wed Aug 20 07:28:41 2014 +0200 |
committer | Jens Wiklander <jens.wiklander@linaro.org> | Mon Sep 01 13:12:00 2014 +0200 |
tree | 60b68176b43c9eed68018fe06e145f26ae07efd6 | |
parent | 35dd28432a736cdbc38a4d3d38e36d9b83b67405 [diff] |
Reentrancy fixes Before this patch: The normal world was only allowed to enter secure world with one thread at a time. After this patch: The normal world may try to enter secure world with as many threads as it likes, secure world will return busy when no more threads can be allowed. Secure world still only allows one active thread at a time, but during RPC another thread may enter and do some work. This is needed for cancellation to work. * Adds a mutex that waits in normal world if busy * Adds a new RPC service to wait in normal world * Imports bitstring.h from FreeBSD to aid mutex implementation * Adds a critical section in tee_ta_init_session * Unmaps TA before RPC exit and maps it again on return to handle rescheduling of threads during RPC * Doesn't clear a1-a3 when returning busy * Bugfixes vector_std_smc_entry This patch depends on the "Allow parallel entries to secure world" patch in optee_linuxdriver.
The optee_os git, containing the source code for the TEE in Linux using the ARM(R) Trustzone(R) technology. This component meets the Global Platform TEE System Architecture specification. It also provides the TEE Internal API v1.0 as defined by the Global Platform TEE Standard for the development of trusted apllications. It is distributed mostly under the BSD 2-clause open-source license. It includes few external files under BSD 3-clause license or other free software licenses. For a general overview of OP-TEE, please see the Notice.md file.
In this git, the binary to build is tee.elf. The Trusted OS is accessible from the Rich OS (Linux) through the Global Platform TEE Client API and performs secure execution of applications inside the TEE.
The software is provided under the BSD 2-Clause license. BSD 3-Clause license.
This software has hardware dependencies. The software has been tested using:
We will strive to use the latest available compiler from Linaro. Start by downloading and unpacking the compiler. Then export the PATH to the bin folder.
$ cd $HOME $ mkdir toolchains $ cd toolchains $ wget http://releases.linaro.org/14.05/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.9-2014.05_linux.tar.xz $ tar xvf gcc-linaro-arm-linux-gnueabihf-4.9-2014.05_linux.tar.xz $ export PATH=$HOME/toolchains/gcc-linaro-arm-linux-gnueabihf-4.9-2014.05_linux/bin:$PATH
$ cd $HOME $ mkdir devel $ cd devel $ git clone https://github.com/OP-TEE/optee_os.git
$ cd $HOME/devel/optee_os $ CROSS_COMPILE=arm-linux-gnueabihf- make
To be able to see the full command when building you could build using following flag:
$ make V=1
In this project we are trying to adhere to the same coding convention as used in the Linux kernel (see CodingStyle). We achieve this by running checkpatch from Linux kernel. However there are a few exceptions that we had to make since the code also follows GlobalPlatform standards. The exceptions are as follows:
Since checkpatch is licensed under the terms of GNU GPL License Version 2, we cannot include this script directly into this project. Therefore we have written the Makefile so you need to explicitly point to the script by exporting an environment variable, namely CHECKPATCH. So, suppose that the source code for the Linux kernel is at $HOME/devel/linux
, then you have to export like follows:
$ export CHECKPATCH=$HOME/devel/linux/scripts/checkpatch.pl
thereafter it should be possible to use one of the different checkpatch targets in the Makefile. There are targets for checking all files, checking against latest commit, against a certain base-commit etc. For the details, read the Makefile.