From nobody Mon Jan 09 16:49:16 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NrKfW6tpYz2p1kD for ; Mon, 9 Jan 2023 16:49:23 +0000 (UTC) (envelope-from mike@mail.karels.net) Received: from mail.karels.net (mail.karels.net [216.160.39.52]) by mx1.freebsd.org (Postfix) with ESMTP id 4NrKfV5stXz46gr for ; Mon, 9 Jan 2023 16:49:22 +0000 (UTC) (envelope-from mike@mail.karels.net) Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of mike@mail.karels.net has no SPF policy when checking 216.160.39.52) smtp.mailfrom=mike@mail.karels.net; dmarc=none Received: from mail.karels.net (localhost [127.0.0.1]) by mail.karels.net (8.16.1/8.16.1) with ESMTPS id 309GnGPb055260 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Mon, 9 Jan 2023 10:49:16 -0600 (CST) (envelope-from mike@mail.karels.net) Received: (from mike@localhost) by mail.karels.net (8.16.1/8.16.1/Submit) id 309GnGi1055259; Mon, 9 Jan 2023 10:49:16 -0600 (CST) (envelope-from mike) Message-Id: <202301091649.309GnGi1055259@mail.karels.net> To: freebsd-arm@freebsd.org From: Mike Karels Reply-to: mike@karels.net Subject: BeagleBone Black does not boot -current (DTB incompatibility?) List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <55257.1673282956.1@mail.karels.net> Content-Transfer-Encoding: quoted-printable Date: Mon, 09 Jan 2023 10:49:16 -0600 X-Spamd-Result: default: False [-1.70 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[mike@karels.net,mike@mail.karels.net]; RCVD_NO_TLS_LAST(0.10)[]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[karels.net]; FREEFALL_USER(0.00)[mike]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; HAS_REPLYTO(0.00)[mike@karels.net]; SUBJECT_HAS_QUESTION(0.00)[]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_NONE(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[mike@karels.net,mike@mail.karels.net]; ASN(0.00)[asn:209, ipnet:216.160.36.0/22, country:US]; R_SPF_NA(0.00)[no SPF record] X-Rspamd-Queue-Id: 4NrKfV5stXz46gr X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N The last couple of snapshots of -current fail to boot on BeagleBone Black (armv7 GENERICSD). I have no idea how long this has been failing. (13.1 runs.) It appears that a malloc from ti_sysc_attach or ti_sysc_attach_clocks is passing a size of 0, which maybe could happen if the FDT has a "clocks" node but no clocks are found. The console output including backtrace is below. I replaced the dtb directory with the one from 13.1, and the system boots and seems to run. I don't know my way around the armv7 DTS files, but I'm happy to investigate if someone can point me in the right direction. Mike ... No PSCI/SMCCC call function found Texas Instruments AM335x Processor, Revision ES2.1 arc4random: WARNING: initial seeding bypassed the cryptographic random dev= ice because it was not yet seeded and the knob 'bypass_before_seeding' was= enabled. random: entropy device external interface kbd0 at kbdmux0 ofwbus0: ti_sysc0: on ofwbus0 panic: Assertion size > 0 failed at /usr/src/sys/kern/subr_vmem.c:1332 cpuid =3D 0 time =3D 1 KDB: stack backtrace: db_trace_self() at db_trace_self pc =3D 0xc05d793c lr =3D 0xc007a9ec (db_trace_self_wrapper+0x30) sp =3D 0xc0f14a98 fp =3D 0xc0f14bb0 db_trace_self_wrapper() at db_trace_self_wrapper+0x30 pc =3D 0xc007a9ec lr =3D 0xc02e8880 (vpanic+0x140) sp =3D 0xc0f14bb8 fp =3D 0xc0f14bd8 r4 =3D 0x00000100 r5 =3D 0x00000000 r6 =3D 0xc07395ef r7 =3D 0xc0afb960 vpanic() at vpanic+0x140 pc =3D 0xc02e8880 lr =3D 0xc02e8660 (dump_savectx) sp =3D 0xc0f14be0 fp =3D 0xc0f14be4 r4 =3D 0x00000000 r5 =3D 0xc20e0000 r6 =3D 0x00000000 r7 =3D 0xc0f14c50 r8 =3D 0xc0b6db00 r9 =3D 0x00000002 r10 =3D 0xc0f14c2c dump_savectx() at dump_savectx pc =3D 0xc02e8660 lr =3D 0xc0358e14 (vmem_xalloc) sp =3D 0xc0f14bec fp =3D 0xc0f14c20 vmem_xalloc() at vmem_xalloc pc =3D 0xc0358e14 lr =3D 0xc059dae4 (kmem_malloc_domainset+0x9c) sp =3D 0xc0f14c28 fp =3D 0xc0f14c70 r4 =3D 0xc0048cf4 r5 =3D 0xc0e0d108 r6 =3D 0xc0f14c18 r7 =3D 0x00000000 r8 =3D 0xc20e0000 r9 =3D 0x00000000 r10 =3D 0xc0f14c50 kmem_malloc_domainset() at kmem_malloc_domainset+0x9c pc =3D 0xc059dae4 lr =3D 0xc02c1b3c (malloc_large+0x2c) sp =3D 0xc0f14c78 fp =3D 0xc0f14c88 r4 =3D 0xc08f5864 r5 =3D 0x00000dbc r6 =3D 0x00000000 r7 =3D 0x00000002 r8 =3D 0x00000dbc r9 =3D 0xc07a4919 r10 =3D 0xc27506c0 malloc_large() at malloc_large+0x2c pc =3D 0xc02c1b3c lr =3D 0xc06ad75c (ti_sysc_attach+0x19c) sp =3D 0xc0f14c90 fp =3D 0xc0f14cd0 r4 =3D 0xd00d3e00 r5 =3D 0x00000dbc r6 =3D 0xffffffff r7 =3D 0xd00d3e28 ti_sysc_attach() at ti_sysc_attach+0x19c pc =3D 0xc06ad75c lr =3D 0xc032873c (device_attach+0x4f0) sp =3D 0xc0f14cd8 fp =3D 0xc0f14d20 r4 =3D 0xc2757d80 r5 =3D 0xc2758200 r6 =3D 0x2eb77a5c r7 =3D 0x00000000 r8 =3D 0xc0b72564 r9 =3D 0xc078651d r10 =3D 0xc27506c0 device_attach() at device_attach+0x4f0 pc =3D 0xc032873c lr =3D 0xc03281b0 (device_probe_and_attach+0x8c) sp =3D 0xc0f14d28 fp =3D 0xc0f14d40 r4 =3D 0xc2757d80 r5 =3D 0xc276da80 r6 =3D 0x5e4a6f28 r7 =3D 0xffffffff r8 =3D 0x00000000 r9 =3D 0x00000000 r10 =3D 0xc27508e0 device_probe_and_attach() at device_probe_and_attach+0x8c pc =3D 0xc03281b0 lr =3D 0xc0329bb8 (bus_generic_attach+0x1c) sp =3D 0xc0f14d48 fp =3D 0xc0f14d50 r4 =3D 0xc2757d80 r5 =3D 0x00000000 r6 =3D 0xc0f14d60 r10 =3D 0xc27508e0 bus_generic_attach() at bus_generic_attach+0x1c pc =3D 0xc0329bb8 lr =3D 0xc00e4ce0 (ofwbus_attach+0x138) sp =3D 0xc0f14d58 fp =3D 0xc0f14d90 r4 =3D 0xc2758200 r10 =3D 0xc27508e0 ofwbus_attach() at ofwbus_attach+0x138 pc =3D 0xc00e4ce0 lr =3D 0xc032873c (device_attach+0x4f0) sp =3D 0xc0f14d98 fp =3D 0xc0f14de0 r4 =3D 0xc2758200 r5 =3D 0xc2758300 r6 =3D 0x2e0a372a r7 =3D 0x00000000 r8 =3D 0xc0b72564 r9 =3D 0xc078651d device_attach() at device_attach+0x4f0 pc =3D 0xc032873c lr =3D 0xc03281b0 (device_probe_and_attach+0x8c) sp =3D 0xc0f14de8 fp =3D 0xc0f14e00 r4 =3D 0xc2758200 r5 =3D 0xc276da80 r6 =3D 0x5e4a6f28 r7 =3D 0x00000000 r8 =3D 0xc0b094ac r9 =3D 0xc0b094b0 r10 =3D 0xc0aeb014 device_probe_and_attach() at device_probe_and_attach+0x8c pc =3D 0xc03281b0 lr =3D 0xc032a62c (bus_generic_new_pass+0xb4) sp =3D 0xc0f14e08 fp =3D 0xc0f14e20 r4 =3D 0xc2758200 r5 =3D 0xc08eb898 r6 =3D 0xc08c602c r10 =3D 0xc0aeb014 bus_generic_new_pass() at bus_generic_new_pass+0xb4 pc =3D 0xc032a62c lr =3D 0xc032a678 (bus_generic_new_pass+0x100) sp =3D 0xc0f14e28 fp =3D 0xc0f14e40 r4 =3D 0xc2758300 r5 =3D 0xc08eb898 r6 =3D 0xc2759680 r7 =3D 0x00000000 r8 =3D 0xc0b094ac r10 =3D 0xc0aeb014 bus_generic_new_pass() at bus_generic_new_pass+0x100 pc =3D 0xc032a678 lr =3D 0xc03256b8 (bus_set_pass+0x54) sp =3D 0xc0f14e48 fp =3D 0xc0f14e60 r4 =3D 0x7fffffff r5 =3D 0xc08eb898 r6 =3D 0xc2759680 r7 =3D 0xc274f6c0 r8 =3D 0xc0b094ac r10 =3D 0xc0aeb014 bus_set_pass() at bus_set_pass+0x54 pc =3D 0xc03256b8 lr =3D 0xc0271788 (mi_startup+0x2b0) sp =3D 0xc0f14e68 fp =3D 0xc0f14e90 r4 =3D 0xc0aeb018 r5 =3D 0x0fffffff r6 =3D 0xc27a3348 r7 =3D 0xc08bf85c r8 =3D 0x00000000 r9 =3D 0x03800000 mi_startup() at mi_startup+0x2b0 pc =3D 0xc0271788 lr =3D 0xc0000344 (btext+0x144) sp =3D 0xc0f14e98 fp =3D 0x00000000 r4 =3D 0xc0000480 r5 =3D 0xc0ba8000 r6 =3D 0x00000005 r7 =3D 0x00c52078 r8 =3D 0xc0e25000 r9 =3D 0x9cf00168 r10 =3D 0x00000000 btext() at btext+0x144 pc =3D 0xc0000344 lr =3D 0xc0000344 (btext+0x144) sp =3D 0xc0f14e98 fp =3D 0x00000000 KDB: enter: panic [ thread pid 0 tid 100000 ] Stopped at kdb_enter+0x54: ldrb r15, [r15, r15, ror r15]!