public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [BOOT-WRAPPER v2 00/10] Cleanup initialization
@ 2024-08-12 10:15 Mark Rutland
  2024-08-12 10:15 ` [BOOT-WRAPPER v2 01/10] aarch64: Remove redundant EL1 entry logic Mark Rutland
                   ` (9 more replies)
  0 siblings, 10 replies; 30+ messages in thread
From: Mark Rutland @ 2024-08-12 10:15 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: akos.denke, andre.przywara, luca.fancellu, mark.rutland, maz

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.

Since v1 [1]:
* Retain SPSR.T bit handling; necessary for PSCI
* Comment on handling of CNTFRQ_EL0 when not entered at the highest EL
* Fix missing braces in cpu_init_psci_arch()
* Add Marc's Acked-by tag series-wide

[1] https://lore.kernel.org/linux-arm-kernel/20240729161501.1806271-1-mark.rutland@arm.com/

Mark.

Mark Rutland (10):
  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                          | 62 ++++---------
 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, 224 insertions(+), 164 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

-- 
2.30.2



^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2024-08-22 10:03 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-12 10:15 [BOOT-WRAPPER v2 00/10] Cleanup initialization Mark Rutland
2024-08-12 10:15 ` [BOOT-WRAPPER v2 01/10] aarch64: Remove redundant EL1 entry logic Mark Rutland
2024-08-12 17:37   ` Andre Przywara
2024-08-12 10:15 ` [BOOT-WRAPPER v2 02/10] aarch64: Implement cpu_init_arch() Mark Rutland
2024-08-13 17:13   ` Andre Przywara
2024-08-12 10:15 ` [BOOT-WRAPPER v2 03/10] aarch64: Always enter kernel via exception return Mark Rutland
2024-08-13 17:14   ` Andre Przywara
2024-08-12 10:15 ` [BOOT-WRAPPER v2 04/10] aarch32: Refactor inital entry Mark Rutland
2024-08-19 17:21   ` Andre Przywara
2024-08-12 10:15 ` [BOOT-WRAPPER v2 05/10] aarch32: Implement cpu_init_arch() Mark Rutland
2024-08-19 17:21   ` Andre Przywara
2024-08-12 10:15 ` [BOOT-WRAPPER v2 06/10] aarch32: Always enter kernel via exception return Mark Rutland
2024-08-19 17:22   ` Andre Przywara
2024-08-20 11:43     ` Mark Rutland
2024-08-20 12:59       ` Andre Przywara
2024-08-20 13:36         ` Mark Rutland
2024-08-20 13:50           ` Andre Przywara
2024-08-20 11:47     ` Mark Rutland
2024-08-20 12:23       ` Andre Przywara
2024-08-12 10:15 ` [BOOT-WRAPPER v2 07/10] Unify assembly setup paths Mark Rutland
2024-08-21 16:54   ` Andre Przywara
2024-08-22  9:50     ` Mark Rutland
2024-08-12 10:15 ` [BOOT-WRAPPER v2 08/10] Simplify spin logic Mark Rutland
2024-08-21 16:55   ` Andre Przywara
2024-08-22  9:54     ` Mark Rutland
2024-08-12 10:15 ` [BOOT-WRAPPER v2 09/10] Add printing functions Mark Rutland
2024-08-21 16:55   ` Andre Przywara
2024-08-12 10:15 ` [BOOT-WRAPPER v2 10/10] Boot CPUs sequentially Mark Rutland
2024-08-21 17:49   ` Andre Przywara
2024-08-22 10:02     ` Mark Rutland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox