Hi Mark,
Thanks for the reply and the diff!
On Sat, Jul 04, 2020 at 12:19:59AM +0200, Mark Kettenis wrote:
| That probably means Paul is using somewhat broken firmware.
pkg_info says I have:
raspberrypi-firmware-1.20200212 Raspberry Pi firmware
Is there something else I should have or do?
| Anyway, I think the problem is that OF_finddevice() returns -1 if the
| node can't be found. Does the following diff help?
It does allow the system to boot to multiuser (so the data_abort+0x68
is gone). The 'failed to spin up' lines now show up a lot earlier in
dmesg, after cpu0 attaches. See below for full dmesg.
For completeness, the machine still doesn't shutdown properly (need to
powercycle it to bring it back).
Cheers,
Paul
OpenBSD 6.7-current (GENERIC.MP) #2: Sat Jul 4 17:12:49 CEST 2020
[email protected]:/usr/src/sys/arch/arm64/compile/GENERIC.MP
real mem = 953442304 (909MB)
avail mem = 891834368 (850MB)
random: good seed from bootblocks
mainbus0 at root: Raspberry Pi 3 Model B Rev 1.2
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: 512KB 64b/line 16-way L2 cache
cpu1 at mainbus0 mpidr 1: failed to spin up
cpu2 at mainbus0 mpidr 2: failed to spin up
cpu3 at mainbus0 mpidr 3: failed to spin up
efi0 at mainbus0: UEFI 2.0.5
efi0: Das U-boot rev 0x0
apm0 at mainbus0
simplefb0 at mainbus0: 656x416, 32bpp
wsdisplay0 at simplefb0 mux 1
wsdisplay0: screen 0-5 added (std, vt100 emulation)
"system" at mainbus0 not configured
"axi" at mainbus0 not configured
simplebus0 at mainbus0: "soc"
bcmdmac0 at simplebus0: DMA2 DMA4 DMA5 DMA8 DMA9 DMA10
bcmintc0 at simplebus0
bcmmbox0 at simplebus0
bcmgpio0 at simplebus0
syscon0 at simplebus0: "syscon"
bcmdog0 at simplebus0
bcmrng0 at simplebus0
pluart0 at simplebus0
bcmsdhost0 at simplebus0: 250 MHz base clock
sdmmc0 at bcmsdhost0: 4-bit, sd high-speed, mmc high-speed, dma
com0 at simplebus0: ns16550, no working fifo
com0: console
"mmc" at simplebus0 not configured
dwctwo0 at simplebus0
"firmware" at simplebus0 not configured
"power" at simplebus0 not configured
"leds" at simplebus0 not configured
"fb" at simplebus0 not configured
"vchiq" at simplebus0 not configured
"thermal" at simplebus0 not configured
"local_intc" at simplebus0 not configured
"arm-pmu" at simplebus0 not configured
"gpiomem" at simplebus0 not configured
agtimer0 at simplebus0: tick rate 19200 KHz
"virtgpio" at simplebus0 not configured
simplebus1 at mainbus0: "clocks"
"clock" at simplebus1 not configured
"clock" at simplebus1 not configured
"clock" at simplebus1 not configured
"clock" at simplebus1 not configured
"clock" at simplebus1 not configured
"clock" at simplebus1 not configured
"clock" at simplebus1 not configured
usb0 at dwctwo0: USB revision 2.0
sdmmc0: can't enable card
uhub0 at usb0 configuration 1 interface 0 "Broadcom DWC2 root hub" rev
2.00/1.00 addr 1
uhub1 at uhub0 port 1 configuration 1 interface 0 "Standard Microsystems
product 0x9514" rev 2.00/2.00 addr 2
smsc0 at uhub1 port 1 configuration 1 interface 0 "Standard Microsystems
SMSC9512/14" rev 2.00/2.00 addr 3
smsc0: address b8:27:eb:93:42:d5
ukphy0 at smsc0 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI
0x0001f0, model 0x000c
urtwn0 at uhub1 port 2 configuration 1 interface 0 "Realtek 802.11n NIC" rev
2.00/0.00 addr 4
urtwn0: MAC/BB RTL8188EU, RF 6052 1T1R, address ec:08:6b:07:c2:1c
umass0 at uhub1 port 4 configuration 1 interface 0 "SanDisk Ultra Fit" rev
2.10/1.00 addr 5
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <SanDisk, Ultra Fit, 1.00> removable
serial.07815583320220107303
sd0: 29327MB, 512 bytes/sector, 60062500 sectors
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
bootfile: sd0a:/bsd
boot device: sd0
root on sd0a (59de83c8e783b811.a) swap on sd0b dump on sd0b
WARNING: CHECK AND RESET THE DATE!
gpio0 at bcmgpio0: 54 pins
|
| Index: arch/arm64/dev/mainbus.c
| ===================================================================
| RCS file: /cvs/src/sys/arch/arm64/dev/mainbus.c,v
| retrieving revision 1.17
| diff -u -p -r1.17 mainbus.c
| --- arch/arm64/dev/mainbus.c 17 Jun 2020 08:00:22 -0000 1.17
| +++ arch/arm64/dev/mainbus.c 3 Jul 2020 22:16:43 -0000
| @@ -316,7 +316,7 @@ mainbus_attach_cpus(struct device *self,
| int acells, scells;
| char buf[32];
|
| - if (node == 0)
| + if (node == -1)
| return;
|
| acells = sc->sc_acells;
| @@ -369,7 +369,7 @@ mainbus_attach_psci(struct device *self)
| struct mainbus_softc *sc = (struct mainbus_softc *)self;
| int node = OF_finddevice("/psci");
|
| - if (node == 0)
| + if (node == -1)
| return;
|
| sc->sc_early = 1;
| @@ -384,7 +384,8 @@ mainbus_attach_efi(struct device *self)
| struct fdt_attach_args fa;
| int node = OF_finddevice("/chosen");
|
| - if (node == 0 || OF_getproplen(node, "openbsd,uefi-system-table") <= 0)
| + if (node == -1 ||
| + OF_getproplen(node, "openbsd,uefi-system-table") <= 0)
| return;
|
| memset(&fa, 0, sizeof(fa));
|
--
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
http://www.weirdnet.nl/