Marek Vasut [Thu, 27 Dec 2018 19:26:01 +0000 (20:26 +0100)]
rcar_gen3: drivers: auth-mod: Access SCTLR in EL3
The code runs in EL3, use EL3 accessors to manipulate the cache bits.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Fri, 28 Dec 2018 19:23:36 +0000 (20:23 +0100)]
rcar_gen3: plat: Dump EL3 interrupt error registers
Since the interrupts are handled in EL3, dump the EL3 error registers
in case an error happens.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Mon, 31 Dec 2018 14:57:11 +0000 (15:57 +0100)]
rcar_gen3: plat: Enable programmable CPU reset address
The reset address is programmable on the R-Car Gen3, enable it.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Mon, 31 Dec 2018 15:48:04 +0000 (16:48 +0100)]
rcar_gen3: plat: Disable IPMMU PV0 cache on E3
Disable the IPMMU PV0 cache on E3 rev. 1.x .
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Fri, 28 Dec 2018 19:11:38 +0000 (20:11 +0100)]
rcar_gen3: plat: Add E3 rev. 1.1 support
Add support for R-Car E3 silicon rev. 1.1
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Fri, 28 Dec 2018 19:11:26 +0000 (20:11 +0100)]
rcar_gen3: plat: Add missing platform auto-detection name
Add missing TARGET_NAME for the case where RCAR_LSI is set to AUTO,
which is platform auto-detection.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Mon, 31 Dec 2018 16:12:45 +0000 (17:12 +0100)]
rcar_gen3: plat: Clean up rcar_pwrc_code_copy_to_system_ram()
Call the function only from architecture setup and at the end of
suspend cycle instead of calling it all over the place.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Wed, 26 Dec 2018 14:57:08 +0000 (15:57 +0100)]
rcar_gen3: plat: Fix BL2 size check
Rename BL2_LIMIT to BL2_IMAGE_LIMIT and BL2_SYSRAM_LIMIT to BL2_LIMIT to
correctly set BL2_LIMIT value. Set correct DEVICE_SRAM_BASE to match the
hardware. Use BL2_END in rcar_configure_mmu_el3() to mark the cacheable
BL2 area.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Sun, 30 Dec 2018 16:19:03 +0000 (17:19 +0100)]
rcar_gen3: plat: Staticize memory maps
Staticize the platform memory map tables as they are only used within
the platform_common.c file.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Wed, 26 Dec 2018 14:57:08 +0000 (15:57 +0100)]
rcar_gen3: plat: Function cleanup
Replace foo_t with struct foo.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Sun, 30 Dec 2018 16:21:39 +0000 (17:21 +0100)]
rcar_gen3: plat: Fix cache line size
The CPU has cache line size of 64 Bytes, fix the cache line size.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Fri, 28 Dec 2018 19:38:09 +0000 (20:38 +0100)]
rcar_gen3: plat: Disable SVE
Apply
3872fc2d1fc5 ("Do not enable SVE on pre-v8.2 platforms") to
R-Car Gen3 too.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Mon, 31 Dec 2018 18:47:37 +0000 (19:47 +0100)]
rcar_gen3: plat: Add missing dependency to rcar_srecord
Add missing dependency on the bl2.elf and bl31.elf into the rcar_srecord
target, which uses those ELF files to generate the SRECs.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Tue, 8 Jan 2019 13:05:39 +0000 (14:05 +0100)]
rcar_gen3: plat: Rename H3 label
Rename the H3 label to avoid confusing clang, which generates an error
if the label is just H3. Rename it to RCARH3.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Tue, 8 Jan 2019 13:04:08 +0000 (14:04 +0100)]
rcar_gen3: plat: Drop ddr_regdef_len()
This function is unused and triggers clang error, drop it.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Antonio Niño Díaz [Tue, 8 Jan 2019 09:10:32 +0000 (09:10 +0000)]
Merge pull request #1739 from Yann-lms/includes
stm32mp1: do not include platform header files directly in drivers
Antonio Niño Díaz [Tue, 8 Jan 2019 09:10:22 +0000 (09:10 +0000)]
Merge pull request #1736 from antonio-nino-diaz-arm/an/maintainers
maintainers: Fix path of Marvell documentation
Antonio Niño Díaz [Tue, 8 Jan 2019 09:09:23 +0000 (09:09 +0000)]
Merge pull request #1732 from jollysxilinx/integration
plat: xilinx: Clock and PLL EEMI API Support
Antonio Niño Díaz [Mon, 7 Jan 2019 11:06:19 +0000 (11:06 +0000)]
Merge pull request #1737 from antonio-nino-diaz-arm/an/asm-assert
Remove ASM_ASSERTION check in Makefile
Antonio Niño Díaz [Mon, 7 Jan 2019 11:06:09 +0000 (11:06 +0000)]
Merge pull request #1735 from antonio-nino-diaz-arm/an/load-image-v2
plat/arm: Remove comment that mentions LOAD_IMAGE_V2
Yann Gautier [Mon, 7 Jan 2019 10:17:24 +0000 (11:17 +0100)]
stm32mp1: do not include platform header files directly in drivers
Instead, only platform_def.h is included.
The required files to be included are added in stm32mp1_def.h.
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Jolly Shah [Wed, 2 Jan 2019 21:53:33 +0000 (13:53 -0800)]
zynqmp: pm: Invalidate unused APLL_TO_LPD clock
This clock does not drive any clock in LPD so there is no need for
Linux to try to initialize it.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Fri, 4 Jan 2019 20:03:44 +0000 (12:03 -0800)]
zynqmp: pm: Invalidate several clocks that Linux doesn't need to control
Linux has no reason to use these system and debug clocks and therefore
shouldn't access them. These clocks are marked as invalid in order to
prevent Linux from registering and querying them.
Note that despite clocks being marked as invalid a security issue
still remains in place as there is nothing that prevents the
non-secure world from gating these clocks and that way causing
damage to the system.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Wed, 2 Jan 2019 21:48:19 +0000 (13:48 -0800)]
zynqmp: pm: Add ACPU_FULL and ACPU_HALF clocks in the invalid list
These clocks are marked as invalid in order to prevent Linux from
registering them.
Note that despite clocks being marked as invalid a security issue
still remains in place as there is nothing that prevents the
non-secure world from gating these clocks and that way halt
the whole APU subsystem.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Wed, 2 Jan 2019 21:45:53 +0000 (13:45 -0800)]
zynqmp: pm: Fix model of ACPU clocks
In the existing model for ACPU clock the mux, divider, and gate were
represented as one clock and ACPU_HALF was modelled as child of
ACPU clock. This is not correct. ACPU clock model contains only
mux and the divider, and it has 2 children: ACPU_FULL and ACPU_HALF
clocks which have only gates. The models of ACPU and ACPU_HALF clocks
are fixed and ACPU_FULL clock is added.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Wed, 2 Jan 2019 21:44:25 +0000 (13:44 -0800)]
zynqmp: pm: Reimplement clock get parent EEMI API
Clock get parent EEMI API is reimplemented to use system-level clock
and pll EEMI APIs rather than direct MMIO read/write accesses to clock
and pll control registers.
Since linux still uses clock set parent API to get pre_src, post_src, div2
and bypasss, in the implementation of pm_clock_get_parent() we need to
workaround this by distinguishing two cases:
1) if the given clock ID corresponds to a PLL-related clock ID (*_PRE_SRC,
*_POST_SRC, *_INT_MUX or *_PLL clock IDs); or
2) given clock ID is truly an on-chip clock.
For case 1) we'll map the call onto PLL-specific EEMI API with the
respective parameter ID. For case 2) the call is passed to the PMU.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Fri, 4 Jan 2019 19:57:40 +0000 (11:57 -0800)]
zynqmp: pm: Reimplement clock set parent EEMI API
Clock set parent EEMI API is reimplemented to use system-level clock
and pll EEMI APIs rather than direct MMIO read/write accesses to clock
and pll control registers.
Since linux still uses clock set parent API to set pre_src, post_src, div2
and bypass, in the implementation of pm_clock_set_parent() we need to
workaround this by distinguishing two cases:
1) if the given clock ID corresponds to a PLL-related clock ID (*_PRE_SRC,
*_POST_SRC, *_INT_MUX or *PLL clock IDs); or 2) given clock ID is truly
an on-chip clock.
For case 1) we'll map the call onto PLL set parameter EEMI API with the
respective parameter ID. Since clock set parent interface to EL1/2 receives
parent index (mux select value), the value is just passed to PMU.
Functions that appear to be unused after this change is made are removed.
Setting the parent of *PLL clocks, that actually model bypass, is not
possible. This is already ensured by the existing clock model having the
CLK_SET_RATE_NO_REPARENT flag. The API also doesn't allow changing the
bypass parent. Bypass is controlled only by the PMU firmware.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Wed, 2 Jan 2019 21:39:30 +0000 (13:39 -0800)]
zynqmp: pm: Cleanup for clock set/get rate EEMI API
Clock set/get rate are not implemented and will likely never be.
Remove empty function stubs.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Fri, 4 Jan 2019 19:53:37 +0000 (11:53 -0800)]
zynqmp: pm: Reimplement clock get divider EEMI API
Clock get divider EEMI API is reimplemented to use system-level clock
get divider EEMI API rather than direct MMIO read/write accesses to clock
control registers.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Fri, 4 Jan 2019 19:49:46 +0000 (11:49 -0800)]
zynqmp: pm: Reimplement clock set divider EEMI API
Clock set divider EEMI API is reimplemented to use system-level clock
set divider EEMI API rather than direct MMIO read/write accesses to clock
control registers.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Wed, 2 Jan 2019 20:55:41 +0000 (12:55 -0800)]
zynqmp: pm: Reimplement clock get state (status) EEMI API
Clock get state EEMI API is reimplemented to use system-level clock
and pll EEMI APIs rather than direct MMIO read/write accesses to clock
and pll control registers.
Since linux is_enabled method for PLLs still uses clock get state API
get the PLL state, in the implementation of pm_clock_getstate() we need
to workaround this by distinguishing two cases: 1) if the given clock ID
corresponds to a PLL output clock ID; or 2) given clock ID is truly an
on-chip clock whose state of the gate should be returned.
For case 1) we'll call pm_api_clock_pll_getstate() implemented in
pm_api_clock.h/c. This function will query the PLL state from PMU using
the system-level PLL get mode EEMI API.
For case 2) we'll call the PMU to query the clock gate state using
system-level clock get status EEMI API.
Functions that appear to be unused after this change is made are removed.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Wed, 2 Jan 2019 20:54:40 +0000 (12:54 -0800)]
zynqmp: pm: Reimplement clock disable EEMI API
Clock disable EEMI API is reimplemented to use system-level clock
and pll EEMI APIs rather than direct MMIO read/write accesses to clock
and pll control registers.
Since linux still uses clock disable API to reset the PLL in the
implementation of pm_clock_disable() we need to workaround this by
distinguishing two cases: 1) if the given clock ID corresponds to a PLL
output clock ID; or 2) given clock ID is truly an on-chip clock that can
be gated.
For case 1) we'll call pm_api_clock_pll_disable() implemented in
pm_api_clock.h/c. This function will reset the PLL using the system-level
PLL set mode EEMI API with the reset mode argument.
For case 2) we'll call the PMU to configure the clock gate. This is done
using system-level clock disable EEMI API.
Functions that appear to be unused after this change is made are removed.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Fri, 4 Jan 2019 19:45:59 +0000 (11:45 -0800)]
zynqmp: pm: Reimplement clock enable EEMI API
Clock enable EEMI API is reimplemented to use system-level clock
and pll EEMI APIs rather than direct MMIO read/write accesses to clock
and pll control registers.
Since linux still uses clock enable API to trigger locking of the PLLs
in the pm_clock_enable() implementation we need to workaround this by
distinguishing two cases: 1) if the given clock ID corresponds to a PLL
output clock ID; or 2) given clock ID is truly an on-chip clock that can
be gated.
For case 1) we'll call pm_api_clock_pll_enable() implemented in
pm_api_clock.h/c. This function checks what is the buffered PLL mode and
calls the system-level PLL set mode EEMI API with the buffered mode value
specified as argument. Long term, if linux driver get fixed to use PLL
EEMI API to control PLLs, this case could be removed from ATF.
For case 2) we'll call the PMU to configure the clock gate. This is done
using system-level clock enable EEMI API.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Wed, 2 Jan 2019 20:49:21 +0000 (12:49 -0800)]
zynqmp: pm: Return the buffered PLL mode through IOCTL PLL get mode API
When linux calls pm_ioctl_get_pll_frac_mode() it doesn't expect the actual
mode to be read from hardware, but the value that it is intending to
program. Therefore, we return the buffered value to linux.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Wed, 2 Jan 2019 20:46:46 +0000 (12:46 -0800)]
zynqmp: pm: Buffer the PLL mode that is set using IOCTL API
When linux calls pm_ioctl_set_pll_frac_mode() it doesn't expect the
fractional mode to be changed in hardware. Furthermore, even before this
patch setting the mode which is done by writing into register takes
no effect until the PLL reset is deasserted, i.e. until linux "enables"
the PLL. To adjust the code to system-level PLL EEMI API and avoid
unnecessary IPIs that would otherwise be issued, we buffer the mode
value set via IOCTL until the PLL mode really needs to be set.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Wed, 2 Jan 2019 20:42:56 +0000 (12:42 -0800)]
zynqmp: pm: Set PLL fractional data using PLL set parameter EEMI API
Fractional data should be set using PLL set parameter EEMI API. This
stands for system-level communication (APU to PMU). Since linux
already uses a specific IOCTL function to do this and we need to
keep it that way, the pll clock ID given by linux has to be mapped
to the pll node ID that is communicated at the system-level (argument
of PLL set parameter API).
With this modification the function pm_api_clk_set_pll_frac_data is
removed from pm_api_clock.c/h because it became unused.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Wed, 2 Jan 2019 20:40:17 +0000 (12:40 -0800)]
zynqmp: pm: Get PLL fractional data using PLL get parameter EEMI API
Fractional data should be get using PLL get parameter EEMI API. This
stands for system-level communication (APU to PMU). Since linux
already uses a specific IOCTL function to do this and we need to
keep it that way, the pll clock ID given by linux has to be mapped
to the pll node ID that is communicated at the system-level (argument
of PLL get parameter API).
With this modification the function pm_api_clk_get_pll_frac_data is
removed from pm_api_clock.c/h because it became unused.
The clock enum is defined as 'enum clock_id'.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Fri, 4 Jan 2019 19:35:48 +0000 (11:35 -0800)]
zynqmp: pm: Implement PLL get mode EEMI API
This API will be used to get the currently configured PLL mode:
reset (bypassed and unlocked), integer or fractional (locked).
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Fri, 4 Jan 2019 19:32:31 +0000 (11:32 -0800)]
zynqmp: pm: Implement PLL set mode EEMI API
This API will be used to set the PLL mode: reset (unlocked), integer
or fractional (locked). If reset mode is set the PM controller will
bypass the target PLL prior to asserting the reset. If integer or
fractional mode is set the PM controller will program and trigger
locking of the PLL. If success status is returned the PLL is locked
and its bypass is deasserted. If fractional mode is set the fractional
divider (data parameter) has to have a non-zero value prior to issuing
pll set fractional mode. The caller need to ensure that the data
parameter is properly set using pll get/set parameter EEMI API.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Fri, 4 Jan 2019 19:28:38 +0000 (11:28 -0800)]
zynqmp: pm: Implement PLL get parameter EEMI API
This API will be used to get a parameter for the PLL. Parameter values
represent the values as defined in the Zynq MPSoC register reference
manual ug1087.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Jolly Shah [Wed, 2 Jan 2019 20:27:00 +0000 (12:27 -0800)]
zynqmp: pm: Implement PLL set parameter EEMI API
This API will be used to set a parameter for the PLL. The parameter
value that is set will have effect once the PLL mode is set to integer
or fractional mode. Parameter values represent the values as defined
in the Zynq MPSoC register reference manual ug1087.
Signed-off-by: Mirela Simonovic <mirela.simonovic@aggios.com>
Acked-by: Will Wong <WILLW@xilinx.com>
Signed-off-by: Jolly Shah <jollys@xilinx.com>
Antonio Nino Diaz [Fri, 4 Jan 2019 14:05:26 +0000 (14:05 +0000)]
Remove ASM_ASSERTION check in Makefile
ASM_ASSERTION was deprecated long ago, this check is no longer needed.
Change-Id: I2a5770f76ea1317461c0059dad8dba9dc0e5af32
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Niño Díaz [Fri, 4 Jan 2019 11:42:16 +0000 (11:42 +0000)]
Merge pull request #1726 from antonio-nino-diaz-arm/an/includes
Sanitise includes across codebase
Antonio Nino Diaz [Fri, 4 Jan 2019 10:58:30 +0000 (10:58 +0000)]
maintainers: Fix path of Marvell documentation
Change-Id: Idd5a2b700b936b22e94194dfadee68b968d03380
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Mon, 17 Dec 2018 17:49:35 +0000 (17:49 +0000)]
rpi3: Remove unneeded include paths from Makefile
Change-Id: I20d164f7573ebc24935e92a924472e29c8a0e3a0
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Fri, 14 Dec 2018 00:18:21 +0000 (00:18 +0000)]
Sanitise includes across codebase
Enforce full include path for includes. Deprecate old paths.
The following folders inside include/lib have been left unchanged:
- include/lib/cpus/${ARCH}
- include/lib/el3_runtime/${ARCH}
The reason for this change is that having a global namespace for
includes isn't a good idea. It defeats one of the advantages of having
folders and it introduces problems that are sometimes subtle (because
you may not know the header you are actually including if there are two
of them).
For example, this patch had to be created because two headers were
called the same way:
e0ea0928d5b7 ("Fix gpio includes of mt8173 platform
to avoid collision."). More recently, this patch has had similar
problems:
46f9b2c3a282 ("drivers: add tzc380 support").
This problem was introduced in commit
4ecca33988b9 ("Move include and
source files to logical locations"). At that time, there weren't too
many headers so it wasn't a real issue. However, time has shown that
this creates problems.
Platforms that want to preserve the way they include headers may add the
removed paths to PLAT_INCLUDES, but this is discouraged.
Change-Id: I39dc53ed98f9e297a5966e723d1936d6ccf2fc8f
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Mon, 17 Dec 2018 17:20:57 +0000 (17:20 +0000)]
Reorganize architecture-dependent header files
The architecture dependant header files in include/lib/${ARCH} and
include/common/${ARCH} have been moved to /include/arch/${ARCH}.
Change-Id: I96f30fdb80b191a51448ddf11b1d4a0624c03394
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Fri, 14 Dec 2018 01:27:19 +0000 (01:27 +0000)]
plat/arm: Always define TSP memory region
Even though this is not used unless SPD=tspd, only defining it when
SPD_tspd is defined doesn't have any advantage and it makes it harder to
read the code.
Change-Id: I3d93135e05f39be071d16f8a47394a9a3ff54bc8
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Niño Díaz [Fri, 4 Jan 2019 09:14:22 +0000 (09:14 +0000)]
Merge pull request #1731 from miyatsu/doc-fix-
20181225
docs: marvell: Fix typo in file build.txt
Antonio Niño Díaz [Fri, 4 Jan 2019 09:13:32 +0000 (09:13 +0000)]
Merge pull request #1728 from satheesbalya-arm/sb1/sb1_2497_v84_dit
Enable DIT if supported
Sathees Balya [Thu, 6 Dec 2018 13:33:24 +0000 (13:33 +0000)]
Enable DIT if supported
This patch enables the Data Independent Timing
functionality (DIT) in EL3 if supported
by the platform.
Change-Id: Ia527d6aa2ee88a9a9fe1c941220404b9ff5567e5
Signed-off-by: Sathees Balya <sathees.balya@arm.com>
Ding Tao [Tue, 25 Dec 2018 06:42:08 +0000 (14:42 +0800)]
docs: marvell: Fix typo in file build.txt
Replace "SECURE=0" with "MARVELL_SECURE_BOOT=0".
Signed-off-by: Ding Tao <miyatsu@qq.com>
Antonio Nino Diaz [Wed, 19 Dec 2018 17:07:32 +0000 (17:07 +0000)]
plat/arm: Remove comment that mentions LOAD_IMAGE_V2
This option was removed in v2.0.
Change-Id: I0c929fddb57d60c5eff9e45dd5ee8c636b28e6c3
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Niño Díaz [Wed, 19 Dec 2018 14:08:23 +0000 (15:08 +0100)]
Merge pull request #1730 from antonio-nino-diaz-arm/an/spdx
Use SPDX identifier in checkpatch config file
Antonio Nino Diaz [Wed, 19 Dec 2018 13:13:33 +0000 (13:13 +0000)]
Use SPDX identifier in checkpatch config file
Change-Id: I4113604ac69ba07bd90d8268be65cae8aa43138e
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Niño Díaz [Wed, 19 Dec 2018 12:43:17 +0000 (13:43 +0100)]
Merge pull request #1725 from Yann-lms/clang_aarch32
clang: 32 bit compilation should include march32-directive
Antonio Niño Díaz [Wed, 19 Dec 2018 09:52:27 +0000 (10:52 +0100)]
Merge pull request #1727 from antonio-nino-diaz-arm/an/gitignore
gitignore: Ignore sptool and doimage binaries
Antonio Niño Díaz [Wed, 19 Dec 2018 09:51:28 +0000 (10:51 +0100)]
Merge pull request #1729 from vwadekar/tegra-native-gicv2
Tegra native gicv2
Varun Wadekar [Fri, 19 Oct 2018 18:42:28 +0000 (11:42 -0700)]
Tegra: support for native GICv2 drivers
This patch converts Tegra platforms to support native
GICv2 drivers. This involves removes Tegra's GIC driver
port platforms to use interrupt_props
Change-Id: I83d8a690ff276dd97928dc60824a4fd36999bb30
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Varun Wadekar [Fri, 19 Oct 2018 18:44:31 +0000 (11:44 -0700)]
Tegra: support to compile native GICv2 drivers
This patch adds a macro to allow platforms to compile native
GICv2 drivers along with Tegra handlers.
Change-Id: I8281796c09dae5704cff2daab831395d65e261b7
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Antonio Nino Diaz [Fri, 14 Dec 2018 10:47:52 +0000 (10:47 +0000)]
gitignore: Ignore sptool and doimage binaries
Change-Id: I119b85179f68148e128cc194f11d2cccb1e33d6d
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Niño Díaz [Tue, 18 Dec 2018 14:24:52 +0000 (15:24 +0100)]
Merge pull request #1721 from marex/arm/master/memsize-passing-v2
plat: rcar: Move FDT from x3 to x1
Antonio Niño Díaz [Tue, 18 Dec 2018 14:22:49 +0000 (15:22 +0100)]
Merge pull request #1717 from satheesbalya-arm/sb1/sb1_2629_romlib_ifc
romlib: Add platform specific jump table list
Sathees Balya [Wed, 31 Oct 2018 14:05:08 +0000 (14:05 +0000)]
romlib: Add platform specific jump table list
This patch allows platforms to define their
own jump table list for library at ROM. The
file has the list of functions to be used
from library at ROM. It can also include
other list files.
Change-Id: I721c35d7dad3dcadbb3a7f3277bfd5d3e1f6e00a
Signed-off-by: Sathees Balya <sathees.balya@arm.com>
Antonio Niño Díaz [Tue, 18 Dec 2018 12:50:38 +0000 (13:50 +0100)]
Merge pull request #1722 from antonio-nino-diaz-arm/an/arch
Synchronize architectural headers with TF-A-Tests
Antonio Nino Diaz [Fri, 23 Nov 2018 15:04:01 +0000 (15:04 +0000)]
Import exception helpers from TF-A-Tests
This is done in order to keep the files in both repositories in sync.
Change-Id: Ie1a9f321cbcfe8d7d14f206883fa718872271218
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Fri, 23 Nov 2018 13:54:41 +0000 (13:54 +0000)]
Deprecate some unused AArch64 assembly functions
Change-Id: I8a0be21783a0c12325e6ab22e9e53ab5466ed9e0
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Fri, 23 Nov 2018 13:54:00 +0000 (13:54 +0000)]
Move helpers from arch.h to arch_helpers.h
Some of the affected macros can only be used from C code. In general, we
use arch_helpers.h for any C helpers to access registers. For
consistency, the other macros have been moved as well.
Also, import some AArch32 helpers from TF-A-Tests.
Change-Id: Ie8fe1ddeadba5336c12971ddc39a7883121386b1
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Niño Díaz [Tue, 18 Dec 2018 10:55:45 +0000 (11:55 +0100)]
Merge pull request #1718 from vwadekar/cc-variable-findstring
build: find "armclang" string in the 'CC' variable
Antonio Niño Díaz [Tue, 18 Dec 2018 10:55:11 +0000 (11:55 +0100)]
Merge pull request #1719 from Yann-lms/useless_flags
stm32mp1: remove useless compilation flags
Yann Gautier [Tue, 18 Dec 2018 09:46:34 +0000 (10:46 +0100)]
clang: 32 bit compilation should include march32-directive
This is done for other compilers, and without this some code does not
compile, like inline assembly code.
Fixes ARM-software/tf-issues#657.
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Antonio Niño Díaz [Tue, 18 Dec 2018 09:05:22 +0000 (10:05 +0100)]
Merge pull request #1720 from jeenu-arm/gic-priority
GIC: Remove lowest priority constants
Antonio Niño Díaz [Tue, 18 Dec 2018 09:04:57 +0000 (10:04 +0100)]
Merge pull request #1723 from soby-mathew/sm/reset_bl31_fix
FVP: Fixes for RESET_TO_BL31
Soby Mathew [Wed, 12 Dec 2018 14:54:23 +0000 (14:54 +0000)]
docs: User-guide corrections for RESET_TO_BL31
This patch updates the user guide instructions for
RESET_TO_SP_MIN and RESET_TO_BL31 cases. The load
address for BL31 had to be updated because of increase
in code size. Also, information about PIE support when
RESET_TO_BL31=1 for FVP is added.
In the case of RESET_TO_SP_MIN, the RVBAR address
was wrong in the instruction. This is also corrected
in the patch.
Change-Id: I65fe6d28c5cf79bee0a11fbde320d49fcc1aacf5
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Soby Mathew [Wed, 12 Dec 2018 14:33:11 +0000 (14:33 +0000)]
BL31: correct GOT section omission
When the patch SHA
931f7c6 introduced PIE support for BL31,
adding the GOT section when the SEPARATE_CODE_AND_RODATA=0
to the linker script was erroneously omitted. This patch corrects
the same.
Also the patch reduces the alignment requirement for GOT and RELA
sections from 16 bytes to 8. Comments are added explain the
intent for alignment.
Change-Id: I8035cbf75f346f99bd56b13f32e0b3b70dd2fe6c
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Soby Mathew [Wed, 12 Dec 2018 14:13:52 +0000 (14:13 +0000)]
FVP: Change BL31_BASE when RESET_TO_BL31=1
This patch defines BL31_BASE to 0x0 when RESET_TO_BL31=1 as the
executable is built with PIE support and can be loaded anywhere
in SRAM for execution.
Change-Id: I4007f4626322f1200a6304c9c565987d3357986c
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Antonio Niño Díaz [Mon, 17 Dec 2018 10:54:16 +0000 (11:54 +0100)]
Merge pull request #1716 from miyatsu/marvell-doc-fix-
20181210
docs: marvell: Fix typo in file build.txt
Jeenu Viswambharan [Wed, 7 Nov 2018 11:46:36 +0000 (11:46 +0000)]
GIC: Remove lowest priority constants
The GIC lowest priority values for each world depends on the number of
priority values implemented in hardware. These constants currently
defined in gic_common.h only meant to enumerate lowest possible
architectural values. Since these values are not used in generic code or
upstream platforms, and that general use of these constants can be
wrong, remove these. Platforms should either define and use these as
appropriate, or determine correct values at run time.
Change-Id: I3805cea8ceb8a592b9eff681ea1b63b7496cec5f
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
Marek Vasut [Thu, 13 Dec 2018 21:08:24 +0000 (22:08 +0100)]
plat: rcar: Move FDT from x3 to x1
As suggested, pass the FDT to BL 33 via x1 instead of x3 , to be
consistent with the other platforms.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Yann Gautier [Thu, 13 Dec 2018 14:01:53 +0000 (15:01 +0100)]
stm32mp1: remove useless compilation flags
On AARCH32, thumb is used by default, no need to redefine it.
As all our binaries are compiled with thumb, interwork is not needed.
The binaries compiled with or without those flags are the same,
except of course for the date.
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Varun Wadekar [Wed, 12 Dec 2018 23:22:27 +0000 (15:22 -0800)]
build: find "armclang" string in the 'CC' variable
This patch modifies the search criteria to see if we are using 'armclang'
as the compiler. Switch over to using 'findstring' which enables platforms
to do fancy stuff using scripts e.g. check if armclang timed out and retry
compilation.
Change-Id: If2162ebadb9033f6457a4e8d4243345e711defe6
Signed-off-by: Kalyani Chidambaram Vaidyanathan <kalyanic@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Soby Mathew [Wed, 12 Dec 2018 15:54:47 +0000 (15:54 +0000)]
Merge pull request #1708 from Yann-lms/warnings
Add possibility to add compilation warnings
Soby Mathew [Wed, 12 Dec 2018 15:54:09 +0000 (15:54 +0000)]
Merge pull request #1715 from pangupta/master
ccn: for RN-I, used node id instead of node postion
Soby Mathew [Wed, 12 Dec 2018 09:43:49 +0000 (09:43 +0000)]
Merge pull request #1712 from jeenu-arm/ssbs
AArch64: Use SSBS for CVE_2018_3639 mitigation
Pankaj Gupta [Fri, 7 Dec 2018 07:35:36 +0000 (13:05 +0530)]
ccn: for RN-I, used node id instead of node postion
For RN-I, node id is used instead of node postion in the bitmap
to calculate the region id.
Signed-off-by: Pankaj Gupta <pankaj.gupta@nxp.com>
Antonio Niño Díaz [Tue, 11 Dec 2018 16:48:17 +0000 (17:48 +0100)]
Merge pull request #1707 from antonio-nino-diaz-arm/an/spm
SPM: Initial prototype based on SPCI and SPRT
Antonio Nino Diaz [Thu, 15 Nov 2018 08:57:18 +0000 (08:57 +0000)]
SPM: Rename files for consistency
Rename files prefixed by sp_ to spm_.
Change-Id: Ie3016a4c4ac5987fe6fdd734c6b470c60954e23d
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Fri, 30 Nov 2018 10:53:26 +0000 (10:53 +0000)]
SPM: Remove remaining SMC interfaces
Also, add a disclaimer to explain that the current implementation of SPM
is a prototype that is going to undergo a lot of rework.
Change-Id: I303c1e61c51d9f286cc599fea565fc9ba5a996bf
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Fri, 30 Nov 2018 10:52:09 +0000 (10:52 +0000)]
SPM: Migrate mem attr get/set helpers to SPRT
The old SMCs SP_MEMORY_ATTRIBUTES_{GET,SET}_AARCH64 have been removed in
favour of SPRT_MEMORY_PERM_ATTR_{GET,SET}_AARCH64.
Change-Id: Idb93cfa5461d0098df941037c5653f7c44b65227
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Tue, 3 Jul 2018 15:54:33 +0000 (16:54 +0100)]
SPM: Allow preemption in non-blocking requests
Change-Id: I1fdc2285a3f6517a715ad6159322543fd5a37a37
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Thu, 8 Nov 2018 14:22:51 +0000 (14:22 +0000)]
SPM: Support non-blocking calls
Note that the arguments passed during the SMC call don't comply with the
SPCI specifications. This will be fixed in following patches, but it is
needed to implement a few more SPCI SMCs to be able to do it. The
current code allows us to start testing it.
Change-Id: Ic13dcc54c40327df03be1b0f52e8a44f468f06b4
Co-authored-by: Jean-Paul Etienne <jean-paul.etienne@arm.com>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Thu, 18 Oct 2018 13:54:57 +0000 (14:54 +0100)]
SPM: Implement global response buffer helpers
This buffer is where all the responses from Secure Partitions are stored
until they are requested.
Change-Id: Iafeb8f0848c5ff6f3e187060cd3a47702484dc45
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Tue, 3 Jul 2018 18:54:59 +0000 (19:54 +0100)]
SPM: Prevent simultaneous blocking calls
Blocking calls can only succeed if the target Secure Partition is idle.
Change-Id: Iabeaa0b8d3e653fd8581fa086758936abfc1c772
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Thu, 8 Nov 2018 14:21:19 +0000 (14:21 +0000)]
SPM: Support blocking calls
Note that the arguments passed during the SMC call don't comply with the
SPCI specifications. This will be fixed in following patches, but it is
needed to implement a few more SPCI SMCs to be able to do it. The
current code allows us to start testing it.
Change-Id: Ief0e75d072b311737fcdb0c6a60ba5b7406a9ee5
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Thu, 8 Nov 2018 09:21:48 +0000 (09:21 +0000)]
SPM: Introduce SPRT C host library
Change-Id: If57ec9cc0791f49d9ade83dff9d24ef9047963a8
Co-authored-by: Jean-Paul Etienne <jean-paul.etienne@arm.com>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Thu, 8 Nov 2018 14:20:07 +0000 (14:20 +0000)]
SPM: Implement SPCI open/close handle SMCs
Introduce SMCs that open and close handles according to the SPCI
specification.
Change-Id: I65f365f15612e01aa445e783e96e48ae275c39fd
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Thu, 8 Nov 2018 14:12:40 +0000 (14:12 +0000)]
SPM: Introduce SMC handlers for SPCI and SPRT
Change-Id: I2ae9b3bb686c41b2e138132a7bed107925ac861e
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Tue, 30 Oct 2018 11:36:47 +0000 (11:36 +0000)]
SPM: Support multiple xlat tables contexts
Change-Id: Ib7c2529b85bb5930d44907edfc8ead13d3b1ef4d
Co-authored-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Tue, 30 Oct 2018 11:35:30 +0000 (11:35 +0000)]
SPM: Support multiple partitions
Change-Id: I6673a5f8c2f6afa7780483e0ce8d4dad4c8dc8ea
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Antonio Nino Diaz [Tue, 30 Oct 2018 12:50:41 +0000 (12:50 +0000)]
SPM: Remove old SMC interfaces
Remove interfaces based on MM_COMMUNICATE.
Change-Id: I628c884b91d9f4758269ea2c4dedc37a66bb93cf
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>