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
4c54d5c5
Commit
4c54d5c5
authored
May 01, 2014
by
Sandrine Bailleux
Browse files
juno: Remove use of partially qualified asm helper functions
Change-Id: I6d7c040d7569df601a12007dd2413c39f40f07ce
parent
8aa94a0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
plat/juno/aarch64/plat_common.c
View file @
4c54d5c5
...
...
@@ -47,32 +47,42 @@ void enable_mmu()
mair
=
MAIR_ATTR_SET
(
ATTR_DEVICE
,
ATTR_DEVICE_INDEX
);
mair
|=
MAIR_ATTR_SET
(
ATTR_IWBWA_OWBWA_NTR
,
ATTR_IWBWA_OWBWA_NTR_INDEX
);
write_mair
(
mair
);
/*
* Set TCR bits as well. Inner & outer WBWA & shareable + T0SZ = 32
*/
tcr
=
TCR_SH_INNER_SHAREABLE
|
TCR_RGN_OUTER_WBA
|
TCR_RGN_INNER_WBA
|
TCR_T0SZ_4GB
;
/* Set TTBR bits as well */
ttbr
=
(
unsigned
long
)
l1_xlation_table
;
if
(
GET_EL
(
current_el
)
==
MODE_EL3
)
{
write_mair_el3
(
mair
);
tcr
|=
TCR_EL3_RES1
;
/* Invalidate EL3 TLBs */
tlbialle3
();
write_tcr_el3
(
tcr
);
write_ttbr0_el3
(
ttbr
);
sctlr
=
read_sctlr_el3
();
sctlr
|=
SCTLR_WXN_BIT
|
SCTLR_M_BIT
|
SCTLR_I_BIT
;
sctlr
|=
SCTLR_A_BIT
|
SCTLR_C_BIT
;
write_sctlr_el3
(
sctlr
);
}
else
{
write_mair_el1
(
mair
);
/* Invalidate EL1 TLBs */
tlbivmalle1
();
}
write_tcr
(
tcr
);
write_tcr_el1
(
tcr
);
write_ttbr0_el1
(
ttbr
);
/* Set TTBR bits as well */
ttbr
=
(
unsigned
long
)
l1_xlation_table
;
write_ttbr0
(
ttbr
);
sctlr
=
read_sctlr
();
sctlr
|=
SCTLR_WXN_BIT
|
SCTLR_M_BIT
|
SCTLR_I_BIT
;
sctlr
|=
SCTLR_A_BIT
|
SCTLR_C_BIT
;
write_sctlr
(
sctlr
);
sctlr
=
read_sctlr_el1
();
sctlr
|=
SCTLR_WXN_BIT
|
SCTLR_M_BIT
|
SCTLR_I_BIT
;
sctlr
|=
SCTLR_A_BIT
|
SCTLR_C_BIT
;
write_sctlr_el1
(
sctlr
);
}
return
;
}
...
...
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