Re: [RFC PATCH 00/18] aarch64: kernel-side update for upstream (April 2024 ABI follow-up) + tests

Samuel Thibault <[email protected]>
Newsgroups gmane.os.hurd.bugs
Organization I am not organized
Message-ID <ahyiTPM617-uhq1K@end>
Hello,

Thanks for reviving the effort :D

I have pushed a few trivial patches which don't even pose copyright
questions. I let you discuss with Sergey and Jessica :)

Samuel

Paulo Duarte, le dim. 24 mai 2026 02:43:04 +0100, a ecrit:
> Hello Samuel,
> 
> This series adds the gnumach kernel-side implementation for the
> aarch64 ABI Sergey landed in April 2024, plus the test-suite arms.
> Patch 01 brings in the aarch64-only sources from bugaevc/wip-aarch64
> verbatim, with Sergey as Author; the rest is mine.
> 
> The meaningful divergence from wip-aarch64 is what I left out:
> roughly 150 files of cross-arch refactoring across kern/, ipc/, vm/,
> device/intr.{c,h}, and the i386 tree. Each got replaced with a
> smaller per-arch shim under aarch64/ so kern/bootstrap.c,
> device/intr.{c,h}, kern/lock.h, and the i386 trees all stay
> bit-identical to current master. The shared-file footprint outside
> aarch64/ is four files: a new ELF constant, two missing decls plus
> their include, and a linker-symbol filter extension.
> 
> The bootstrap reader handles two DTB conventions:
> /chosen/multiboot,module (Sergey's, multi-module, fed by u-boot's
> `fdt mknod` per aarch64/BOOTING) and the standard arm64
> /chosen/linux,initrd-* so any stock bootloader works. Tests use the
> multiboot,module path; linux,initrd runs but QEMU's `-initrd`
> placement bumps into the single-segment vm_page heap. A
> multi-segment heap is on my follow-up list.
> 
> Patches 11 and 12 each bundle two fixes that surfaced together when
> I first delivered a bootstrap module end-to-end and ran
> tests/test-thread-state-fp. I haven't reproduced them against
> wip-aarch64 directly (at least the kvtophys-contract half of patch
> 11 plausibly belongs to this series' integration with upstream's
> bootstrap.c rather than the imported code), but the fixes are needed
> either way. Splits are recoverable if anyone would rather review
> them separately.
> 
> Tested: 12/12 pass on x86_64, i686, and aarch64 under qemu. No
> bare-metal validation yet. I plan to build bootable images and boot
> the kernel on Apple M1 / Raspberry Pi (aarch64) and an x86_64 box
> (x86_64 + i686). Help on any of these welcome.
> 
> I used substantial AI assistance (Claude Code) on this. Every line is
> mine and the FSF assignment is on its way. Disclosing in the cover
> rather than per-commit since bug-hurd has no precedent either way;
> happy to add `Assisted-by:` per the Linux kernel's December 2025 form
> (https://docs.kernel.org/process/coding-assistants.html) if you'd
> rather see that.
> 
> Sergey, especially interested in your read on patches 2 and 10's
> choice of small per-arch shims over rewriting shared code, and on
> whether the four test-time bugs in 11-12 read as wip-aarch64-inherent
> or as artefacts of how this series wires the import to upstream's
> bootstrap.c.
> 
> Published at:
>   https://github.com/paulofduarte/gnumach/tree/aarch64-tests
> 
> Paulo
> 
> Paulo Duarte (17):
>   aarch64: add per-arch lock.h shim for kern/lock.h's machine include
>   aarch64: drop the ramdisk driver from the import
>   aarch64: stub hpclock hooks for current master's clock subsystem
>   mach: add EM_AARCH64 to the ELF machine constant list
>   ipc: declare copyinmsg / copyoutmsg in <ipc/copy_user.h>
>   build: extend ld_magic_routines for the aarch64 PIE kernel
>   aarch64: move boot stack out of .bss so zero_out_bss doesn't clobber
>     it
>   device/dtb: read 8-byte cells as two 4-byte loads to survive pre-MMU
>     access
>   aarch64: route bootstrap modules through kern/bootstrap.c
>   aarch64: complete end-to-end bootstrap module delivery
>   aarch64: fix AARCH64_FLOAT_STATE save/restore and setstatus alignment
>   aarch64: accept linux,initrd-* DTB nodes as bootstrap modules
>   tests: add aarch64 arm to start.S
>   tests: support aarch64 in the test harness (u-boot + multiboot,module)
>   tests: add aarch64 arm to testlib_thread_start.c
>   tests: aarch64 arms for the per-arch test bodies
>   tests: dedicated multiboot,module DTB bootstrap test (aarch64)
> 
> Sergey Bugaev (1):
>   aarch64: import the kernel-side port from bugaevc/wip-aarch64
> 
>  Makefile.am                                   |    5 +-
>  aarch64/BOOTING                               |   62 +
>  aarch64/Makefrag.am                           |   80 ++
>  aarch64/aarch64/aarch64asm.sym                |   41 +
>  aarch64/aarch64/bits/esr.h                    |   84 ++
>  aarch64/aarch64/bits/hcr.h                    |   17 +
>  aarch64/aarch64/bits/id_aa64.h                |  148 ++
>  aarch64/aarch64/bits/mair.h                   |   12 +
>  aarch64/aarch64/bits/pte.h                    |   33 +
>  aarch64/aarch64/bits/sctlr.h                  |   20 +
>  aarch64/aarch64/bits/spsr.h                   |   42 +
>  aarch64/aarch64/bits/tcr.h                    |   18 +
>  aarch64/aarch64/boot.S                        |  106 ++
>  aarch64/aarch64/conf.c                        |   53 +
>  aarch64/aarch64/cpu_number.h                  |   36 +
>  aarch64/aarch64/cswitch.S                     |   97 ++
>  aarch64/aarch64/db_machdep.h                  |   25 +
>  aarch64/aarch64/fpu.c                         |  157 +++
>  aarch64/aarch64/fpu.h                         |   27 +
>  aarch64/aarch64/hwcaps.c                      |  164 +++
>  aarch64/aarch64/hwcaps.h                      |   31 +
>  aarch64/aarch64/ipl.h                         |   24 +
>  aarch64/aarch64/irq.c                         |   29 +
>  aarch64/aarch64/irq.h                         |   76 +
>  aarch64/aarch64/lock.h                        |   33 +
>  aarch64/aarch64/locore.S                      |  837 +++++++++++
>  aarch64/aarch64/locore.h                      |   50 +
>  aarch64/aarch64/loose_ends.h                  |   24 +
>  aarch64/aarch64/mach_aarch64.c                |   45 +
>  aarch64/aarch64/mach_param.h                  |   24 +
>  aarch64/aarch64/machine_routines.h            |   27 +
>  aarch64/aarch64/model_dep.c                   |  527 +++++++
>  aarch64/aarch64/model_dep.h                   |   61 +
>  aarch64/aarch64/mp_desc.h                     |   22 +
>  aarch64/aarch64/pcb.c                         |  396 ++++++
>  aarch64/aarch64/pcb.h                         |   66 +
>  aarch64/aarch64/percpu.c                      |   28 +
>  aarch64/aarch64/percpu.h                      |   68 +
>  aarch64/aarch64/pmap.c                        | 1248 +++++++++++++++++
>  aarch64/aarch64/pmap.h                        |   95 ++
>  aarch64/aarch64/setjmp.h                      |   19 +
>  aarch64/aarch64/smp.h                         |   29 +
>  aarch64/aarch64/spl.h                         |  100 ++
>  aarch64/aarch64/strings.c                     |   59 +
>  aarch64/aarch64/task.c                        |   38 +
>  aarch64/aarch64/task.h                        |   55 +
>  aarch64/aarch64/thread.h                      |   67 +
>  aarch64/aarch64/trap.c                        |  683 +++++++++
>  aarch64/aarch64/trap.h                        |   47 +
>  aarch64/aarch64/undef.c                       |   31 +
>  aarch64/aarch64/vm_param.h                    |   56 +
>  aarch64/aarch64/xpr.h                         |   25 +
>  aarch64/arm/gic-v2.c                          |  194 +++
>  aarch64/arm/gic-v2.h                          |   38 +
>  aarch64/arm/pl011.c                           |  207 +++
>  aarch64/arm/pl011.h                           |   24 +
>  aarch64/arm/psci.c                            |  152 ++
>  aarch64/arm/psci.h                            |   29 +
>  aarch64/arm/timer.c                           |  115 ++
>  aarch64/arm/timer.h                           |   29 +
>  aarch64/configfrag.ac                         |    4 +
>  aarch64/include/mach/aarch64/exception.h      |   25 +-
>  aarch64/include/mach/aarch64/exec/elf.h       |   44 +
>  .../include/mach/aarch64/mach_aarch64.defs    |    2 +-
>  .../include/mach/aarch64/mach_aarch64_types.h |    2 +-
>  .../include/mach/aarch64/machine_types.defs   |   21 +-
>  aarch64/include/mach/aarch64/multiboot.h      |   61 +
>  aarch64/include/mach/aarch64/thread_status.h  |    2 +
>  aarch64/include/mach/aarch64/vm_param.h       |    4 +
>  aarch64/ldscript                              |   35 +
>  device/dtb.c                                  |  440 ++++++
>  device/dtb.h                                  |  123 ++
>  include/mach/exec/elf.h                       |    1 +
>  ipc/copy_user.h                               |   15 +
>  kern/exception.c                              |    1 +
>  tests/Makefrag.am                             |   24 +-
>  tests/run-multiboot-module-qemu.sh.template   |   45 +
>  tests/run-qemu.sh.template                    |    2 +-
>  tests/start.S                                 |   10 +
>  tests/test-machmsg.c                          |   15 +
>  tests/test-syscalls.c                         |   83 +-
>  tests/test-thread-state-fp.c                  |  123 ++
>  tests/testlib_thread_start.c                  |   21 +
>  tests/uboot.script.template                   |   71 +
>  tests/user-qemu.mk                            |  135 +-
>  85 files changed, 8203 insertions(+), 41 deletions(-)
>  create mode 100644 aarch64/BOOTING
>  create mode 100644 aarch64/aarch64/aarch64asm.sym
>  create mode 100644 aarch64/aarch64/bits/esr.h
>  create mode 100644 aarch64/aarch64/bits/hcr.h
>  create mode 100644 aarch64/aarch64/bits/id_aa64.h
>  create mode 100644 aarch64/aarch64/bits/mair.h
>  create mode 100644 aarch64/aarch64/bits/pte.h
>  create mode 100644 aarch64/aarch64/bits/sctlr.h
>  create mode 100644 aarch64/aarch64/bits/spsr.h
>  create mode 100644 aarch64/aarch64/bits/tcr.h
>  create mode 100644 aarch64/aarch64/boot.S
>  create mode 100644 aarch64/aarch64/conf.c
>  create mode 100644 aarch64/aarch64/cpu_number.h
>  create mode 100644 aarch64/aarch64/cswitch.S
>  create mode 100644 aarch64/aarch64/db_machdep.h
>  create mode 100644 aarch64/aarch64/fpu.c
>  create mode 100644 aarch64/aarch64/fpu.h
>  create mode 100644 aarch64/aarch64/hwcaps.c
>  create mode 100644 aarch64/aarch64/hwcaps.h
>  create mode 100644 aarch64/aarch64/ipl.h
>  create mode 100644 aarch64/aarch64/irq.c
>  create mode 100644 aarch64/aarch64/irq.h
>  create mode 100644 aarch64/aarch64/lock.h
>  create mode 100644 aarch64/aarch64/locore.S
>  create mode 100644 aarch64/aarch64/locore.h
>  create mode 100644 aarch64/aarch64/loose_ends.h
>  create mode 100644 aarch64/aarch64/mach_aarch64.c
>  create mode 100644 aarch64/aarch64/mach_param.h
>  create mode 100644 aarch64/aarch64/machine_routines.h
>  create mode 100644 aarch64/aarch64/model_dep.c
>  create mode 100644 aarch64/aarch64/model_dep.h
>  create mode 100644 aarch64/aarch64/mp_desc.h
>  create mode 100644 aarch64/aarch64/pcb.c
>  create mode 100644 aarch64/aarch64/pcb.h
>  create mode 100644 aarch64/aarch64/percpu.c
>  create mode 100644 aarch64/aarch64/percpu.h
>  create mode 100644 aarch64/aarch64/pmap.c
>  create mode 100644 aarch64/aarch64/pmap.h
>  create mode 100644 aarch64/aarch64/setjmp.h
>  create mode 100644 aarch64/aarch64/smp.h
>  create mode 100644 aarch64/aarch64/spl.h
>  create mode 100644 aarch64/aarch64/strings.c
>  create mode 100644 aarch64/aarch64/task.c
>  create mode 100644 aarch64/aarch64/task.h
>  create mode 100644 aarch64/aarch64/thread.h
>  create mode 100644 aarch64/aarch64/trap.c
>  create mode 100644 aarch64/aarch64/trap.h
>  create mode 100644 aarch64/aarch64/undef.c
>  create mode 100644 aarch64/aarch64/vm_param.h
>  create mode 100644 aarch64/aarch64/xpr.h
>  create mode 100644 aarch64/arm/gic-v2.c
>  create mode 100644 aarch64/arm/gic-v2.h
>  create mode 100644 aarch64/arm/pl011.c
>  create mode 100644 aarch64/arm/pl011.h
>  create mode 100644 aarch64/arm/psci.c
>  create mode 100644 aarch64/arm/psci.h
>  create mode 100644 aarch64/arm/timer.c
>  create mode 100644 aarch64/arm/timer.h
>  create mode 100644 aarch64/include/mach/aarch64/exec/elf.h
>  create mode 100644 aarch64/include/mach/aarch64/multiboot.h
>  create mode 100644 aarch64/ldscript
>  create mode 100644 device/dtb.c
>  create mode 100644 device/dtb.h
>  create mode 100644 tests/run-multiboot-module-qemu.sh.template
>  create mode 100644 tests/uboot.script.template
> 
> -- 
> 2.54.0
> 

-- 
Samuel
Actually, typing random strings in the Finder does the equivalent of
filename completion.
(Discussion in comp.os.linux.misc on the intuitiveness of commands: file
completion vs. the Mac Finder.)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.