Commit Graph

1463 Commits

Author SHA1 Message Date
Sandrine Bailleux 86d8948c78 Doc: Add links to the A53/A57 Errata Notice documents
This patch adds links to the Cortex-A53 and Cortex-A57 MPCores
Software Developers Errata Notice documents in the ARM CPU Specific
Build Macros document.

Change-Id: I0aa26d7f373026097ed012a02bc61ee2c5b9d6fc
2016-04-21 13:00:28 +01:00
Sandrine Bailleux adeecf9219 Add support for Cortex-A57 erratum 833471 workaround
Change-Id: I86ac81ffd7cd094ce68c4cceb01c16563671a063
2016-04-21 12:59:59 +01:00
Sandrine Bailleux 072888656d Add support for Cortex-A57 erratum 826977 workaround
Change-Id: Icaacd19c4cef9c10d02adcc2f84a4d7c97d4bcfa
2016-04-21 12:59:59 +01:00
Sandrine Bailleux 0b77197baf Add support for Cortex-A57 erratum 829520 workaround
Change-Id: Ia2ce8aa752efb090cfc734c1895c8f2539e82439
2016-04-21 12:59:59 +01:00
Sandrine Bailleux a8b1c76936 Add support for Cortex-A57 erratum 828024 workaround
Change-Id: I632a8c5bb517ff89c69268e865be33101059be7d
2016-04-21 12:59:59 +01:00
danh-arm 07e8942a7b Merge pull request #594 from jcastillo-arm/jc/user-guide
Update User Guide and move up to Linaro 16.02
2016-04-21 12:51:27 +01:00
Sandrine Bailleux df22d602b6 Add support for Cortex-A57 erratum 826974 workaround
Change-Id: I45641551474f4c58c638aff8c42c0ab9a8ec78b4
2016-04-21 09:44:51 +01:00
Sandrine Bailleux 097b787a0e Fix wording in cpu-ops.mk comments
The CPU errata build flags don't enable errata, they enable errata
workarounds.

Change-Id: Ica65689d1205fc54eee9081a73442144b973400f
2016-04-21 09:44:51 +01:00
Soren Brinkmann 1c87351bfd context: Fix typo in comment
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
2016-04-18 10:46:50 -07:00
Soren Brinkmann 0a48e2bde8 zynqmp: ipi: Consolidate IRQ #defines
The bit mapping in I(E|D|S)R are equal, consolidate the #defines.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
2016-04-18 07:35:14 -07:00
Soren Brinkmann 8b90140657 zynqmp: Remove unused/redundant #includes
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
2016-04-18 07:33:15 -07:00
danh-arm 81b491ff37 Merge pull request #595 from sandrine-bailleux-arm/sb/unoptimised-build
Add support for unoptimised (-O0) build
2016-04-18 12:04:22 +01:00
Antonio Nino Diaz e1ea9290bb Limit support for region overlaps in xlat_tables
The only case in which regions can now overlap is if they are
identity mapped or they have the same virtual to physical address
offset (identity mapping is just a particular case of the latter).
They must overlap completely (i.e. one of them must be completely
inside the other one) and not cover the same area.

This allow future enhancements to the xlat_tables library without
having to support unnecessarily complex edge cases.

Outer regions are now sorted by mmap_add_region() before inner
regions with the same base virtual address for consistency: all
regions contained inside another one must be placed after the outer
one in the list.

If an inner region has the same attributes as the outer ones it will
be merged when creating the tables with init_xlation_table(). This
cannot be done as regions are added because there may be cases where
adding a region makes previously mergeable regions no longer
mergeable.

If the attributes of an inner region are different than the outer
region, new pages will be generated regardless of how "restrictive"
they are. For example, RO memory is more restrictive than RW. The
old implementation would give priority to RO if there is an overlap,
the new one doesn't.

NOTE: THIS IS THEORETICALLY A COMPATABILITY BREAK FOR PLATFORMS THAT
USE THE XLAT_TABLES LIBRARY IN AN UNEXPECTED WAY. PLEASE RAISE A
TF-ISSUE IF YOUR PLATFORM IS AFFECTED.

Change-Id: I75fba5cf6db627c2ead70da3feb3cc648c4fe2af
2016-04-15 11:51:44 +01:00
danh-arm 7b4838e4fc Merge pull request #549 from ljerry/tf_issue_373
Allow to dump platform-defined regs in crash log
2016-04-14 19:15:36 +01:00
Gerald Lejeune 9ff67fa6f2 Dump platform-defined regs in crash reporting
It is up to the platform to implement the new plat_crash_print_regs macro to
report all relevant platform registers helpful for troubleshooting.

plat_crash_print_regs merges or calls previously defined plat_print_gic_regs
and plat_print_interconnect_regs macros for each existing platforms.

