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
756f9bb8
Commit
756f9bb8
authored
Sep 15, 2017
by
davidcunado-arm
Committed by
GitHub
Sep 15, 2017
Browse files
Merge pull request #1094 from douglas-raillard-arm/dr/fix_mmap_add_dynamic_region
xlat: Use MAP_REGION macro as compatibility layer
parents
1cde9b94
769d65da
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/lib/xlat_tables/xlat_tables_v2.h
View file @
756f9bb8
...
...
@@ -23,7 +23,12 @@
/* Helper macro to define entries for mmap_region_t. It allows to
* re-map address mappings from 'pa' to 'va' for each region.
*/
#define MAP_REGION(pa, va, sz, attr) {(pa), (va), (sz), (attr)}
#define MAP_REGION(_pa, _va, _sz, _attr) ((mmap_region_t){ \
.base_pa = (_pa), \
.base_va = (_va), \
.size = (_sz), \
.attr = (_attr), \
})
/*
* Shifts and masks to access fields of an mmap_attr_t
...
...
lib/xlat_tables_v2/xlat_tables_internal.c
View file @
756f9bb8
...
...
@@ -770,12 +770,7 @@ void mmap_add_region(unsigned long long base_pa,
size_t
size
,
mmap_attr_t
attr
)
{
mmap_region_t
mm
=
{
.
base_va
=
base_va
,
.
base_pa
=
base_pa
,
.
size
=
size
,
.
attr
=
attr
,
};
mmap_region_t
mm
=
MAP_REGION
(
base_pa
,
base_va
,
size
,
attr
);
mmap_add_region_ctx
(
&
tf_xlat_ctx
,
&
mm
);
}
...
...
@@ -892,12 +887,7 @@ int mmap_add_dynamic_region_ctx(xlat_ctx_t *ctx, mmap_region_t *mm)
int
mmap_add_dynamic_region
(
unsigned
long
long
base_pa
,
uintptr_t
base_va
,
size_t
size
,
mmap_attr_t
attr
)
{
mmap_region_t
mm
=
{
.
base_va
=
base_va
,
.
base_pa
=
base_pa
,
.
size
=
size
,
.
attr
=
attr
,
};
mmap_region_t
mm
=
MAP_REGION
(
base_pa
,
base_va
,
size
,
attr
);
return
mmap_add_dynamic_region_ctx
(
&
tf_xlat_ctx
,
&
mm
);
}
...
...
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