amd-debug-tools 0.2.6__tar.gz → 0.2.10__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. amd_debug_tools-0.2.10/.github/workflows/ci.yml +117 -0
  2. amd_debug_tools-0.2.10/.github/workflows/mirror.yml +24 -0
  3. amd_debug_tools-0.2.10/.gitignore +11 -0
  4. amd_debug_tools-0.2.10/.pre-commit-config.yaml +7 -0
  5. amd_debug_tools-0.2.10/.vscode/settings.json +129 -0
  6. amd_debug_tools-0.2.10/Makefile +9 -0
  7. amd_debug_tools-0.2.10/PKG-INFO +75 -0
  8. amd_debug_tools-0.2.10/README.md +50 -0
  9. amd_debug_tools-0.2.10/amd_pstate.py +34 -0
  10. amd_debug_tools-0.2.10/amd_s2idle.py +34 -0
  11. amd_debug_tools-0.2.10/amd_ttm.py +34 -0
  12. amd_debug_tools-0.2.10/docs/amd-bios.md +26 -0
  13. amd_debug_tools-0.2.10/docs/amd-pstate.md +4 -0
  14. amd_debug_tools-0.2.6/README.md → amd_debug_tools-0.2.10/docs/amd-s2idle.md +8 -95
  15. amd_debug_tools-0.2.10/docs/amd-ttm.md +35 -0
  16. amd_debug_tools-0.2.10/docs/in-tree.md +12 -0
  17. amd_debug_tools-0.2.10/install_deps.py +34 -0
  18. amd_debug_tools-0.2.10/psr.py +94 -0
  19. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/pyproject.toml +4 -4
  20. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug/__init__.py +0 -1
  21. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug/acpi.py +0 -1
  22. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug/battery.py +0 -1
  23. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug/bios.py +0 -1
  24. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug/common.py +41 -13
  25. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug/database.py +22 -5
  26. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug/display.py +2 -3
  27. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug/failures.py +23 -2
  28. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug/installer.py +1 -2
  29. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug/kernel.py +10 -7
  30. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug/prerequisites.py +53 -14
  31. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug/pstate.py +0 -1
  32. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug/s2idle.py +6 -4
  33. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug/sleep_report.py +1 -2
  34. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug/ttm.py +4 -8
  35. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug/validator.py +5 -8
  36. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug/wake.py +0 -1
  37. amd_debug_tools-0.2.10/src/amd_debug_tools.egg-info/PKG-INFO +75 -0
  38. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug_tools.egg-info/SOURCES.txt +18 -1
  39. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug_tools.egg-info/requires.txt +1 -0
  40. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug_tools.egg-info/top_level.txt +1 -0
  41. amd_debug_tools-0.2.10/src/launcher.py +34 -0
  42. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/test_acpi.py +1 -1
  43. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/test_common.py +76 -51
  44. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/test_database.py +1 -1
  45. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/test_display.py +6 -6
  46. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/test_installer.py +1 -1
  47. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/test_kernel.py +4 -4
  48. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/test_prerequisites.py +354 -2
  49. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/test_s2idle.py +10 -1
  50. {amd_debug_tools-0.2.6/src/amd_debug → amd_debug_tools-0.2.10/src}/test_ttm.py +11 -26
  51. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/test_validator.py +8 -8
  52. amd_debug_tools-0.2.6/PKG-INFO +0 -184
  53. amd_debug_tools-0.2.6/src/amd_debug_tools.egg-info/PKG-INFO +0 -184
  54. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/LICENSE +0 -0
  55. /amd_debug_tools-0.2.6/src/launcher.py → /amd_debug_tools-0.2.10/amd_bios.py +0 -0
  56. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/setup.cfg +0 -0
  57. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug/bash/amd-s2idle +0 -0
  58. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug/s2idle-hook +0 -0
  59. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug/templates/html +0 -0
  60. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug/templates/md +0 -0
  61. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug/templates/stdout +0 -0
  62. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug/templates/txt +0 -0
  63. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug_tools.egg-info/dependency_links.txt +0 -0
  64. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/amd_debug_tools.egg-info/entry_points.txt +0 -0
  65. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/test_batteries.py +0 -0
  66. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/test_bios.py +0 -0
  67. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/test_failures.py +0 -0
  68. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/test_launcher.py +0 -0
  69. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/test_pstate.py +0 -0
  70. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/test_sleep_report.py +0 -0
  71. {amd_debug_tools-0.2.6 → amd_debug_tools-0.2.10}/src/test_wake.py +0 -0
@@ -0,0 +1,117 @@
1
+ name: CI
2
+ on:
3
+ push:
4
+ pull_request:
5
+ workflow_run:
6
+ workflows: ["mirror"]
7
+ types:
8
+ - completed
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - uses: actions/setup-python@v5
16
+ with:
17
+ python-version: "3.x"
18
+ - name: Build release distributions
19
+ run: |
20
+ python -m pip install build
21
+ python -m build
22
+ - name: Store the distribution packages
23
+ uses: actions/upload-artifact@v4
24
+ with:
25
+ name: python-package-distributions
26
+ path: dist/
27
+
28
+ publish-to-pypi:
29
+ name: >-
30
+ Publish Python 🐍 distribution 📦 to PyPI
31
+ if: startsWith(github.ref, 'refs/tags/')
32
+ needs:
33
+ - build
34
+ runs-on: ubuntu-latest
35
+ environment:
36
+ name: pypi
37
+ url: https://pypi.org/p/amd-debug-tools
38
+ permissions:
39
+ id-token: write
40
+ steps:
41
+ - name: Download all the dists
42
+ uses: actions/download-artifact@v4
43
+ with:
44
+ name: python-package-distributions
45
+ path: dist/
46
+ - name: Publish distribution 📦 to PyPI
47
+ uses: pypa/gh-action-pypi-publish@release/v1
48
+
49
+ github-release:
50
+ name: >-
51
+ Sign the Python 🐍 distribution 📦 with Sigstore
52
+ and upload them to GitHub Release
53
+ needs:
54
+ - publish-to-pypi
55
+ runs-on: ubuntu-latest
56
+
57
+ permissions:
58
+ contents: write # IMPORTANT: mandatory for making GitHub Releases
59
+ id-token: write # IMPORTANT: mandatory for sigstore
60
+
61
+ steps:
62
+ - name: Download all the dists
63
+ uses: actions/download-artifact@v4
64
+ with:
65
+ name: python-package-distributions
66
+ path: dist/
67
+ - name: Sign the dists with Sigstore
68
+ uses: sigstore/gh-action-sigstore-python@v3.0.0
69
+ with:
70
+ inputs: >-
71
+ ./dist/*.tar.gz
72
+ ./dist/*.whl
73
+ - name: Create GitHub Release
74
+ env:
75
+ GITHUB_TOKEN: ${{ github.token }}
76
+ run: >-
77
+ gh release create
78
+ "$GITHUB_REF_NAME"
79
+ --repo "$GITHUB_REPOSITORY"
80
+ --notes ""
81
+ - name: Upload artifact signatures to GitHub Release
82
+ env:
83
+ GITHUB_TOKEN: ${{ github.token }}
84
+ # Upload to GitHub Release using the `gh` CLI.
85
+ # `dist/` contains the built packages, and the
86
+ # sigstore-produced signatures and certificates.
87
+ run: >-
88
+ gh release upload
89
+ "$GITHUB_REF_NAME" dist/**
90
+ --repo "$GITHUB_REPOSITORY"
91
+
92
+ coverage:
93
+ runs-on: ubuntu-latest
94
+ steps:
95
+ - uses: actions/checkout@v4
96
+ - uses: actions/setup-python@v5
97
+ with:
98
+ python-version: "3.x"
99
+ - name: install apt deps
100
+ run: |
101
+ sudo apt install libsystemd-dev -y
102
+ - name: install deps
103
+ run: |
104
+ pip install .
105
+ - name: Generate Report
106
+ run: |
107
+ pip install pytest-cov
108
+ pytest --cov --junitxml=junit.xml
109
+ - name: Upload coverage reports to Codecov
110
+ uses: codecov/codecov-action@v5
111
+ with:
112
+ token: ${{ secrets.CODECOV_TOKEN }}
113
+ - name: Upload test results to Codecov
114
+ if: ${{ !cancelled() }}
115
+ uses: codecov/test-results-action@v1
116
+ with:
117
+ token: ${{ secrets.CODECOV_TOKEN }}
@@ -0,0 +1,24 @@
1
+ name: 'mirror'
2
+ on:
3
+ push:
4
+ branches:
5
+ - __mirror
6
+ schedule:
7
+ # Run everyday at 3 AM UTC
8
+ - cron: '0 3 * * *'
9
+ workflow_dispatch:
10
+
11
+ permissions:
12
+ contents: write
13
+
14
+ jobs:
15
+ mirror:
16
+ runs-on: ubuntu-latest
17
+ name: mirror
18
+ steps:
19
+ - name: mirror
20
+ id: mirror
21
+ uses: bridgelightcloud/github-mirror-action@v3
22
+ with:
23
+ origin: git://git.kernel.org/pub/scm/linux/kernel/git/superm1/amd-debug-tools.git
24
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,11 @@
1
+ /.vscode
2
+ *.txt
3
+ __pycache__
4
+ amd*.egg-info
5
+ build
6
+ dist
7
+ amd*.md
8
+ *.html
9
+ deb_dist/
10
+ *.tar.gz
11
+ .coverage
@@ -0,0 +1,7 @@
1
+ default_stages: [pre-commit]
2
+ repos:
3
+ - repo: https://github.com/ambv/black
4
+ rev: 25.1.0
5
+ hooks:
6
+ - id: black
7
+ exclude_types: [symlink]
@@ -0,0 +1,129 @@
1
+ {
2
+ "cSpell.words": [
3
+ "abled",
4
+ "acpica",
5
+ "alarmtimer",
6
+ "ASIC",
7
+ "aspm",
8
+ "ASPM",
9
+ "asus",
10
+ "ASUS",
11
+ "cmos",
12
+ "CPPC",
13
+ "cpuid",
14
+ "cpuidle",
15
+ "cpus",
16
+ "crashkernel",
17
+ "cryptdevice",
18
+ "cryptkey",
19
+ "cstates",
20
+ "cysystemd",
21
+ "dbus",
22
+ "dmar",
23
+ "dmcub",
24
+ "Dmcub",
25
+ "DMCUB",
26
+ "DMUB",
27
+ "dpia",
28
+ "DPIA",
29
+ "DSDT",
30
+ "earlycon",
31
+ "earlyprintk",
32
+ "edid",
33
+ "edids",
34
+ "ENDC",
35
+ "ertm",
36
+ "evmisc",
37
+ "FACP",
38
+ "geteuid",
39
+ "gobject",
40
+ "gpiolib",
41
+ "gpios",
42
+ "guids",
43
+ "hpet",
44
+ "HPET",
45
+ "hsmp",
46
+ "Hsmp",
47
+ "HSMP",
48
+ "hwirq",
49
+ "hwsleep",
50
+ "Iasl",
51
+ "idlemask",
52
+ "Iommu",
53
+ "irqs",
54
+ "IVRS",
55
+ "kconfig",
56
+ "klass",
57
+ "kmajor",
58
+ "kminor",
59
+ "kwin",
60
+ "levelname",
61
+ "logf",
62
+ "logind",
63
+ "luks",
64
+ "minv",
65
+ "modalias",
66
+ "netdev",
67
+ "netroot",
68
+ "nfsaddrs",
69
+ "nfsroot",
70
+ "noplymouth",
71
+ "notsupported",
72
+ "nowatchdog",
73
+ "ostree",
74
+ "powerprofilesctl",
75
+ "powersave",
76
+ "ppfeaturemask",
77
+ "prefcore",
78
+ "prereq",
79
+ "propf",
80
+ "reques",
81
+ "resumeflags",
82
+ "rhgb",
83
+ "rootflags",
84
+ "rootfstype",
85
+ "roothash",
86
+ "sadm",
87
+ "seeked",
88
+ "showopts",
89
+ "sscanf",
90
+ "SSDT",
91
+ "subleaf",
92
+ "sysfs",
93
+ "tmpd",
94
+ "UBTC",
95
+ "uefi",
96
+ "uevent",
97
+ "Unserviced",
98
+ "usec",
99
+ "userspace",
100
+ "usrflags",
101
+ "usrfstype",
102
+ "virt",
103
+ "wakealarm",
104
+ "xhci",
105
+ "Xhci",
106
+ "zswap"
107
+ ],
108
+ "python.testing.unittestArgs": [
109
+ "-v",
110
+ "-s",
111
+ "./src",
112
+ "-p",
113
+ "test_*.py"
114
+ ],
115
+ "python.testing.pytestEnabled": true,
116
+ "python.testing.unittestEnabled": false,
117
+ "cSpell.ignoreWords": [
118
+ "barplot",
119
+ "intf",
120
+ "line",
121
+ "message",
122
+ "showindex",
123
+ "tablefmt",
124
+ "xlabel",
125
+ "xticks",
126
+ "ylabel",
127
+ "yscale"
128
+ ]
129
+ }
@@ -0,0 +1,9 @@
1
+ build:
2
+ python3 -m build
3
+ check:
4
+ pytest
5
+ coverage:
6
+ coverage run -m unittest
7
+ coverage report
8
+ clean:
9
+ rm -rf build src/*.egg-info build dist amd*.txt amd*md amd*html
@@ -0,0 +1,75 @@
1
+ Metadata-Version: 2.4
2
+ Name: amd-debug-tools
3
+ Version: 0.2.10
4
+ Summary: debug tools for AMD systems
5
+ Author-email: Mario Limonciello <superm1@kernel.org>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://web.git.kernel.org/pub/scm/linux/kernel/git/superm1/amd-debug-tools.git/
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: Operating System :: POSIX :: Linux
10
+ Requires-Python: >=3.7
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: dbus-fast
14
+ Requires-Dist: pyudev
15
+ Requires-Dist: packaging
16
+ Requires-Dist: pandas
17
+ Requires-Dist: jinja2
18
+ Requires-Dist: tabulate
19
+ Requires-Dist: seaborn
20
+ Requires-Dist: cysystemd
21
+ Requires-Dist: Jinja2
22
+ Requires-Dist: matplotlib
23
+ Requires-Dist: seaborn
24
+ Dynamic: license-file
25
+
26
+ # Helpful tools for debugging AMD Zen systems
27
+ [![codecov](https://codecov.io/github/superm1/amd-debug-tools/graph/badge.svg?token=Z9WTBZADGT)](https://codecov.io/github/superm1/amd-debug-tools)
28
+ [![PyPI](https://img.shields.io/pypi/v/amd-debug-tools.svg)](https://pypi.org/project/amd-debug-tools/)
29
+
30
+ This repository hosts open tools that are useful for debugging issues on AMD systems.
31
+
32
+ ## Installation
33
+ ### Distro (Arch)
34
+ `amd-debug-tools` has been [packaged for Arch Linux](https://archlinux.org/packages/extra/any/amd-debug-tools/) (and derivatives). You can install it using:
35
+
36
+ pacman -Sy amd-debug-tools
37
+
38
+ ### Using a python wheel (Generic)
39
+ It is suggested to install tools in a virtual environment either using
40
+ `pipx` or `python3 -m venv`.
41
+
42
+ #### From PyPI
43
+ `amd-debug-tools` is distributed as a python wheel, which is a
44
+ binary package format for Python. To install from PyPI, run the following
45
+ command:
46
+
47
+ pipx install amd-debug-tools
48
+
49
+ ### From source
50
+ To build the package from source, you will need to the `python3-build`
51
+ package natively installed by your distribution package manager. Then you
52
+ can generate and install a wheel by running the following commands:
53
+
54
+ python3 -m build
55
+ pipx install dist/amd-debug-tools-*.whl
56
+
57
+ ### Ensuring path
58
+ If you have not used a `pipx` environment before, you may need to run the following command
59
+ to set up the environment:
60
+
61
+ pipx ensurepath
62
+
63
+ This will add the `pipx` environment to your path.
64
+
65
+ ## Running in-tree
66
+ Documentation about running directly from a git checkout is available [here](https://github.com/superm1/amd-debug-tools/blob/master/docs/in-tree.md).
67
+
68
+ ## Tools
69
+
70
+ Each tool has its own individual documentation page:
71
+ * [amd-s2idle](https://github.com/superm1/amd-debug-tools/blob/master/docs/amd-s2idle.md)
72
+ * [amd-bios](https://github.com/superm1/amd-debug-tools/blob/master/docs/amd-bios.md)
73
+ * [amd-pstate](https://github.com/superm1/amd-debug-tools/blob/master/docs/amd-pstate.md)
74
+ * [amd-ttm](https://github.com/superm1/amd-debug-tools/blob/master/docs/amd-ttm.md)
75
+
@@ -0,0 +1,50 @@
1
+ # Helpful tools for debugging AMD Zen systems
2
+ [![codecov](https://codecov.io/github/superm1/amd-debug-tools/graph/badge.svg?token=Z9WTBZADGT)](https://codecov.io/github/superm1/amd-debug-tools)
3
+ [![PyPI](https://img.shields.io/pypi/v/amd-debug-tools.svg)](https://pypi.org/project/amd-debug-tools/)
4
+
5
+ This repository hosts open tools that are useful for debugging issues on AMD systems.
6
+
7
+ ## Installation
8
+ ### Distro (Arch)
9
+ `amd-debug-tools` has been [packaged for Arch Linux](https://archlinux.org/packages/extra/any/amd-debug-tools/) (and derivatives). You can install it using:
10
+
11
+ pacman -Sy amd-debug-tools
12
+
13
+ ### Using a python wheel (Generic)
14
+ It is suggested to install tools in a virtual environment either using
15
+ `pipx` or `python3 -m venv`.
16
+
17
+ #### From PyPI
18
+ `amd-debug-tools` is distributed as a python wheel, which is a
19
+ binary package format for Python. To install from PyPI, run the following
20
+ command:
21
+
22
+ pipx install amd-debug-tools
23
+
24
+ ### From source
25
+ To build the package from source, you will need to the `python3-build`
26
+ package natively installed by your distribution package manager. Then you
27
+ can generate and install a wheel by running the following commands:
28
+
29
+ python3 -m build
30
+ pipx install dist/amd-debug-tools-*.whl
31
+
32
+ ### Ensuring path
33
+ If you have not used a `pipx` environment before, you may need to run the following command
34
+ to set up the environment:
35
+
36
+ pipx ensurepath
37
+
38
+ This will add the `pipx` environment to your path.
39
+
40
+ ## Running in-tree
41
+ Documentation about running directly from a git checkout is available [here](https://github.com/superm1/amd-debug-tools/blob/master/docs/in-tree.md).
42
+
43
+ ## Tools
44
+
45
+ Each tool has its own individual documentation page:
46
+ * [amd-s2idle](https://github.com/superm1/amd-debug-tools/blob/master/docs/amd-s2idle.md)
47
+ * [amd-bios](https://github.com/superm1/amd-debug-tools/blob/master/docs/amd-bios.md)
48
+ * [amd-pstate](https://github.com/superm1/amd-debug-tools/blob/master/docs/amd-pstate.md)
49
+ * [amd-ttm](https://github.com/superm1/amd-debug-tools/blob/master/docs/amd-ttm.md)
50
+
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/python3
2
+ # SPDX-License-Identifier: MIT
3
+ """
4
+ This module is a launcher for the AMD Debug Tools package. It is meant for
5
+ launching various tools within the package without installation.
6
+ """
7
+
8
+ import sys
9
+ import os
10
+
11
+ URL = "git://git.kernel.org/pub/scm/linux/kernel/git/superm1/amd-debug-tools.git"
12
+ try:
13
+ import amd_debug
14
+ from amd_debug.common import fatal_error
15
+ except ModuleNotFoundError:
16
+ sys.exit(
17
+ f"\033[91m{sys.argv[0]} can not be run standalone.\n"
18
+ f"\033[0m\033[94mCheck out the full branch from {URL}\033[0m"
19
+ )
20
+
21
+
22
+ def main():
23
+ """Main function to launch the appropriate tool based on the script name."""
24
+ try:
25
+ return amd_debug.launch_tool(os.path.basename(sys.argv[0]))
26
+ except ModuleNotFoundError as e:
27
+ fatal_error(
28
+ f"Missing dependency: {e}\n"
29
+ f"Run ./install_deps.py to install dependencies."
30
+ )
31
+
32
+
33
+ if __name__ == "__main__":
34
+ sys.exit(main())
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/python3
2
+ # SPDX-License-Identifier: MIT
3
+ """
4
+ This module is a launcher for the AMD Debug Tools package. It is meant for
5
+ launching various tools within the package without installation.
6
+ """
7
+
8
+ import sys
9
+ import os
10
+
11
+ URL = "git://git.kernel.org/pub/scm/linux/kernel/git/superm1/amd-debug-tools.git"
12
+ try:
13
+ import amd_debug
14
+ from amd_debug.common import fatal_error
15
+ except ModuleNotFoundError:
16
+ sys.exit(
17
+ f"\033[91m{sys.argv[0]} can not be run standalone.\n"
18
+ f"\033[0m\033[94mCheck out the full branch from {URL}\033[0m"
19
+ )
20
+
21
+
22
+ def main():
23
+ """Main function to launch the appropriate tool based on the script name."""
24
+ try:
25
+ return amd_debug.launch_tool(os.path.basename(sys.argv[0]))
26
+ except ModuleNotFoundError as e:
27
+ fatal_error(
28
+ f"Missing dependency: {e}\n"
29
+ f"Run ./install_deps.py to install dependencies."
30
+ )
31
+
32
+
33
+ if __name__ == "__main__":
34
+ sys.exit(main())
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/python3
2
+ # SPDX-License-Identifier: MIT
3
+ """
4
+ This module is a launcher for the AMD Debug Tools package. It is meant for
5
+ launching various tools within the package without installation.
6
+ """
7
+
8
+ import sys
9
+ import os
10
+
11
+ URL = "git://git.kernel.org/pub/scm/linux/kernel/git/superm1/amd-debug-tools.git"
12
+ try:
13
+ import amd_debug
14
+ from amd_debug.common import fatal_error
15
+ except ModuleNotFoundError:
16
+ sys.exit(
17
+ f"\033[91m{sys.argv[0]} can not be run standalone.\n"
18
+ f"\033[0m\033[94mCheck out the full branch from {URL}\033[0m"
19
+ )
20
+
21
+
22
+ def main():
23
+ """Main function to launch the appropriate tool based on the script name."""
24
+ try:
25
+ return amd_debug.launch_tool(os.path.basename(sys.argv[0]))
26
+ except ModuleNotFoundError as e:
27
+ fatal_error(
28
+ f"Missing dependency: {e}\n"
29
+ f"Run ./install_deps.py to install dependencies."
30
+ )
31
+
32
+
33
+ if __name__ == "__main__":
34
+ sys.exit(main())
@@ -0,0 +1,26 @@
1
+ # BIOS log parser
2
+ `amd-bios` is a a tool that can be used to enable or disable BIOS AML debug logging
3
+ -and to parse a kernel log that contains BIOS logs.
4
+
5
+ ## `amd-bios trace`
6
+ Modify BIOS AML trace debug logging.
7
+
8
+ One of the following arguments must be set for this command:
9
+
10
+ --enable Enable BIOS AML tracing
11
+ --disable Disable BIOS AML tracing
12
+
13
+ The following optional arguments are supported for this command:
14
+
15
+ --tool-debug Enable tool debug logging
16
+
17
+ ## `amd-bios parse`
18
+ Parses a kernel log that contains BIOS AML debug logging and produces a report.
19
+
20
+ The following optional arguments are supported for this command:
21
+
22
+ --input INPUT Optional input file to parse
23
+ --tool-debug Enable tool debug logging
24
+
25
+ ## `amd-bios --version`
26
+ This will print the version of the tool and exit.
@@ -0,0 +1,4 @@
1
+ # AMD P-State issue triage tool
2
+ `amd-pstate` is a tool used for identification of issues with amd-pstate.
3
+ It will capture some state from the system as well as from the machine specific registers that
4
+ amd-pstate uses.