Date: Sun, 15 Mar 2020 21:10:55 -0700 From: Mark Millard <marklmi@yahoo.com> To: Kyle Evans <kevans@freebsd.org> Cc: bob prohaska <fbsd@www.zefox.net>, "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org> Subject: Re: Panic on Rpi3 at r358976 Message-ID: <5A11699F-7EDD-4541-82C0-62993C95EE72@yahoo.com> In-Reply-To: <CACNAnaFjdJg29Oc=FXb6f=3Z0vVPbGvJ4fXA%2Bm7UVFFZrGURkA@mail.gmail.com> References: <20200315041203.GA55605@www.zefox.net> <CACNAnaGuXH%2B3sB7qexz9-eC87=WmZrhwvuyb%2BkEMVdXPxB6LHQ@mail.gmail.com> <90DE70B3-F3A5-4EFE-832C-7C412744D974@yahoo.com> <CACNAnaFjdJg29Oc=FXb6f=3Z0vVPbGvJ4fXA%2Bm7UVFFZrGURkA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2020-Mar-15, at 19:03, Kyle Evans <kevans at freebsd.org> wrote: > On Sun, Mar 15, 2020 at 8:54 PM Mark Millard <marklmi@yahoo.com> = wrote: >>> On 2020-Mar-15, at 17:33, Kyle Evans <kevans at freebsd.org> wrote: >>=20 >>> On Sat, Mar 14, 2020 at 11:12 PM bob prohaska <fbsd@www.zefox.net> = wrote: >>>>=20 >>>> Tried to boot a kernel built from r358976 on a Pi3 and got a panic: >>>>=20 >>>> [... snip ...] >>>=20 >>> Hi, >>>=20 >>> I've got a patch against sysutils/u-boot-rpi{3,4} based on what I've >>> submitted upstream that I'm test-building again and will soon be >>> submitting to Phabricator; please give it a shot and confirm if it >>> makes life happier or not: >>> https://people.freebsd.org/~kevans/rpi-psci.diff >>=20 >> I grep'd in the area that holds where I did the >> investigative patch that enabled the RPi4 to boot >> and such without the armstub8-gic.bin memory being >> slamed. (I've not done any clean-out of the materials >> in that area.) >>=20 >> The result is not suggestive of CONFIG_RPI_EFI_NR_SPIN_PAGES >> making a difference: >>=20 >> [... snip ...] >=20 > Indeed; note these lines in my patch: >=20 > PATCHFILES+=3D 1245351/raw 1245352/raw >=20 > These pull in the patches I submitted upstream that introduces > CONFIG_RPI_EFI_NR_SPIN_PAGES so that they don't have to accept an > arbitrary bump of the reserved page count, since it's just our PSCI > stub that's larger. Sorry. The day has gone as one where I need to separately validate that I've not omitted something for pretty much whatever I was trying to do. I applied the patch and rebuilt and substituted the new u-boot.bin for my hacked one. The context is head -r358510 that was booting with my hack okay. (I'll soon be updating to -r358966 .) The result did not go well. Using boot -v indicates that the 2nd page is not protected on the RPi4: ---<<BOOT>>--- KDB: debugger backends: ddb KDB: current backend: ddb Type Physical Virtual #Pages Attr Reserved 000000000000 0 00000001 WB=20 ConventionalMemory 000000001000 1000 00007ef1 WB=20 BootServicesData 000007ef2000 7ef2000 0000001c WB=20 ConventionalMemory 000007f0e000 7f0e000 00029f93 WB=20 BootServicesData 000031ea1000 31ea1000 00000001 WB=20 LoaderData 000031ea2000 31ea2000 00008001 WB=20 LoaderCode 000039ea3000 39ea3000 000000a6 WB=20 Reserved 000039f49000 39f49000 00000007 WB=20 BootServicesData 000039f50000 39f50000 00000001 WB=20 Reserved 000039f51000 39f51000 00000002 WB=20 RuntimeServicesData 000039f53000 39f53000 00000001 WB RUNTIME Reserved 000039f54000 39f54000 00000001 WB=20 BootServicesData 000039f55000 39f55000 00000002 WB=20 RuntimeServicesData 000039f57000 39f57000 00000001 WB RUNTIME LoaderData 000039f58000 39f58000 00001408 WB=20 RuntimeServicesCode 00003b360000 3b360000 00000010 WB RUNTIME LoaderData 00003b370000 3b370000 00000090 WB=20 BootServicesData 000040000000 40000000 000bc000 WB=20 MemoryMappedIO 0000fe100000 fe100000 00000001 RUNTIME Physical memory chunk(s): 0x00001000 - 0x39f48fff, 927 MB ( 237384 pages) 0x39f50000 - 0x39f50fff, 0 MB ( 1 pages) 0x39f53000 - 0x39f53fff, 0 MB ( 1 pages) 0x39f55000 - 0x3b35ffff, 20 MB ( 5131 pages) 0x3b370000 - 0x3b3fffff, 0 MB ( 144 pages) 0x40000000 - 0xfbffffff, 3008 MB ( 770048 pages) Excluded memory regions: 0x00000000 - 0x00000fff, 0 MB ( 1 pages) NoAlloc=20 0x32000000 - 0x337a0fff, 23 MB ( 6049 pages) NoAlloc=20 0x39f49000 - 0x39f4ffff, 0 MB ( 7 pages) NoAlloc=20 0x39f51000 - 0x39f54fff, 0 MB ( 4 pages) NoAlloc=20 0x39f57000 - 0x39f57fff, 0 MB ( 1 pages) NoAlloc=20 0x3b360000 - 0x3b36ffff, 0 MB ( 16 pages) NoAlloc=20 0x3e513000 - 0x3ebebfff, 6 MB ( 1753 pages) NoAlloc=20 0xfe100000 - 0xfe100fff, 0 MB ( 1 pages) NoAlloc=20 Found 4 CPUs in the device tree Copyright (c) 1992-2020 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights = reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 13.0-CURRENT #66 r358510M: Sun Mar 1 18:19:04 PST 2020 = markmi@FBSDFHUGE:/usr/obj/cortexA53_clang/arm64.aarch64/usr/src/arm64.aarc= h64/sys/GENERIC-NODBG arm64 FreeBSD clang version 9.0.1 (git@github.com:llvm/llvm-project.git = c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1) VT(efifb): resolution 1824x984 Preloaded elf kernel "/boot/kernel/kernel" at 0xffff000001573000. Preloaded elf module "/boot/kernel/ucom.ko" at 0xffff00000157c020. Preloaded boot_entropy_cache "/boot/entropy" at 0xffff00000157c7f8. Preloaded elf module "/boot/kernel/umodem.ko" at 0xffff00000157c850. module firmware already present! Starting CPU 1 (1) Failed to start CPU 1 (1) Starting CPU 2 (2) Failed to start CPU 2 (2) Starting CPU 3 (3) Failed to start CPU 3 (3) FreeBSD/SMP: Multiprocessor System Detected: 1 CPUs random: read 4096 bytes from preloaded cache random: unblocking device. VIMAGE (virtualized network stack) enabled ULE: setup cpu 0 . . . psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0 psci0: PSCI version number mismatched with DT device_attach: psci0 attach returned 6 psci0: <ARM Power State Co-ordination Interface Driver> on ofwbus0 psci0: PSCI version number mismatched with DT device_attach: psci0 attach returned 6 . . . sdhci_bcm0-slot0: Controller timeout sdhci_bcm0-slot0: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D REGISTER = DUMP =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D sdhci_bcm0-slot0: Sys addr: 0x000008c8 | Version: 0x00001002 sdhci_bcm0-slot0: Blk size: 0x00000200 | Blk cnt: 0x00000001 sdhci_bcm0-slot0: Argument: 0x0ee2affe | Trn mode: 0x00000012 sdhci_bcm0-slot0: Present: 0x1fff0a06 | Host ctl: 0x00000007 sdhci_bcm0-slot0: Power: 0x0000000f | Blk gap: 0x00000080 sdhci_bcm0-slot0: Wake-up: 0x00000000 | Clock: 0x00000107 sdhci_bcm0-slot0: Timeout: 0x00000003 | Int stat: 0x00000020 sdhci_bcm0-slot0: Int enab: 0x01ff003b | Sig enab: 0x01ff0009 sdhci_bcm0-slot0: AC12 err: 0x00000000 | Host ctl2:0x00000000 sdhci_bcm0-slot0: Caps: 0x45ee6432 | Caps2: 0x0000a525 sdhci_bcm0-slot0: Max curr: 0x00080008 | ADMA err: 0x00000000 sdhci_bcm0-slot0: ADMA addr:0x00000000 | Slot int: 0x00000000 sdhci_bcm0-slot0: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D mmcsd0: Error indicated: 1 Timeout . . . Mounting from ufs:/dev/label/RPi4root failed with error 2; retrying for = 10 more seconds Mounting from ufs:/dev/label/RPi4root failed with error 2; retrying for = 9 more seconds Mounting from ufs:/dev/label/RPi4root failed with error 2; retrying for = 8 more seconds Mounting from ufs:/dev/label/RPi4root failed with error 2; retrying for = 7 more seconds Mounting from ufs:/dev/label/RPi4root failed with error 2; retrying for = 6 more seconds Mounting from ufs:/dev/label/RPi4root failed with error 2; retrying for = 5 more seconds Mounting from ufs:/dev/label/RPi4root failed with error 2; retrying for = 4 more seconds Mounting from ufs:/dev/label/RPi4root failed with error 2; retrying for = 3 more seconds Mounting from ufs:/dev/label/RPi4root failed with error 2; retrying for = 2 more seconds Mounting from ufs:/dev/label/RPi4root failed with error 2; retrying for = 1 more second Mounting from ufs:/dev/label/RPi4root failed with error 2. Loader variables: vfs.root.mountfrom=3Dufs:/dev/label/RPi4root vfs.root.mountfrom.options=3Drw,noatime Manual root filesystem specification: <fstype>:<device> [options] Mount <device> using filesystem <fstype> and with the specified (optional) option list. eg. ufs:/dev/da0s1a zfs:zroot/ROOT/default cd9660:/dev/cd0 ro (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /) ? List valid disk boot devices . Yield 1 second (for background tasks) <empty line> Abort manual input mountroot> ? List of GEOM managed disk devices: mmcsd0 Variations of the sdhci_bcm0-slot0 sequence repeats over and over but sometimes with a: sdhci_bcm0-slot0: Got data interrupt 0x00600000, but there is no active = command. after the Timeout notice or instead of it. I've not checked if the rpi/rpi.c code still has: efi_add_memory_map(0, 1, EFI_RESERVED_MEMORY_TYPE, 0) or not. But that would be my guess for where the first page being reserved still comes from, as reported in: Type Physical Virtual #Pages Attr Reserved 000000000000 0 00000001 WB=20 . . . Excluded memory regions: 0x00000000 - 0x00000fff, 0 MB ( 1 pages) NoAlloc=20 . . . =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5A11699F-7EDD-4541-82C0-62993C95EE72>