[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-arm] [PATCH v2 13/23] target/arm: Make the v7-M S
From: |
Alex Bennée |
Subject: |
Re: [Qemu-devel] [Qemu-arm] [PATCH v2 13/23] target/arm: Make the v7-M Security State routines |
Date: |
Mon, 17 Jun 2019 15:11:20 +0100 |
User-agent: |
mu4e 1.3.2; emacs 26.1 |
Philippe Mathieu-Daudé <address@hidden> writes:
> The Security State helpers are now only called within v7m_helper.c.
> Remove them from "internals.h".
>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
This does seem a little round the houses, but whatever:
Reviewed-by: Alex Bennée <address@hidden>
> ---
> target/arm/internals.h | 8 --------
> target/arm/v7m_helper.c | 10 +++++-----
> 2 files changed, 5 insertions(+), 13 deletions(-)
>
> diff --git a/target/arm/internals.h b/target/arm/internals.h
> index 1d15af3f8b..fe9e4665e2 100644
> --- a/target/arm/internals.h
> +++ b/target/arm/internals.h
> @@ -1043,12 +1043,4 @@ bool pmsav8_mpu_lookup(CPUARMState *env, uint32_t
> address,
> int *prot, bool *is_subpage,
> ARMMMUFaultInfo *fi, uint32_t *mregion);
>
> -void write_v7m_control_spsel_for_secstate(CPUARMState *env,
> - bool new_spsel,
> - bool secstate);
> -
> -void write_v7m_control_spsel(CPUARMState *env, bool new_spsel);
> -
> -void switch_v7m_security_state(CPUARMState *env, bool new_secstate);
> -
> #endif
> diff --git a/target/arm/v7m_helper.c b/target/arm/v7m_helper.c
> index b50bb98e06..aa6a08e326 100644
> --- a/target/arm/v7m_helper.c
> +++ b/target/arm/v7m_helper.c
> @@ -94,9 +94,9 @@ uint32_t HELPER(v7m_tt)(CPUARMState *env, uint32_t addr,
> uint32_t op)
> * stack pointers if it is done for the CONTROL register for the current
> * security state.
> */
> -void write_v7m_control_spsel_for_secstate(CPUARMState *env,
> - bool new_spsel,
> - bool secstate)
> +static void write_v7m_control_spsel_for_secstate(CPUARMState *env,
> + bool new_spsel,
> + bool secstate)
> {
> bool old_is_psp = v7m_using_psp(env);
>
> @@ -121,13 +121,13 @@ void write_v7m_control_spsel_for_secstate(CPUARMState
> *env,
> * Write to v7M CONTROL.SPSEL bit. This may change the current
> * stack pointer between Main and Process stack pointers.
> */
> -void write_v7m_control_spsel(CPUARMState *env, bool new_spsel)
> +static void write_v7m_control_spsel(CPUARMState *env, bool new_spsel)
> {
> write_v7m_control_spsel_for_secstate(env, new_spsel, env->v7m.secure);
> }
>
> /* Switch M profile security state between NS and S */
> -void switch_v7m_security_state(CPUARMState *env, bool new_secstate)
> +static void switch_v7m_security_state(CPUARMState *env, bool new_secstate)
> {
> uint32_t new_ss_msp, new_ss_psp;
--
Alex Bennée
- Re: [Qemu-devel] [Qemu-arm] [PATCH v2 03/23] target/arm: Makefile cleanup (KVM), (continued)
- [Qemu-devel] [PATCH v2 04/23] target/arm: Makefile cleanup (softmmu), Philippe Mathieu-Daudé, 2019/06/15
- [Qemu-devel] [PATCH v2 09/23] target/arm: Move code around, Philippe Mathieu-Daudé, 2019/06/15
- [Qemu-devel] [PATCH v2 07/23] target/arm: Declare some function publicly, Philippe Mathieu-Daudé, 2019/06/15
- [Qemu-devel] [PATCH v2 06/23] target/arm: Fix multiline comment syntax, Philippe Mathieu-Daudé, 2019/06/15
- [Qemu-devel] [PATCH v2 13/23] target/arm: Make the v7-M Security State routines, Philippe Mathieu-Daudé, 2019/06/15
- Re: [Qemu-devel] [Qemu-arm] [PATCH v2 13/23] target/arm: Make the v7-M Security State routines,
Alex Bennée <=
- [Qemu-devel] [PATCH v2 08/23] target/arm: Move all v7m insn helpers into their own file, Philippe Mathieu-Daudé, 2019/06/15
- [Qemu-devel] [PATCH v2 14/23] target/arm: Move the DC ZVA helper into op_helper, Philippe Mathieu-Daudé, 2019/06/15
- [Qemu-devel] [PATCH v2 17/23] target/arm: Fix coding style issues, Philippe Mathieu-Daudé, 2019/06/15
- [Qemu-devel] [PATCH v2 11/23] target/arm: Declare v7m_cpacr_pass() publicly, Philippe Mathieu-Daudé, 2019/06/15
- [Qemu-devel] [PATCH v2 10/23] target/arm: Move the v7-M Security State helpers to v7m_helper, Philippe Mathieu-Daudé, 2019/06/15