Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Jan 2023 08:21:09 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        =?utf-8?Q?Klaus_K=C3=BCchemann?= <maciphone2@googlemail.com>
Cc:        Mitchell Horne <mhorne@freebsd.org>, freebsd-arm@freebsd.org
Subject:   Re: (RPi) db> reboot -> cpu_reset failed
Message-ID:  <2EAD00FA-22AE-4BE8-98B1-BEBB3848C486@yahoo.com>
In-Reply-To: <5A57DF73-FEC0-41C9-96D2-A4EED7695EEF@googlemail.com>
References:  <29q7q878-091-r17n-8r3n-o3n68p3646@mnoonqbm.arg> <F4435E57-1F90-454D-8E75-01DF50DD37DA@googlemail.com> <np4qps4-2o34-3n9n-q4s4-4931p4s7p13@yvfgf.mnoonqbm.arg> <38B92299-2776-476D-A81F-7C8EB4D59A13@googlemail.com> <8o4s9914-sq84-90pq-no3o-59r18n5on14@yvfgf.mnoonqbm.arg> <e8dd18bf-df8b-5c62-4860-a2bc946e1d00@freebsd.org> <5A57DF73-FEC0-41C9-96D2-A4EED7695EEF@googlemail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 9, 2023, at 00:15, Klaus K=C3=BCchemann =
<maciphone2@googlemail.com> wrote:

> `ve tested D37981 on a Pi4b,=20
> sorry but it had no effect,
> not on the booted machine and not when intentionally provoked crashing =
in early boot up( no changed behavior in reset) .
>=20
> I never see :
> <<debug.kdb.enter: 0KDB: enter: sysctl debug.kdb.enter>>
> (except, of course when entering directly by : sysctl =
debug.kdb.enter=3D1)

I think you misinterpreted:

QUOTE
We get some new console output with this change:
debug.kdb.enter: 0KDB: enter: sysctl debug.kdb.enter
[ thread pid 812 tid 100118 ]
Stopped at kdb_trap+0x448: sd zero,0(s1)
db> reset
Waiting (max 60 seconds) for system process `vnlru' to stop... done
Uptime: 1m51s
END QUOTE

I expect the new output text was only the text after the "reset"
command:

QUOTE
Waiting (max 60 seconds) for system process `vnlru' to stop... done
Uptime: 1m51s
END QUOTE

I also expect that the text:

QUOTE
debug.kdb.enter: 0KDB: enter: sysctl debug.kdb.enter
END QUOTE

was just from how db> was entered to make the example and
other ways of entering db> that historically did not put
out such a line still would not put out such a line.


> =46rom the booted system( so you see that the new tunable is compiled =
in) :
> =E2=80=94
> root@:~ # sysctl debug.ddb.full_reboot=3D1
> debug.ddb.full_reboot: 1 -> 1
> root@:~ # root@:~ # sysctl debug.kdb.panic=3D1
> =E2=80=A6.
> KDB: enter: panic
> [ thread pid 1056 tid 100128 ]
> Stopped at      kdb_enter+0x44: undefined       f900827f
> db>=20
> --
>=20
> root@:~ # sysctl debug.ddb.full_reboot=3D0
> debug.ddb.full_reboot: 1 -> 0
> root@:~ # sysctl debug.kdb.panic=3D1
> ...
> KDB: enter: panic
> [ thread pid 1057 tid 100092 ]
> Stopped at      kdb_enter+0x44: undefined       f900827f
> db>=20
> =E2=80=94






> Am 08.01.2023 um 19:32 schrieb Mitchell Horne <mhorne@freebsd.org>:
>=20
> =E2=80=A6=E2=80=A6.
>=20
> The reason for the difference in behaviour here is that the ddb reset =
command doesn't execute the full list of registered shutdown handlers, =
it just calls cpu_reset() directly. For whatever reason your combination =
of RPI hw+fw doesn't support the PSCI shutdown interface, so cpu_reset() =
fails. I am guessing that it is the bcm2835_watchdog driver that handles =
the normal reboot.
>=20
> I think it should be just fine to execute such handlers from ddb =
reset, so you can try my patch: https://reviews.freebsd.org/D37981
>=20
> Cheers,
> Mitchell
>=20



=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2EAD00FA-22AE-4BE8-98B1-BEBB3848C486>