| 474d4eca | 31-Jan-2017 |
danh-arm <dan.handley@arm.com> |
Merge pull request #799 from masahir0y/fiptool
fiptool: Alignment support + misc refactoring |
| e9ced6f2 | 31-Jan-2017 |
danh-arm <dan.handley@arm.com> |
Merge pull request #825 from dp-arm/dp/simplify-cond
tbbr: Simplify conditional |
| bac75297 | 31-Jan-2017 |
danh-arm <dan.handley@arm.com> |
Merge pull request #823 from douglas-raillard-arm/dr/add_fno_builtin
Add -fno-builtin to CFLAGS |
| f2590d61 | 31-Jan-2017 |
danh-arm <dan.handley@arm.com> |
Merge pull request #822 from jeenu-arm/fix-fvp-refs
user-guide.md: Fix FVP references |
| 424ad491 | 31-Jan-2017 |
danh-arm <dan.handley@arm.com> |
Merge pull request #819 from davidcunado-arm/dc/build_with_gcc6.2
Resolve build errors flagged by GCC 6.2 |
| f3ded378 | 31-Jan-2017 |
dp-arm <dimitris.papastamos@arm.com> |
tbbr: Simplify conditional
These are equivalent so use the reduced form.
Change-Id: I40ca097411b9abab69985b8e4dbccf7582eae49e Signed-off-by: dp-arm <dimitris.papastamos@arm.com> |
| 72fc70ed | 28-Dec-2016 |
Douglas Raillard <douglas.raillard@arm.com> |
build: Use separate CFLAGS for tools
Sharing the same CFLAGS for both the firmware and host tools is not useful and can lead to compilation failure when CFLAGS is set on the command line.
This patc
build: Use separate CFLAGS for tools
Sharing the same CFLAGS for both the firmware and host tools is not useful and can lead to compilation failure when CFLAGS is set on the command line.
This patch make MAKEOVERRIDES special variable empty so make's command line variable definitions are not implicitly forwarded to sub make invocations. However, make options are still forwarded like "-s" option to make the build silent.
Change-Id: Ia921c02beb1fd2041696a26160b9e7974ae000fa Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
show more ...
|
| 10bcd761 | 03-Jan-2017 |
Jeenu Viswambharan <jeenu.viswambharan@arm.com> |
Report errata workaround status to console
The errata reporting policy is as follows:
- If an errata workaround is enabled:
- If it applies (i.e. the CPU is affected by the errata), an INFO
Report errata workaround status to console
The errata reporting policy is as follows:
- If an errata workaround is enabled:
- If it applies (i.e. the CPU is affected by the errata), an INFO message is printed, confirming that the errata workaround has been applied.
- If it does not apply, a VERBOSE message is printed, confirming that the errata workaround has been skipped.
- If an errata workaround is not enabled, but would have applied had it been, a WARN message is printed, alerting that errata workaround is missing.
The CPU errata messages are printed by both BL1 (primary CPU only) and runtime firmware on debug builds, once for each CPU/errata combination.
Relevant output from Juno r1 console when ARM Trusted Firmware is built with PLAT=juno LOG_LEVEL=50 DEBUG=1:
VERBOSE: BL1: cortex_a57: errata workaround for 806969 was not applied VERBOSE: BL1: cortex_a57: errata workaround for 813420 was not applied INFO: BL1: cortex_a57: errata workaround for disable_ldnp_overread was applied WARNING: BL1: cortex_a57: errata workaround for 826974 was missing! WARNING: BL1: cortex_a57: errata workaround for 826977 was missing! WARNING: BL1: cortex_a57: errata workaround for 828024 was missing! WARNING: BL1: cortex_a57: errata workaround for 829520 was missing! WARNING: BL1: cortex_a57: errata workaround for 833471 was missing! ... VERBOSE: BL31: cortex_a57: errata workaround for 806969 was not applied VERBOSE: BL31: cortex_a57: errata workaround for 813420 was not applied INFO: BL31: cortex_a57: errata workaround for disable_ldnp_overread was applied WARNING: BL31: cortex_a57: errata workaround for 826974 was missing! WARNING: BL31: cortex_a57: errata workaround for 826977 was missing! WARNING: BL31: cortex_a57: errata workaround for 828024 was missing! WARNING: BL31: cortex_a57: errata workaround for 829520 was missing! WARNING: BL31: cortex_a57: errata workaround for 833471 was missing! ... VERBOSE: BL31: cortex_a53: errata workaround for 826319 was not applied INFO: BL31: cortex_a53: errata workaround for disable_non_temporal_hint was applied
Also update documentation.
Change-Id: Iccf059d3348adb876ca121cdf5207bdbbacf2aba Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
show more ...
|
| b38bc68b | 19-Jan-2017 |
Jeenu Viswambharan <jeenu.viswambharan@arm.com> |
Allow spin locks to be defined from assembly
At present, spin locks can only defined from C files. Add some macros such that they can be defined from assembly files too.
Change-Id: I64f0c214062f5c1
Allow spin locks to be defined from assembly
At present, spin locks can only defined from C files. Add some macros such that they can be defined from assembly files too.
Change-Id: I64f0c214062f5c15b3c8b412c7f25c908e87d970 Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
show more ...
|
| e507f8e7 | 16-Jan-2017 |
Douglas Raillard <douglas.raillard@arm.com> |
Add -fno-builtin to CFLAGS
Disable the automatic substitution of functions with builtins. The existing -ffreestanding option should already do this but explicitly adding -fno-builtin reduces the ris
Add -fno-builtin to CFLAGS
Disable the automatic substitution of functions with builtins. The existing -ffreestanding option should already do this but explicitly adding -fno-builtin reduces the risk of compiler variation. With this option, GCC is not supposed to be able to make assumptions on what the function does, which could otherwise lead to security-sensitive code removal.
This can lead to potentially less efficient code but improves predictability of what code is actually compiled into the binary.
Change-Id: I06ad151c61318bd1b00d84976f051d2d94314acc Signed-off-by: Douglas Raillard <douglas.raillard@arm.com>
show more ...
|
| 1c75d5df | 25-Dec-2016 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
fiptool: support --align option to add desired alignment to image offset
The current fiptool packs all the images without any padding between them. So, the offset to each image has no alignment. T
fiptool: support --align option to add desired alignment to image offset
The current fiptool packs all the images without any padding between them. So, the offset to each image has no alignment. This is not efficient, for example, when the FIP is read from a block-oriented device.
For example, (e)MMC is accessed by block-addressing. The block size is 512 byte. So, the best case is each image is aligned by 512 byte since the DMA engine can transfer the whole of the image to its load address directly. The worst case is the offset does not have even DMA-capable alignment (this is where we stand now). In this case, we need to transfer every block to a bounce buffer, then do memcpy() from the bounce buffer to our final destination. At least, this should work with the abstraction by the block I/O layer, but the CPU-intervention for the whole data transfer makes it really slow.
This commit adds a new option --align to the fiptool. This option, if given, requests the tool to align each component in the FIP file by the specified byte. Also, add a new Make option FIP_ALIGN for easier access to this feature; users can give something like FIP_ALIGN=512 from the command line, or add "FIP_ALIGN := 512" to their platform.mk file.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| 65caa3d0 | 26-Jan-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
fiptool: embed fip_toc_entry in struct image
The struct image has "uuid" and "size" to memorize the field values they had in the TOC entry. So, parse_fip() copies them from struct fip_toc_entry to
fiptool: embed fip_toc_entry in struct image
The struct image has "uuid" and "size" to memorize the field values they had in the TOC entry. So, parse_fip() copies them from struct fip_toc_entry to struct image, then pack_images() copies them back to struct fip_toc_entry.
The next commit (support --align option) will require to save the "offset" field as well. This makes me realize that struct image can embed struct fip_toc_entry.
This commit will allow the "flags" field to persevere the "update" command. At this moment, the "flags" is not used in a useful way. (Yet, platforms can save their own parameters in the flags field.) It makes sense to save it unless users explicitly replace the image.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| a1da83f5 | 26-Jan-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
fiptool: add xfwrite() helper
We have same patterns for fwrite().
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> |
| 4f96a498 | 12-Jan-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
fiptool: fix the global option in usage
The global option --verbose should come after the "fiptool".
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> |
| ee079320 | 14-Jan-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
fiptool: simplify the top line of command usage
We need not mention like [--force], [--out <path>] because they are included in [opts].
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> |
| 9e866d34 | 27-Jan-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
fiptool: refactor remove_image()
We need not handle the image_head as a special case. Just use a double-pointer to simplify the traverse.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.
fiptool: refactor remove_image()
We need not handle the image_head as a special case. Just use a double-pointer to simplify the traverse.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| e9e0d287 | 27-Jan-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
fiptool: simplify assert() for add_image(_desc)
lookup_image(_desc)_from_uuid() traverses the linked list, so it is not efficient. We just want to make sure *p points to NULL here.
Signed-off-by:
fiptool: simplify assert() for add_image(_desc)
lookup_image(_desc)_from_uuid() traverses the linked list, so it is not efficient. We just want to make sure *p points to NULL here.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| ea39d557 | 27-Jan-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
fiptool: revive replace_image() to keep the image order by update command
Commit e0f083a09b29 ("fiptool: Prepare ground for expanding the set of images at runtime") introduced another side effect; t
fiptool: revive replace_image() to keep the image order by update command
Commit e0f083a09b29 ("fiptool: Prepare ground for expanding the set of images at runtime") introduced another side effect; the "update" command now changes the image order in the FIP.
Let's say you have an FIP with BL2, BL31, BL32, BL33. If you update for example, BL32 with the "update" command, you will get a new FIP with BL2, BL31, BL33, BL32, in this order.
It happens like this; remove_image() removes the old image from the linked list, add_image() adds the new image at the tail of the list, then images are packed in the new order. Prior to that commit, images were updated by replace_image(), but it was deleted by the re-work. Revive replace_image() that is re-implemented to work with the linked list.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| 67973fb4 | 15-Jan-2017 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
fiptool: remove always true conditional
The conditional
if (desc != NULL) ...
is always true here because we assert it 6 lines above:
assert(desc != NULL);
Remove the if-conditiona
fiptool: remove always true conditional
The conditional
if (desc != NULL) ...
is always true here because we assert it 6 lines above:
assert(desc != NULL);
Remove the if-conditional and concatenate the printf() calls.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| 40866aaf | 25-Dec-2016 |
Masahiro Yamada <yamada.masahiro@socionext.com> |
fiptool: fix existence check of FIP input file for update command
This line should check the existence of the input file, but it is actually checking the output file. When -o option is given to the
fiptool: fix existence check of FIP input file for update command
This line should check the existence of the input file, but it is actually checking the output file. When -o option is given to the "update" command, the outfile is unlikely to exist, then parse_fip() is skipped and an empty FIP file is output. This is wrong behavior.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
show more ...
|
| c38b36d8 | 26-Jan-2017 |
danh-arm <dan.handley@arm.com> |
Merge pull request #814 from freedomtan/patches-for-8173-crbook-osi-0110
Patches for 8173 crbook |
| 186cbd08 | 26-Jan-2017 |
Jeenu Viswambharan <jeenu.viswambharan@arm.com> |
user-guide.md: Fix FVP references
The current user guide mentions that Foundation model doesn't support debugger interface. Clarify that all FVPs support --cadi-server option such that a CADI-compli
user-guide.md: Fix FVP references
The current user guide mentions that Foundation model doesn't support debugger interface. Clarify that all FVPs support --cadi-server option such that a CADI-compliant debugger can connect to and control model execution.
Also fix broken URL to FVP home page.
Change-Id: Ia14d618a4e0abb4b228eb1616040f9b51fb3f6f9 Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
show more ...
|
| 9edac047 | 19-Jan-2017 |
David Cunado <david.cunado@arm.com> |
Resolve build errors flagged by GCC 6.2
With GCC 6.2 compiler, more C undefined behaviour is being flagged as warnings, which result in build errors in ARM TF build.
The specific issue that this pa
Resolve build errors flagged by GCC 6.2
With GCC 6.2 compiler, more C undefined behaviour is being flagged as warnings, which result in build errors in ARM TF build.
The specific issue that this patch resolves is the use of (1 << 31), which is predominantly used in case statements, where 1 is represented as a signed int. When shifted to msb the behaviour is undefined.
The resolution is to specify 1 as an unsigned int using a convenience macro ULL(). A duplicate macro MAKE_ULL() is replaced.
Fixes ARM-software/tf-issues#438
Change-Id: I08e3053bbcf4c022ee2be33a75bd0056da4073e1 Signed-off-by: David Cunado <david.cunado@arm.com>
show more ...
|
| d7aa7b44 | 24-Jan-2017 |
danh-arm <dan.handley@arm.com> |
Merge pull request #817 from antonio-nino-diaz-arm/an/timingsafe
Import constant-time bcmp() and use it where necessary |
| 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 ...
|