lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240820080349.ypxrzvyy2bwettfu@lcpd911>
Date: Tue, 20 Aug 2024 13:33:49 +0530
From: Dhruva Gole <d-gole@...com>
To: Kevin Hilman <khilman@...libre.com>
CC: Nishanth Menon <nm@...com>, Tero Kristo <kristo@...nel.org>,
        Santosh
 Shilimkar <ssantosh@...nel.org>,
        <linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
        Vibhore Vardhan <vibhore@...com>, Akashdeep
 Kaur <a-kaur@...com>,
        Markus Schneider-Pargmann <msp@...libre.com>
Subject: Re: [PATCH v10 0/4] firmware: ti_sci: Introduce system suspend
 support

Hello all,

On Aug 14, 2024 at 08:39:27 -0700, Kevin Hilman wrote:
> Abstract
> ********
> 
> This series introduces necessary ti_sci driver functionality to support
> various Suspend-to-RAM modes on TI AM62 family of devices. These Low
> Power Modes include Deep Sleep and MCU Only as described in section
> "6.2.4 Power Modes" of the AM62P Technical Reference Manual [0].
> 
> Summary
> *******
> 
> This series is a restructuring and rebase of the patch series by
> Dave Gerlach [1] and Dhruva Gole [2]. It applies on top of Linux
> 6.11-rc1.
> 
> The kernel triggers entry to Low Power Mode through the mem suspend
> transition with the following:
> 
> * At the  bootloader stage, one is  expected to package the  TIFS stub
>   which then gets  pulled into the Tightly coupled memory  of the Device
>   Mgr  (DM) R5  when it  starts up.  If using  U-Boot, then  it requires
>   tispl.bin to contain the TIFS stub. Refer to documentation in upstream
>   u-boot[3] for further details. The  supported firmware version is from
>   TI Processor SDK >= 10.00 ie. tag 10.00.04 from ti-linux-firmware [4].
> 
> * Use a TF-A binary that supports PSCI_SYSTEM_SUSPEND call. This causes
>   system to use PSCI system suspend as last step of mem sleep.
> 
> * We add support for the TISCI_MSG_QUERY_FW_CAPS message, used to retrieve
>   the firmware capabilities of the currently running system firmware [6].
>   Sysfw version >= 10.00.04 support LPM_DM_MANAGED capability, where
>   Device Mgr firmware now manages which low power mode is chosen. Going
>   forward, this is the default configuration supported for TI AM62 family
>   of devices. The state chosen by the DM can be influenced by sending
>   constraints using the new LPM constraint APIs. (Patch 1)
> 
> * The firmware requires that the OS sends a TISCI_MSG_PREPARE_SLEEP
>   message in order to provide details about suspend. The ti_sci driver
>   must send this message to firmware with the above information
>   included, which it does during the driver suspend handler when
>   PM_MEM_SUSPEND is the determined state being entered. The mode being
>   sent depends on whether firmware capabilities have support for
>   LPM_DM_MANAGED feature. Legacy firmware or those supporting other
>   modes can extend the mode selection logic as needed. (Patch 2)
> 
> * We also add the remaining TISCI Low Power Mode messages required for
>   inquiring wake reason and managing LPM constraints as part of a new PM
>   ops. These messages are part of the TISCI PM Low Power Mode API [5].
>   (Patch 3)
> 
> * Finally if any CPUs have PM QoS resume latency constraints set, we
>   aggregate these and set the TISCI system-wide latency constraint.
>   (Patch 4)
> 
> Testing
> *******
> 
> This series can for example be tested with a am62a-lp-sk board.
> 
> For am62a-lp-sk all usb nodes have to be disabled at the moment (usbss0,
> usb0, usbss1 and usb1). There is currently an issue with USB Link Power
> Management and turning off the USB device which is being worked on.
> 
> Once booted suspend/resume can be tested with rtcwake:
>   $ rtcwake -m mem -s 10 -d /dev/rtc0
> 
> Make sure /dev/rtc0 corresponds to rtc-ti-k3:
>   $ dmesg | grep rtc-ti-k3
>   rtc-ti-k3 2b1f0000.rtc: registered as rtc0

Additionally, one can refer to this guide for more details:
https://software-dl.ti.com/processor-sdk-linux/esd/AM62X/latest/exports/docs/linux/Foundational_Components/Power_Management/pm_low_power_modes.html

For the series,
Tested-by: Dhruva Gole <d-gole@...com>

Logs: https://gist.github.com/DhruvaG2000/658d0d4683b13ab41025df19a8eafc2f

Tree with all the patches applied:
https://github.com/DhruvaG2000/v-linux/tree/lpm-k3-next


-- 
Best regards,
Dhruva

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