Skip to content
GitLab
Menu
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
f91ec7dc
Commit
f91ec7dc
authored
Jan 25, 2014
by
Jon Medhurst
Committed by
Sandrine Bailleux
Jun 04, 2014
Browse files
juno: Initialise TZC-400
Signed-off-by:
Jon Medhurst
<
tixy@linaro.org
>
parent
4d958dbf
Changes
2
Hide whitespace changes
Inline
Side-by-side
plat/juno/bl1_plat_setup.c
View file @
f91ec7dc
...
...
@@ -136,6 +136,45 @@ static void init_nic400(void)
}
#define TZC400_GATE_KEEPER_REG 0x008
#define TZC400_REGION_ATTRIBUTES_0_REG 0x110
#define TZC400_REGION_ID_ACCESS_0_REG 0x114
#define TZC400_NSAID_WR_EN (1 << 16)
#define TZC400_NSAID_RD_EN (1 << 0)
#define TZC400_NSAID_RD_RW (TZC400_NSAID_WR_EN | TZC400_NSAID_RD_EN)
static
void
init_tzc400
(
void
)
{
/* Enable all filter units available */
mmio_write_32
(
TZC400_BASE
+
TZC400_GATE_KEEPER_REG
,
0x0000000f
);
/*
* Secure read and write are enabled for region 0, and the background
* region (region 0) is enabled for all four filter units
*/
mmio_write_32
(
TZC400_BASE
+
TZC400_REGION_ATTRIBUTES_0_REG
,
0xc0000000
);
/*
* Enable Non-secure read/write accesses for the Soc Devices from the
* Non-Secure World
*/
mmio_write_32
(
TZC400_BASE
+
TZC400_REGION_ID_ACCESS_0_REG
,
(
TZC400_NSAID_RD_RW
<<
0
)
|
/* CCI400 */
(
TZC400_NSAID_RD_RW
<<
1
)
|
/* PCIE */
(
TZC400_NSAID_RD_RW
<<
2
)
|
/* HDLCD0 */
(
TZC400_NSAID_RD_RW
<<
3
)
|
/* HDLCD1 */
(
TZC400_NSAID_RD_RW
<<
4
)
|
/* USB */
(
TZC400_NSAID_RD_RW
<<
5
)
|
/* DMA330 */
(
TZC400_NSAID_RD_RW
<<
6
)
|
/* THINLINKS */
(
TZC400_NSAID_RD_RW
<<
9
)
|
/* AP */
(
TZC400_NSAID_RD_RW
<<
10
)
|
/* GPU */
(
TZC400_NSAID_RD_RW
<<
11
)
|
/* SCP */
(
TZC400_NSAID_RD_RW
<<
12
)
/* CORESIGHT */
);
}
/*******************************************************************************
* Function which will perform any remaining platform-specific setup that can
* occur after the MMU and data cache have been enabled.
...
...
@@ -143,6 +182,7 @@ static void init_nic400(void)
void
bl1_platform_setup
(
void
)
{
init_nic400
();
init_tzc400
();
/* Initialise the IO layer and register platform IO devices */
io_setup
();
...
...
plat/juno/platform.h
View file @
f91ec7dc
...
...
@@ -110,6 +110,7 @@
#define DEVICE0_BASE 0x20000000
#define DEVICE0_SIZE 0x0e000000
#define CSS_NIC400_BASE 0x2a000000
#define TZC400_BASE 0x2a4a0000
#define NSRAM_BASE 0x2e000000
#define NSRAM_SIZE 0x00008000
...
...
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