Re: orangepi zero 3 fails to boot after hw.blockcpu patch
chara <[email protected]>
| Newsgroups | gmane.os.openbsd.misc |
|---|---|
| Message-ID | <[email protected]> |
Seems i have tested the wrong kernel. After booting the right one it boots (phew), But i get the some pledge errors, likely unrelated to the patch, but i think those relate to commit i put those on. Commit i applied patches is (i think this might be a bit earlier than release commit): commit bb8e03cabd2f8e2503e178dd95d38b806dea3e1a (HEAD) Author: jsg <[email protected]> Date: Mon Apr 20 00:18:21 2026 +0000 7.9-current ok deraadt@ How do i find the commit that relates to 7.9-release tree in git? boot log: boot> boot /7.9-with-patches booting sd0a:/7.9-with-patches: 12761784+3011192+323688+870048 [1115505+91+1405392+903591]=0x1667b58 type 0x0 pa 0x40000000 va 0x40000000 pages 0x40 attr 0x8 type 0x7 pa 0x40040000 va 0x40040000 pages 0x1c0 attr 0x8 type 0x1 pa 0x40200000 va 0x40200000 pages 0x4000 attr 0x8 type 0x7 pa 0x44200000 va 0x44200000 pages 0x36b8f attr 0x8 type 0x2 pa 0x7ad8f000 va 0x7ad8f000 pages 0x7 attr 0x8 type 0x4 pa 0x7ad96000 va 0x7ad96000 pages 0x1 attr 0x8 type 0x7 pa 0x7ad97000 va 0x7ad97000 pages 0x1 attr 0x8 type 0x2 pa 0x7ad98000 va 0x7ad98000 pages 0x100 attr 0x8 type 0x1 pa 0x7ae98000 va 0x7ae98000 pages 0x39 attr 0x8 type 0x4 pa 0x7aed1000 va 0x7aed1000 pages 0x3 attr 0x8 type 0x9 pa 0x7aed4000 va 0x7aed4000 pages 0x9 attr 0x8 type 0x4 pa 0x7aedd000 va 0x7aedd000 pages 0x4 attr 0x8 type 0x9 pa 0x7aee1000 va 0x7aee1000 pages 0x9 attr 0x8 type 0x4 pa 0x7aeea000 va 0x7aeea000 pages 0x1 attr 0x8 type 0x6 pa 0x7aeeb000 va 0x7aeeb000 pages 0x1 attr 0x8000000000000008 type 0x4 pa 0x7aeec000 va 0x7aeec000 pages 0x3 attr 0x8 type 0x6 pa 0x7aeef000 va 0x7aeef000 pages 0x1 attr 0x8000000000000008 type 0x4 pa 0x7aef0000 va 0x7aef0000 pages 0x1 attr 0x8 type 0x6 pa 0x7aef1000 va 0x7aef1000 pages 0x2 attr 0x8000000000000008 type 0x4 pa 0x7aef3000 va 0x7aef3000 pages 0x1 attr 0x8 type 0x6 pa 0x7aef4000 va 0x7aef4000 pages 0x10 attr 0x8000000000000008 type 0x4 pa 0x7af04000 va 0x7af04000 pages 0x9 attr 0x8 type 0x3 pa 0x7af0d000 va 0x7af0d000 pages 0x5023 attr 0x8 type 0x5 pa 0x7ff30000 va 0x7ff30000 pages 0x10 attr 0x8000000000000008 type 0x3 pa 0x7ff40000 va 0x7ff40000 pages 0xc0 attr 0x8 [ using 3425360 bytes of bsd ELF symbol table ] Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. Copyright (c) 1995-2026 OpenBSD. All rights reserved. https://www.OpenBSD.org OpenBSD 7.9-current (GENERIC.MP) #3: Sat Aug 15 20:01:08 +0330 2026 [email protected]:/usr/src/sys/arch/arm64/compile/GENERIC.MP real mem = 1071947776 (1022MB) avail mem = 995954688 (949MB) random: good seed from bootblocks mainbus0 at root: OrangePi Zero3 psci0 at mainbus0: PSCI 1.1, SMCCC 1.4 efi0 at mainbus0: UEFI 2.10 efi0: Das U-Boot rev 0x20231000 smbios0 at efi0: SMBIOS 3.0 smbios0: vendor U-Boot version "2023.10-rc4-00039-g252592214f-dirty" date 10/01/2023 smbios0: Unknown Unknown Product cpu0 at mainbus0 mpidr 0: ARM Cortex-A53 r0p4 cpu0: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache cpu0: 1024KB 64b/line 16-way L2 cache cpu0: CRC32,SHA2,SHA1,AES+PMULL,ASID16 cpu1 at mainbus0 mpidr 1: ARM Cortex-A53 r0p4 cpu1: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache cpu1: 1024KB 64b/line 16-way L2 cache cpu2 at mainbus0 mpidr 2: ARM Cortex-A53 r0p4 cpu2: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache cpu2: 1024KB 64b/line 16-way L2 cache cpu3 at mainbus0 mpidr 3: ARM Cortex-A53 r0p4 cpu3: 32KB 64b/line 2-way L1 VIPT I-cache, 32KB 64b/line 4-way L1 D-cache cpu3: 1024KB 64b/line 16-way L2 cache "secmon" at mainbus0 not configured apm0 at mainbus0 "osc24M-clk" at mainbus0 not configured "pmu" at mainbus0 not configured agtimer0 at mainbus0: 24000 kHz simplebus0 at mainbus0: "soc" sxisyscon0 at simplebus0 sxiccmu0 at simplebus0 sxisid0 at simplebus0 sxipio0 at simplebus0: 85 pins ampintc0 at simplebus0 nirq 192, ncpu 4 ipi 0: "interrupt-controller" sxirtc0 at simplebus0 sxiccmu1 at simplebus0 sxipio1 at simplebus0: 2 pins sxitwi0 at simplebus0 iic0 at sxitwi0 axppmic0 at iic0 addr 0x36: AXP313A "crypto" at simplebus0 not configured "dma-controller" at simplebus0 not configured sxidog0 at simplebus0 "iommu" at simplebus0 not configured sximmc0 at simplebus0 sdmmc0 at sximmc0: 4-bit, sd high-speed, mmc high-speed, dma com0 at simplebus0: dw16550 com0: console "spi" at simplebus0 not configured dwxe0 at simplebus0: address 02:00:ad:4c:7f:8c ytphy0 at dwxe0 phy 1: YT8531, rev. 11 "thermal-sensor" at simplebus0 not configured "codec" at simplebus0 not configured "usb" at simplebus0 not configured "phy" at simplebus0 not configured ehci0 at simplebus0 usb0 at ehci0: USB revision 2.0 uhub0 at usb0 configuration 1 interface 0 "Generic EHCI root hub" rev 2.00/1.00 addr 1 ohci0 at simplebus0: version 1.0 "interrupt-controller" at simplebus0 not configured gpio0 at sxipio0: 32 pins gpio1 at sxipio0: 32 pins gpio2 at sxipio0: 32 pins gpio3 at sxipio0: 32 pins gpio4 at sxipio0: 32 pins gpio5 at sxipio0: 32 pins gpio6 at sxipio0: 32 pins gpio7 at sxipio0: 32 pins gpio8 at sxipio0: 32 pins gpio9 at sxipio1: 32 pins usb1 at ohci0: USB revision 1.0 uhub1 at usb1 configuration 1 interface 0 "Generic OHCI root hub" rev 1.00/1.00 addr 1 gpioleds0 at mainbus0: "power" "vcc5v" at mainbus0 not configured "regulator-usb1-vbus" at mainbus0 not configured "opp-table-cpu" at mainbus0 not configured scsibus0 at sdmmc0: 2 targets, initiator 0 sd0 at scsibus0 targ 1 lun 0: <SD/MMC, LX64G, 0010> removable sd0: 60350MB, 512 bytes/sector, 123596800 sectors vscsi0 at root scsibus1 at vscsi0: 256 targets softraid0 at root scsibus2 at softraid0: 256 targets root on sd0a (39a7d86909d424fd.a) swap on sd0b dump on sd0b Automatic boot in progress: starting file system checks. /dev/sd0a (39a7d86909d424fd.a): file system is clean; not checking /dev/sd0h (39a7d86909d424fd.h): file system is clean; not checking /dev/sd0d (39a7d86909d424fd.d): file system is clean; not checking /dev/sd0f (39a7d86909d424fd.f): file system is clean; not checking /dev/sd0g (39a7d86909d424fd.g): file system is clean; not checking /dev/sd0e (39a7d86909d424fd.e): file system is clean; not checking pfctl: DIOCADDRULE: Operation not supported by device pf enabled starting network reordering: ld.so libcfile[95271]: pledge "rpath", syscall 5 libcryptofile[79048]: pledge "rpath", syscall 5 sshd sshd-session sshd-auth ssh-agent. pfctl: DIOCADDRULE: Operation not supported by device starting early daemons: syslogd(failed) pflogd(failed) ntpd(failed). starting RPC daemons:. savecore: no core dump checking quotas: done. clearing /tmp kern.securelevel: 0 -> 1 creating runtime link editor directory cache. ldconfig: pledge: Invalid argument preserving editor files. starting network daemons: sshd(failed) smtpd(failed) sndiod(failed). starting local daemons: cron(failed). date[76741]: pledge "rpath", syscall 5 Abort trap (core dumped) OpenBSD/arm64 (opiz3.my.domain) (console) login: On Fri, 14 Aug 2026 19:21:56 +0200 Mark Kettenis <[email protected]> wrote: > > Date: Fri, 14 Aug 2026 04:00:59 +0330 > > From: chara <[email protected]> > > > > Hi there, hope you all be well. > > > > I have a orange pi zero 3, which has a allwinner h618 (cortext A53). > > > > It used to work well (mostly) until 7.9, bisecting it and found out > > the offending commit is '6159827a9df06769a0823fbf9738555785b69e8c' (git hash). > > > > Does this patch fix the issue? > > Index: arch/arm64/arm64/cpu.c > =================================================================== > RCS file: /cvs/src/sys/arch/arm64/arm64/cpu.c,v > diff -u -p -r1.149 cpu.c > --- arch/arm64/arm64/cpu.c 23 Jun 2026 11:45:54 -0000 1.149 > +++ arch/arm64/arm64/cpu.c 14 Aug 2026 17:21:08 -0000 > @@ -1772,12 +1772,13 @@ cpu_attach(struct device *parent, struct > cpu_kstat_attach(ci); > #endif > > - ci->ci_capacity = OF_getpropint(ci->ci_node, "capacity-dmips-mhz", 0); > opp = OF_getpropint(ci->ci_node, "operating-points-v2", 0); > - if (opp) { > + if (opp) > cpu_opp_init(ci, opp); > + > + ci->ci_capacity = OF_getpropint(ci->ci_node, "capacity-dmips-mhz", 0); > + if (ci->ci_opp_table) > ci->ci_capacity *= ci->ci_opp_table->ot_opp_hz_max / 1000000; > - } > cpu_classify(); > > cpu_psci_init(ci); > Index: arch/arm64/arm64/machdep.c > =================================================================== > RCS file: /cvs/src/sys/arch/arm64/arm64/machdep.c,v > diff -u -p -r1.100 machdep.c > --- arch/arm64/arm64/machdep.c 7 Jul 2026 12:12:44 -0000 1.100 > +++ arch/arm64/arm64/machdep.c 14 Aug 2026 17:21:08 -0000 > @@ -1025,7 +1025,7 @@ initarm(struct arm64_bootparams *abp) > * EfiLoaderData so it won't be added here. > */ > for (i = 0; i < mmap_size / mmap_desc_size; i++) { > -#ifdef MMAP_DEBUG > +#ifndef MMAP_DEBUG > printf("type 0x%x pa 0x%llx va 0x%llx pages 0x%llx attr 0x%llx\n", > desc->Type, desc->PhysicalStart, > desc->VirtualStart, desc->NumberOfPages, > -- chara <[email protected]>