Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Aug 2021 11:12:03 -0400
From:      Mark Johnston <markj@freebsd.org>
To:        Yoshiro MIHIRA <sanpei.ml@gmail.com>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: [14-CURRENT]BBB can't boot 14-CURRENT GENERICSD-20210805
Message-ID:  <YRfcGiDPvVaQMUyq@nuc>
In-Reply-To: <CALwmBx0Q_t=YGSJzMszmmVctRRqTica1xPrNQ9dytxis5ArRgA@mail.gmail.com>
References:  <CALwmBx0Q_t=YGSJzMszmmVctRRqTica1xPrNQ9dytxis5ArRgA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Aug 14, 2021 at 06:15:37PM +0900, Yoshiro MIHIRA wrote:
> I can use 13.0-STABLE-arm-armv7-GENERICSD-20210812 on Beaglebone Black[OK].
> 
> However, I tested 14-CURRENT GENERICSD-20210805 on Beaglebone Black.
> It can't boot with the below message[NG].
> 
> Please let me know to solve this issue.
> 
> If I use the same microSD on Raspberry PI2, it can boot without issue.
> I put all boot console messages.
> https://people.freebsd.org/~sanpei/20210814-boot-NG-14-GENERICSD-20210805
> 
> <<BOOT message>
> mem: <memory>
> ofwbus0: <Open Firmware Device Tree>
> ti_sysc0: <TI SYSC Interconnect> on ofwbus0
> panic: Assertion size > 0 failed at /usr/src/sys/kern/subr_vmem.c:1332

I guess that the DTB has changed somehow such that this error path
is getting exercised.  This patch should allow you to boot without
panicking, at least.

diff --git a/sys/arm/ti/ti_sysc.c b/sys/arm/ti/ti_sysc.c
index b16158aa5d83..4fda12f05725 100644
--- a/sys/arm/ti/ti_sysc.c
+++ b/sys/arm/ti/ti_sysc.c
@@ -306,6 +306,8 @@ parse_regfields(struct ti_sysc_softc *sc) {
 
 	/* Grab the content of reg properties */
 	nreg = OF_getproplen(node, "reg");
+	if (nreg == -1)
+		return (ENXIO);
 	reg = malloc(nreg, M_DEVBUF, M_WAITOK);
 	OF_getencprop(node, "reg", reg, nreg);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YRfcGiDPvVaQMUyq>