Commit Graph

4189 Commits

Author SHA1 Message Date
Andrew F. Davis f996a5f79f PSCI: Do not flush cache when unneeded
When a platform enables its caches before it accesses the
psci_non_cpu_pd_nodes structure then explicit cache maintenance
is not needed.

Signed-off-by: Andrew F. Davis <afd@ti.com>
2018-10-10 13:07:56 -05:00
Andrew F. Davis c98db6c617 PSCI: Update comment on MMU disablement
The MMU is not disabled in this path, update the comment to
reflect this. Also clarify that both paths call prepare_cpu_pwr_dwn(),
but the second path does stack cache maintenance.

Signed-off-by: Andrew F. Davis <afd@ti.com>
2018-10-10 13:07:56 -05:00
Soby Mathew f7a18268ad
Merge pull request #1614 from MISL-EBU-System-SW/integration-fix
Fix service CPU image load at BL2 stage and update maintainers list
2018-10-10 14:00:34 +01:00
Soby Mathew 52a9e53b8c
Merge pull request #1612 from antonio-nino-diaz-arm/an/tools
tools: Make invocation of host compiler correct
2018-10-10 14:00:14 +01:00
Soby Mathew 821d3547e1
Merge pull request #1607 from girishpathak/gp/346_sgm775_earlylog_fix_v2
plat/arm/css/sgm: Reorder early platform init
2018-10-10 13:59:47 +01:00
Soby Mathew 7c39f6f772
Merge pull request #1489 from teknoraver/master
doimage: get rid of non null terminated strings by strncpy
2018-10-10 13:58:23 +01:00
Bryan O'Donoghue a21da47806 drivers: imx: mxc_usdhc: Do not set MMC_RSP_48 for MMC_RESPONSE_R2
commit 97d5db8c5c reverts an update to the
MMC layer that accompanied the original submission of this MMC driver this
is the right-thing-to-do in terms of the MMC spec.

Unfortunately the reversion also breaks this driver. The issue is the i.MX
controller doesn't want MMC_RSP_48 set for MMC_RESPONSE_R2.

The appropriate place to place that constraint is obviously in
drivers/imx/usdhc/imx_usdhc.c not in the shared MMC codebase. This patch
restores the logic the i.MX controller requires without breaking it for
everyone else.

Fixes: 97d5db8c5c
Fixes: 2a82a9c95f

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Jun Nie <jun.nie@linaro.org>
2018-10-10 12:15:33 +01:00
John Tsichritzis fadd21514b Fix typos in changelog
Change-Id: Icc6fb03abb9b4ef85931b9e3d767b5a9c271b5f3
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
2018-10-10 12:11:32 +01:00
John Tsichritzis ea75ffd3e7 docs: Clarify usage of LOG_LEVEL
Change-Id: I1ce771a155e6e83885a00d2f05591bf98cd69854
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
2018-10-10 12:11:32 +01:00
John Tsichritzis a623832683 Replace S-EL3 references by EL3
The "Secure" prefix (S-ELx) is valid only for S-EL0 and S-EL1 but is
meaningless for EL3, since EL3 is always secure. Hence, the "S" prefix
has been removed from wherever it was used as "S-EL3".

Change-Id: Icdeac9506d763f9f83d7297c7113aec7b85e9dbe
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
2018-10-10 12:11:32 +01:00
John Tsichritzis 701b498cec Reorder log level macro definitions for clarity
The definitions of the logging macros are reordered to be consistent
with the definitions of the log levels.

Change-Id: I6ff07b93eb64786ff147d39014d1c8e15db28444
Signed-off-by: John Tsichritzis <john.tsichritzis@arm.com>
2018-10-10 12:11:32 +01:00
Girish Pathak 2879b5c164 plat/arm/css/sgm: Reorder early platform init
In the function, bl1_early_platform_setup in the file
plat/arm/css/sgm/sgm_bl1_setup.c:

  plat_config_init();

  arm_bl1_early_platform_setup();

The debug messages logged by plat_config_init() are lost because
the console is initialized in the function
arm_bl1_early_platform_setup()

To see the logs of plat_config_init, this fix re-orders above calls
so that the console is initialized before call to plat_config_init.

Change-Id: I2e98f1f67c591cca24e28905acd0838ea3697a7c
Signed-off-by: Girish Pathak <girish.pathak@arm.com>
2018-10-10 12:09:06 +01:00
Soby Mathew c6d1fe954b
Merge pull request #1618 from satheesbalya-arm/sb1_2601_misra_smc_pwr
Fix misra warnings in SMC and power mgmt code
2018-10-10 11:35:28 +01:00
Antonio Nino Diaz aa7877c4bf plat/arm: Move norflash driver to drivers/ folder
This way it can be reused by other platforms if needed.

