Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pcimem]: Add pcimem Utility #12125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ashwin-h
Copy link
Contributor

@ashwin-h ashwin-h commented Sep 20, 2022

The pcimem application provides a simple method of reading and writing to memory registers on a PCI device.

The code used is from https://github.com/billfarrow/pcimem

Signed-off-by: Ashwin H Ashwin.H@amd.com

Why I did it

We need a utility to read/write to memory regions on a PCI device.

How I did it

reused the code from https://github.com/billfarrow/pcimem and created a debian pkg.

How to verify it

Installed the debian pkg on switch and verified that pcimem is working fine
For ex: To read memory offset 0 on a pci device
sudo pcimem /sys/bus/pci/devices/0000\:12\:00.1/resource0 0

To write value 6 at offset 4 on a pci device
sudo pcimem /sys/bus/pci/devices/0000\:12\:00.1/resource0 4 w 6

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

The pcimem application provides a simple method of reading and writing
to memory registers on a PCI device.

The code used is from https://github.com/billfarrow/pcimem

Signed-off-by: Ashwin H Ashwin.H@amd.com
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 20, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: ashwin-h / name: Ashwin Hiranniah (44ba826)

@ashwin-h
Copy link
Contributor Author

@qiluo-msft @xumia @lguohan could you pls review the PR ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant