Re: [14-CURRENT]BBB can't boot 14-CURRENT GENERICSD-20210805

From: Oskar Holmlund <info_at_ohdata.se>
Date: Sun, 15 Aug 2021 10:59:57 +0200
2021-08-15 09:59 skrev Yoshiro MIHIRA:
> I applied ti_sysc.c patch with 
> 14.0-CURRENT-arm-armv7-GENERICSD-20210805.
> 
> Unfortunately, I got another panic(No usable event timer found!)
> 
> ofwbus0: <Open Firmware Device Tree>
> ti_sysc0: <TI SYSC Interconnect> on ofwbus0
> device_attach: ti_sysc0 attach returned 6
> regfix0: <Fixed Regulator> on ofwbus0
> clk_fixed0: <Fixed clock> on ofwbus0
> ti_sysc0: <TI SYSC Interconnect> on ofwbus0
> device_attach: ti_sysc0 attach returned 6
> ti_sysc0: <TI SYSC Interconnect> on ofwbus0
> device_attach: ti_sysc0 attach returned 6
> ti_sysc0: <TI SYSC Interconnect> on ofwbus0
> device_attach: ti_sysc0 attach returned 6
> ti_sysc0: <TI SYSC Interconnect> on ofwbus0
> device_attach: ti_sysc0 attach returned 6
> ti_sysc0: <TI SYSC Interconnect> on ofwbus0
> device_attach: ti_sysc0 attach returned 6
> ti_sysc0: <TI SYSC Interconnect> on ofwbus0
> device_attach: ti_sysc0 attach returned 6
> ti_sysc0: <TI SYSC Interconnect> on ofwbus0
> device_attach: ti_sysc0 attach returned 6
> ti_sysc0: <TI SYSC Interconnect> on ofwbus0
> device_attach: ti_sysc0 attach returned 6
> ti_sysc0: <TI SYSC Interconnect> on ofwbus0
> device_attach: ti_sysc0 attach returned 6
> ti_sysc0: <TI SYSC Interconnect> on ofwbus0
> device_attach: ti_sysc0 attach returned 6
> ti_sysc0: <TI SYSC Interconnect> on ofwbus0
> <snip>
> ti_sysc0: <TI SYSC Interconnect> on ofwbus0
> device_attach: ti_sysc0 attach returned 6
> cpulist0: <Open Firmware CPU Group> on ofwbus0
> cpu0: <Open Firmware CPU> on cpulist0
> cpufreq_dt0: <Generic cpufreq driver> on cpu0
> cpufreq_dt0: no regulator for cpu_at_0
> device_attach: cpufreq_dt0 attach returned 6
> ti_sysc0: <TI SYSC Interconnect> on ofwbus0
> device_attach: ti_sysc0 attach returned 6
> gpioled0: <GPIO LEDs> on ofwbus0
> gpioled0: <beaglebone:green:heartbeat> failed to map pin
> gpioled0: <beaglebone:green:mmc0> failed to map pin
> gpioled0: <beaglebone:green:usr2> failed to map pin
> gpioled0: <beaglebone:green:usr3> failed to map pin
> panic: No usable event timer found! <-----------------------------PANIC
> 
> I compared between13-stable and 14-current.
> 14-current kernel can't attach clock management.
> ti_prcm0: <TI Power and Clock Management> mem 0-0x1fff on ti_sysc0
> 
> If I replace dtb directory(I got from 13-stable dtb directory and I put 
> FAT
> partition dtb and /boot/dtb), 14-GENERICSD can't boot....
> 
> 
> 2021年8月15日(日) 0:12 Mark Johnston <markj_at_freebsd.org>:
> 
>> 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
>> _at__at_ -306,6 +306,8 _at__at_ 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);
>> 
>> 

Hi,

You will probably need these two reviews to get AM335x to boot on the 
latest device-tree import.
https://reviews.freebsd.org/D27889
https://reviews.freebsd.org/D31311

-- 
Bästa Hälsningar
Oskar Holmlund
Tel 070-3220292
Received on Sun Aug 15 2021 - 08:59:57 UTC

Original text of this message