NOTE: THIS COMMIT REQUIRES ALL PLATFORMS THAT ENABLE THE `CRASH_REPORTING`
BUILD FLAG TO MIGRATE TO USE THE NEW `plat_crash_print_regs()` MACRO. BY
DEFAULT, `CRASH_REPORTING` IS ENABLED IN DEBUG BUILDS FOR ALL PLATFORMS.

Fixes: arm-software/tf-issues#373

Signed-off-by: Gerald Lejeune <gerald.lejeune@st.com>
2016-04-14 17:50:22 +02:00
Sandrine Bailleux 10c252c14b Fix build error with optimizations disabled (-O0)
If Trusted Firmware is built with optimizations disabled (-O0), the
linker throws the following error:

    undefined reference to 'xxx'

Where 'xxx' is a raw inline function defined in a header file. The
reason is that, with optimizations disabled, GCC may decide to skip
the inlining. If that is the case, an external definition to the
compilation unit must be provided. Because no external definition
is present, the linker throws the error.

This patch fixes the problem by declaring the following inline
functions static, so the internal definition is used:
 - cm_set_next_context()
 - bakery_lock_init()

Note that building the TF with optimizations disabled when Trusted
Board Boot is enabled is currently unsupported, as this makes the BL2
image too big to fit in memory without any adjustment of its base
address. Similarly, disabling optimizations for debug builds on FVP
is unsupported at the moment.

Change-Id: I284a9f84cc8df96a0c1a52dfe05c9e8544c0cefe
2016-04-14 16:24:03 +01:00
Sandrine Bailleux 403973c95d Give user's compiler flags precedence over default ones
The user can provide additional CFLAGS to use when building TF.
However, these custom CFLAGS are currently prepended to the
standard CFLAGS that are hardcoded in the TF build system. This
is an issue because when providing conflicting compiler flags
(e.g. different optimisations levels like -O1 and -O0), the last
one on the command line usually takes precedence. This means that
the user flags get overriden.

To address this problem, this patch separates the TF CFLAGS from
the user CFLAGS. The former are now stored in the TF_CFLAGS make
variable, whereas the CFLAGS make variable is untouched and reserved
for the user. The order of the 2 sets of flags is enforced when
invoking the compiler.

Fixes ARM-Software/tf-issues#350

Change-Id: Ib189f44555b885f1dffbec6015092f381600e560
2016-04-14 16:16:37 +01:00
Juan Castillo ec0a975fe8 Update User Guide and move up to Linaro 16.02
This patch updates the TF User Guide, simplifying some of the steps
to build and run TF and trying to avoid duplicated information that
is already available on the ARM Connected Community or the Linaro
website.

The recommended Linaro release is now 16.02.

Change-Id: I21db486d56a07bb10f5ee9a33014ccc59ca12986
2016-04-14 12:39:20 +01:00
danh-arm df03c6ed42 Merge pull request #593 from mtk09422/mtcmos-fix
mt8173: Fix timing issue of mfg mtcmos power off
2016-04-14 12:17:44 +01:00
danh-arm 6d21b29d42 Merge pull request #591 from soby-mathew/sm/xlat_common
Refactor the xlat_tables library
2016-04-14 11:39:46 +01:00
Fan Chen 8c9130c6c2 mt8173: Fix timing issue of mfg mtcmos power off
In mt8173, there are totally 10 non-cpu mtcmos, so we cannot tell
if SPM finished the power control flow by 10 status bits of PASR_PDP_3.
So, extend PASR_PDP_3 status bits from 10 to 20 so that we can
make sure if the control action has been done precisely.

Change-Id: Ifd4faaa4173c6e0543aa8471149adb9fe7fadedc
Signed-off-by: Fan Chen <fan.chen@mediatek.com>
2016-04-14 14:10:04 +08:00
Soby Mathew 3e4b8fdcd3 Migrate platform ports to the new xlat_tables library
This patch modifies the upstream platform port makefiles to use the new
xlat_tables library files. This patch also makes mmap region setup common
between AArch64 and AArch32 for FVP platform port. The file `fvp_common.c`
is moved from the `plat/arm/board/fvp/aarch64` folder to the parent folder
as it is not specific to AArch64.

Change-Id: Id2e9aac45e46227b6f83cccfd1e915404018ea0b
2016-04-13 12:06:23 +01:00
Soby Mathew 3ca9928df2 Refactor the xlat_tables library code
The AArch32 long descriptor format and the AArch64 descriptor format
correspond to each other which allows possible sharing of xlat_tables
library code between AArch64 and AArch32. This patch refactors the
xlat_tables library code to seperate the common functionality from
architecture specific code. Prior to this patch, all of the xlat_tables
library code were in `lib/aarch64/xlat_tables.c` file. The refactored code
is now in `lib/xlat_tables/` directory. The AArch64 specific programming
for xlat_tables is in `lib/xlat_tables/aarch64/xlat_tables.c` and the rest
of the code common to AArch64 and AArch32 is in
`lib/xlat_tables/xlat_tables_common.c`. Also the data types used in
xlat_tables library APIs are reworked to make it compatible between AArch64
and AArch32.

