aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/amdsmu
Commit message (Collapse)AuthorAgeFilesLines
* amdsmu: Add Krackan Point supportTom Jones2026-05-013-31/+92
| | | | | | Reviewed by: obiwac, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56619
* amdsmu: Cezanne supportAymeric Wibo2026-03-313-27/+31
| | | | | | | | | | | | | | Add support for Cezanne chips. The only real difference vs Rembrandt/Phoenix is the idlemask register. Also simplify getting IP block count by having this straight in struct amdsmu_product and remove Strix Point from the list for now, as that doesn't support S0ix and our driver can't handle that. Reviewed by: mckusick Approved by: mckusick Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55594
* amdsmu: Sleep entry/exit hints for PMFWAymeric Wibo2026-03-043-3/+57
| | | | | | | | | | | | | | | amdsmu_suspend() and amdsmu_resume() for sending hints to the AMD SMU power management firmware (PMFW) that we are entering and exiting s2idle. We also dump sleep metrics once we tell it we're exiting sleep, so the relevant metrics are updated. Register these as acpi_post_dev_suspend and acpi_post_dev_resume eventhandlers. Reviewed by: olce Approved by: olce Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48721
* amdsmu: Read and dump idlemaskAymeric Wibo2025-07-273-0/+17
| | | | | | | | | | | | | | Read and dump the SMU's idlemask value in `dev.amdsmu.0.idlemask` sysctl. The idlemask is used internally by AMD and its value is not documented anywhere. This patch exposes it mainly to help AMD diagnose issues with S0i3 entry on FreeBSD. Reviewed by: cem, emaste, kib, mckusick (mentor) Approved by: emaste, kib, mckusick (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51487
* amdsmu: Expose sysctls for metrics about last sleepAymeric Wibo2025-07-263-18/+322
| | | | | | | | | | | | | | | | | | | | | | Get "log" address with the `SMU_MSG_LOG_GETDRAM_ADDR_HI/LO` SMU commands. From this, we dump & read metrics about residency in various sleep states (none, S0i2, and S0i3), as well as active durations for the IP blocks on the CPU during the last sleep. All these metrics are exposed under the `dev.amdsmu.0.metrics` node. This is useful for debugging sleep as the residency registers in the `_LPI` object are not populated on some systems (e.g. AMD Phoenix). A `dev.amdsmu.0.ip_blocks.XXX` node is also created for each IP block, with children for the current active state and time spent active during the last sleep. Differential Revision: https://reviews.freebsd.org/D48714 Reviewed by: cem, kib, mckusick Approved by: kib, mckusick Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48714
* amdsmu: Initial work on a driver for the AMD SMUAymeric Wibo2025-07-263-0/+324
Start work on a driver for the AMD SMU (system management unit), which will eventually be used for getting S0ix statistics (e.g. how long the CPU has spent in the deepest - S0i3 - sleep state during the last sleep) as well as letting PMFW (power management firmware, running on the SMU) know when we intend to enter and exit sleep. It is what's responsible for actually turning off the VDD line to the CPU. With this commit, amdsmu is just able to get the SMU's firmware version on AMD Rembrandt, Phoenix, and Strix Point CPUs. This is the equivalent to amd-pmc on Linux. Reviewed by: cem, kib, mckusick Approved by: kib, mckusick Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48683