Note that this driver is designed to work with the Versatile Express NOR
flash of Juno and FVP. In said platforms, the memory is organized as an
interleaved memory of two chips with a 16 bit word.

Any platform that wishes to reuse it with a different configuration will
need to modify the driver so that it is more generic.

Change-Id: Ic721758425864e0cf42b7b9b04bf0d9513b6022e
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-10-10 11:14:44 +01:00
Deepak Pandey 49d3a62146 plat/arm: allow RESET_TO_BL31 for CSS-based platforms
This lets any future CSS platforms to use RESET_TO_BL31 flag.

Change-Id: I32a90fce43cb0c6f4d33589653a0fd6a7ecc9577
Signed-off-by: Deepak Pandey <Deepak.Pandey@arm.com>
2018-10-10 13:45:10 +05:30
Sathees Balya e02f469f88 Fix misra warnings in SMC and power mgmt code
Change-Id: Ia00eba2b18804e6498d935d33ec104953e0e5e03
Signed-off-by: Sathees Balya <sathees.balya@arm.com>
2018-10-09 12:23:55 +01:00
Dimitris Papastamos 3d3619c6df
Merge pull request #1617 from antonio-nino-diaz-arm/an/bugfix
xlat: Fix checks in mmap_add() and mmap_add_ctx()
2018-10-08 17:34:59 +01:00
Antonio Nino Diaz a5fa5658e8 xlat: Fix checks in mmap_add() and mmap_add_ctx()
Commit 79621f0038 broke sgi575.

It is possible to have a region with 0 as value for the attributes. It
means device memory, read only, secure, executable. This is legitimate
if the code is in flash and the code is executed from there.

This is the case for SGI_MAP_FLASH0_RO, defined in the file
plat/arm/css/sgi/sgi_plat.c.

This problem is solved by checking both size and attributes in xlat v1.
In xlat v2, it is enough to check the granularity, as it can never be 0.

Change-Id: I7be11f1b0e51c4c2ffd560b4a6cdfbf15de2c276
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-10-08 16:15:21 +01:00
Andre Przywara ee1ba6d4dd Makefile: Support totally quiet output with -s
"-s" is a command line option to the make tool, to suppress normal output,
something to the effect of prepending every line with '@' in the Makefile.
However with our V={0|1} support, we now print the shortened command line
output in any case (even with V=1, in addition to the long line!).
Normally -s helps to not miss non-fatal warnings, which tend to scroll out
of the window easily.

Introduce a new Makefile variable ECHO, to control the shortened output.
We only set it in the (current default) V=0 case, and replace every
occurence of "@echo" with that variable.
When the user specifies "-s", we set ECHO to some magic string which
changes the output line into a comment, so the output is suppressed.

Beside suppressing every output for "-s", we also avoid the redundant
short output when compiling with V=1.

This changes the output to:
==========
$ make -s PLAT=.... bl31

Built build/.../release/bl31.bin

==========
$ make PLAT=.... bl31
...
  CC      lib/libc/strncmp.c
  CC      lib/libc/strnlen.c
...
==========
$ make V=1 PLAT=.... bl31
...
gcc -DDEBUG=0 .... -o build/.../release/libc/strncmp.o
gcc -DDEBUG=0 .... -o build/.../release/libc/strnlen.o
...
==========

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
2018-10-08 12:25:51 +01:00
Grzegorz Jaszczyk f2c1504621 plat: marvell: invoke platform specific scp_bl2 image handler
Before switching to new API the scp_bl2 handler was invoked from
bl2/bl2_image_load.c which was removed. Invoke the platform specific
scp_bl2 handler in analogy to ARM and HiSilicon.

Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
2018-10-07 12:26:27 +03:00
Konstantin Porotchkin 5e5e4d8df2 add Marvell tools to maintained sources list
Declate Marvell's ownership on tools/doimage

Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
2018-10-07 12:21:31 +03:00
Dimitris Papastamos 5634a493e7
Merge pull request #1611 from antonio-nino-diaz-arm/an/misra-common
Remove some MISRA defects in common code
2018-10-04 16:46:53 +01:00
Dimitris Papastamos 68e0fca139
Merge pull request #1610 from sandrine-bailleux-arm/sb/fix-makefile
Remove incorrect tabulation in Makefile
2018-10-04 16:45:40 +01:00
Dimitris Papastamos 200006df54
Merge pull request #1583 from danielboulby-arm/db/AArch32_Multi_Console
Enable Multi Console API in AArch32
2018-10-04 16:43:39 +01:00
Antonio Nino Diaz 81542c00d0 Remove some MISRA defects in common code
No functional changes.

