Panic on Rpi3 at r358976
Mark Millard
marklmi at yahoo.com
Mon Mar 16 04:11:06 UTC 2020
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 at yahoo.com> wrote:
>>> On 2020-Mar-15, at 17:33, Kyle Evans <kevans at freebsd.org> wrote:
>>
>>> On Sat, Mar 14, 2020 at 11:12 PM bob prohaska <fbsd at www.zefox.net> wrote:
>>>>
>>>> Tried to boot a kernel built from r358976 on a Pi3 and got a panic:
>>>>
>>>> [... snip ...]
>>>
>>> Hi,
>>>
>>> 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
>>
>> 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.)
>>
>> The result is not suggestive of CONFIG_RPI_EFI_NR_SPIN_PAGES
>> making a difference:
>>
>> [... snip ...]
>
> Indeed; note these lines in my patch:
>
> PATCHFILES+= 1245351/raw 1245352/raw
>
> 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
ConventionalMemory 000000001000 1000 00007ef1 WB
BootServicesData 000007ef2000 7ef2000 0000001c WB
ConventionalMemory 000007f0e000 7f0e000 00029f93 WB
BootServicesData 000031ea1000 31ea1000 00000001 WB
LoaderData 000031ea2000 31ea2000 00008001 WB
LoaderCode 000039ea3000 39ea3000 000000a6 WB
Reserved 000039f49000 39f49000 00000007 WB
BootServicesData 000039f50000 39f50000 00000001 WB
Reserved 000039f51000 39f51000 00000002 WB
RuntimeServicesData 000039f53000 39f53000 00000001 WB RUNTIME
Reserved 000039f54000 39f54000 00000001 WB
BootServicesData 000039f55000 39f55000 00000002 WB
RuntimeServicesData 000039f57000 39f57000 00000001 WB RUNTIME
LoaderData 000039f58000 39f58000 00001408 WB
RuntimeServicesCode 00003b360000 3b360000 00000010 WB RUNTIME
LoaderData 00003b370000 3b370000 00000090 WB
BootServicesData 000040000000 40000000 000bc000 WB
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
0x32000000 - 0x337a0fff, 23 MB ( 6049 pages) NoAlloc
0x39f49000 - 0x39f4ffff, 0 MB ( 7 pages) NoAlloc
0x39f51000 - 0x39f54fff, 0 MB ( 4 pages) NoAlloc
0x39f57000 - 0x39f57fff, 0 MB ( 1 pages) NoAlloc
0x3b360000 - 0x3b36ffff, 0 MB ( 16 pages) NoAlloc
0x3e513000 - 0x3ebebfff, 6 MB ( 1753 pages) NoAlloc
0xfe100000 - 0xfe100fff, 0 MB ( 1 pages) NoAlloc
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 at FBSDFHUGE:/usr/obj/cortexA53_clang/arm64.aarch64/usr/src/arm64.aarch64/sys/GENERIC-NODBG arm64
FreeBSD clang version 9.0.1 (git at 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: ============== REGISTER DUMP ==============
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: ===========================================
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=ufs:/dev/label/RPi4root
vfs.root.mountfrom.options=rw,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
. . .
Excluded memory regions:
0x00000000 - 0x00000fff, 0 MB ( 1 pages) NoAlloc
. . .
===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
More information about the freebsd-arm
mailing list