Harry Liebel | cef9339 | 2014-04-01 19:27:38 +0100 | [diff] [blame] | 1 | /* |
Summer Qin | 5ce394c | 2018-03-12 11:28:26 +0800 | [diff] [blame] | 2 | * Copyright (c) 2014-2018, ARM Limited and Contributors. All rights reserved. |
Harry Liebel | cef9339 | 2014-04-01 19:27:38 +0100 | [diff] [blame] | 3 | * |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
Harry Liebel | cef9339 | 2014-04-01 19:27:38 +0100 | [diff] [blame] | 5 | */ |
| 6 | |
Antonio Nino Diaz | bd7b740 | 2019-01-25 14:30:04 +0000 | [diff] [blame] | 7 | #include <plat/arm/common/arm_config.h> |
| 8 | #include <plat/arm/common/plat_arm.h> |
Harry Liebel | cef9339 | 2014-04-01 19:27:38 +0100 | [diff] [blame] | 9 | |
| 10 | /* |
Dan Handley | 2b6b574 | 2015-03-19 19:17:53 +0000 | [diff] [blame] | 11 | * We assume that all security programming is done by the primary core. |
Harry Liebel | cef9339 | 2014-04-01 19:27:38 +0100 | [diff] [blame] | 12 | */ |
Dan Handley | 2b6b574 | 2015-03-19 19:17:53 +0000 | [diff] [blame] | 13 | void plat_arm_security_setup(void) |
Harry Liebel | cef9339 | 2014-04-01 19:27:38 +0100 | [diff] [blame] | 14 | { |
Harry Liebel | cef9339 | 2014-04-01 19:27:38 +0100 | [diff] [blame] | 15 | /* |
| 16 | * The Base FVP has a TrustZone address space controller, the Foundation |
| 17 | * FVP does not. Trying to program the device on the foundation FVP will |
| 18 | * cause an abort. |
| 19 | * |
| 20 | * If the platform had additional peripheral specific security |
| 21 | * configurations, those would be configured here. |
| 22 | */ |
| 23 | |
Sathees Balya | 30952cc | 2018-09-27 14:41:02 +0100 | [diff] [blame] | 24 | if ((get_arm_config()->flags & ARM_CONFIG_HAS_TZC) != 0U) |
Summer Qin | 5ce394c | 2018-03-12 11:28:26 +0800 | [diff] [blame] | 25 | arm_tzc400_setup(NULL); |
Harry Liebel | cef9339 | 2014-04-01 19:27:38 +0100 | [diff] [blame] | 26 | } |