Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
.idea/
.vscode/
scripts/__pycache__/
scripts/pm_dumps/
userspace/monitor_cpu
*.o
*.d
*.ko
*.cmd
*.mod
*.mod.*
*.bin
Module.symvers
modules.order
NOTES.txt
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MOD := ryzen_smu
VERSION := 0.1.6
VERSION := 0.1.7
TARGET := $(shell uname -r)
DKMS_ROOT_PATH := /usr/src/$(MOD)-$(VERSION)

Expand All @@ -16,7 +16,7 @@ endif
endif

obj-m := $(MOD).o
$(MOD)-objs := drv.o smu.o
$(MOD)-objs := drv.o smu.o lib/smu_common.o

.PHONY: all modules clean dkms-install dkms-uninstall insmod checkmod

Expand Down
59 changes: 11 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ can also be accessed:

- Granite Ridge ( Ryzen 9000 Desktop Series )
- Strix Point ( Ryzen AI 300 )
- Hawk Point ( Ryzen 8000 Mobile Series )
- Phoenix ( Ryzen 8000 APU Series )
- Hawk Point ( Ryzen 8000 APU Series )
- Phoenix ( Ryzen 7000 APU Series )
- Storm Peak ( ThreadRipper 7000 Workstation Series )
- Raphael ( Ryzen 7000 Desktop Series )
- Chagall ( ThreadRipper 5000 Workstation Series )
Expand Down Expand Up @@ -76,8 +76,6 @@ exposed:
- `pm_table_size`
- `pm_table`



## Installation

The kernel module may be installed either by DKMS or manually building and inserting the module.
Expand All @@ -88,28 +86,28 @@ Be sure kernel headers, dev utilities such as `gcc` and `make` are installed bef

```sh
sudo apt install dkms git build-essential linux-headers-$(uname -r)
git clone https://gitlab.com/leogx9r/ryzen_smu.git
git clone https://github.com/amkillam/ryzen_smu.git
cd ryzen_smu

sudo make dkms-install
```

### Arch Linux

Available on the [AUR](https://aur.archlinux.org/packages/ryzen_smu-dkms-git/).

Install it using your AUR helper of choice, example:

```sh
yay -S ryzen_smu-dkms-git
sudo pacman -S dkms git base-devel linux-headers-$(uname -r)
git clone https://github.com/amkillam/ryzen_smu.git
cd ryzen_smu

sudo make dkms-install
```

### Stand-alone Installation

The module may be built and inserted into the running kernel manually as follows:

```sh
git clone https://gitlab.com/leogx9r/ryzen_smu.git
git clone https://github.com/amkillam/ryzen_smu.git
cd ryzen_smu

make
Expand Down Expand Up @@ -138,7 +136,7 @@ Upon loading the module, you should see output in your `dmesg` window listing th
# dmesg

...
[1091.154018] ryzen_smu: CPUID: family 0x17, model 0x71, stepping 0x0, package 0x2
[1091.154018] ryzen_smu: CPUID: family 0x17, model 0x71, package 0x2
[1091.154385] ryzen_smu: SMU v46.54.0
...
```
Expand Down Expand Up @@ -172,9 +170,6 @@ SMU v46.54.0
# cat /sys/kernel/ryzen_smu_drv/codename
4

# cat /sys/kernel/ryzen_smu_drv/drv_version
0.1.7

```

Following which, you can run the [test.py script](scripts/test.py) to verify that SMU and SMN
Expand Down Expand Up @@ -228,39 +223,7 @@ Note: This file returns a string representation of the "Value" field above.

#### `/sys/kernel/ryzen_smu_drv/codename`

Returns a numeric index containing the running processor's codename based on the following
enumeration:

| Hex | Decimal | Code Name |
|:---:|:-------:|:--------------:|
| 00h | 0 | Unknown |
| 01h | 1 | Colfax |
| 02h | 2 | Renoir |
| 03h | 3 | Picasso |
| 04h | 4 | Matisse |
| 05h | 5 | Threadripper |
| 06h | 6 | Castle Peak |
| 07h | 7 | Raven Ridge |
| 08h | 8 | Raven Ridge 2 |
| 09h | 9 | Summit Ridge |
| 0Ah | 10 | Pinnacle Ridge |
| 0Bh | 11 | Rembrandt |
| 0Ch | 12 | Vermeer |
| 0Dh | 13 | Vangogh |
| 0Eh | 14 | Cezanne |
| 0Fh | 15 | Milan |
| 10h | 16 | Dali |
| 11h | 17 | Luciene |
| 12h | 18 | Naples |
| 13h | 19 | Chagall |
| 14h | 20 | Raphael |
| 15h | 21 | Phoenix |
| 16h | 22 | Strix Point |
| 17h | 23 | Granite Ridge |
| 18h | 24 | Hawk Point |
| 19h | 25 | Storm Peak |

Note: This file returns 2 characters of the 'Decimal' encoded index.
Returns a numeric value containing the running processor's codename based on the [smu_processor_codename](lib/smu_common.h) enumeration.

#### `/sys/kernel/ryzen_smu_drv/rsmu_cmd` or `/sys/kernel/ryzen_smu_drv/mp1_smu_cmd` or `/sys/kernel/ryzen_smu_drv/hsmp_smu_cmd`

Expand Down
3 changes: 1 addition & 2 deletions dkms.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
MAKE="make TARGET=${kernelver} CFLAGS_MODULE+=@CFLGS@"
CLEAN="make clean"
PACKAGE_NAME="ryzen_smu"
PACKAGE_VERSION="@VERSION@"
BUILT_MODULE_NAME[0]="ryzen_smu"
DEST_MODULE_LOCATION[0]="/kernel/drivers/ryzen_smu"
AUTOINSTALL="yes"
AUTOINSTALL="yes"
Loading