| 8178ea7c | 21-Apr-2017 |
Varun Wadekar <vwadekar@nvidia.com> |
drivers: ti: uart: remove UART_FCR writes
This patch removes the code that touched UART_FCR, from console_core_putc(). The check for whether transmit FIFO is full is sufficient before writing to UAR
drivers: ti: uart: remove UART_FCR writes
This patch removes the code that touched UART_FCR, from console_core_putc(). The check for whether transmit FIFO is full is sufficient before writing to UART TX FIFO. In fact setting UARTFCR_TXCLR immediately after a byte is written to FIFO might even result in loss of that byte, if UART hasn't sent that byte out yet.
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
show more ...
|
| 2edf6482 | 21-Apr-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #906 from antonio-nino-diaz-arm/an/asserts-release
Add `ENABLE_ASSERTIONS` build option |
| aa61368e | 22-Mar-2017 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Control inclusion of helper code used for asserts
Many asserts depend on code that is conditionally compiled based on the DEBUG define. This patch modifies the conditional inclusion of such code so
Control inclusion of helper code used for asserts
Many asserts depend on code that is conditionally compiled based on the DEBUG define. This patch modifies the conditional inclusion of such code so that it is based on the ENABLE_ASSERTIONS build option.
Change-Id: I6406674788aa7e1ad7c23d86ce94482ad3c382bd Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 239b085c | 28-Feb-2017 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
TZC: rename included C file to a header
C files shouldn't be included into others. This file only contains some macros and functions that can be made `static inline`, so it is ok to convert it into
TZC: rename included C file to a header
C files shouldn't be included into others. This file only contains some macros and functions that can be made `static inline`, so it is ok to convert it into a header file.
This is the only occurrence of a C file being included in another one in the codebase instead of using a header, other occurrences are a way of achieving backwards-compatibility.
Functions therein have been qualified as `inline`.
Change-Id: I88fe300f6d85a7f0740ef14c9cb8fa54849218e6 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| f3c8ec67 | 16-Apr-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #893 from antonio-nino-diaz-arm/an/tf-printf-error
Replace tf_printf occurrences with ERROR |
| f07d3985 | 12-Apr-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #885 from antonio-nino-diaz-arm/an/console-flush
Implement console_flush() |
| 38aecbb4 | 06-Apr-2017 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Replace tf_printf occurrences with ERROR
The amount of console output is controlled by the LOG_LEVEL build option. Using tf_printf without any #ifdef depending on the LOG_LEVEL doesn't give the user
Replace tf_printf occurrences with ERROR
The amount of console output is controlled by the LOG_LEVEL build option. Using tf_printf without any #ifdef depending on the LOG_LEVEL doesn't give the user that flexibility.
This patch replaces all occurrences of tf_printf that prints error, but aren't dependent on LOG_LEVEL, with the ERROR macro.
Change-Id: Ib5147f14fc1579398a11f19ddd0e840ff6692831 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| ad4c2ec6 | 08-Feb-2017 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Add console_core_flush() in upstream platforms
It is needed to add placeholders for this function because, as this is not a `plat_xxx()` function, there aren't weak definitions of it in any file.
I
Add console_core_flush() in upstream platforms
It is needed to add placeholders for this function because, as this is not a `plat_xxx()` function, there aren't weak definitions of it in any file.
If `console_flush()` is used and there isn't an implementation of `console_core_flush()` in any file, the compilation will fail.
Change-Id: I50eb56d085c4c9fbc85d40c343e86af6412f3020 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 73e05284 | 06-Feb-2017 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Add console_flush() to console API
This function ensures that console output is flushed, for example before shutting down or use by another component
In line with other console APIs, console_flush(
Add console_flush() to console API
This function ensures that console output is flushed, for example before shutting down or use by another component
In line with other console APIs, console_flush() wraps console_core_flush().
Also implement console_core_flush() for PL011.
Change-Id: I3db365065e4de04a454a5c2ce21be335a23a01e4 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 66b4c166 | 07-Mar-2017 |
dp-arm <dimitris.papastamos@arm.com> |
mbedtls: Namespace TF specific macros
These macros are not part of mbed TLS so they should not be prefixed with `MBEDTLS_` to avoid potential collision in the future. Use the `TBBR_` suffix to highl
mbedtls: Namespace TF specific macros
These macros are not part of mbed TLS so they should not be prefixed with `MBEDTLS_` to avoid potential collision in the future. Use the `TBBR_` suffix to highlight that they only used in TF.
`MBEDTLS_KEY_ALG` was not modified because that is documented and used by platforms to select the key algorithm.
Change-Id: Ief224681715c481691c80810501830ce16e210b0 Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
show more ...
|
| 3944adca | 18-Mar-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #861 from soby-mathew/sm/aarch32_fixes
Misc AArch32 fixes |
| effe0dca | 17-Mar-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #858 from soby-mathew/sm/gic_driver_data_fix
Flush the GIC driver data after init |
| e40e075f | 28-Feb-2017 |
Soby Mathew <soby.mathew@arm.com> |
AArch32: Fix conditional inclusion of bakery_locks
Due to incorrect conditional compilation checks, bakery locks were excluded from the CCN driver and the power controller driver for FVP when BL32 w
AArch32: Fix conditional inclusion of bakery_locks
Due to incorrect conditional compilation checks, bakery locks were excluded from the CCN driver and the power controller driver for FVP when BL32 was built as the EL3 Runtime Software in AArch32 mode. This patch corrects the same.
Change-Id: Ib1f163d9167a5c38e4d622232c4835cad9c235aa Signed-off-by: Soby Mathew <soby.mathew@arm.com>
show more ...
|
| 311b1773 | 14-Feb-2017 |
Soby Mathew <soby.mathew@arm.com> |
Flush the GIC driver data after init
The GIC driver data is initialized by the primary CPU with caches enabled. When the secondary CPU boots up, it initializes the GICC/GICR interface with the cache
Flush the GIC driver data after init
The GIC driver data is initialized by the primary CPU with caches enabled. When the secondary CPU boots up, it initializes the GICC/GICR interface with the caches disabled and there is a chance that the driver data is not yet written back to the memory. This patch fixes this problem by flushing the driver data after they have been initialized.
Change-Id: Ie9477029683846209593ff005d2bac559bb8f5e6 Signed-off-by: Soby Mathew <soby.mathew@arm.com>
show more ...
|
| b4d2c67b | 21-Feb-2017 |
Jeenu Viswambharan <jeenu.viswambharan@arm.com> |
Remove redundant assert
Static checks flag an assert added in commit 1f786b0 that compares unsigned value to 0, which will never fail.
Change-Id: I4b02031c2cfbd9a25255d12156919dda7d4805a0 Signed-of
Remove redundant assert
Static checks flag an assert added in commit 1f786b0 that compares unsigned value to 0, which will never fail.
Change-Id: I4b02031c2cfbd9a25255d12156919dda7d4805a0 Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
show more ...
|
| 93f39820 | 20-Feb-2017 |
danh-arm <dan.handley@arm.com> |
Merge pull request #844 from antonio-nino-diaz-arm/an/no-timingsafe
Revert "tbbr: Use constant-time bcmp() to compare hashes" |
| 1f786b0f | 20-Feb-2017 |
danh-arm <dan.handley@arm.com> |
Merge pull request #842 from jeenu-arm/io-memmap-asserts
Add bounds checking asserts to memmap IO driver |
| fabd21ad | 09-Feb-2017 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
Revert "tbbr: Use constant-time bcmp() to compare hashes"
This reverts commit b621fb503c76f3bdf06ed5ed1d3a995df8da9c50.
Because of the Trusted Firmware design, timing-safe functions are not needed.
Revert "tbbr: Use constant-time bcmp() to compare hashes"
This reverts commit b621fb503c76f3bdf06ed5ed1d3a995df8da9c50.
Because of the Trusted Firmware design, timing-safe functions are not needed. Using them may be misleading as it could be interpreted as being a protection against private data leakage, which isn't the case here.
For each image, the SHA-256 hash is calculated. Some padding is appended and the result is encrypted with a private key using RSA-2048. This is the signature of the image. The public key is stored along with BL1 in read-only memory and the encrypted hash is stored in the FIP.
When authenticating an image, the TF decrypts the hash stored in the FIP and recalculates the hash of the image. If they don't match, the boot sequence won't continue.
A constant-time comparison does not provide additional security as all the data involved in this process is already known to any attacker. There is no private data that can leaked through a timing attack when authenticating an image.
`timingsafe_bcmp()` is kept in the codebase because it could be useful in the future.
Change-Id: I44bdcd58faa586a050cc89447e38c142508c9888 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 108e4df7 | 16-Feb-2017 |
davidcunado-arm <david.cunado@arm.com> |
Merge pull request #834 from douglas-raillard-arm/dr/use_dc_zva_zeroing
Use DC ZVA instruction to zero memory |
| dae695ab | 09-Feb-2017 |
dp-arm <dimitris.papastamos@arm.com> |
Fix minor issues found by cppcheck
cppcheck highlighted variables that were initialized but then later reassigned.
Change-Id: Ie12742c01fd3bf48b2d6c05a3b448da91d57a2e4 Signed-off-by: dp-arm <dimitr
Fix minor issues found by cppcheck
cppcheck highlighted variables that were initialized but then later reassigned.
Change-Id: Ie12742c01fd3bf48b2d6c05a3b448da91d57a2e4 Signed-off-by: dp-arm <dimitris.papastamos@arm.com>
show more ...
|
| 69c043b2 | 13-Feb-2017 |
Jeenu Viswambharan <jeenu.viswambharan@arm.com> |
Add bounds checking asserts to memmap IO driver
The memmap IO driver doesn't perform bounds check when reading, writing, or seeking. The onus to vet parameters is on the caller, and this patch asser
Add bounds checking asserts to memmap IO driver
The memmap IO driver doesn't perform bounds check when reading, writing, or seeking. The onus to vet parameters is on the caller, and this patch asserts that:
- non-negative size is specified for for backing memory;
- valid parameters are passed into the driver for read, write and seek operations.
Change-Id: I6518c4065817e640e9e7e39a8a4577655f2680f7 Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
show more ...
|
| 32f0d3c6 | 26-Jan-2017 |
Douglas Raillard <douglas.raillard@arm.com> |
Replace some memset call by zeromem
Replace all use of memset by zeromem when zeroing moderately-sized structure by applying the following transformation: memset(x, 0, sizeof(x)) => zeromem(x, sizeo
Replace some memset call by zeromem
Replace all use of memset by zeromem when zeroing moderately-sized structure by applying the following transformation: memset(x, 0, sizeof(x)) => zeromem(x, sizeof(x))
As the Trusted Firmware is compiled with -ffreestanding, it forbids the compiler from using __builtin_memset and forces it to generate calls to the slow memset implementation. Zeromem is a near drop in replacement for this use case, with a more efficient implementation on both AArch32 and AArch64.
Change-Id: Ia7f3a90e888b96d056881be09f0b4d65b41aa79e Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
show more ...
|
| b621fb50 | 13-Jan-2017 |
Antonio Nino Diaz <antonio.ninodiaz@arm.com> |
tbbr: Use constant-time bcmp() to compare hashes
To avoid timing side-channel attacks, it is needed to use a constant time memory comparison function when comparing hashes. The affected code only ch
tbbr: Use constant-time bcmp() to compare hashes
To avoid timing side-channel attacks, it is needed to use a constant time memory comparison function when comparing hashes. The affected code only cheks for equality so it isn't needed to use any variant of memcmp(), bcmp() is enough.
Also, timingsafe_bcmp() is as fast as memcmp() when the two compared regions are equal, so this change incurrs no performance hit in said case. In case they are unequal, the boot sequence wouldn't continue as normal, so performance is not an issue.
Change-Id: I1c7c70ddfa4438e6031c8814411fef79fd3bb4df Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
show more ...
|
| 4abd2225 | 23-Jan-2017 |
danh-arm <dan.handley@arm.com> |
Merge pull request #800 from masahir0y/ifdef
Correct preprocessor conditionals |
| e02be207 | 23-Jan-2017 |
danh-arm <dan.handley@arm.com> |
Merge pull request #815 from hzhuang1/dwmmc_v3.9
drivers: add designware emmc driver |