Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
af0a9618
Commit
af0a9618
authored
11 years ago
by
danh-arm
Browse files
Options
Download
Plain Diff
Merge pull request #66 from athoelke/tzc-config-fix
Fixes for TZC configuration on FVP
parents
60bc4bbd
84dbf6ff
master
v2.5
v2.5-rc1
v2.5-rc0
v2.4
v2.4-rc2
v2.4-rc1
v2.4-rc0
v2.3
v2.3-rc2
v2.3-rc1
v2.3-rc0
v2.2
v2.2-rc2
v2.2-rc1
v2.2-rc0
v2.1
v2.1-rc1
v2.1-rc0
v2.0
v2.0-rc0
v1.6
v1.6-rc1
v1.6-rc0
v1.5
v1.5-rc3
v1.5-rc2
v1.5-rc1
v1.5-rc0
v1.4
v1.4-rc0
v1.3
v1.3_rc2
v1.3_rc1
v1.3-rc0
v1.2
v1.2-rc0
v1.1
v1.1-rc3
v1.1-rc2
v1.1-rc1
v1.1-rc0
v1.1-Juno-0.1
v1.0
v1.0-rc0
v0.4
v0.4-rc2
v0.4-rc1
v0.4-Juno-0.6-rc1
v0.4-Juno-0.6-rc0
v0.4-Juno-0.5
v0.4-Juno-0.5-rc1
v0.4-Juno-0.5-rc0
v0.4-Juno-0.4
v0.4-Juno-0.4-rc0
for-v0.4/05.22
for-v0.4/05.21
for-v0.4/05.20
for-v0.4-rc0
arm_cca_v0.2
arm_cca_v0.1
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/porting-guide.md
+4
-2
docs/porting-guide.md
plat/fvp/plat_security.c
+18
-21
plat/fvp/plat_security.c
plat/fvp/platform.h
+8
-5
plat/fvp/platform.h
with
30 additions
and
28 deletions
+30
-28
docs/porting-guide.md
View file @
af0a9618
...
...
@@ -631,8 +631,10 @@ this function. This information is accessible in the `bl33_meminfo` field in
the
`bl31_args`
structure pointed to by
`bl2_to_bl31_args`
.
Platform security components are configured if required. For the Base FVP the
TZC-400 TrustZone controller is configured to grant secure and non-secure access
to DRAM.
TZC-400 TrustZone controller is configured to only grant non-secure access
to DRAM. This avoids aliasing between secure and non-secure accesses in the
TLB and cache - secure execution states can use the NS attributes in the
MMU translation tables to access the DRAM.
This function is also responsible for initializing the storage abstraction layer
which is used to load further bootloader images.
...
...
This diff is collapsed.
Click to expand it.
plat/fvp/plat_security.c
View file @
af0a9618
...
...
@@ -88,36 +88,33 @@ void plat_security_setup(void)
tzc_disable_filters
(
&
controller
);
/*
* Allow
full
access to all DRAM to supported devices
for the
*
moment.
Give access to the CPUs and Virtio. Some devices
* Allow
only non-secure
access to all DRAM to supported devices
.
* Give access to the CPUs and Virtio. Some devices
* would normally use the default ID so allow that too. We use
* t
hree different
regions to cover the
three separate blocks of
*
memory in the FVPs. We allow secure access to DRAM to load NS
*
s
oftware
.
*
FIXME: In current models Virtio uses a reserved ID. Thi
s i
s
*
not correct and will be fixed
.
* t
wo
regions to cover the
blocks of physical memory in the FVPs.
*
*
S
oftware
executing in the secure state, such as a secure
*
boot-loader, can access the DRAM by using the NS attribute
s i
n
*
the MMU translation tables and descriptors
.
*/
/* Set to cover
2GB
block of DRAM */
/* Set to cover
the first
block of DRAM */
tzc_configure_region
(
&
controller
,
FILTER_SHIFT
(
0
),
1
,
DRAM_BASE
,
0xFFFFFFFF
,
TZC_REGION_S_RDWR
,
TZC_REGION_ACCESS_RDWR
(
FVP_NSAID_AP
)
|
DRAM_BASE
,
0xFFFFFFFF
,
TZC_REGION_S_NONE
,
TZC_REGION_ACCESS_RDWR
(
FVP_NSAID_DEFAULT
)
|
TZC_REGION_ACCESS_RDWR
(
FVP_NSAID_RES5
));
TZC_REGION_ACCESS_RDWR
(
FVP_NSAID_PCI
)
|
TZC_REGION_ACCESS_RDWR
(
FVP_NSAID_AP
)
|
TZC_REGION_ACCESS_RDWR
(
FVP_NSAID_VIRTIO
)
|
TZC_REGION_ACCESS_RDWR
(
FVP_NSAID_VIRTIO_OLD
));
/* Set to cover the
30GB block
*/
/* Set to cover the
second block of DRAM
*/
tzc_configure_region
(
&
controller
,
FILTER_SHIFT
(
0
),
2
,
0x880000000
,
0xFFFFFFFFF
,
TZC_REGION_S_RDWR
,
TZC_REGION_ACCESS_RDWR
(
FVP_NSAID_AP
)
|
0x880000000
,
0xFFFFFFFFF
,
TZC_REGION_S_NONE
,
TZC_REGION_ACCESS_RDWR
(
FVP_NSAID_DEFAULT
)
|
TZC_REGION_ACCESS_RDWR
(
FVP_NSAID_RES5
));
/* Set to cover 480GB block */
tzc_configure_region
(
&
controller
,
FILTER_SHIFT
(
0
),
3
,
0x8800000000
,
0xFFFFFFFFFF
,
TZC_REGION_S_RDWR
,
TZC_REGION_ACCESS_RDWR
(
FVP_NSAID_PCI
)
|
TZC_REGION_ACCESS_RDWR
(
FVP_NSAID_AP
)
|
TZC_REGION_ACCESS_RDWR
(
FVP_NSAID_
DEFAULT
)
|
TZC_REGION_ACCESS_RDWR
(
FVP_NSAID_
RES5
));
TZC_REGION_ACCESS_RDWR
(
FVP_NSAID_
VIRTIO
)
|
TZC_REGION_ACCESS_RDWR
(
FVP_NSAID_
VIRTIO_OLD
));
/*
* TODO: Interrupts are not currently supported. The only
...
...
This diff is collapsed.
Click to expand it.
plat/fvp/platform.h
View file @
af0a9618
...
...
@@ -307,18 +307,21 @@
/*
* The NSAIDs for this platform as used to program the TZC400.
* TODO:
* This list and the numbers in it is still changing on the Base FVP.
* For now only specify the NSAIDs we actually use.
*/
/* The FVP has 4 bits of NSAIDs. Used with TZC FAIL_ID (ACE Lite ID width) */
#define FVP_AID_WIDTH 4
/* NSAIDs used by devices in TZC filter 0 on FVP */
#define FVP_NSAID_DEFAULT 0
#define FVP_NSAID_PCI 1
#define FVP_NSAID_VIRTIO 8
/* from FVP v5.6 onwards */
#define FVP_NSAID_AP 9
/* Application Processors */
#define FVP_NSAID_VIRTIO_OLD 15
/* until FVP v5.5 */
/* FIXME: Currently incorrectly used by Virtio */
#define FVP_NSAID_RES5 15
/* NSAIDs used by devices in TZC filter 2 on FVP */
#define FVP_NSAID_HDLCD0 2
#define FVP_NSAID_CLCD 7
/*******************************************************************************
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help