From nobody Mon Jan 9 08:15:11 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 4Nr6FV3vXFz2p7dK for ; Mon, 9 Jan 2023 08:15:26 +0000 (UTC) (envelope-from maciphone2@googlemail.com) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Nr6FV0bs9z4QCl; Mon, 9 Jan 2023 08:15:26 +0000 (UTC) (envelope-from maciphone2@googlemail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x62d.google.com with SMTP id gh17so18082240ejb.6; Mon, 09 Jan 2023 00:15:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=Vmrqb5e7Sindjr/oT+9TVODdBpQRLe5WWGMz4Se9vHQ=; b=XQGsWPwmX3RHdFb0V/vaVVdZFlU9mKLUpG9rsFAgtQJMKwy/32/3zkG4GKieV6rzfw ofNkrAtQ/SyqRzlpMdMeaU0Z3rYIl4L848IERYo5141GEdPsMilByXFD1qxPwZ8HBDsR xpJLMHKcZU0pl0d8JqcviIE9eAPAyrusLmuMLnM9tF/3l+zEWbCeVadK9IXn5PnI4E2e JD3Q0JndHhGG3PDbQMQOJQHuXxBqgsz3dgucYC8cfaDTJpdAEgWzWljRZORRD0OihGrx sGt0Vj51d3DY1sYoRNWmu132nsna0k5xjqu49AVOvt0Njnf38cMGb7tzXPd70tx2ptoD tXvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Vmrqb5e7Sindjr/oT+9TVODdBpQRLe5WWGMz4Se9vHQ=; b=asHibdfYkCNVp3rOpY84pNPJyOlKb77QdPoizwPOI7gTitNVsFpoKzLTXuJLvpm0rQ 4p0XzKTQP6P2hxSni/6h9avIQJCEa7EBcuuq2+65RjYeeFzqiZKJ6ZkzjTsg22APuHSn Me0JcZ20j7LyyPo8+jO/PZhoV0dhTzYbHtZgIwQRSyjD51jlFV0LrfV5j8u7EtGcD5aD lh5nt7BEpbXS96G4PsOjlXsugBJ+AMZaYpYeysdjsbNQkQzXAVJFgyh/eWExnpsfJzs5 clFNXnxo4XzPalhlXyNpDfS1nz5H9Ko5/qUU8eZO31xZRtshvTod52nm4PVA9gbBZdqK y6PA== X-Gm-Message-State: AFqh2kp5Q6x4C91CAI+jXDLYob+tyHAKXb6Q1MMYU1WOn0ceYo5XolgU qXVWzyXxfi37/xPJjZlT/QueJ76uoy8= X-Google-Smtp-Source: AMrXdXusKlqYfAKaTbn5ANH1OND1YvUdxXdEL8I0katQUKwaA3O6MQlAM77cm84GTHisFTzXYTCBBw== X-Received: by 2002:a17:907:7676:b0:7c1:5b5e:4d86 with SMTP id kk22-20020a170907767600b007c15b5e4d86mr55474600ejc.36.1673252123759; Mon, 09 Jan 2023 00:15:23 -0800 (PST) Received: from smtpclient.apple (dynamic-046-114-188-092.46.114.pool.telefonica.de. [46.114.188.92]) by smtp.googlemail.com with ESMTPSA id l6-20020a170906078600b0084d381d0528sm2206811ejc.180.2023.01.09.00.15.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jan 2023 00:15:23 -0800 (PST) From: =?utf-8?Q?Klaus_K=C3=BCchemann?= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 (Mac OS X Mail 16.0 \(3731.300.101.1.3\)) Subject: Re: (RPi) db> reboot -> cpu_reset failed Date: Mon, 9 Jan 2023 09:15:11 +0100 References: <29q7q878-091-r17n-8r3n-o3n68p3646@mnoonqbm.arg> <38B92299-2776-476D-A81F-7C8EB4D59A13@googlemail.com> <8o4s9914-sq84-90pq-no3o-59r18n5on14@yvfgf.mnoonqbm.arg> To: Mitchell Horne , freebsd-arm@freebsd.org In-Reply-To: Message-Id: <5A57DF73-FEC0-41C9-96D2-A4EED7695EEF@googlemail.com> X-Mailer: Apple Mail (2.3731.300.101.1.3) X-Rspamd-Queue-Id: 4Nr6FV0bs9z4QCl X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N Hi Mitchell , `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) . I never see : <> (except, of course when entering directly by : sysctl debug.kdb.enter=3D1)= =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 -- 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 but perhaps I have overlooked something Regards K. > Am 08.01.2023 um 19:32 schrieb Mitchell Horne : >=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