Change-Id: I9638e02acb9b22eb794ebf45aad84348a710287e
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-10-04 15:43:52 +01:00
Soby Mathew 756fac649b
Merge pull request #1595 from Yann-lms/dts_dep
MAKE_DTB: dependencies on device tree source files
2018-10-04 15:23:09 +01:00
Antonio Nino Diaz 750e8d807d tools: Make invocation of host compiler correct
HOSTCC should be used in any of the tools inside the tools/ directory
instead of CC. That way it is possible to override both values from the
command line when building the Trusted Firmware and the tools at the
same time. Also, use HOSTCCFLAGS instead of CFLAGS.

Also, instead of printing the strings CC and LD in the console during
the compilation of the tools, HOSTCC and HOSTLD have to be used for
clarity. This is how it is done in other projects like U-Boot or Linux.

Change-Id: Icd6f74c31eb74cdd1c353583399ab19e173e293e
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2018-10-04 14:35:38 +01:00
Soby Mathew 3989a81930
Merge pull request #1609 from MISL-EBU-System-SW/integration-ble
plat/marvell: Move BLE into the platform tree, minor fix in tools.
2018-10-04 14:31:58 +01:00
Soby Mathew 7e0a38a4d8
Merge pull request #1603 from antonio-nino-diaz-arm/db/reclaim-init
Reclaim BL31 initialization code memory for runtime data
2018-10-04 14:23:31 +01:00
Soby Mathew e44b8a9d48
Merge pull request #1608 from npoushin/integration
maintainers: Correct github username for nariman to npoushin
2018-10-03 15:38:12 +01:00
Soby Mathew 3ed87a496a
Merge pull request #1584 from danielboulby-arm/db/Switches
Ensure the flow through switch statements is clear
2018-10-03 15:36:37 +01:00
Sandrine Bailleux 44a87380c5 Remove incorrect tabulation in Makefile
When attempting to compile TF-A with "SPD=something ARCH=aarch32", the
following error message is printed:

 Makefile:291: *** recipe commences before first target.  Stop.

This is because the call to the error function is indented using a tab
whereas it's not part of a rule's recipe. Replace the tab by spaces.

Change-Id: Ic9b603837a0e43f2f7070cb39137541c332365d2
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
2018-10-03 15:06:53 +02:00
Jan Kiszka c0f73edc9b tools: Fix broken object compilation rules
As these rules depend on non-existing headers as well (likely copy &
pasted from fiptool), they never matched, and the built-in rules were
used. That led to random breakages when e.g. CPPFLAGS was suddenly
evaluated and contained invalid options.

For the stm32image, this reveals that we were relying on the built-in
rules by passing -D_GNU_SOURCE via CPPFLAGS, rather than using CFLAGS as
used in the local rule. Fix that as well.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2018-10-03 15:31:19 +03:00
Konstantin Porotchkin 37c4341b10 marvell: Move BLE from external repo to the platform folder
The BLE is the pre-TF-A boot stage required by Marvell Armada
BootROM for bringing up DRAM and allow the boot image copy to it.
Since this is not a standard boot level and only uses the TF-A
as a build environment, it was introduced out of source tree.
However it turns out that such remote location introduces additional
complexity to the upstream TF-A build process.
In order to simplify the build environment the BLE source folder
is relocated from the external repository to A8K platform directory.
The build documentation is updated accordingly.

Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
2018-10-03 15:31:19 +03:00
Daniel Boulby cb4adb0d8c FVP: Reclaim init code for the stack
Map the initialization code for BL31 to overlap with the memory
required for the secondary cores stack. Once BL31 has been
initialized the memory can be remapped to RW data so that it can
be used for secondary cores stacks. By moving code from .text to
.text.init the size of the BL31 image is decreased by a page.

Split arm_common.ld.S into two linker scripts, one for tzc_dram
(arm_tzc_dram.ld.S) and one for reclaiming initialization code
(arm_reclaim_init.ld.S) so that platforms can chose which memory
regions they wish to include.

Change-Id: I648e88f3eda1aa71765744cf34343ecda9320b32
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
2018-10-03 12:06:07 +01:00
Nariman Poushin 0c66e64ebb maintainers: Correct github username for nariman to npoushin
Signed-off-by: Nariman Poushin <nariman.poushin@linaro.org>
2018-10-03 12:04:02 +01:00
Daniel Boulby c9263e62a7 Mark GICV3, CCI and CCN boot time code as init
Mark the GICv3, CCI and CCN code only used in Bl31 initialization
with __init to be reclaimed once no longer needed.

