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
f578d5e1
Commit
f578d5e1
authored
Feb 25, 2015
by
danh-arm
Browse files
Merge pull request #258 from rmurphy-arm/rm/dma-smmu
Juno: clear DMA-330 SMMU security state
parents
6ff51439
75f8261c
Changes
2
Show whitespace changes
Inline
Side-by-side
plat/juno/juno_def.h
View file @
f578d5e1
...
...
@@ -271,4 +271,10 @@
#define PRIMARY_CPU_SHIFT 8
#define PRIMARY_CPU_MASK 0xf
/*******************************************************************************
* MMU-401 related constants
******************************************************************************/
#define MMU401_SSD_OFFSET 0x4000
#define MMU401_DMA330_BASE 0x7fb00000
#endif
/* __JUNO_DEF_H__ */
plat/juno/plat_security.c
View file @
f578d5e1
...
...
@@ -29,6 +29,7 @@
*/
#include <debug.h>
#include <mmio.h>
#include <tzc400.h>
#include "juno_def.h"
...
...
@@ -93,6 +94,19 @@ static void init_tzc400(void)
tzc_enable_filters
();
}
/*******************************************************************************
* Set up the MMU-401 SSD tables. The power-on configuration has all stream IDs
* assigned to Non-Secure except some for the DMA-330. Assign those back to the
* Non-Secure world as well, otherwise EL1 may end up erroneously generating
* (untranslated) Secure transactions if it turns the SMMU on.
******************************************************************************/
static
void
init_mmu401
(
void
)
{
uint32_t
reg
=
mmio_read_32
(
MMU401_DMA330_BASE
+
MMU401_SSD_OFFSET
);
reg
|=
0x1FF
;
mmio_write_32
(
MMU401_DMA330_BASE
+
MMU401_SSD_OFFSET
,
reg
);
}
/*******************************************************************************
* Initialize the secure environment. At this moment only the TrustZone
* Controller is initialized.
...
...
@@ -101,4 +115,6 @@ void plat_security_setup(void)
{
/* Initialize the TrustZone Controller */
init_tzc400
();
/* Initialize the SMMU SSD tables*/
init_mmu401
();
}
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