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
74a44dca
Unverified
Commit
74a44dca
authored
6 years ago
by
Dimitris Papastamos
Committed by
GitHub
6 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #1399 from danielboulby-arm/db/MISRA
MISRA 5.1, 5.3 & 5.7 compliance changes
parents
e109b0ff
776ff52a
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
services/spd/opteed/opteed_pm.c
+12
-12
services/spd/opteed/opteed_pm.c
services/spd/opteed/opteed_private.h
+1
-1
services/spd/opteed/opteed_private.h
services/spd/tspd/tspd_private.h
+6
-6
services/spd/tspd/tspd_private.h
with
19 additions
and
19 deletions
+19
-19
services/spd/opteed/opteed_pm.c
View file @
74a44dca
...
...
@@ -30,11 +30,11 @@ static int32_t opteed_cpu_off_handler(u_register_t unused)
uint32_t
linear_id
=
plat_my_core_pos
();
optee_context_t
*
optee_ctx
=
&
opteed_sp_context
[
linear_id
];
assert
(
optee_vector
s
);
assert
(
optee_vector
_table
);
assert
(
get_optee_pstate
(
optee_ctx
->
state
)
==
OPTEE_PSTATE_ON
);
/* Program the entry point and enter OPTEE */
cm_set_elr_el3
(
SECURE
,
(
uint64_t
)
&
optee_vector
s
->
cpu_off_entry
);
cm_set_elr_el3
(
SECURE
,
(
uint64_t
)
&
optee_vector
_table
->
cpu_off_entry
);
rc
=
opteed_synchronous_sp_entry
(
optee_ctx
);
/*
...
...
@@ -63,11 +63,11 @@ static void opteed_cpu_suspend_handler(u_register_t max_off_pwrlvl)
uint32_t
linear_id
=
plat_my_core_pos
();
optee_context_t
*
optee_ctx
=
&
opteed_sp_context
[
linear_id
];
assert
(
optee_vector
s
);
assert
(
optee_vector
_table
);
assert
(
get_optee_pstate
(
optee_ctx
->
state
)
==
OPTEE_PSTATE_ON
);
/* Program the entry point and enter OPTEE */
cm_set_elr_el3
(
SECURE
,
(
uint64_t
)
&
optee_vector
s
->
cpu_suspend_entry
);
cm_set_elr_el3
(
SECURE
,
(
uint64_t
)
&
optee_vector
_table
->
cpu_suspend_entry
);
rc
=
opteed_synchronous_sp_entry
(
optee_ctx
);
/*
...
...
@@ -94,11 +94,11 @@ static void opteed_cpu_on_finish_handler(u_register_t unused)
optee_context_t
*
optee_ctx
=
&
opteed_sp_context
[
linear_id
];
entry_point_info_t
optee_on_entrypoint
;
assert
(
optee_vector
s
);
assert
(
optee_vector
_table
);
assert
(
get_optee_pstate
(
optee_ctx
->
state
)
==
OPTEE_PSTATE_OFF
);
opteed_init_optee_ep_state
(
&
optee_on_entrypoint
,
opteed_rw
,
(
uint64_t
)
&
optee_vector
s
->
cpu_on_entry
,
(
uint64_t
)
&
optee_vector
_table
->
cpu_on_entry
,
0
,
0
,
0
,
optee_ctx
);
/* Initialise this cpu's secure context */
...
...
@@ -129,14 +129,14 @@ static void opteed_cpu_suspend_finish_handler(u_register_t max_off_pwrlvl)
uint32_t
linear_id
=
plat_my_core_pos
();
optee_context_t
*
optee_ctx
=
&
opteed_sp_context
[
linear_id
];
assert
(
optee_vector
s
);
assert
(
optee_vector
_table
);
assert
(
get_optee_pstate
(
optee_ctx
->
state
)
==
OPTEE_PSTATE_SUSPEND
);
/* Program the entry point, max_off_pwrlvl and enter the SP */
write_ctx_reg
(
get_gpregs_ctx
(
&
optee_ctx
->
cpu_ctx
),
CTX_GPREG_X0
,
max_off_pwrlvl
);
cm_set_elr_el3
(
SECURE
,
(
uint64_t
)
&
optee_vector
s
->
cpu_resume_entry
);
cm_set_elr_el3
(
SECURE
,
(
uint64_t
)
&
optee_vector
_table
->
cpu_resume_entry
);
rc
=
opteed_synchronous_sp_entry
(
optee_ctx
);
/*
...
...
@@ -168,11 +168,11 @@ static void opteed_system_off(void)
uint32_t
linear_id
=
plat_my_core_pos
();
optee_context_t
*
optee_ctx
=
&
opteed_sp_context
[
linear_id
];
assert
(
optee_vector
s
);
assert
(
optee_vector
_table
);
assert
(
get_optee_pstate
(
optee_ctx
->
state
)
==
OPTEE_PSTATE_ON
);
/* Program the entry point */
cm_set_elr_el3
(
SECURE
,
(
uint64_t
)
&
optee_vector
s
->
system_off_entry
);
cm_set_elr_el3
(
SECURE
,
(
uint64_t
)
&
optee_vector
_table
->
system_off_entry
);
/* Enter OPTEE. We do not care about the return value because we
* must continue the shutdown anyway */
...
...
@@ -188,11 +188,11 @@ static void opteed_system_reset(void)
uint32_t
linear_id
=
plat_my_core_pos
();
optee_context_t
*
optee_ctx
=
&
opteed_sp_context
[
linear_id
];
assert
(
optee_vector
s
);
assert
(
optee_vector
_table
);
assert
(
get_optee_pstate
(
optee_ctx
->
state
)
==
OPTEE_PSTATE_ON
);
/* Program the entry point */
cm_set_elr_el3
(
SECURE
,
(
uint64_t
)
&
optee_vector
s
->
system_reset_entry
);
cm_set_elr_el3
(
SECURE
,
(
uint64_t
)
&
optee_vector
_table
->
system_reset_entry
);
/* Enter OPTEE. We do not care about the return value because we
* must continue the reset anyway */
...
...
This diff is collapsed.
Click to expand it.
services/spd/opteed/opteed_private.h
View file @
74a44dca
...
...
@@ -154,7 +154,7 @@ void opteed_init_optee_ep_state(struct entry_point_info *optee_ep,
extern
optee_context_t
opteed_sp_context
[
OPTEED_CORE_COUNT
];
extern
uint32_t
opteed_rw
;
extern
struct
optee_vectors
*
optee_vector
s
;
extern
struct
optee_vectors
*
optee_vector
_table
;
#endif
/*__ASSEMBLY__*/
#endif
/* __OPTEED_PRIVATE_H__ */
This diff is collapsed.
Click to expand it.
services/spd/tspd/tspd_private.h
View file @
74a44dca
...
...
@@ -190,14 +190,14 @@ typedef struct tsp_context {
}
tsp_context_t
;
/* Helper macros to store and retrieve tsp args from tsp_context */
#define store_tsp_args(tsp_ctx, x1, x2) do {\
tsp_ctx->saved_tsp_args[0] = x1;\
tsp_ctx->saved_tsp_args[1] = x2;\
#define store_tsp_args(
_
tsp_ctx,
_
x1,
_
x2) do {\
_
tsp_ctx->saved_tsp_args[0] =
_
x1;\
_
tsp_ctx->saved_tsp_args[1] =
_
x2;\
} while (0)
#define get_tsp_args(tsp_ctx, x1, x2) do {\
x1 = tsp_ctx->saved_tsp_args[0];\
x2 = tsp_ctx->saved_tsp_args[1];\
#define get_tsp_args(
_
tsp_ctx,
_
x1,
_
x2) do {\
_
x1 =
_
tsp_ctx->saved_tsp_args[0];\
_
x2 =
_
tsp_ctx->saved_tsp_args[1];\
} while (0)
/* TSPD power management handlers */
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help