The `lib/aarch64/xlat_tables.c` file now includes the new xlat_tables
library files to retain compatibility for existing platform ports.
The macros related to xlat_tables library are also moved from
`include/lib/aarch64/arch.h` to the header `include/lib/xlat_tables.h`.

NOTE: THE `lib/aarch64/xlat_tables.c` FILE IS DEPRECATED AND PLATFORM PORTS
ARE EXPECTED TO INCLUDE THE NEW XLAT_TABLES LIBRARY FILES IN THEIR MAKEFILES.

Change-Id: I3d17217d24aaf3a05a4685d642a31d4d56255a0f
2016-04-13 12:06:23 +01:00
danh-arm 43b97eda25 Merge pull request #590 from yatharth-arm/yk/tzc400
Use unsigned long long instead of uintptr_t in TZC400/DMC500 drivers
2016-04-13 10:03:00 +01:00
Yatharth Kochar 9fbdb80209 Use unsigned long long instead of uintptr_t in TZC400/DMC500 drivers
Currently the `tzc400_configure_region` and `tzc_dmc500_configure_region`
functions uses uintptr_t as the data type for `region_top` and `region_base`
variables, which will be converted to 32/64 bits for AArch32/AArch64
respectively. But the expectation is to keep these addresses at least 64 bit.

This patch modifies the data types to make it at least 64 bit by using
unsigned long long instead of uintptr_t for the `region_top` and
`region_base` variables. It also modifies the associated macros
`_tzc##fn_name##_write_region_xxx` accordingly.

Change-Id: I4e3c6a8a39ad04205cf0f3bda336c3970b15a28b
2016-04-12 16:51:39 +01:00
danh-arm 72c1dc149c Merge pull request #589 from soby-mathew/sm/fix_rk_build_err
Fix build error in Rockchip platform
2016-04-12 14:47:54 +01:00
Soby Mathew 000bc4578e Fix build error in Rockchip platform
This patch fixes the compilation error in Rockchip rk3368 platform port when
it is built in release mode.

Fixes ARM-software/tf-issues#389

Change-Id: I1a3508ac3a620289cf700e79db8f08569331ac53
2016-04-12 14:25:13 +01:00
danh-arm 70fafab36b Merge pull request #579 from ashutoshksingh/master
pass r0-r6 as part of smc param
2016-04-11 10:23:47 +01:00
danh-arm 5d787dd97d Merge pull request #569 from Xilinx/zynqmp-v1
Support for Xilinx Zynq UltraScale+ MPSoC
2016-04-08 14:31:58 +01:00
danh-arm af984eefd7 Merge pull request #588 from antonio-nino-diaz-arm/an/ignore-check-md
Fix style check and remove markdown files from it
2016-04-08 13:51:46 +01:00
Antonio Nino Diaz 8f524c2232 Remove markdown files from coding style check
All markdown (.md) files in the root directory of the repository and
all the files inside the 'docs' directory have been removed from
ROOT_DIRS_TO_CHECK in the Makefile in order not to perform the coding
style check on them.

Change-Id: Iac397b44f95cbcdb9a52cc20bf69998c394ac00a
2016-04-08 11:51:19 +01:00
Antonio Nino Diaz 3323fe1d76 Fix list of paths to perform coding style check on
Removed an extra parentheses that produced an invalid list of files
and directories to check by checkpatch.pl.

Change-Id: Iefe2c1f8be6e7b7b58f6ffe3e16fe6336b9a8689
2016-04-08 11:49:10 +01:00
danh-arm c71a87a3b3 Merge pull request #587 from antonio-nino-diaz-arm/an/rename-bl33-base
Rename BL33_BASE and make it work with RESET_TO_BL31
2016-04-08 10:43:46 +01:00
danh-arm b2c9687fe3 Merge pull request #586 from antonio-nino-diaz-arm/an/spd-bl32
Remove BL32_BASE when building without SPD for FVP
2016-04-08 10:40:39 +01:00
danh-arm 978e6820ac Merge pull request #585 from soby-mathew/sm/tf_printf_ll_changes
Differentiate `long` and `long long` formats in tf_printf
2016-04-08 10:36:11 +01:00
Antonio Nino Diaz 68450a6d5b Rename BL33_BASE option to PRELOADED_BL33_BASE
To avoid confusion the build option BL33_BASE has been renamed to
PRELOADED_BL33_BASE, which is more descriptive of what it does and
doesn't get mistaken by similar names like BL32_BASE that work in a
completely different way.

NOTE: PLATFORMS USING BUILD OPTION `BL33_BASE` MUST CHANGE TO THE NEW
BUILD OPTION `PRELOADED_BL33_BASE`.

Change-Id: I658925ebe95406edf0325f15aa1752e1782aa45b
2016-04-08 09:36:48 +01:00
Antonio Nino Diaz d5d6b89611 Fix BL33_BASE option to work with RESET_TO_BL31
The BL33 address is now set in arm_bl31_early_platform_setup() so
that the preloaded BL33 boot option is available when RESET_TO_BL31
is also used.

Change-Id: Iab93e3916f9199c3387886b055c7cd2315efed29
2016-04-08 09:36:16 +01:00
Antonio Nino Diaz 81d139d577 Remove BL32_BASE when building without SPD for FVP
Previously, when building TF without SPD support, BL2 tried to load a
BL32 image from the FIP and fails to find one, which resulted on
warning messages on the console. Even if there is a BL32 image in the
FIP it shouldn't be loaded because there is no way to transfer
control to the Secure Payload without SPD support.

The Makefile has been modified to pass a define of the form
SPD_${SPD} to the source code the same way it's done for PLAT. The
define SPD_none is then used to undefine BL32_BASE when BL32 is not
used to prevent BL2 from trying to load a BL32 image and failing,
thus removing the warning messages mentioned above.

Fixes ARM-software/tf-issues#287

Change-Id: Ifeb6f1c26935efb76afd353fea88e87ba09e9658
2016-04-08 09:30:20 +01:00
Soby Mathew f2f5a7bd18 Differentiate `long` and `long long` formats in tf_printf
This patch adds support to differentiate between `long` and `long long`
format specifiers in tf_printf(). In AArch64, they are the same which is
a 64-bit word. But, in AArch32 they are different and tf_printf() needs
to handle these format specifiers separately. This patch also fixes the
type of variables used to generic C types.

Change-Id: If3bbb0245cd0183acbe13bc1fe0d9743f417578f
2016-04-07 22:29:04 +01:00
danh-arm 7a0ae2f457 Merge pull request #584 from soby-mathew/sm/enable_scr_sif
Enable SCR_EL3.SIF bit
2016-04-07 17:17:25 +01:00
danh-arm 0892f6b605 Merge pull request #583 from mtk09422/fix-build-error
mt8173: fix spm driver build errors
2016-04-07 17:16:51 +01:00
danh-arm e850883474 Merge pull request #582 from jcastillo-arm/jc/fip_extract
fip_create: add support for image unpacking
2016-04-07 17:16:27 +01:00
danh-arm 91e8ae6631 Merge pull request #578 from EvanLloyd/ejll/woa_make2
Make improvements for host environment portability
2016-04-07 17:11:45 +01:00
danh-arm 105b59e7bb Merge pull request #575 from soby-mathew/sm/new_tzc_driver
Refactor the TZC driver and add DMC-500 driver
2016-04-07 17:11:20 +01:00
danh-arm 5d29c76015 Merge pull request #572 from jcastillo-arm/jc/tbb_nvcounter
TBB NVcounter support
2016-04-07 17:10:44 +01:00
danh-arm a8f6e21eb4 Merge pull request #563 from sbranden/tf_issue_380
Add support for %z in tf_print()
2016-04-07 17:09:48 +01:00
Soby Mathew 99e58f9e69 Enable SCR_EL3.SIF bit
This patch enables the SCR_EL3.SIF (Secure Instruction Fetch) bit in BL1 and
BL31 common architectural setup code. When in secure state, this disables
instruction fetches from Non-secure memory.

NOTE: THIS COULD BREAK PLATFORMS THAT HAVE SECURE WORLD CODE EXECUTING FROM
NON-SECURE MEMORY, BUT THIS IS CONSIDERED UNLIKELY AND IS A SERIOUS SECURITY
RISK.

Fixes ARM-Software/tf-issues#372

Change-Id: I684e84b8d523c3b246e9a5fabfa085b6405df319
2016-04-07 16:30:45 +01:00
yt.lee 3454fdea07 mt8173: fix spm driver build errors
To fix build errors in following build conditions,
DEBUG=1 LOG_LEVEL<40
DEBUG=0 LOG_LEVEL>=40

Change-Id: Ib34aed07b2ae0abd8a3a46948adc9fbeaae715aa
Signed-off-by: yt.lee <yt.lee@mediatek.com>
2016-04-07 18:38:03 +08:00
Soren Brinkmann 498256ed11 Add Xilinx to acknowledgements file
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
2016-04-06 10:44:27 -07:00
Soren Brinkmann c8284409e1 Add support for Xilinx Zynq UltraScale+ MPSOC
The Xilinx Zynq UltraScale+ MPSOC containes a quad A53 cluster. This
patch adds the platform port for that SoC.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
2016-04-06 10:44:27 -07:00