Change-Id: I3d77f36758450d9d1d87ecc60bc1c63fe4082667
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
2018-10-03 11:48:15 +01:00
Daniel Boulby aff2863fe6 Mark xlat tables initialization code
Mark the xlat tables code only used in BL31 initialization as
__init to be reclaimed once no longer needed

Change-Id: I3106bfd994706a57c578624573bcfa525fbbd3c4
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
2018-10-03 11:48:15 +01:00
Daniel Boulby 4d010d0dc0 plat/arm: Mark arm platform initialization functions
Mark the initialization functions found in the BL31 boot sequence
as __init so they can be reclaimed when no longer needed.

Change-Id: I687a89346419c7710ef5097feaa325d83c527697
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
2018-10-03 11:48:15 +01:00
Daniel Boulby 87c8513498 Mark BL31 initialization functions
Mark the initialization functions in BL31, such as context management,
EHF, RAS and PSCI as __init so that they can be reclaimed by the
platform when no longer needed

Change-Id: I7446aeee3dde8950b0f410cb766b7a2312c20130
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
2018-10-03 11:47:30 +01:00
Daniel Boulby 1dcc28cfba Introduce RECLAIM_INIT_CODE build flag
This patch introduces a build flag "RECLAIM_INIT_CODE" to mark boot time
code which allows platforms to place this memory in an appropriate
section to be reclaimed later. This features is primarily targeted for
BL31. Appropriate documentation updates are also done.

Change-Id: If0ca062851614805d769c332c771083d46599194
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
2018-10-03 11:47:30 +01:00
Daniel Boulby 1a4b46d583 Set the IMAGE_BLx flag for the linker preprocessor
Change-Id: Ibc91f119c99413ded59a9db3db918d22f0517bc1
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
2018-10-03 11:47:30 +01:00
Daniel Boulby 8d30b4987b Remove unused ROMLIB memory region macro
Remove ARM_MAP_BL_ROMLIB memory region macro as it is now split
into two regions for code and data

Change-Id: Ic17b5b584933c196db29fe83051d7e0a8e92911c
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
2018-10-03 11:47:30 +01:00
Daniel Boulby 79621f0038 xlat: Change check in mmap_add and mmap_add_ctx()
Depending on the build flags it is possible that some of the memory
regions mapped in page table setup could have a size of 0. In this
case we simply want to do nothing but still wish to map the other
regions in the array. Therefore we cannot only use size == 0 as
the termination logic for the loop.

Since an attributes field with value 0 means that the region is
device memory, read only, secure and executable. Device memory
can't be executable, so this combination should never be used
and it is safe to use as a terminator value.

Therefore by changing the termination logic to use attributes
instead of size we prevent terminating the loop when we don't
intend to.

Change-Id: I92fc7f689ab08543497be6be4896dace2ed7b66a
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
2018-10-03 11:47:30 +01:00
Soby Mathew a4277cda5c
Merge pull request #1588 from satheesbalya-arm/sb1_2596_misra_tim_console
Fix misra warnings in delay timer and console drivers
2018-10-03 11:22:02 +01:00
Soby Mathew f19d2104eb
Merge pull request #1591 from jts-arm/cov1
Fix static analysis defects
2018-10-03 11:21:02 +01:00
Soby Mathew f60a74afc2
Merge pull request #1604 from MISL-EBU-System-SW/integration
marvell: Continue migration to new APIs
2018-10-03 11:19:10 +01:00
Soby Mathew 034a8155f0
Merge pull request #1597 from antonio-nino-diaz-arm/an/optimise
plat/arm: Remove option ARM_BOARD_OPTIMISE_MEM
2018-10-03 11:18:30 +01:00
Konstantin Porotchkin 2bc6321804 marvell: Continue migration to new APIs
- Fix build issue
- Add initial memory parameters descriptors for BL2
- Migrate to image load V2

Basic build and run test passed on MacchiatoBin board.
Need to fix the service CPU (CM3) image load procesure and test
OPTEE functionality, which probably will require additional work.

Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
2018-10-02 18:55:42 +03:00
Soby Mathew dbc8d9496e
Merge pull request #1602 from soby-mathew/sm/v2.0_docs_fixup
docs: Fixup filename and links to compatibility policy
2018-10-02 14:13:37 +01:00