-
-
Notifications
You must be signed in to change notification settings - Fork 52
pci: Export pci functions through procfs and sysfs #58
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
Comments
Maybe add |
What is the use case for these device interfaces? What is the user supposed to do with them? Are they readonly, etc... Elaborate more on the feature request. |
Full access to all of the functions (that would still be safe) through a fs interface, rw. |
Just do standard sysfs for lspci or mini-lspci |
+1 but a complementary (maybe easier to implement) nonstandard interface would be pleasant, + maybe a (easy to implement) non-standard ioctl interface? |
ioctl is for userspace apps to be able to communicate with kernel and drivers running in the kernel, that would make no sense - if you want PCI access write a kernel module |
Yeah....but why would PCI access be locked in kernel mode? I would understand if it was exclusive to root but not kernel... afaik in bsd/linux it is modifiable through root with sysfs |
Im a bit iffy on in the standard sysfs. seems very redundant, All I would want would be /sys/ vendor /device id/<read, write, foo, bar> |
Considering a lot of Linux userland that uses |
Yeah, but the (pci) standard is awful imho, i2(/3)c, usb, firewire, is good but the pci proc/sysfs standard is abhorrent(imho UNIX is a curse but thats a separate thing). |
Considering Aero is UNIX like, and likely won't write its own userland (at least not fully like ToaruOS or SerenityOS), the in your eyes abhorrent standard is the one to follow to maximize portability. UNIX being a curse is a yikes for you I'm afraid, because the aforementioned UNIX likeness of Aero. Then again, be the change you want to see, and implement a better API yourself. I'm sure contributions like that are welcomed. |
there is a reason that isn't there, you know - driving pci devices is hard, and you can't just write values into the configuration space. Also, text is not very fun to work with, you would probably want to use ioctls and at that point why are you even using sysfs |
Generally, things that use PCI are too performance sensitive even for the overhead of USB, so you won't be able to write a useful userspace driver using a text-based interface. |
Yes, but if your creating a driver in user space your probably not going to be caring about performance, though yeah a text based interface may not be the best but it is the most straightforward for people learning about UNIX through Aero(a educational OS!). |
Aero should add a sysfs and procfs interface for PCI.
The text was updated successfully, but these errors were encountered: