Commit Graph

17 Commits

Author SHA1 Message Date
Alexei Fedorov 0861fcdd3e fix(dt-bindings): fix static checks
This patch fixes static checks errors reported for missing copyright in
`include/dt-bindings/interrupt-controller/arm-gic.h` and the include
order of header files in `.dts` and `.dtsi` files.

Change-Id: I2baaf2719fd2c84cbcc08a8f0c4440a17a9f24f6
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
Signed-off-by: Chris Kay <chris.kay@arm.com>
2021-04-27 13:16:56 +01:00
Alexei Fedorov dfa6c54071 Plat FVP: Fix Generic Timer interrupt types
The Arm Generic Timer specification mandates that the
interrupt associated with each timer is low level triggered,
see:

Arm Cortex-A76 Core:
"Each timer provides an active-LOW interrupt output to the SoC."

Arm Cortex-A53 MPCore Processor:
"It generates timer events as active-LOW interrupt outputs and
event streams."

The following files in fdts\

fvp-base-gicv3-psci-common.dtsi
fvp-base-gicv3-psci-aarch32-common.dtsi
fvp-base-gicv2-psci-aarch32.dts
fvp-base-gicv2-psci.dts
fvp-foundation-gicv2-psci.dts
fvp-foundation-gicv3-psci.dts

describe interrupt types as edge rising
IRQ_TYPE_EDGE_RISING = 0x01:

interrupts = <1 13 0xff01>,
             <1 14 0xff01>,
             <1 11 0xff01>,
             <1 10 0xff01>;

, see include\dt-bindings\interrupt-controller\arm-gic.h:

which causes Linux to generate the warnings below:
arch_timer: WARNING: Invalid trigger for IRQ5, assuming level low
arch_timer: WARNING: Please fix your firmware

This patch adds GIC_CPU_MASK_RAW macro definition to
include\dt-bindings\interrupt-controller\arm-gic.h,
modifies interrupt type to IRQ_TYPE_LEVEL_LOW and
makes use of type definitions in arm-gic.h.

Change-Id: Iafa2552a9db85a0559c73353f854e2e0066ab2b9
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2021-04-21 14:38:15 +02:00
Alexei Fedorov 003faaa59f FVP: Add support for passing platform's topology to DTS
This patch adds support for passing FVP platform's topology
configuration to DTS files for compilation, which allows to
build DTBs with correct number of clusters and CPUs.
This removes non-existing clusters/CPUs from the compiled
device tree blob and fixes reported Linux errors when trying
to power on absent CPUs/PEs.
If DTS file is passed using FVP_HW_CONFIG_DTS build option from
the platform's makefile, FVP_CLUSTER_COUNT, FVP_MAX_CPUS_PER_CLUSTER
and FVP_MAX_PE_PER_CPU parameters are used, otherwise CI script will
use the default values from the corresponding DTS file.

Change-Id: Idcb45dc6ad5e3eaea18573aff1a01c9344404ab3
Signed-off-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2020-05-19 13:16:22 +00:00
Madhukar Pappireddy 4682461ded fconf: Extract topology node properties from HW_CONFIG dtb
Create, register( and implicitly invoke) fconf_populate_topology()
function which extracts the topology related properties from dtb into
the newly created fconf based configuration structure 'soc_topology'.
Appropriate libfdt APIs are added to jmptbl.i file for use with USE_ROMLIB
build feature.

A new property which describes the power domain levels is added to the
HW_CONFIG device tree source files.

This patch also fixes a minor bug in the common device tree file
fvp-base-gicv3-psci-dynamiq-common.dtsi
As this file includes fvp-base-gicv3-psci-common.dtsi, it is necessary
to delete all previous cluster node definitons because DynamIQ based
models have upto 8 CPUs in each cluster. If not deleted, the final dts
would have an inaccurate description of SoC topology, i.e., cluster0
with 8 or more core nodes and cluster1 with 4 core nodes.

Change-Id: I9eb406da3ba4732008a66c01afec7c9fa8ef59bf
Signed-off-by: Madhukar Pappireddy <madhukar.pappireddy@arm.com>
2020-03-11 11:25:10 -05:00
Balint Dobszay 2d51b55ee5 Replace dts includes with C preprocessor syntax
Using the /include/ syntax, the include was evaluated by dtc, only after running
the preprocessor, therefore the .dtsi files were not preprocessed. This patch
adds the #include syntax instead. Evaluating this and preprocessing the files
now happens in a single step, done by the C preprocessor.

Change-Id: I6d0104b6274316fc736e84973502a4d6c2c9d6e0
Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
2020-01-14 10:30:38 +01:00
Achin Gupta 8d2c497715 Device tree changes to boot FreeBSD on FVPs
FreeBSD does not understand #interrupt-map in a device tree. This prevents the
GIC from being set up correctly. This patch removes the #interrupt-map in the
device trees for the Base and Foundation FVPs. This enables correct boot of
FreeBSD on these platforms.

These changes have been tested with FreeBSD and an Ubuntu cloud image
(ubuntu-16.04-server-cloudimg-arm64-uefi1.img) to ensure compatibility with
Linux.

Change-Id: I1347acdcf994ec4b1dd843ba32af9951aa54db73
Signed-off-by: Achin Gupta <achin.gupta@arm.com>
2017-06-01 18:32:31 +01:00
Antonio Nino Diaz ede939f26d Fix incorrect copyright notices
Some files have incorrect copyright notices, this patch fixes all
files with deviations from the standard notice.

Change-Id: I66b73e78a50a235acb55f1e2ec2052a42c0570d2
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
2016-12-14 14:31:32 +00:00
Antonio Nino Diaz b1063d955b Add cache topology info to FVP DTBs
From version 4.0 onwards, the ARM64 Linux kernel expects the device
tree to indicate the cache hierarchy. Failing to provide this
information results in the following warning message to be printed by
the kernel:

    `Unable to detect cache hierarchy from DT for CPU x`

All the FVP device trees provided in the TF source tree have been
modified to add this information.

Fixes ARM-software/tf-issues#325

Change-Id: I0ff888992e602b81a0fe1744a86151d625727511
2016-03-03 13:53:57 +00:00
Juan Castillo 6136f372db FVP: update device tree idle state entries
Device tree idle state bindings changed in kernel v3.18. This patch
updates the FVP DT files to use PSCI suspend as idle state.

The patch also updates the 'compatible' property in the PSCI node
and the 'entry-method' property in the idle-states node in the FVP
Foundation GICv2-legacy device tree.

Change-Id: Ie921d497c579f425c03d482f9d7b90e166106e2f
2015-04-29 14:57:12 +01:00
Soby Mathew e8ca7d1e32 Increment the PSCI VERSION to 1.0
This patch:

   * Bumps the PSCI VERSION to 1.0. This means that
     the PSCI_VERSION API will now return the value 0x00010000
     to indicate the version as 1.0. The firmware remains
     compatible with PSCI v0.2 clients.

   * The firmware design guide is updated to document the
     APIs supported by the Trusted Firmware generic code.

   * The FVP Device Tree Sources (dts) and Blobs(dtb) are also
     updated to add "psci-1.0" and "psci-0.2" to the list of
     compatible PSCI versions.

Change-Id: Iafc2f549c92651dcd65d7e24a8aae35790d00f8a
2015-01-26 12:49:32 +00:00
Achin Gupta bab7bfd282 FVP: Update device trees to match cpuidle driver
This patch updates the representation of idle tables and cpu/cluster topology in
the device tree source files for the FVP to what the latest cpuidle driver in
Linux expects. The device tree binaries have also been updated.

Change-Id: If0668b96234f65aa0435fba52f288c9378bd8824
2014-08-20 19:38:58 +01:00
Juan Castillo d5f1309306 Add support for PSCI SYSTEM_OFF and SYSTEM_RESET APIs
This patch adds support for SYSTEM_OFF and SYSTEM_RESET PSCI
operations. A platform should export handlers to complete the
requested operation. The FVP port exports fvp_system_off() and
fvp_system_reset() as an example.

If the SPD provides a power management hook for system off and
system reset, then the SPD is notified about the corresponding
operation so it can do some bookkeeping. The TSPD exports
tspd_system_off() and tspd_system_reset() for that purpose.

Versatile Express shutdown and reset methods have been removed
from the FDT as new PSCI sys_poweroff and sys_reset services
have been added. For those kernels that do not support yet these
PSCI services (i.e. GICv3 kernel), the original dtsi files have
been renamed to *-no_psci.dtsi.

Fixes ARM-software/tf-issues#218

Change-Id: Ic8a3bf801db979099ab7029162af041c4e8330c8
2014-08-19 11:42:45 +01:00
Juan Castillo 364daf9320 Reserve some DDR DRAM for secure use on FVP platforms
TZC-400 is configured to set the last 16MB of DRAM1 as secure memory and
the rest of DRAM as non-secure. Non-secure software must not attempt to
access the 16MB secure area.

Device tree files (sources and binaries) have been updated to match this
configuration, removing that memory from the Linux physical memory map.

To use UEFI and Linux with this patch, the latest version of UEFI and
the updated device tree files are required. Check the user guide in the
documentation for more details.

Replaced magic numbers with #define for memory region definition in the
platform security initialization function.

Fixes ARM-software/tf-issues#149

Change-Id: Ia5d070244aae6c5288ea0e6c8e89d92859522bfe
2014-05-22 17:27:28 +01:00
Harry Liebel f2199d95d9 Enable secure memory support for FVPs
- Use the TrustZone controller on Base FVP to program DRAM access
  permissions. By default no access to DRAM is allowed if
  'secure memory' is enabled on the Base FVP.
- The Foundation FVP does not have a TrustZone controller but instead
  has fixed access permissions.
- Update FDTs for Linux to use timers at the correct security level.
- Starting the FVPs with 'secure memory' disabled is also supported.

Limitations:
Virtio currently uses a reserved NSAID. This will be corrected in
future FVP releases.

Change-Id: I0b6c003a7b5982267815f62bcf6eb82aa4c50a31
2014-04-24 14:08:01 +01:00
Dan Handley e83b0cadc6 Update year in copyright text to 2014
Change-Id: Ic7fb61aabae1d515b9e6baf3dd003807ff42da60
2014-01-17 10:27:53 +00:00
Dan Handley ab2d31edbd Enable third party contributions
- Add instructions for contributing to ARM Trusted Firmware.

- Update copyright text in all files to acknowledge contributors.

Change-Id: I9311aac81b00c6c167d2f8c889aea403b84450e5
2013-12-05 11:34:09 +00:00
Harry Liebel 43ef4f1ee7 FDTs for v5.2 Foundation model
- The Foundation FVP is a cut down version of the Base FVP and as
  such lacks some components.
- Three FDTs are provided.
  fvp-foundation-gicv2legacy-psci:
    Use this when setting the Foundation FVP to use GICv2. In this
    mode the GIC is located at the VE location, as described in the
    VE platform memory map.
  fvp-foundation-gicv3-psci :
    Use this when setting the Foundation FVP to use GICv3. In this
    mode the GIC is located at the Base location, as described in the
    Base platform memory map.
  fvp-foundation-gicv2-psci :
    Use this when setting the Foundation FVP to use GICv3, but Linux
    is expected to use GICv2 emulation mode. In this mode the GIC is
    located at the Base location, but the GICv3 is used in GICv2
    emulation mode.

Change-Id: I9d69bcef35c64cc8f16550efe077f578e55aaae5
2013-11-14 17:48:52 +00:00