]> git.baikalelectronics.ru Git - arm-tf.git/log
arm-tf.git
5 years agoMerge changes from topic "console_t_cleanup" into integration
Mark Dykes [Tue, 25 Feb 2020 23:38:46 +0000 (23:38 +0000)]
Merge changes from topic "console_t_cleanup" into integration

* changes:
  coreboot: Use generic base address
  skeletton: Use generic console_t data structure
  cdns: Use generic console_t data structure

5 years agoMerge "pl011: Use generic console_t data structure" into integration
Mark Dykes [Tue, 25 Feb 2020 23:16:14 +0000 (23:16 +0000)]
Merge "pl011: Use generic console_t data structure" into integration

5 years agoMerge "meson: Use generic console_t data structure" into integration
Mark Dykes [Tue, 25 Feb 2020 21:08:21 +0000 (21:08 +0000)]
Merge "meson: Use generic console_t data structure" into integration

5 years agoMerge "console: Integrate UART base address in generic console_t" into integration
Mark Dykes [Tue, 25 Feb 2020 21:03:11 +0000 (21:03 +0000)]
Merge "console: Integrate UART base address in generic console_t" into integration

5 years agoMerge "allwinner: Adjust SRAM A2 base to include the ARISC vectors" into integration
Mark Dykes [Tue, 25 Feb 2020 20:26:53 +0000 (20:26 +0000)]
Merge "allwinner: Adjust SRAM A2 base to include the ARISC vectors" into integration

5 years agoMerge "arm/css/scpi: Don't panic if the SCP fails to respond" into integration
Mark Dykes [Tue, 25 Feb 2020 20:25:35 +0000 (20:25 +0000)]
Merge "arm/css/scpi: Don't panic if the SCP fails to respond" into integration

5 years agoMerge "Read-only xlat tables for BL31 memory" into integration
Mark Dykes [Tue, 25 Feb 2020 17:24:17 +0000 (17:24 +0000)]
Merge "Read-only xlat tables for BL31 memory" into integration

5 years agoMerge "mediatek: mt8183: protect 4GB~8GB dram memory" into integration
Soby Mathew [Tue, 25 Feb 2020 16:33:37 +0000 (16:33 +0000)]
Merge "mediatek: mt8183: protect 4GB~8GB dram memory" into integration

5 years agoMerge "SPMD: generate and add Secure Partition blobs into FIP" into integration
Sandrine Bailleux [Tue, 25 Feb 2020 16:19:46 +0000 (16:19 +0000)]
Merge "SPMD: generate and add Secure Partition blobs into FIP" into integration

5 years agoMerge "uniphier: make on-chip SRAM region configurable" into integration
Soby Mathew [Tue, 25 Feb 2020 13:55:33 +0000 (13:55 +0000)]
Merge "uniphier: make on-chip SRAM region configurable" into integration

5 years agocoreboot: Use generic base address
Andre Przywara [Sat, 25 Jan 2020 01:07:19 +0000 (01:07 +0000)]
coreboot: Use generic base address

Since now the generic console_t structure holds the UART base address as
well, let's use that generic location for the coreboot memory console.
This removes the base member from the coreboot specific data structure,
but keeps the struct console_cbmc_t and its size member.

Change-Id: I7f1dffd41392ba3fe5c07090aea761a42313fb5b
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agopl011: Use generic console_t data structure
Andre Przywara [Sat, 25 Jan 2020 00:58:35 +0000 (00:58 +0000)]
pl011: Use generic console_t data structure

Since now the generic console_t structure holds the UART base address as
well, let's use that generic location and drop the UART driver specific
data structure at all.

Change-Id: I7a23327394d142af4b293ea7ccd90b843c54587c
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agomeson: Use generic console_t data structure
Andre Przywara [Sat, 25 Jan 2020 00:58:35 +0000 (00:58 +0000)]
meson: Use generic console_t data structure

Since now the generic console_t structure holds the UART base address as
well, let's use that generic location and drop the UART driver specific
data structure at all.

Change-Id: I07a07677153d3671ced776671e4f107824d3df16
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agoconsole: Integrate UART base address in generic console_t
Andre Przywara [Sat, 25 Jan 2020 00:54:38 +0000 (00:54 +0000)]
console: Integrate UART base address in generic console_t

*All* UART drivers in TF-A are storing their base address as a uintptr_t
pointer in the first location of the UART specific driver data.
Since the base address is a pretty natural and generic data item, we
should integrate this into the generic console_t structure.

That will not only allow to remove a lot of seemingly UART specific data
structures, but also enables to simplify runtime choices between different
UARTs, since they can share the same pointer.

This patch just adds the new member, the existing data structures will
be handled on a per-UART base in follow-up patches.

Change-Id: I59ce49471ccc8f3b870f2cfd8a72ebfd0cb14d12
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agoskeletton: Use generic console_t data structure
Andre Przywara [Sat, 25 Jan 2020 00:58:35 +0000 (00:58 +0000)]
skeletton: Use generic console_t data structure

Since now the generic console_t structure holds the UART base address as
well, let's use that generic location and drop the UART driver specific
data structure at all.

Change-Id: I347849424782333149e5912a25cc0ab9d277a201
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agocdns: Use generic console_t data structure
Andre Przywara [Sat, 25 Jan 2020 00:58:35 +0000 (00:58 +0000)]
cdns: Use generic console_t data structure

Since now the generic console_t structure holds the UART base address as
well, let's use that generic location and drop the UART driver specific
data structure at all.

Change-Id: I9f8b55414ab7965e431e3e86d182eabd511f32a4
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 years agoRead-only xlat tables for BL31 memory
Petre-Ionut Tudor [Thu, 7 Nov 2019 15:18:03 +0000 (15:18 +0000)]
Read-only xlat tables for BL31 memory

This patch introduces a build flag which allows the xlat tables
to be mapped in a read-only region within BL31 memory. It makes it
much harder for someone who has acquired the ability to write to
arbitrary secure memory addresses to gain control of the
translation tables.

The memory attributes of the descriptors describing the tables
themselves are changed to read-only secure data. This change
happens at the end of BL31 runtime setup. Until this point, the
tables have read-write permissions. This gives a window of
opportunity for changes to be made to the tables with the MMU on
(e.g. reclaiming init code). No changes can be made to the tables
with the MMU turned on from this point onwards. This change is also
enabled for sp_min and tspd.

To make all this possible, the base table was moved to .rodata. The
penalty we pay is that now .rodata must be aligned to the size of
the base table (512B alignment). Still, this is better than putting
the base table with the higher level tables in the xlat_table
section, as that would cost us a full 4KB page.

Changing the tables from read-write to read-only cannot be done with
the MMU on, as the break-before-make sequence would invalidate the
descriptor which resolves the level 3 page table where that very
descriptor is located. This would make the translation required for
writing the changes impossible, generating an MMU fault.

The caches are also flushed.

Signed-off-by: Petre-Ionut Tudor <petre-ionut.tudor@arm.com>
Change-Id: Ibe5de307e6dc94c67d6186139ac3973516430466

5 years agoMerge "Add Matterhorn CPU lib" into integration
joanna.farley [Fri, 21 Feb 2020 17:51:10 +0000 (17:51 +0000)]
Merge "Add Matterhorn CPU lib" into integration

5 years agoMerge "Add CPULib for Klein Core" into integration
joanna.farley [Fri, 21 Feb 2020 17:50:01 +0000 (17:50 +0000)]
Merge "Add CPULib for Klein Core" into integration

5 years agoMerge "Use consistent SMCCC error code" into integration
Mark Dykes [Fri, 21 Feb 2020 15:47:30 +0000 (15:47 +0000)]
Merge "Use consistent SMCCC error code" into integration

5 years agoMerge "rockchip: fix definition of struct param_ddr_usage" into integration
Mark Dykes [Fri, 21 Feb 2020 15:46:05 +0000 (15:46 +0000)]
Merge "rockchip: fix definition of struct param_ddr_usage" into integration

5 years agoMerge changes from topic "tegra-downstream-02092020" into integration
joanna.farley [Fri, 21 Feb 2020 10:59:46 +0000 (10:59 +0000)]
Merge changes from topic "tegra-downstream-02092020" into integration

* changes:
  Tegra: spe: uninit console on a timeout
  Tegra: handler to check support for System Suspend
  Tegra: bpmp_ipc: improve cyclomatic complexity
  Tegra: platform handler to relocate BL32 image
  Tegra: common: improve cyclomatic complexity
  Tegra210: secure PMC hardware block
  Tegra: delay_timer: support for physical secure timer
  include: move MHZ_TICKS_PER_SEC to utils_def.h
  Tegra194: memctrl: lock mc stream id security config
  Tegra210: resume PMC hardware block for all platforms
  Tegra: macro for legacy WDT FIQ handling
  Tegra186: enable higher performance non-cacheable load forwarding
  Tegra210: enable higher performance non-cacheable load forwarding
  cpus: higher performance non-cacheable load forwarding

5 years agoSPMD: generate and add Secure Partition blobs into FIP
Manish Pandey [Tue, 14 Jan 2020 11:52:05 +0000 (11:52 +0000)]
SPMD: generate and add Secure Partition blobs into FIP

Till now TF-A allows limited number of external images to be made part
of FIP. With SPM coming along, there may exist multiple SP packages
which need to be inserted into FIP. To achieve this we need a more
scalable approach to feed SP packages to FIP.

This patch introduces changes in build system to generate and add SP
packages into FIP based on information provided by platform.
Platform provides information in form of JSON which contains layout
description of available Secure Partitions.
JSON parser script is invoked by build system early on and generates
a makefile which updates FIP, SPTOOL and FDT arguments which will be
used by build system later on for final packaging.

"SP_LAYOUT_FILE" passed as a build argument and can be outside of TF-A
tree. This option will be used only when SPD=spmd.

For each SP, generated makefile will have following entries
     - FDT_SOURCES += sp1.dts
     - SPTOOL_ARGS +=  -i sp1.img:sp1.dtb -o sp1.pkg
     - FIP_ARGS += --blob uuid=XXXX-XXX...,file=SP1.pkg

Signed-off-by: Manish Pandey <manish.pandey2@arm.com>
Change-Id: Ib6a9c064400caa3cd825d9886008a3af67741af7

5 years agoTegra: spe: uninit console on a timeout
Varun Wadekar [Wed, 20 Jun 2018 00:07:08 +0000 (17:07 -0700)]
Tegra: spe: uninit console on a timeout

There are chances a denial-of-service attack, if an attacker
removes the SPE firmware from the system. The console driver
would end up waiting for the firmware to respond indefinitely.
The console driver must detect such scenarios and uninit the
interface as a result.

This patch adds a timeout to the interaction with the SPE
firmware and uninits the interface if it times out.

Change-Id: I06f27a858baed25711d41105b4110865f1a01727
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra: handler to check support for System Suspend
Varun Wadekar [Tue, 26 Jun 2018 23:07:50 +0000 (16:07 -0700)]
Tegra: handler to check support for System Suspend

Tegra210 SoCs need the sc7entry-fw to enter System Suspend mode,
but there might be certain boards that do not have this firmware
blob. To stop the NS world from issuing System suspend entry
commands on such devices, we ned to disable System Suspend from
the PSCI "features".

This patch removes the System suspend handler from the Tegra PSCI
ops, so that the framework will disable support for "System Suspend"
from the PSCI "features".

Original change by: kalyani chidambaram <kalyanic@nvidia.com>

Change-Id: Ie029f82f55990a8b3a6debb73e95e0e218bfd1f5
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra: bpmp_ipc: improve cyclomatic complexity
Varun Wadekar [Wed, 20 Jun 2018 23:12:50 +0000 (16:12 -0700)]
Tegra: bpmp_ipc: improve cyclomatic complexity

Code complexity is a good indication of maintainability versus
testability of a piece of software.

ISO26262 introduces the following thresholds:

    complexity < 10 is accepted
    10 <= complexity < 20 has to be justified
    complexity >= 20 cannot be accepted

Rationale is that number of test cases to fully test a piece of
software can (depending on the coverage metrics) grow exponentially
with the number of branches in the software.

This patch removes redundant conditionals from 'ipc_send_req_atomic'
handler to reduce the McCabe Cyclomatic Complexity for this function

Change-Id: I20fef79a771301e1c824aea72a45ff83f97591d5
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra: platform handler to relocate BL32 image
Varun Wadekar [Wed, 20 Jun 2018 21:30:59 +0000 (14:30 -0700)]
Tegra: platform handler to relocate BL32 image

This patch provides platforms an opportunity to relocate the
BL32 image, during cold boot. Tegra186 platforms, for example,
relocate BL32 images to TZDRAM memory as the previous bootloader
relies on BL31 to do so.

Change-Id: Ibb864901e43aca5bf55d8c79e918b598c12e8a28
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra: common: improve cyclomatic complexity
Varun Wadekar [Wed, 20 Jun 2018 20:43:43 +0000 (13:43 -0700)]
Tegra: common: improve cyclomatic complexity

Code complexity is a good indication of maintainability versus
testability of a piece of software.

ISO26262 introduces the following thresholds:

    complexity < 10 is accepted
    10 <= complexity < 20 has to be justified
    complexity >= 20 cannot be accepted

Rationale is that number of test cases to fully test a piece of
software can (depending on the coverage metrics) grow exponentially
with the number of branches in the software.

This patch removes redundant conditionals from 'bl31_early_platform_setup'
handler to reduce the McCabe Cyclomatic Complexity for this function.

Change-Id: Ifb628e33269b388f9323639cd97db761a7e049c4
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra210: secure PMC hardware block
kalyani chidambaram [Mon, 9 Apr 2018 22:18:02 +0000 (15:18 -0700)]
Tegra210: secure PMC hardware block

This patch sets the "secure" bit to mark the PMC hardware block
as accessible only from the secure world. This setting must be
programmed during cold boot and System Resume.

The sc7entry-fw, running on the COP, needs access to the PMC block
to enter System Suspend state, so "unlock" the PMC block before
passing control to the COP.

Change-Id: I00e39a49ae6b9f8c8eafe0cf7ff63fe6a67fdccf
Signed-off-by: kalyani chidambaram <kalyanic@nvidia.com>
5 years agoTegra: delay_timer: support for physical secure timer
Varun Wadekar [Mon, 18 Jun 2018 23:15:51 +0000 (16:15 -0700)]
Tegra: delay_timer: support for physical secure timer

This patch modifies the delay timer driver to switch to the ARM
secure physical timer instead of using Tegra's on-chip uS timer.

The secure timer is not accessible to the NS world and so eliminates
an important attack vector, where the Tegra timer source gets switched
off from the NS world leading to a DoS attack for the trusted world.

This timer is shared with the S-EL1 layer for now, but later patches
will mark it as exclusive to the EL3 exception mode.

Change-Id: I2c00f8cb4c48b25578971c626c314603906ad7cc
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoinclude: move MHZ_TICKS_PER_SEC to utils_def.h
Varun Wadekar [Thu, 13 Feb 2020 21:07:12 +0000 (13:07 -0800)]
include: move MHZ_TICKS_PER_SEC to utils_def.h

This patch moves the MHZ_TICKS_PER_SEC macro to utils_def.h
for other platforms to use.

Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I6c4dc733f548d73cfdb3515ec9ad89a9efaf4407

5 years agoTegra194: memctrl: lock mc stream id security config
Pritesh Raithatha [Wed, 6 Jun 2018 05:32:55 +0000 (11:02 +0530)]
Tegra194: memctrl: lock mc stream id security config

This patch locks most of the stream id security config registers as
per HW guidance.

This patch keeps the stream id configs unlocked for the following
clients, to allow some platforms to still function, until they make
the transition to the latest guidance.

- ISPRA
- ISPFALR
- ISPFALW
- ISPWA
- ISPWA1
- ISPWB
- XUSB_DEVR
- XUSB_DEVW
- XUSB_HOSTR
- XUSB_HOSTW
- VIW
- VIFALR
- VIFALW

Change-Id: I66192b228a0a237035938f498babc0325764d5df
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
5 years agoTegra210: resume PMC hardware block for all platforms
kalyani chidambaram [Tue, 19 Jun 2018 22:56:01 +0000 (15:56 -0700)]
Tegra210: resume PMC hardware block for all platforms

The PMC hardware block resume handler was called for Tegra210
platforms, only if the sc7entry-fw was present on the device.
This would cause problems for devices that do not support this
firmware.

This patch fixes this logic and resumes the PMC block even if
the sc7entry-fw is not present on the device.

Change-Id: I6f0eb7878126f624ea98392f583ed45a231d27db
Signed-off-by: Kalyani Chidambaram <kalyanic@nvidia.com>
5 years agoTegra: macro for legacy WDT FIQ handling
Varun Wadekar [Wed, 13 Jun 2018 21:54:01 +0000 (14:54 -0700)]
Tegra: macro for legacy WDT FIQ handling

This patch adds the macro to enable legacy FIQ handling to the common
Tegra makefile. The default value of this macro is '0'. Platforms that
need this support should enable it from their makefiles.

This patch also helps fix violation of Rule 20.9.

Rule 20.9 "All identifiers used in the controlling expression of #if
           of #elif preprocessing directives shall be #define'd before
           evaluation"

Change-Id: I4f0c9917c044b5b1967fb5e79542cd3bf6e91f18
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra186: enable higher performance non-cacheable load forwarding
Varun Wadekar [Tue, 12 Jun 2018 23:55:06 +0000 (16:55 -0700)]
Tegra186: enable higher performance non-cacheable load forwarding

This patch enables higher performance non-cacheable load forwarding for
Tegra186 platforms.

Change-Id: Ifceb304bfbd805f415bb6205c9679602ecb47b53
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoTegra210: enable higher performance non-cacheable load forwarding
Varun Wadekar [Tue, 12 Jun 2018 23:54:55 +0000 (16:54 -0700)]
Tegra210: enable higher performance non-cacheable load forwarding

This patch enables higher performance non-cacheable load forwarding for
Tegra210 platforms.

Change-Id: I11d0ffc09aca97d37386f283f2fbd2483d51fd28
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agocpus: higher performance non-cacheable load forwarding
Varun Wadekar [Tue, 12 Jun 2018 23:49:12 +0000 (16:49 -0700)]
cpus: higher performance non-cacheable load forwarding

The CPUACTLR_EL1 register on Cortex-A57 CPUs supports a bit to enable
non-cacheable streaming enhancement. Platforms can set this bit only
if their memory system meets the requirement that cache line fill
requests from the Cortex-A57 processor are atomic.

This patch adds support to enable higher performance non-cacheable load
forwarding for such platforms. Platforms must enable this support by
setting the 'A57_ENABLE_NONCACHEABLE_LOAD_FWD' flag from their
makefiles. This flag is disabled by default.

Change-Id: Ib27e55dd68d11a50962c0bbc5b89072208b4bac5
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
5 years agoUse consistent SMCCC error code
Manish V Badarkhe [Wed, 19 Feb 2020 13:36:50 +0000 (13:36 +0000)]
Use consistent SMCCC error code

Removed duplicate error code present for SMCCC and used
proper error code for "SMCCC_ARCH_WORKAROUND_2" call.

Signed-off-by: Manish V Badarkhe <Manish.Badarkhe@arm.com>
Change-Id: I76fc7c88095f78a7e2c3d205838f8eaf3132ed5c

5 years agoMerge "intel: Fix Coverity Scan Defects" into integration
Sandrine Bailleux [Thu, 20 Feb 2020 09:53:26 +0000 (09:53 +0000)]
Merge "intel: Fix Coverity Scan Defects" into integration

5 years agointel: Fix Coverity Scan Defects
Abdul Halim, Muhammad Hadi Asyrafi [Tue, 11 Feb 2020 12:17:05 +0000 (20:17 +0800)]
intel: Fix Coverity Scan Defects

Fix mailbox driver incompatible cast bug and control flow issue that
was flagged by Coverity Scan.

Signed-off-by: Abdul Halim, Muhammad Hadi Asyrafi <muhammad.hadi.asyrafi.abdul.halim@intel.com>
Change-Id: I3f34e98d24e40139d31cf7d5b9b973cd2d981065

5 years agoMerge "Update docs with PMU security information" into integration
Manish Pandey [Wed, 19 Feb 2020 17:30:37 +0000 (17:30 +0000)]
Merge "Update docs with PMU security information" into integration

5 years agoMerge changes I72846d86,I70c3d873,If675796a,I0dbf8091,Ie4f3ac83, ... into integration
Sandrine Bailleux [Wed, 19 Feb 2020 15:29:23 +0000 (15:29 +0000)]
Merge changes I72846d86,I70c3d873,If675796a,I0dbf8091,Ie4f3ac83, ... into integration

* changes:
  rcar_gen3: plat: Minor coding style fix for rcar_version.h
  rcar_gen3: plat: Update IPL and Secure Monitor Rev.2.0.6
  rcar_gen3: drivers: ddr: Update DDR setting for H3, M3, M3N
  rcar_gen3: drivers: ddr: Update DDR setting for H3, M3, M3N
  rcar_gen3: drivers: board: Add new board revision for M3ULCB
  rcar_gen3: drivers: ddr: Update DDR setting for H3, M3, M3N
  rcar_gen3: plat: Update IPL and Secure Monitor Rev.2.0.5
  rcar_gen3: plat: Change fixed destination address of BL31 and BL32

5 years agoMerge "TBBR: Reduce size of hash buffers when possible" into integration
Sandrine Bailleux [Wed, 19 Feb 2020 15:17:56 +0000 (15:17 +0000)]
Merge "TBBR: Reduce size of hash buffers when possible" into integration

5 years agoMerge "TBBR: Reduce size of ECDSA key buffers" into integration
Sandrine Bailleux [Wed, 19 Feb 2020 15:17:48 +0000 (15:17 +0000)]
Merge "TBBR: Reduce size of ECDSA key buffers" into integration

5 years agoMerge "corstone700: fdts: using DDR memory and XIP rootfs" into integration
Manish Pandey [Wed, 19 Feb 2020 11:25:52 +0000 (11:25 +0000)]
Merge "corstone700: fdts: using DDR memory and XIP rootfs" into integration

5 years agoMerge changes I5ca7a004,Ibcb336a2 into integration
Manish Pandey [Tue, 18 Feb 2020 21:54:25 +0000 (21:54 +0000)]
Merge changes I5ca7a004,Ibcb336a2 into integration

* changes:
  board/rdn1edge: use CREATE_SEQ helper macro to compare chip count
  build_macros: add create sequence helper function

5 years agoboard/rdn1edge: use CREATE_SEQ helper macro to compare chip count
Vijayenthiran Subramaniam [Wed, 12 Feb 2020 07:56:33 +0000 (13:26 +0530)]
board/rdn1edge: use CREATE_SEQ helper macro to compare chip count

Use CREATE_SEQ helper macro to create sequence of valid chip counts
instead of manually creating the sequence. This allows a scalable
approach to increase the valid chip count sequence in the future.

Change-Id: I5ca7a00460325c156b9e9e52b2bf656a2e43f82d
Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
5 years agobuild_macros: add create sequence helper function
Vijayenthiran Subramaniam [Sat, 8 Feb 2020 15:57:30 +0000 (21:27 +0530)]
build_macros: add create sequence helper function

Add `CREATE_SEQ` function to generate sequence of numbers starting from
1 to allow easy comparison of a user defined macro with non-zero
positive numbers.

Change-Id: Ibcb336a223d958154b1007d08c428fbaf1e48664
Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
5 years agocorstone700: fdts: using DDR memory and XIP rootfs
Rui Silva [Wed, 9 Oct 2019 11:54:30 +0000 (12:54 +0100)]
corstone700: fdts: using DDR memory and XIP rootfs

This patch allows to use DDR address in memory node because on FPGA we
typically use DDR instead of shared RAM.

This patch also modifies the kernel arguments to allow the rootfs to be
mounted from a direct mapping of the QSPI NOR flash using the physmap
driver in the kernel. This allows to support CRAMFS XIP.

Change-Id: I4e2bc6a1f48449c7f60e00f5f1a698df8cb2ba89
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
5 years agoMerge changes from topic "corstone700" into integration
Manish Pandey [Tue, 18 Feb 2020 21:47:38 +0000 (21:47 +0000)]
Merge changes from topic "corstone700" into integration

* changes:
  corstone700: set UART clocks to 32MHz
  corstone700: clean-up as per coding style guide
  Corstone700: add support for mhuv2 in arm TF-A

5 years agoMerge "coverity: fix MISRA violations" into integration
Mark Dykes [Tue, 18 Feb 2020 19:19:00 +0000 (19:19 +0000)]
Merge "coverity: fix MISRA violations" into integration

5 years agoMerge "FVP: Fix BL31 load address and image size for RESET_TO_BL31=1" into integration
Mark Dykes [Tue, 18 Feb 2020 17:02:50 +0000 (17:02 +0000)]
Merge "FVP: Fix BL31 load address and image size for RESET_TO_BL31=1" into integration

5 years agocoverity: fix MISRA violations
Zelalem [Wed, 12 Feb 2020 16:37:03 +0000 (10:37 -0600)]
coverity: fix MISRA violations

Fixes for the following MISRA violations:
- Missing explicit parentheses on sub-expression
- An identifier or macro name beginning with an
  underscore, shall not be declared
- Type mismatch in BL1 SMC handlers and tspd_main.c

Change-Id: I7a92abf260da95acb0846b27c2997b59b059efc4
Signed-off-by: Zelalem <zelalem.aweke@arm.com>
5 years agoMerge changes I4e95678f,Ia7c28704,I1bb04bb4,I93d96dca,I50aef5dd into integration
Mark Dykes [Tue, 18 Feb 2020 16:24:33 +0000 (16:24 +0000)]
Merge changes I4e95678f,Ia7c28704,I1bb04bb4,I93d96dca,I50aef5dd into integration

* changes:
  Fix boot failures on some builds linked with ld.lld.
  trusty: generic-arm64-smcall: Support gicr address
  trusty: Allow gic base to be specified with GICD_BASE
  trusty: Allow getting trusty memsize from BL32_MEM_SIZE instead of TSP_SEC_MEM_SIZE
  Fix clang build if CC is not in the path.

5 years agoAdd Matterhorn CPU lib
Jimmy Brisson [Wed, 8 Jan 2020 19:52:51 +0000 (13:52 -0600)]
Add Matterhorn CPU lib

Also update copyright statements

Change-Id: Iba0305522ac0f2ddc4da99127fd773f340e67300
Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com>
5 years agoAdd CPULib for Klein Core
Jimmy Brisson [Mon, 9 Dec 2019 20:02:22 +0000 (14:02 -0600)]
Add CPULib for Klein Core

Change-Id: I686fd623b8264c85434853a2a26ecd71e9eeac01
Signed-off-by: Jimmy Brisson <jimmy.brisson@arm.com>
5 years agoFVP: Fix BL31 load address and image size for RESET_TO_BL31=1
Alexei Fedorov [Mon, 17 Feb 2020 13:38:35 +0000 (13:38 +0000)]
FVP: Fix BL31 load address and image size for RESET_TO_BL31=1

When TF-A is built with RESET_TO_BL31=1 option, BL31 is the
first image to be run and should have all the memory allocated
to it except for the memory reserved for Shared RAM at the start
of Trusted SRAM.
This patch fixes FVP BL31 load address and its image size for
RESET_TO_BL31=1 option. BL31 startup address should be set to
0x400_1000 and its maximum image size to the size of Trusted SRAM
minus the first 4KB of shared memory.
Loading BL31 at 0x0402_0000 as it is currently stated in
'\docs\plat\arm\fvp\index.rst' causes EL3 exception when the
image size gets increased (i.e. building with LOG_LEVEL=50)
but doesn't exceed 0x3B000 not causing build error.

Change-Id: Ie450baaf247f1577112f8d143b24e76c39d33e91
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
5 years agoTBBR: Reduce size of hash buffers when possible
Sandrine Bailleux [Mon, 17 Feb 2020 15:26:05 +0000 (16:26 +0100)]
TBBR: Reduce size of hash buffers when possible

The TBBR implementation extracts hashes from certificates and stores
them in static buffers. TF-A supports 3 variants of SHA right now:
SHA-256, SHA-384 and SHA-512. When support for SHA-512 was added in
commit 9a3088a5f509084e60d9c55bf53985c5ec4ca821 ("tbbr: Add build flag
HASH_ALG to let the user to select the SHA"), the hash buffers got
unconditionally increased from 51 to 83 bytes each. We can reduce that
space if we're using SHA-256 or SHA-384.

This saves some BSS space in both BL1 and BL2:
- BL1 with SHA-256: saving 168 bytes.
- BL1 with SHA-384: saving 80 bytes.
- BL2 with SHA-256: saving 384 bytes.
- BL2 with SHA-384: saving 192 bytes.

Change-Id: I0d02e5dc5f0162e82339c768609c9766cfe7e2bd
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
5 years agoTBBR: Reduce size of ECDSA key buffers
Sandrine Bailleux [Mon, 17 Feb 2020 12:41:59 +0000 (13:41 +0100)]
TBBR: Reduce size of ECDSA key buffers

The TBBR implementation extracts public keys from certificates and
stores them in static buffers. DER-encoded ECDSA keys are only 91 bytes
each but were each allocated 294 bytes instead. Reducing the size of
these buffers saves 609 bytes of BSS in BL2 (294 - 91 = 203 bytes for
each of the 3 key buffers in use).

Also add a comment claryfing that key buffers are tailored on RSA key
sizes when both ECDSA and RSA keys are used.

Change-Id: Iad332856e7af1f9814418d012fba3e1e9399f72a
Signed-off-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
5 years agocorstone700: set UART clocks to 32MHz
Vishnu Banavath [Wed, 7 Aug 2019 09:49:05 +0000 (10:49 +0100)]
corstone700: set UART clocks to 32MHz

Adding support for 32MHz UART clock and selecting it as the
default UART clock

Change-Id: I9541eaff70424e85a3b5ee4820ca0e7efb040d2c
Signed-off-by: Vishnu Banavath <vishnu.banavath@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
5 years agocorstone700: clean-up as per coding style guide
Avinash Mehta [Thu, 11 Jul 2019 15:23:43 +0000 (16:23 +0100)]
corstone700: clean-up as per coding style guide

Running checkpatch.pl on the codebase and making required changes

Change-Id: I7d3f8764cef632ab2a6d3c355c68f590440b85b8
Signed-off-by: Avinash Mehta <avinash.mehta@arm.com>
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
5 years agoCorstone700: add support for mhuv2 in arm TF-A
Khandelwal [Wed, 29 Jan 2020 16:51:42 +0000 (16:51 +0000)]
Corstone700: add support for mhuv2 in arm TF-A

Note: This patch implements in-band messaging protocol only.
ARM has launched a next version of MHU i.e. MHUv2 with its latest
subsystems. The main change is that the MHUv2 is now a distributed IP
with different peripheral views (registers) for the sender and receiver.

Another main difference is that MHUv1 duplex channels are now split into
simplex/half duplex in MHUv2. MHUv2 has a configurable number of
communication channels. There is a capability register (MSG_NO_CAP) to
find out how many channels are available in a system.

The register offsets have also changed for STAT, SET & CLEAR registers
from 0x0, 0x8 & 0x10 in MHUv1 to 0x0, 0xC & 0x8 in MHUv2 respectively.

0x0    0x4  0x8  0xC             0x1F
------------------------....-----
| STAT |    |    | SET |    |   |
------------------------....-----
      Transmit Channel

0x0    0x4  0x8   0xC            0x1F
------------------------....-----
| STAT |    | CLR |    |    |   |
------------------------....-----
        Receive Channel

The MHU controller can request the receiver to wake-up and once the
request is removed, the receiver may go back to sleep, but the MHU
itself does not actively put a receiver to sleep.

So, in order to wake-up the receiver when the sender wants to send data,
the sender has to set ACCESS_REQUEST register first in order to wake-up
receiver, state of which can be detected using ACCESS_READY register.
ACCESS_REQUEST has an offset of 0xF88 & ACCESS_READY has an offset
of 0xF8C and are accessible only on any sender channel.

This patch adds necessary changes in a new file required to support the
latest MHUv2 controller. This patch also needs an update in DT binding
for ARM MHUv2 as we need a second register base (tx base) which would
be used as the send channel base.

Change-Id: I1455e08b3d88671a191c558790c503eabe07a8e6
Signed-off-by: Tushar Khandelwal <tushar.khandelwal@arm.com>
5 years agorockchip: fix definition of struct param_ddr_usage
XiaoDong Huang [Thu, 13 Feb 2020 06:11:31 +0000 (14:11 +0800)]
rockchip: fix definition of struct param_ddr_usage

In extreme cases, the number of secure regions is one more than
non-secure regions. So array "s_base" and "s_top"s size
in struct param_ddr_usage need to be adjust to "DDR_REGION_NR_MAX + 1".

Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: Ifc09da2c8f8afa1aebcc78f8fbc21ac95abdece2

5 years agorcar_gen3: plat: Minor coding style fix for rcar_version.h
Marek Vasut [Sun, 9 Feb 2020 10:57:24 +0000 (11:57 +0100)]
rcar_gen3: plat: Minor coding style fix for rcar_version.h

Use space after #define consistently, drop useless parenthesis,
no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Change-Id: I72846d8672cab09b128e3118f4b7042a5a9c0df5

5 years agorcar_gen3: plat: Update IPL and Secure Monitor Rev.2.0.6
Yoshifumi Hosoya [Fri, 7 Feb 2020 02:23:33 +0000 (11:23 +0900)]
rcar_gen3: plat: Update IPL and Secure Monitor Rev.2.0.6

Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> # upstream update
Change-Id: I70c3d873b1d05075257034aee5e19c754be911e0

5 years agorcar_gen3: drivers: ddr: Update DDR setting for H3, M3, M3N
Chiaki Fujii [Thu, 26 Dec 2019 03:57:40 +0000 (12:57 +0900)]
rcar_gen3: drivers: ddr: Update DDR setting for H3, M3, M3N

[IPL/DDR]
- Update H3, M3, M3N DDR setting rev.0.40.

Signed-off-by: Chiaki Fujii <chiaki.fujii.wj@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> # upstream update
Change-Id: If675796a2314e769602af21bf5cc6b10962d4f29

5 years agorcar_gen3: drivers: ddr: Update DDR setting for H3, M3, M3N
Chiaki Fujii [Fri, 6 Dec 2019 10:33:34 +0000 (19:33 +0900)]
rcar_gen3: drivers: ddr: Update DDR setting for H3, M3, M3N

[IPL/DDR]
- Update H3, M3, M3N DDR setting rev.0.39.

Signed-off-by: Chiaki Fujii <chiaki.fujii.wj@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> # upstream update
Change-Id: I0dbf8091f9de9bb6d2d4f94007a5813fff14789f

5 years agorcar_gen3: drivers: board: Add new board revision for M3ULCB
Yusuke Goda [Thu, 28 Nov 2019 04:30:58 +0000 (13:30 +0900)]
rcar_gen3: drivers: board: Add new board revision for M3ULCB

Board Revision[2:0]
 3'b000 Rev1.0
 3'b011 Rev3.0 [New]

Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> # upstream update
Change-Id: Ie4f3ac83cc20120ede21052f7452327049565e60

5 years agorcar_gen3: drivers: ddr: Update DDR setting for H3, M3, M3N
Chiaki Fujii [Wed, 18 Sep 2019 04:10:00 +0000 (13:10 +0900)]
rcar_gen3: drivers: ddr: Update DDR setting for H3, M3, M3N

[IPL/DDR]
- Update H3, M3, M3N DDR setting rev.0.38.

Signed-off-by: Chiaki Fujii <chiaki.fujii.wj@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> # upstream update
Change-Id: I49cf8f778b849a6ee97bc9f6948c45b07dc467b1

5 years agorcar_gen3: plat: Update IPL and Secure Monitor Rev.2.0.5
Toshiyuki Ogasahara [Fri, 13 Dec 2019 05:50:30 +0000 (14:50 +0900)]
rcar_gen3: plat: Update IPL and Secure Monitor Rev.2.0.5

Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> # upstream update
Change-Id: I8ef32a67f7984d8bcfcc3655988b559efa6e65ab

5 years agorcar_gen3: plat: Change fixed destination address of BL31 and BL32
Toshiyuki Ogasahara [Fri, 13 Dec 2019 05:43:52 +0000 (14:43 +0900)]
rcar_gen3: plat: Change fixed destination address of BL31 and BL32

This patch changes the destination address of BL31 and BL32 From
fixed address for getting from the each certificates.

Signed-off-by: Toshiyuki Ogasahara <toshiyuki.ogasahara.bo@hitachi.com>
Signed-off-by: Yoshifumi Hosoya <yoshifumi.hosoya.wj@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> # upstream rework
Change-Id: Ide11776feff25e6fdd55ab28503a15b658b2e0d5

5 years agoMerge "Fix topology description of cpus for DynamIQ based FVP" into integration
Mark Dykes [Fri, 14 Feb 2020 19:12:44 +0000 (19:12 +0000)]
Merge "Fix topology description of cpus for DynamIQ based FVP" into integration

5 years agoMerge "fconf: Move remaining arm platform to fconf" into integration
Sandrine Bailleux [Fri, 14 Feb 2020 14:39:44 +0000 (14:39 +0000)]
Merge "fconf: Move remaining arm platform to fconf" into integration

5 years agoMerge changes from topic "uniphier" into integration
Sandrine Bailleux [Fri, 14 Feb 2020 08:26:05 +0000 (08:26 +0000)]
Merge changes from topic "uniphier" into integration

* changes:
  uniphier: make I/O register region configurable
  uniphier: make PSCI related base address configurable
  uniphier: make counter control base address configurable
  uniphier: make UART base address configurable
  uniphier: make pinmon base address configurable
  uniphier: make NAND controller base address configurable
  uniphier: make eMMC controller base address configurable

5 years agomediatek: mt8183: protect 4GB~8GB dram memory
Xi Chen [Fri, 14 Feb 2020 02:57:14 +0000 (10:57 +0800)]
mediatek: mt8183: protect 4GB~8GB dram memory

The offset there is the virtual address space on the bus side (1-9GB for 8GB RAM),
and that emi_mpu_set_region_protection will translate to the physical memory space (0-8GB).

8GB is 33-bit (the memory bus width is 33-bit on this platform),
so 0x23FFFFFFFUL-EMI_PHY_OFFSET = 0x1_FFFF_FFFF.

Change-Id: I7be4759ed7546f7e15a5868b6f08988928c34075
Signed-off-by: Xi Chen <xixi.chen@mediatek.com>
5 years agoFix topology description of cpus for DynamIQ based FVP
Madhukar Pappireddy [Thu, 13 Feb 2020 21:36:50 +0000 (15:36 -0600)]
Fix topology description of cpus for DynamIQ based FVP

DynamIQ based designs have upto 8 CPUs in each cluster. This
patch fixes the device tree node which describes the topology
of the CPU for DynamIQ FVP Model.

Change-Id: I7146bc79029ce38314026d4853e5b6406863725c
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
5 years agoMerge "corstone700: adding support for stack protector for the FVP" into integration
Alexei Fedorov [Thu, 13 Feb 2020 15:29:49 +0000 (15:29 +0000)]
Merge "corstone700: adding support for stack protector for the FVP" into integration

5 years agocorstone700: adding support for stack protector for the FVP
Morten Borup Petersen [Wed, 29 Jan 2020 16:44:17 +0000 (16:44 +0000)]
corstone700: adding support for stack protector for the FVP

Adding support for generating a semi-random number required for
enabling building TF-A with stack protector support.
TF-A for corstone-700 may now be built using ENABLE_STACK_PROTECTOR=all

Change-Id: I03e1be1a8d4e4a822cf286f3b9ad4da4337ca765
Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
5 years agoMerge changes from topic "uniphier" into integration
Sandrine Bailleux [Thu, 13 Feb 2020 09:37:27 +0000 (09:37 +0000)]
Merge changes from topic "uniphier" into integration

* changes:
  uniphier: extend boot device detection for future SoCs
  uniphier: change block_addressing flag to bool
  uniphier: change the return value type of .is_usb_boot() to bool

5 years agoallwinner: Adjust SRAM A2 base to include the ARISC vectors
Samuel Holland [Sun, 17 Feb 2019 21:10:36 +0000 (15:10 -0600)]
allwinner: Adjust SRAM A2 base to include the ARISC vectors

The ARISC vector area consists of 0x4000 bytes before the beginning of
usable SRAM. Still, it is technically a part of SRAM A2, so include it
in the memory definition. This avoids the confusing practice of
subtracting from the beginning of the SRAM region when referencing the
ARISC vectors.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Change-Id: Iae89e01aeab93560159562692e03e88306e2a1bf

5 years agoarm/css/scpi: Don't panic if the SCP fails to respond
Samuel Holland [Sun, 21 Oct 2018 17:44:24 +0000 (12:44 -0500)]
arm/css/scpi: Don't panic if the SCP fails to respond

Instead, pass back the error to the calling function. This allows
platform code to fall back to another PSCI implementation if
scpi_wait_ready() or a later SCPI command fails.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Change-Id: Ib4411e63c2512857f09ffffe1c405358dddeb4a6

5 years agoFix boot failures on some builds linked with ld.lld.
Arve Hjønnevåg [Fri, 7 Feb 2020 22:12:35 +0000 (14:12 -0800)]
Fix boot failures on some builds linked with ld.lld.

Pad the .rodata section to 16 bytes as ld.lld does not apply the ALIGN
statement on the .data section to the LMA. Fixes boot failure on builds
where the .rodata section happens to not be 16 bytes aligned.

Change-Id: I4e95678f73d8b326c5fc749dc7d0ce84e2d603f5
Signed-off-by: Arve Hjønnevåg <arve@android.com>
5 years agotrusty: generic-arm64-smcall: Support gicr address
Arve Hjønnevåg [Fri, 15 Nov 2019 22:25:43 +0000 (14:25 -0800)]
trusty: generic-arm64-smcall: Support gicr address

Add SMC_GET_GIC_BASE_GICR option to SMC_FC_GET_REG_BASE and
SMC_FC64_GET_REG_BASE calls for returning the base address of the gic
redistributor added in gic version 3.

Bug: 122357256
Change-Id: Ia7c287040656515bab262588163e0c5fc8f13a21
Signed-off-by: Arve Hjønnevåg <arve@android.com>
5 years agotrusty: Allow gic base to be specified with GICD_BASE
Arve Hjønnevåg [Wed, 11 Apr 2018 23:09:35 +0000 (16:09 -0700)]
trusty: Allow gic base to be specified with GICD_BASE

Some platforms define GICD_BASE instead of PLAT_ARM_GICD_BASE but the
meaning is the same.

Change-Id: I1bb04bb49fdab055b365b1d70a4d48d2058e49df
Signed-off-by: Arve Hjønnevåg <arve@android.com>
5 years agotrusty: Allow getting trusty memsize from BL32_MEM_SIZE instead of TSP_SEC_MEM_SIZE
Arve Hjønnevåg [Wed, 11 Apr 2018 23:10:53 +0000 (16:10 -0700)]
trusty: Allow getting trusty memsize from BL32_MEM_SIZE instead of TSP_SEC_MEM_SIZE

Some platforms define BL32_MEM_SIZE instead of TSP_SEC_MEM_SIZE, but
the meaning is the same.

Change-Id: I93d96dca442e653435cae6a165b1955efe2d2b75
Signed-off-by: Arve Hjønnevåg <arve@android.com>
5 years agoFix clang build if CC is not in the path.
Arve Hjønnevåg [Tue, 4 Feb 2020 23:50:24 +0000 (15:50 -0800)]
Fix clang build if CC is not in the path.

If CC points to clang the linker was set to ld.lld. Copy the diectory
name from CC is it has one.

Change-Id: I50aef5dddee4d2540b12b6d4e68068ad004446f7
Signed-off-by: Arve Hjønnevåg <arve@android.com>
5 years agoMerge "doc: debugfs remove references section and add topic to components index"...
Mark Dykes [Wed, 12 Feb 2020 16:44:26 +0000 (16:44 +0000)]
Merge "doc: debugfs remove references section and add topic to components index" into integration

5 years agoMerge "intel: Change boot source selection" into integration
Sandrine Bailleux [Wed, 12 Feb 2020 15:54:02 +0000 (15:54 +0000)]
Merge "intel: Change boot source selection" into integration

5 years agoMerge changes Ib68092d1,I816ea14e into integration
Sandrine Bailleux [Wed, 12 Feb 2020 15:51:42 +0000 (15:51 +0000)]
Merge changes Ib68092d1,I816ea14e into integration

* changes:
  plat: marvell: armada: scp_bl2: allow loading up to 8 images
  plat: marvell: armada: add support for loading MG CM3 images

5 years agofconf: Move remaining arm platform to fconf
Louis Mayencourt [Wed, 12 Feb 2020 09:26:09 +0000 (09:26 +0000)]
fconf: Move remaining arm platform to fconf

Change-Id: I011256ca60672a00b711c3f5725211be64bbc2b2
Signed-off-by: Louis Mayencourt <louis.mayencourt@arm.com>
5 years agoUpdate docs with PMU security information
Petre-Ionut Tudor [Fri, 27 Sep 2019 14:13:21 +0000 (15:13 +0100)]
Update docs with PMU security information

This patch adds information on the PMU configuration registers
and security considerations related to the PMU.

Signed-off-by: Petre-Ionut Tudor <petre-ionut.tudor@arm.com>
Change-Id: I36b15060b9830a77d3f47f293c0a6dafa3c581fb

5 years agodoc: debugfs remove references section and add topic to components index
Olivier Deprez [Fri, 7 Feb 2020 15:54:36 +0000 (16:54 +0100)]
doc: debugfs remove references section and add topic to components index

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I8c2e6dc98f2f30a81f4f80cc0ca1232fed7a53c9

5 years agoMerge "Fixes ROTPK hash generation for ECDSA encryption" into integration
joanna.farley [Wed, 12 Feb 2020 08:46:46 +0000 (08:46 +0000)]
Merge "Fixes ROTPK hash generation for ECDSA encryption" into integration

5 years agouniphier: make on-chip SRAM region configurable
Masahiro Yamada [Mon, 3 Feb 2020 10:46:26 +0000 (19:46 +0900)]
uniphier: make on-chip SRAM region configurable

The on-chip SRAM region will be changed in the next SoC. Make it
configurable. Also, split the mmap code into a new helper function
so that it can be re-used for another boot mode.

Change-Id: I89f40432bf852a58ebc9be5d9dec4136b8dc010b
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agouniphier: make I/O register region configurable
Masahiro Yamada [Mon, 3 Feb 2020 10:46:15 +0000 (19:46 +0900)]
uniphier: make I/O register region configurable

The I/O register region will be changed in the next SoC. Make it
configurable.

Change-Id: Iec0cbd1ef2d0703ebc7c3d3082edd73791bbfec9
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agouniphier: extend boot device detection for future SoCs
Masahiro Yamada [Mon, 3 Feb 2020 10:28:13 +0000 (19:28 +0900)]
uniphier: extend boot device detection for future SoCs

The next SoC will have:
  - No boot swap
  - SD boot
  - No USB boot

Add new fields to handle this.

Change-Id: I772395f2c5dfc612e575b0cbd0657a5fa9611c25
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agouniphier: make PSCI related base address configurable
Masahiro Yamada [Mon, 3 Feb 2020 10:46:00 +0000 (19:46 +0900)]
uniphier: make PSCI related base address configurable

The register base address will be changed in the next SoC. Make it
configurable.

Change-Id: Ibe07bd9db128b0f7e629916cb6ae21ba7984eca9
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agouniphier: change block_addressing flag to bool
Masahiro Yamada [Mon, 3 Feb 2020 09:40:37 +0000 (18:40 +0900)]
uniphier: change block_addressing flag to bool

The flag, uniphier_emmc_block_addressing, is boolean logic, so
"bool' is more suitable.

uniphier_emmc_is_over_2gb() is not boolean - it returns 1 / 0
depending on the card density, or a negative value on failure.
Rename it to make it less confusing.

Change-Id: Ia646b1929147b644e0df07c46b54ab80548bc3bd
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agouniphier: make counter control base address configurable
Masahiro Yamada [Mon, 3 Feb 2020 10:45:37 +0000 (19:45 +0900)]
uniphier: make counter control base address configurable

The register base will be changed in the next SoC. Make it
configurable.

Change-Id: I4a7cf85fe50e4d71db58a3372a71774e43193bd3
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agouniphier: change the return value type of .is_usb_boot() to bool
Masahiro Yamada [Tue, 28 Jan 2020 12:14:28 +0000 (21:14 +0900)]
uniphier: change the return value type of .is_usb_boot() to bool

This is boolean logic, so "bool" is more suitable.

Change-Id: I439c5099770600a65b8f58390a4c621c2ee487a5
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>