Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
atf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MediaTek
atf
Commits
3243cbf0
Commit
3243cbf0
authored
4 years ago
by
Madhukar Pappireddy
Committed by
TrustedFirmware Code Review
4 years ago
Browse files
Options
Downloads
Plain Diff
Merge "lib: cpus: aarch32: sanity check pointers before use" into integration
parents
1d93ce63
e3b9cc12
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/cpus/aarch32/cpu_helpers.S
+16
-0
16 additions, 0 deletions
lib/cpus/aarch32/cpu_helpers.S
with
16 additions
and
0 deletions
lib/cpus/aarch32/cpu_helpers.S
+
16
−
0
View file @
3243cbf0
...
@@ -78,6 +78,10 @@ func prepare_cpu_pwr_dwn
...
@@ -78,6 +78,10 @@ func prepare_cpu_pwr_dwn
mov
r1
,
#
CPU_PWR_DWN_OPS
mov
r1
,
#
CPU_PWR_DWN_OPS
add
r1
,
r1
,
r2
,
lsl
#
2
add
r1
,
r1
,
r2
,
lsl
#
2
ldr
r1
,
[
r0
,
r1
]
ldr
r1
,
[
r0
,
r1
]
#if ENABLE_ASSERTIONS
cmp
r1
,
#
0
ASM_ASSERT
(
ne
)
#endif
bx
r1
bx
r1
endfunc
prepare_cpu_pwr_dwn
endfunc
prepare_cpu_pwr_dwn
...
@@ -146,6 +150,10 @@ func get_cpu_ops_ptr
...
@@ -146,6 +150,10 @@ func get_cpu_ops_ptr
/
*
Subtract
the
increment
and
offset
to
get
the
cpu
-
ops
pointer
*/
/
*
Subtract
the
increment
and
offset
to
get
the
cpu
-
ops
pointer
*/
sub
r0
,
r4
,
#(
CPU_OPS_SIZE
+
CPU_MIDR
)
sub
r0
,
r4
,
#(
CPU_OPS_SIZE
+
CPU_MIDR
)
#if ENABLE_ASSERTIONS
cmp
r0
,
#
0
ASM_ASSERT
(
ne
)
#endif
error_exit
:
error_exit
:
bx
lr
bx
lr
endfunc
get_cpu_ops_ptr
endfunc
get_cpu_ops_ptr
...
@@ -224,7 +232,15 @@ func print_errata_status
...
@@ -224,7 +232,15 @@ func print_errata_status
*
function
.
If
it
's non-NULL, jump to the function in turn.
*
function
.
If
it
's non-NULL, jump to the function in turn.
*/
*/
bl
_cpu_data
bl
_cpu_data
#if ENABLE_ASSERTIONS
cmp
r0
,
#
0
ASM_ASSERT
(
ne
)
#endif
ldr
r1
,
[
r0
,
#
CPU_DATA_CPU_OPS_PTR
]
ldr
r1
,
[
r0
,
#
CPU_DATA_CPU_OPS_PTR
]
#if ENABLE_ASSERTIONS
cmp
r1
,
#
0
ASM_ASSERT
(
ne
)
#endif
ldr
r0
,
[
r1
,
#
CPU_ERRATA_FUNC
]
ldr
r0
,
[
r1
,
#
CPU_ERRATA_FUNC
]
cmp
r0
,
#
0
cmp
r0
,
#
0
beq
1
f
beq
1
f
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment