Commit Graph

1457 Commits

Author SHA1 Message Date
Antonio Nino Diaz 6704f425dd Replace Rockchip delay timer by generic one
Use the generic delay timer instead of having a specific platform
file for configuring it.

Change-Id: Ifa68b9c97cd96ae1190cee74d22d729af95e4537
2016-05-20 15:29:30 +01:00
Antonio Nino Diaz 1d0b990e9d Replace MediaTek delay timer by generic one
Use the generic delay timer instead of having a specific platform
file for configuring it.

Change-Id: If6b8f60bc04230f4b85b2bcc1b670fc65461214e
2016-05-20 15:29:30 +01:00
Antonio Nino Diaz 32cd95f094 Replace SP804 timer by generic delay timer on FVP
Added a build flag to select the generic delay timer on FVP instead
of the SP804 timer. By default, the generic one will be selected. The
user guide has been updated.

Change-Id: Ica34425c6d4ed95a187b529c612f6d3b26b78bc6
2016-05-20 15:29:30 +01:00
Antonio Nino Diaz 0bcedb2212 Implement generic delay timer
Add delay timer implementation based on the system generic counter.
This either uses the platform's implementation of
`plat_get_syscnt_freq()` or explicit clock multiplier/divider values
provided by the platform.

The current implementation of udelay has been modified to avoid
unnecessary calculations while waiting on the loop and to make it
easier to check for overflows.

Change-Id: I9062e1d506dc2f68367fd9289250b93444721732
2016-05-20 15:29:30 +01:00
Antonio Nino Diaz f3d3b316f8 Implement plat_get_syscnt_freq2 on platforms
Replaced plat_get_syscnt_freq by plat_get_syscnt_freq2 on all
upstream platforms.

Change-Id: I3248f3f65a16dc5e9720012a05c35b9e3ba6abbe
2016-05-20 15:29:30 +01:00
Antonio Nino Diaz d44863910c Add 32 bit version of plat_get_syscnt_freq
Added plat_get_syscnt_freq2, which is a 32 bit variant of the 64 bit
plat_get_syscnt_freq. The old one has been flagged as deprecated.
Common code has been updated to use this new version. Porting guide
has been updated.

Change-Id: I9e913544926c418970972bfe7d81ee88b4da837e
2016-05-20 15:29:03 +01:00
Gerald Lejeune 3385f412cc Bring IO storage dummy driver
Allow to handle cases where some images are pre-loaded (by debugger for
instance) without introducing many switches in files calling load_* functions.

Fixes: arm-software/tf-issues#398
Signed-off-by: Gerald Lejeune <gerald.lejeune@st.com>
2016-05-12 16:07:07 +02:00
danh-arm d1d716531d Merge pull request #622 from mtk09422/hw-crypt-v3
Hw crypt v3
2016-05-12 15:04:44 +01:00
Yi Zheng 7ace1cc088 MT8173: Add Sip function for MTK HW crypt driver
Change-Id: Idc40cc6243e532567ec4334ae37d97c003c90bfa
Signed-off-by: Yi Zheng <yi.zheng@mediatek.com>
2016-05-12 14:37:20 +08:00
Jimmy Huang b659b1a755 mt8173: Reorganize plat SiP functions
Due to the changes in Mediatek platform common code, we need to move
plat related SiP functions to plat folder.

Change-Id: I6b14b988235205a5858b4bf49043bc79d0512b06
Signed-off-by: Jimmy Huang <jimmy.huang@mediatek.com>
2016-05-12 14:36:19 +08:00
danh-arm 789a6d492f Merge pull request #619 from sandrine-bailleux-arm/sb/rockchip-assertions
Rockchip: Add some debug assertions in the PMU driver
2016-05-11 10:56:25 +01:00
Sandrine Bailleux 80fb66b3e6 Rockchip: Add some debug assertions in the PMU driver
This patch adds some debug assertions ensuring that array indices
are within the bounds of the array.

Change-Id: I96ee81d14834c1e92cdfb7e60b49995cdacfd93a
2016-05-05 15:35:46 +01:00
danh-arm 8fc835775b Merge pull request #618 from rockchip-linux/fixes-for-suspend/resume
rockchip: support the suspend/resume for rk3399
2016-05-04 17:10:31 +01:00
danh-arm 2edaa749f0 Merge pull request #617 from leon-chen-mtk/refactor_common_1
Refactor MediaTek platform common code
2016-05-04 13:47:49 +01:00
Caesar Wang f47a25ddd8 rockchip: support the suspend/resume for rk3399
This patch adds to support the suspend/resume for rk3399 SoCs.

Signed-off-by: Shengfei xu <xsf@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-05-04 19:39:21 +08:00
danh-arm fa7d172b0c Merge pull request #614 from soby-mathew/sm/rem_fvp_ve_memmap
FVP: Remove VE memory map support and change default GIC driver
2016-05-04 10:32:41 +01:00
Leon Chen cf906b2a2e Refactor MediaTek platform common code
Refactor MediaTek platform common code for further mt6795 upstream.
2016-05-04 14:01:59 +08:00
Soby Mathew a8af6a4d2a Change the default driver to GICv3 in FVP
This patch changes the default driver for FVP platform from the deprecated
GICv3 legacy to the GICv3 only driver. This means that the default build of
Trusted Firmware will not be able boot Linux kernel with GICv2 FDT blob. The
user guide is also updated to reflect this change of default GIC driver for
FVP.

Change-Id: Id6fc8c1ac16ad633dabb3cd189b690415a047764
2016-04-28 11:12:36 +01:00
Soby Mathew 21a3973de0 Remove support for legacy VE memory map in FVP
This patch removes support for legacy Versatile Express memory map for the
GIC peripheral in the FVP platform. The user guide is also updated for the
same.

Change-Id: Ib8cfb819083aca359e5b46b5757cb56cb0ea6533
2016-04-27 16:59:20 +01:00
danh-arm 32d4f82687 Merge pull request #597 from hzhuang1/emmc_v3.2
Emmc v3
2016-04-27 12:31:23 +01:00
Haojian Zhuang 2da3604241 drivers: add emmc stack
In a lot of embedded platforms, eMMC device is the only one storage
device. So loading content from eMMC device is required in ATF.

Create the emmc stack that could co-work with IO block driver.
Support to read/write/erase eMMC blocks on both rpmb and normal
user area. Support to change the IO speed and bus width.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2016-04-27 18:52:51 +08:00
Haojian Zhuang 08b375b0f1 Document: add MAX_IO_BLOCK_DEVICES platform macro
Add MAX_IO_BLOCK_DEVICES in porting guide. It's necessary to define
this macro to support io block device. With this macro, multiple
block devices could be opened at the same time. Each block device
stores its own state.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2016-04-27 18:52:40 +08:00
Haojian Zhuang 9da7a653bd IO: support block device type
FIP is accessed as memory-mapped type. eMMC is block device type.
In order to support FIP based on eMMC, add the new io_block layer.

io_block always access eMMC device as block size. And it'll only
copy the required data into buffer in io_block driver. So preparing
an temporary buffer is required.

When use io_block device, MAX_IO_BLOCK_DEVICES should be declared
in platform_def.h. It's used to support multiple block devices.

Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
2016-04-27 18:51:58 +08:00
danh-arm 4e41896387 Merge pull request #612 from sandrine-bailleux-arm/sb/fix-xlat-lib-path
Doc: Fix the path to the xlat lib
2016-04-27 09:58:56 +01:00
danh-arm 846f296238 Merge pull request #610 from bjackman/bj/fip-create-exit-code
fip_create: Fix exit status for missing output filename (2)
2016-04-27 09:40:05 +01:00
danh-arm 3992c359c2 Merge pull request #611 from sandrine-bailleux-arm/sb/fix-init_xlation_table_inner
Fix computation of L1 bitmask in the translation table lib
2016-04-27 09:38:40 +01:00
Sandrine Bailleux 3c2c72fa4c Doc: Fix the path to the xlat lib
The translation table library code has moved from lib/aarch64/ to
lib/xlat_tables/ since commit 3ca9928df but the Porting Guide still
points to the old location. This patch fixes this issue.

Change-Id: I983a9a100d70eacf6bac71725ffbb4bb5f3732b0
2016-04-27 09:29:06 +01:00
Brendan Jackman 6d9b7c1efc fip_create: Fix exit status for missing output filename
Change-Id: I0d298eea9eaf47121c87637c7395e5d9868aa272
2016-04-27 15:06:33 +08:00
Sandrine Bailleux aa447b9c50 Fix computation of L1 bitmask in the translation table lib
This patch fixes the computation of the bitmask used to isolate
the level 1 field of a virtual address. The whole computation needs
to work on 64-bit values to produce the correct bitmask value.
XLAT_TABLE_ENTRIES_MASK being a C constant, it is a 32-bit value
so it needs to be extended to a 64-bit value before it takes part
in any other computation.

This patch fixes this bug by casting XLAT_TABLE_ENTRIES_MASK as
an unsigned long long.

Note that this bug doesn't manifest itself in practice because
address spaces larger than 39 bits are not yet supported in the
Trusted Firmware.

Change-Id: I955fd263ecb691ca94b29b9c9f576008ce1d87ee
2016-04-26 14:59:38 +01:00
danh-arm 142ff9b5f5 Merge pull request #605 from yatharth-arm/yk/sys_counter_fix
Conditionally compile `plat_get_syscnt_freq()` in ARM standard platforms
2016-04-26 14:58:57 +01:00
Yatharth Kochar 1969625afa Conditionally compile `plat_get_syscnt_freq()` in ARM standard platforms
This patch puts the definition of `plat_get_syscnt_freq()`
under `#ifdef ARM_SYS_CNTCTL_BASE` in arm_common.c file.
This is the fix for compilation error introduced by commit-id
`749ade4`, for platforms that use arm_common.c but do not
provide a memory mapped interface to the generic counter.

Fixes ARM-software/tf-issues#395

Change-Id: I2f2b10bd9500fa15308541ccb15829306a76a745
2016-04-26 13:58:09 +01:00
Michal Simek b96f77c65b zynqmp: FSBL->ATF handover
Parse the parameter structure the FSBL populates, to populate the bl32
and bl33 image structures.

Cc: Sarat Chand Savitala <saratcha@xilinx.com>
Cc: petalinux-dev@xilinx.com
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[ SB
 - pass pointers to structs instead of structs
 - handle execution state parameter
 - populate bl32 SPSR
 - add documentation
 - query bootmode and consider missing handoff parameters an error when
   not in JTAG boot mode
]
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
2016-04-25 09:49:59 -07:00
Soren Brinkmann 2cb5bac984 zynqmp: Introduce zynqmp_get_bootmode
Provide a function to retrieve the bootmode.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
2016-04-25 09:49:59 -07:00
Soren Brinkmann e543e79b2d zynqmp: Remove bogus comment
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
2016-04-25 09:49:58 -07:00
Soren Brinkmann 01555332fa zynqmp: Revise memory configuration options
Drop the current configuration options for selecting the location of
the ATF and TSP (ZYNQMP_ATF_LOCATION, ZYNQMP_TSP_RAM_LOCATION).
The new configuration provides one default setup (ATF in OCM,
BL32 in DRAM). Additionally, the new configuration options
 - ZYNQMP_ATF_MEM_BASE
 - ZYNQMP_ATF_MEM_SIZE
 - ZYNQMP_BL32_MEM_BASE
 - ZYNQMP_BL32_MEM_SIZE
can be used to freely configure the memory locations used for ATF and
secure payload.

Also, allow setting the BL33 entry point via PRELOADED_BL33_BASE.

Cc: petalinux-dev@xilinx.com
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Acked-by: Alistair Francis <alistair.francis@xilinx.com>
2016-04-25 09:49:42 -07:00
danh-arm cf4ee1779a Merge pull request #604 from sandrine-bailleux-arm/sb/validate-psci_cpu_on_start-args
Validate psci_cpu_on_start() arguments
2016-04-25 14:52:14 +01:00
danh-arm 3f84cec51c Merge pull request #602 from rockchip-linux/fixes-for-coreboot_v1
rockchip: fixes for the required
2016-04-25 14:50:46 +01:00
danh-arm 749ade4566 Merge pull request #603 from yatharth-arm/yk/sys_counter
Move `plat_get_syscnt_freq()` to arm_common.c
2016-04-25 14:50:27 +01:00
Sandrine Bailleux 22b09c1721 Remove unused argument in psci_cpu_on_start()
The "end power level" value passed as the 3rd argument to the
psci_cpu_on_start() function is not used so this patch removes it.

Change-Id: Icaa68b8c4ecd94507287970455fbff354faaa41e
2016-04-25 12:55:45 +01:00
Sandrine Bailleux 1ad9f93e8d Validate psci_cpu_on_start() arguments
This patch introduces some debug assertions in the function
psci_cpu_on_start() to check the arguments it receives are
valid.

Change-Id: If4d23c9f668fb46f2d18c5e2ed1929498cc6736b
2016-04-25 12:55:45 +01:00
Caesar Wang 0c05748bde rockchip: fixes for the required
This patch has the following change for rk3399.

* Set the uart to 115200 since the loader decide to set
  uart baud to 115200Hz. So the ATF also should set uart baud to 115200.

* We need ensure the bl31 base is greater than 4KB since there are have
  the shared mem for coreboot.(Note: the previous vesion was tested with uboot)

Otherwise, we will happen the exception crash since the ddr area won't
to work from the shared ram address in some cases.

For example, the exception crash:
CBFS: Found @ offset 19c80 size 24074
exception _sync_sp_el0
ELR = 0x0000000000008000
ESR = 0x0000000002000000
SPSR = 0x600003cc
FAR = 0xffffffff00000000
SP = 0x00000000ff8ed230
...
X29 = 0x00000000ff8c1fc0
X30 = 0x000000000030e3b0
exception death

Change-Id: I8bc557c6bcaf6804d2a313b38667d3e2517881d7
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
2016-04-25 16:53:22 +08:00
danh-arm 7607204c0d Merge pull request #601 from sandrine-bailleux-arm/sb/a57-errata-workarounds
Cortex-A57 errata workarounds
2016-04-22 10:13:16 +01:00
danh-arm 7ee532a1ee Merge pull request #598 from antonio-nino-diaz-arm/an/xlat-overlap
Limit support for region overlaps in xlat_tables
2016-04-22 10:04:58 +01:00
Yatharth Kochar c073fda1c6 Move `plat_get_syscnt_freq()` to arm_common.c
This patch moves the definition for `plat_get_syscnt_freq()`
from arm_bl31_setup.c to arm_common.c. This could be useful
in case a delay timer needs to be installed based on the
generic timer in other BLs.
This patch also modifies the return type for this function
from `uint64_t` to `unsigned long long` within ARM and other
platform files.

Change-Id: Iccdfa811948e660d4fdcaae60ad1d700e4eda80d
2016-04-21 17:10:58 +01:00
Sandrine Bailleux 86d8948c78 Doc: Add links to the A53/A57 Errata Notice documents
This patch adds links to the Cortex-A53 and Cortex-A57 MPCores
Software Developers Errata Notice documents in the ARM CPU Specific
Build Macros document.

Change-Id: I0aa26d7f373026097ed012a02bc61ee2c5b9d6fc
2016-04-21 13:00:28 +01:00
Sandrine Bailleux adeecf9219 Add support for Cortex-A57 erratum 833471 workaround
Change-Id: I86ac81ffd7cd094ce68c4cceb01c16563671a063
2016-04-21 12:59:59 +01:00
Sandrine Bailleux 072888656d Add support for Cortex-A57 erratum 826977 workaround
Change-Id: Icaacd19c4cef9c10d02adcc2f84a4d7c97d4bcfa
2016-04-21 12:59:59 +01:00
Sandrine Bailleux 0b77197baf Add support for Cortex-A57 erratum 829520 workaround
Change-Id: Ia2ce8aa752efb090cfc734c1895c8f2539e82439
2016-04-21 12:59:59 +01:00
Sandrine Bailleux a8b1c76936 Add support for Cortex-A57 erratum 828024 workaround
Change-Id: I632a8c5bb517ff89c69268e865be33101059be7d
2016-04-21 12:59:59 +01:00
danh-arm 07e8942a7b Merge pull request #594 from jcastillo-arm/jc/user-guide
Update User Guide and move up to Linaro 16.02
2016-04-21 12:51:27 +01:00