[BOOT-WRAPPER 00/11] Cleanup initialization

Marc Zyngier maz at kernel.org
Fri Aug 2 03:18:05 PDT 2024


On Mon, 29 Jul 2024 17:14:50 +0100,
Mark Rutland <mark.rutland at arm.com> wrote:
> 
> These patches cleanup the boot-wrapper initialization logic to make it
> more consistent and easier to extend in C code in future. The big
> changes are:
> 
> * The kernel is always entered via an exception return. This allows us
>   to initialize PSTATE consistently, and will allow us to adjust the
>   SPSR dynamically in C code in future if necessary.
> 
> * Regardless of the entered exception level, CPU state is initialized
>   under cpu_init_arch(), allowing for logic to be shared regardless of
>   which exception level was entered.
> 
> * CPUs are initialized sequentially, which allows better for better
>   logging within the boot-wrapper.
> 
> Mark.
> 
> Mark Rutland (11):
>   Always enter AArch32 kernels in ARM mode
>   aarch64: Remove redundant EL1 entry logic
>   aarch64: Implement cpu_init_arch()
>   aarch64: Always enter kernel via exception return
>   aarch32: Refactor inital entry
>   aarch32: Implement cpu_init_arch()
>   aarch32: Always enter kernel via exception return
>   Unify assembly setup paths
>   Simplify spin logic
>   Add printing functions
>   Boot CPUs sequentially
> 
>  arch/aarch32/boot.S                          | 95 ++++++++++----------
>  arch/aarch32/include/asm/{gic-v3.h => gic.h} |  2 +-
>  arch/aarch32/init.c                          | 30 +++++--
>  arch/aarch64/boot.S                          | 66 ++++----------
>  arch/aarch64/include/asm/{gic-v3.h => gic.h} |  2 +-
>  arch/aarch64/init.c                          | 30 +++++--
>  arch/aarch64/spin.S                          | 14 +--
>  common/boot.c                                | 20 ++---
>  common/gic-v3.c                              |  2 +-
>  common/gic.c                                 |  2 +-
>  common/init.c                                | 50 +++++++++--
>  common/platform.c                            | 35 ++++++++
>  common/psci.c                                | 16 +---
>  include/boot.h                               |  8 +-
>  include/gic.h                                | 16 ++++
>  include/platform.h                           |  4 +
>  16 files changed, 221 insertions(+), 171 deletions(-)
>  rename arch/aarch32/include/asm/{gic-v3.h => gic.h} (91%)
>  rename arch/aarch64/include/asm/{gic-v3.h => gic.h} (92%)
>  create mode 100644 include/gic.h

This looks good to me. With the issue reported by Lucas fixed and an
extra comment in patch #3:

Acked-by: Marc Zyngier <maz at kernel.org>

	M.

-- 
Without deviation from the norm, progress is not possible.



More information about the linux-arm-kernel mailing list