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
1b56ed66
Unverified
Commit
1b56ed66
authored
Jan 29, 2018
by
davidcunado-arm
Committed by
GitHub
Jan 29, 2018
Browse files
Merge pull request #1241 from vchong/fixmemprot
hikey: fix assert in sec_protect()
parents
5df27780
d5d5595a
Changes
1
Hide whitespace changes
Inline
Side-by-side
plat/hisilicon/hikey/hikey_security.c
View file @
1b56ed66
...
...
@@ -71,10 +71,12 @@ static void sec_protect(uint32_t region_base, uint32_t region_size,
volatile
struct
rgn_attr_reg
*
rgn_attr
;
uint32_t
i
=
0
;
assert
(
region
<
1
||
region
>
15
);
assert
(
!
IS_POWER_OF_TWO
(
region_size
)
||
region_size
<
0x10000
);
/* ensure secure region_base is aligned to region_size */
assert
((
region_base
&
(
region_size
-
1
)));
/* ensure secure region number is between 1-15 */
assert
(
region
>
0
&&
region
<
16
);
/* ensure secure region size is a power of 2 >= 64KB */
assert
(
IS_POWER_OF_TWO
(
region_size
)
&&
region_size
>=
0x10000
);
/* ensure secure region address is aligned to region size */
assert
(
!
(
region_base
&
(
region_size
-
1
)));
INFO
(
"BL2: TrustZone: protecting %u bytes of memory at 0x%x
\n
"
,
region_size
,
region_base
);
...
...
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