Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
b27280a8
Commit
b27280a8
authored
5 years ago
by
Sandrine Bailleux
Committed by
TrustedFirmware Code Review
5 years ago
Browse files
Options
Download
Plain Diff
Merge "Coding guideline suggest not to use unsigned long" into integration
parents
90199457
9afe8cdc
master
v2.5
v2.5-rc1
v2.5-rc0
v2.4
v2.4-rc2
v2.4-rc1
v2.4-rc0
v2.3
v2.3-rc2
v2.3-rc1
v2.3-rc0
arm_cca_v0.2
arm_cca_v0.1
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/xlat_tables/aarch32/nonlpae_tables.c
+11
-11
lib/xlat_tables/aarch32/nonlpae_tables.c
lib/xlat_tables_v2/xlat_tables_core.c
+2
-1
lib/xlat_tables_v2/xlat_tables_core.c
with
13 additions
and
12 deletions
+13
-12
lib/xlat_tables/aarch32/nonlpae_tables.c
View file @
b27280a8
...
...
@@ -284,10 +284,10 @@ void mmap_add_region(unsigned long long base_pa, uintptr_t base_va,
}
/* map all memory as shared/global/domain0/no-usr access */
static
u
nsigned
long
mmap_desc
(
unsigned
attr
,
unsigned
long
addr_pa
,
unsigned
int
level
)
static
u
int32_t
mmap_desc
(
unsigned
attr
,
unsigned
int
addr_pa
,
unsigned
int
level
)
{
u
nsigned
long
desc
;
u
int32_t
desc
;
switch
(
level
)
{
case
1
:
...
...
@@ -380,14 +380,14 @@ static unsigned int mmap_region_attr(const mmap_region_t *mm, uintptr_t base_va,
}
static
mmap_region_t
*
init_xlation_table_inner
(
mmap_region_t
*
mm
,
unsigned
long
base_va
,
u
nsigned
long
*
table
,
unsigned
int
base_va
,
u
int32_t
*
table
,
unsigned
int
level
)
{
unsigned
int
level_size_shift
=
(
level
==
1
)
?
ONE_MB_SHIFT
:
FOUR_KB_SHIFT
;
unsigned
int
level_size
=
1
<<
level_size_shift
;
unsigned
long
level_index_mask
=
(
level
==
1
)
?
unsigned
int
level_index_mask
=
(
level
==
1
)
?
(
NUM_1MB_IN_4GB
-
1
)
<<
ONE_MB_SHIFT
:
(
NUM_4K_IN_1MB
-
1
)
<<
FOUR_KB_SHIFT
;
...
...
@@ -396,7 +396,7 @@ static mmap_region_t *init_xlation_table_inner(mmap_region_t *mm,
VERBOSE
(
"init xlat table at %p (level%1d)
\n
"
,
(
void
*
)
table
,
level
);
do
{
u
nsigned
long
desc
=
MMU32B_UNSET_DESC
;
u
int32_t
desc
=
MMU32B_UNSET_DESC
;
if
(
mm
->
base_va
+
mm
->
size
<=
base_va
)
{
/* Area now after the region so skip it */
...
...
@@ -427,7 +427,7 @@ static mmap_region_t *init_xlation_table_inner(mmap_region_t *mm,
}
if
(
desc
==
MMU32B_UNSET_DESC
)
{
u
nsigned
long
xlat_table
;
u
intptr_t
xlat_table
;
/*
* Area not covered by a region so need finer table
...
...
@@ -443,7 +443,7 @@ static mmap_region_t *init_xlation_table_inner(mmap_region_t *mm,
~
(
MMU32B_L1_TABLE_ALIGN
-
1
);
desc
=
*
table
;
}
else
{
xlat_table
=
(
u
nsigned
long
)
mmu_l2_base
+
xlat_table
=
(
u
intptr_t
)
mmu_l2_base
+
next_xlat
*
MMU32B_L2_TABLE_SIZE
;
next_xlat
++
;
assert
(
next_xlat
<=
MAX_XLAT_TABLES
);
...
...
@@ -456,7 +456,7 @@ static mmap_region_t *init_xlation_table_inner(mmap_region_t *mm,
}
/* Recurse to fill in new table */
mm
=
init_xlation_table_inner
(
mm
,
base_va
,
(
u
nsigned
long
*
)
xlat_table
,
(
u
int32_t
*
)
xlat_table
,
level
+
1
);
}
#if LOG_LEVEL >= LOG_LEVEL_VERBOSE
...
...
@@ -480,7 +480,7 @@ void init_xlat_tables(void)
memset
(
mmu_l1_base
,
0
,
MMU32B_L1_TABLE_SIZE
);
init_xlation_table_inner
(
mmap
,
0
,
(
u
nsigned
long
*
)
mmu_l1_base
,
1
);
init_xlation_table_inner
(
mmap
,
0
,
(
u
int32_t
*
)
mmu_l1_base
,
1
);
VERBOSE
(
"init xlat - max_va=%p, max_pa=%llx
\n
"
,
(
void
*
)
xlat_max_va
,
xlat_max_pa
);
...
...
This diff is collapsed.
Click to expand it.
lib/xlat_tables_v2/xlat_tables_core.c
View file @
b27280a8
...
...
@@ -607,7 +607,8 @@ static uintptr_t xlat_tables_map_region(xlat_ctx_t *ctx, mmap_region_t *mm,
}
/* Point to new subtable from this one. */
table_base
[
table_idx
]
=
TABLE_DESC
|
(
unsigned
long
)
subtable
;
table_base
[
table_idx
]
=
TABLE_DESC
|
(
uintptr_t
)
subtable
;
/* Recurse to write into subtable */
end_va
=
xlat_tables_map_region
(
ctx
,
mm
,
table_idx_va
,
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help