From nobody Fri Jun 02 05:16:34 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 4QXWSf6f66z4YVtF for ; Fri, 2 Jun 2023 05:16:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QXWSf3XDMz46VW for ; Fri, 2 Jun 2023 05:16:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685682994; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8KcTNfRlZBdIKy+9nRwH1quw2NC7dGImtwdeR+f3ov8=; b=evjKCUU8B5f2bCX5ZpPNwwej5bGnXh48ZVUzLA+LCMAt88TtqGkNk28l9F7OmyEPcb6g1v fBHjxSeiUSGXZiUxAVocUVx+FmBo8IWCaVwJoVIh03P1TmGIRYF8v8Al9AumZHh1Qkz2da ScNsjyw55CNRklvXOdBmYmNOwTVBd7MJkFIq0IkwNP6FWnEL9Bw7XBmUlplnFVAMm+h1Ij pt3MFtwqDwarc4Ba/Zx/z6UlmrKXX4n7A9wS5AObGVxIJgPoTVTebndUsoC8vwKz2b4NzY my9zrkViLANqHVPo6OCzy5AcLnTTIvbNYzk8+Jy5vT6Fu0b3zFaHlfzXYuv/ZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685682994; a=rsa-sha256; cv=none; b=sQfQhn6PrUAnFoF+uSStqchvInjsUQUcJQHyjTWchhEXVTocSN1JhPbILaS4mI4UdchdC/ UHLjwsXwbbYgCx8q0Lkof2fPyH80VHdWIOmL8qQIqLokE8e8pXiannEaiDFGbuMmzh6SGT D3fnavCkGOYqHeW/P8X4VVtMfszKxkHmG23puxerVuyY/bBcGsBzyphsWKhKBYZ9Mvq9GE ftO7+8y/BJbJI7PZvNlO9ahibzjFEpqdjNhyJNN4D3SSSBWpuQIWen3RjNyq/P9hvc/I2u wDYuuo2v3T08PfCE53NT+GYHuYS8krC4hR05PUmA6vy2/0xf5U7s8qHAGRp2KQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QXWSf2Mprzmcy for ; Fri, 2 Jun 2023 05:16:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 3525GYpx071894 for ; Fri, 2 Jun 2023 05:16:34 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 3525GY7u071893 for freebsd-arm@FreeBSD.org; Fri, 2 Jun 2023 05:16:34 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-arm@FreeBSD.org Subject: [Bug 271780] [patch][RPi4] PSCI reset doesn't work. Date: Fri, 02 Jun 2023 05:16:34 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: arm X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: t_uemura@macome.co.jp X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-arm@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated 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 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271780 Bug ID: 271780 Summary: [patch][RPi4] PSCI reset doesn't work. Product: Base System Version: CURRENT Hardware: arm64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: t_uemura@macome.co.jp On RPi4B, PSCI reset, precisely, PSCI_FNID_SYSTEM_RESET doesn't work. This causes a reset (a key press) after shutdown -h to halt the board rather tha= n to reboot, and need a powercycle to restart. To workaround, SoC's watchdog must handle the reset, as its 32-bit sibling did so in bcm2835_machdep.c:bcm2835_cpu_reset() . This happens on 13.2-RELEASE image, 13.2-STABLE and 14-CURRENT with more re= cent u-boot and firmware. Long story: After shutdown -h, the "Please press any key to reboot." message is shown, = and by a key press, architecture dependent cpu_reset() is called to try to rese= t: on 32-bit RPis, arm/platform.c:cpu_reset() broadcom/bcm2835/bcm2835_machdep.c:bcm2835_cpu_reset() broadcom/bcm2835/bcm2835_wdog.c:bcmwd_watchdog_reset() on arm64, arm64/arm64/vm_machdep.c:cpu_reset() dev/psci/psci.c:psci_reset() dev/psci/psci.c:psci_shutdown() dev/psci/psci.h:psci_call(PSCI_FNID_SYSTEM_RESET) Since PSCI reset works properly on RPi3B+, I guess this issue is specific to BCM2711 and is due to a bug in this newer generation SoC's PSCI implementat= ion. To workaround, watchdog is armed to fire immediately instead of psci_call()= . I wasn't sure if I could add SoC dependent snippet in this location (arm64/arm64), but I found a quirk for Cavium in GIC v3 code, so I thought = it might be OK. Finally note that about simple reboots, triggered by shutdown -r or reboot(= 8), are all handled by watchdog on both arm and arm64; broadcom/bcm2835/bcm2835_wdog.c:bcmwd_reboot_system() via shutdown_final ev= ent handler. --=20 You are receiving this mail because: You are the assignee for the bug.=