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
d48f193d
Unverified
Commit
d48f193d
authored
Jun 27, 2018
by
Dimitris Papastamos
Committed by
GitHub
Jun 27, 2018
Browse files
Merge pull request #1429 from jeenu-arm/mmu-direct
Enable MMU without stack for xlat v2/DynamIQ
parents
86e07ae6
bb00ea5b
Changes
24
Hide whitespace changes
Inline
Side-by-side
lib/xlat_tables_v2/xlat_tables_internal.c
View file @
d48f193d
...
@@ -802,7 +802,7 @@ void mmap_add_region_ctx(xlat_ctx_t *ctx, const mmap_region_t *mm)
...
@@ -802,7 +802,7 @@ void mmap_add_region_ctx(xlat_ctx_t *ctx, const mmap_region_t *mm)
* that there is free space.
* that there is free space.
*/
*/
assert
(
mm_last
->
size
==
0U
);
assert
(
mm_last
->
size
==
0U
);
/* Make room for new region by moving other regions up by one place */
/* Make room for new region by moving other regions up by one place */
mm_destination
=
mm_cursor
+
1
;
mm_destination
=
mm_cursor
+
1
;
memmove
(
mm_destination
,
mm_cursor
,
memmove
(
mm_destination
,
mm_cursor
,
...
@@ -1313,22 +1313,25 @@ void init_xlat_tables(void)
...
@@ -1313,22 +1313,25 @@ void init_xlat_tables(void)
void
enable_mmu_secure
(
unsigned
int
flags
)
void
enable_mmu_secure
(
unsigned
int
flags
)
{
{
enable
_mmu_
arch
(
flags
,
tf_xlat_ctx
.
base_table
,
MAX_PHYS_ADDR
,
setup
_mmu_
cfg
(
flags
,
tf_xlat_ctx
.
base_table
,
MAX_PHYS_ADDR
,
tf_xlat_ctx
.
va_max_address
);
tf_xlat_ctx
.
va_max_address
);
enable_mmu_direct
(
flags
);
}
}
#else
#else
void
enable_mmu_el1
(
unsigned
int
flags
)
void
enable_mmu_el1
(
unsigned
int
flags
)
{
{
enable
_mmu_
arch
(
flags
,
tf_xlat_ctx
.
base_table
,
MAX_PHYS_ADDR
,
setup
_mmu_
cfg
(
flags
,
tf_xlat_ctx
.
base_table
,
MAX_PHYS_ADDR
,
tf_xlat_ctx
.
va_max_address
);
tf_xlat_ctx
.
va_max_address
);
enable_mmu_direct_el1
(
flags
);
}
}
void
enable_mmu_el3
(
unsigned
int
flags
)
void
enable_mmu_el3
(
unsigned
int
flags
)
{
{
enable
_mmu_
arch
(
flags
,
tf_xlat_ctx
.
base_table
,
MAX_PHYS_ADDR
,
setup
_mmu_
cfg
(
flags
,
tf_xlat_ctx
.
base_table
,
MAX_PHYS_ADDR
,
tf_xlat_ctx
.
va_max_address
);
tf_xlat_ctx
.
va_max_address
);
enable_mmu_direct_el3
(
flags
);
}
}
#endif
/* AARCH32 */
#endif
/* AARCH32 */
...
...
lib/xlat_tables_v2/xlat_tables_private.h
View file @
d48f193d
...
@@ -81,7 +81,7 @@ int xlat_arch_current_el(void);
...
@@ -81,7 +81,7 @@ int xlat_arch_current_el(void);
unsigned
long
long
xlat_arch_get_max_supported_pa
(
void
);
unsigned
long
long
xlat_arch_get_max_supported_pa
(
void
);
/* Enable MMU and configure it to use the specified translation tables. */
/* Enable MMU and configure it to use the specified translation tables. */
void
enable
_mmu_
arch
(
unsigned
int
flags
,
uint64_t
*
base_table
,
void
setup
_mmu_
cfg
(
unsigned
int
flags
,
const
uint64_t
*
base_table
,
unsigned
long
long
max_pa
,
uintptr_t
max_va
);
unsigned
long
long
max_pa
,
uintptr_t
max_va
);
/*
/*
...
...
plat/common/aarch64/plat_common.c
View file @
d48f193d
...
@@ -18,8 +18,6 @@
...
@@ -18,8 +18,6 @@
* provide typical implementations that may be re-used by multiple
* provide typical implementations that may be re-used by multiple
* platforms but may also be overridden by a platform if required.
* platforms but may also be overridden by a platform if required.
*/
*/
#pragma weak bl31_plat_enable_mmu
#pragma weak bl32_plat_enable_mmu
#pragma weak bl31_plat_runtime_setup
#pragma weak bl31_plat_runtime_setup
#if !ERROR_DEPRECATED
#if !ERROR_DEPRECATED
#pragma weak plat_get_syscnt_freq2
#pragma weak plat_get_syscnt_freq2
...
@@ -33,16 +31,6 @@
...
@@ -33,16 +31,6 @@
#pragma weak plat_ea_handler
#pragma weak plat_ea_handler
void
bl31_plat_enable_mmu
(
uint32_t
flags
)
{
enable_mmu_el3
(
flags
);
}
void
bl32_plat_enable_mmu
(
uint32_t
flags
)
{
enable_mmu_el1
(
flags
);
}
void
bl31_plat_runtime_setup
(
void
)
void
bl31_plat_runtime_setup
(
void
)
{
{
#if MULTI_CONSOLE_API
#if MULTI_CONSOLE_API
...
...
plat/common/aarch64/platform_helpers.S
View file @
d48f193d
...
@@ -17,6 +17,8 @@
...
@@ -17,6 +17,8 @@
.
weak
plat_disable_acp
.
weak
plat_disable_acp
.
weak
bl1_plat_prepare_exit
.
weak
bl1_plat_prepare_exit
.
weak
plat_panic_handler
.
weak
plat_panic_handler
.
weak
bl31_plat_enable_mmu
.
weak
bl32_plat_enable_mmu
#if !ENABLE_PLAT_COMPAT
#if !ENABLE_PLAT_COMPAT
.
globl
platform_get_core_pos
.
globl
platform_get_core_pos
...
@@ -164,3 +166,23 @@ func plat_panic_handler
...
@@ -164,3 +166,23 @@ func plat_panic_handler
wfi
wfi
b
plat_panic_handler
b
plat_panic_handler
endfunc
plat_panic_handler
endfunc
plat_panic_handler
/
*
-----------------------------------------------------
*
void
bl31_plat_enable_mmu
(
uint32_t
flags
)
;
*
*
Enable
MMU
in
BL31
.
*
-----------------------------------------------------
*/
func
bl31_plat_enable_mmu
b
enable_mmu_direct_el3
endfunc
bl31_plat_enable_mmu
/
*
-----------------------------------------------------
*
void
bl32_plat_enable_mmu
(
uint32_t
flags
)
;
*
*
Enable
MMU
in
BL32
.
*
-----------------------------------------------------
*/
func
bl32_plat_enable_mmu
b
enable_mmu_direct_el1
endfunc
bl32_plat_enable_mmu
Prev
1
2
Next
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