| f182814b | 15-Feb-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
drivers: convert pl011 driver to use struct serial_chip
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Car
drivers: convert pl011 driver to use struct serial_chip
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| a26e2529 | 16-Mar-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
drivers: serial: introduce struct io_pa_va
UART drivers typically need to be able to work with the MMU enabled or disabled (for instance, to support the early console). Introduce a structure that co
drivers: serial: introduce struct io_pa_va
UART drivers typically need to be able to work with the MMU enabled or disabled (for instance, to support the early console). Introduce a structure that contains both a PA and a VA, as well as a helper function to better abstract a device address.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| ae8a86d9 | 16-Feb-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
serial.h: add missing #include <stdbool.h>
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienn
serial.h: add missing #include <stdbool.h>
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| b2215adf | 15-Mar-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: FS: replace file name with struct tee_pobj
Replaces the file name with a pointer to corresponding struct tee_pobj instead in the file operation interface.
Reviewed-by: Jerome Forissier <jerom
core: FS: replace file name with struct tee_pobj
Replaces the file name with a pointer to corresponding struct tee_pobj instead in the file operation interface.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey, GP) Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (b2260, GP) Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 879237ae | 15-Mar-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: FS: remove fop->seek()
Simplifies file operations interface and implementation by removing the file operation function pointer seek(). read() and write() takes and additional position argument
core: FS: remove fop->seek()
Simplifies file operations interface and implementation by removing the file operation function pointer seek(). read() and write() takes and additional position argument to avoid keeping track of the position in the FS layer. The file position was already maintained in parallel in struct tee_obj.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d5c7fcbd | 17-Mar-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove IO() macro
Removes the now unused IO() macro.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> |
| 2221cb56 | 16-Mar-2017 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: move cache_operation() out of SVC cache services
cache_operation() is moved to a specific tee/cache.c source file. This will allow core to call cache maintenance routine without needing to rel
core: move cache_operation() out of SVC cache services
cache_operation() is moved to a specific tee/cache.c source file. This will allow core to call cache maintenance routine without needing to rely on the cache maintenance SVC services.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d9147ded | 16-Mar-2017 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: move svc_cache.h from local directory to generic includes
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by:
core: move svc_cache.h from local directory to generic includes
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 25d6f46e | 03-Mar-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: prng: Don't lock a mutex from rpc_cmd_nolock()
Avoids a recursive indirect call to rpc_cmd_nolock() from plat_prng_add_jitter_entropy_norpc() by not calling plat_prng_add_jitter_entropy_norpc(
core: prng: Don't lock a mutex from rpc_cmd_nolock()
Avoids a recursive indirect call to rpc_cmd_nolock() from plat_prng_add_jitter_entropy_norpc() by not calling plat_prng_add_jitter_entropy_norpc() for RPC related to mutex wait/wakeup.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (HiKey) Fixes: 82f97f19fe2d ("prng: call plat_prng_add_jitter_entropy() at PRNG init and before NW RPC") Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b72716ce | 01-Mar-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: prng: Don't try to read REE time when it's not possible
The commit referenced below extends entropy gathering to two locations where it is unfortunately not OK to invoke Normal World through R
core: prng: Don't try to read REE time when it's not possible
The commit referenced below extends entropy gathering to two locations where it is unfortunately not OK to invoke Normal World through RPC:
1. tee_ltc_prng_init(), because at this point the RPC subsystem has not yet been initialized, 2. rpc_cmd_nolock(), because doing so would cause recursion and would be inefficient (doubling the number of RPC calls).
The problem is: if CFG_SECURE_TIME_SOURCE_REE=y and if the platform does not override plat_prng_add_jitter_entropy(), the function will end up calling the RPC service where it's not permitted and the TEE will crash.
This commit introduces plat_prng_add_jitter_entropy_norpc() and provides a default implementation which does nothing if the time source is the REE, thus fixing the issue while still allowing platform code to implement a specific behavior.
Fixes: 82f97f19fe2d ("prng: call plat_prng_add_jitter_entropy() at PRNG init and before NW RPC") Reported-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
[Review] core: prng: Don't try to read REE time when it's not possible
Remove useless return.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 7b3758b4 | 15-Feb-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove unused FS key manager features
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> |
| 50a81498 | 15-Feb-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: provide a hash tree for secure storage
Provides a hash tree to be used by REE and SQL FS for the secure storage implementation.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Sig
core: provide a hash tree for secure storage
Provides a hash tree to be used by REE and SQL FS for the secure storage implementation.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 366f8a64 | 15-Feb-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: provide tee_fs_fek_crypt()
FS key manager provides tee_fs_fek_crypt().
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> |
| eaf1547c | 15-Feb-2017 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove obsolete <tee/tee_fs_defs.h>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> |
| 26128b8f | 28-Dec-2016 |
Victor Chong <victor.chong@linaro.org> |
drivers: pl022: Allow platforms to register CS control function
If a CS callback function is registered, the system provided one will not be used.
Signed-off-by: Victor Chong <victor.chong@linaro.o
drivers: pl022: Allow platforms to register CS control function
If a CS callback function is registered, the system provided one will not be used.
Signed-off-by: Victor Chong <victor.chong@linaro.org> Tested-by: Victor Chong <victor.chong@linaro.org> (HiKey) Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> [jf: rebase on top of master] Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 6356eeb2 | 28-Dec-2016 |
Victor Chong <victor.chong@linaro.org> |
drivers: spi: Make configure, start and end functions generic
Move configure, start and end functions from IP specific files into spi_ops in spi.h to allow platforms to call and control them via the
drivers: spi: Make configure, start and end functions generic
Move configure, start and end functions from IP specific files into spi_ops in spi.h to allow platforms to call and control them via the generic framework.
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> [jf: rebase on top of master] Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 9a2efe04 | 28-Dec-2016 |
Victor Chong <victor.chong@linaro.org> |
drivers: pl022: Add more checks and configuration
- Add checks for proper data size before packet transfer - Check also busy status before exiting rx loop to avoid possible endless looping - Clear
drivers: pl022: Add more checks and configuration
- Add checks for proper data size before packet transfer - Check also busy status before exiting rx loop to avoid possible endless looping - Clear interrupts during configure
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> [jf: rebase on top of master] Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 2ff86f60 | 28-Dec-2016 |
Victor Chong <victor.chong@linaro.org> |
drivers: spi: simplify code
1. SPI mandates that sizes of transmitted and received packet are of same size [1]. As discussed in [2], this means that *num_rxpkts != num_txpkts is not a valid use case
drivers: spi: simplify code
1. SPI mandates that sizes of transmitted and received packet are of same size [1]. As discussed in [2], this means that *num_rxpkts != num_txpkts is not a valid use case so there's no need for both and we can just merge them and use num_pkts.
2. Remove tx{8,16} and rx{8,16} only functions as these are not commonly used. If necessary, users can call just txrx{8,16} with rdat or wdat as NULL for tx{8,16} and rx{8,16} respectively as replacements. E.g.:
tx8: txrx8(chip, wdat, NULL, num_pkts);
rx16: txrx16(chip, NULL, rdat, num_pkts);
3. Remove unnecessary or repetitive enums and headers and line feeds
[1] http://www.quanser.com/products/quarc/documentation/spi_protocol.html [2] https://github.com/OP-TEE/optee_os/pull/1215
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> [jf: rebase on top of master] Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 889dbbbf | 13-Feb-2017 |
Victor Chong <victor.chong@linaro.org> |
core: Add tee_time_busy_wait()
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linar
core: Add tee_time_busy_wait()
Signed-off-by: Victor Chong <victor.chong@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> [jf: rebase on top of master] Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 2a5e2ec6 | 26-Jan-2017 |
Andy Green <andy@warmcat.com> |
prng: move old implementation to be weak default
The patch replaces the original entropy scheme using system time with the new api plat_prng_add_jitter_entropy().
The old scheme aimed to get 64 bit
prng: move old implementation to be weak default
The patch replaces the original entropy scheme using system time with the new api plat_prng_add_jitter_entropy().
The old scheme aimed to get 64 bits of entropy from the current time expressed in 64 bits in ms each time. Most of this was in fact zeros or unchanging for >256s. If you call it twice with 1ms, it actually provides 0 bits of entropy.
The replacement scheme aims to get 2 bits of entropy from the counter, which typically operates faster than 1MHz, greater than a thousand times more precision than the old way, each time.
For backwards compatibility, the old scheme is retained as the default or arches or platforms that did not provide an override to collect jitter in a better way.
Signed-off-by: Andy Green <andy@warmcat.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| cb0b5954 | 13-Dec-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add pseudo TA for socket
Adds a pseudo TA sockets using tee-supplicant.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (
core: add pseudo TA for socket
Adds a pseudo TA sockets using tee-supplicant.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (b2260 pager=y/n) Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey) Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (b2260) Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 42fb5b2e | 13-Feb-2017 |
Etienne Carriere <etienne.carriere@linaro.org> |
rename 'static TA' into 'pseudo TA'
This renaming prevents confusion of what is a static TA: static TAs are NOT Trusted Application operating at OP-TEE core privilege execution level. There are rath
rename 'static TA' into 'pseudo TA'
This renaming prevents confusion of what is a static TA: static TAs are NOT Trusted Application operating at OP-TEE core privilege execution level. There are rather OP-TEE core services that offer an invocation API based on GP TEE specified invocation API: open session, invoke command and close session.
This change renames all 'static TA' references into 'pseudo TA' references.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 883c4be3 | 13-Oct-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
Add support for user TA profiling with gprof (-pg)
Adds the infrastructure to collect profiling information from Trusted Applications running in user mode and instrumented with -pg. Enable with: CFG
Add support for user TA profiling with gprof (-pg)
Adds the infrastructure to collect profiling information from Trusted Applications running in user mode and instrumented with -pg. Enable with: CFG_TA_GPROF_SUPPORT=y.
Profiling support in itself adds no significant performance overhead. Instrumented applications however may run 1.3x - 2x slower, and have a larger .bss section (+1.36 times .text size for 32-bit TAs, +1.77 times .text size for 64-bit ones).
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (D02 64-bit) Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMU 32-bit) Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| add06171 | 26-Oct-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
Move definitions from optee_msg.h to optee_msg_supplicant.h
Commands that are specific to tee-supplicant belong in their own file. This allows optee_msg.h to remain untouched as more supplicant comm
Move definitions from optee_msg.h to optee_msg_supplicant.h
Commands that are specific to tee-supplicant belong in their own file. This allows optee_msg.h to remain untouched as more supplicant commands are added. With this change: - optee_msg.h is used by the driver and OP-TEE OS (note: there are two slightly different versions of the file adapted to each environment but they define the same things) - optee_msg_supplicant.h is used by OP-TEE OS and tee-supplicant
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 3e21f81b | 26-Oct-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
Rename optee_msg_fs.h to optee_msg_supplicant.h
The file contains the definition of the RPC interface with tee-supplicant, not limited to filesystem functions.
Signed-off-by: Jerome Forissier <jero
Rename optee_msg_fs.h to optee_msg_supplicant.h
The file contains the definition of the RPC interface with tee-supplicant, not limited to filesystem functions.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|