bjorn3
15d2078a13
Handle daemonization of pcid in a better way
...
Currently pcid exits the main thread once it is done spawning drivers
and expects all background threads handling driver communication to stay
around. This only works as exitting the main thread on redox os
currently doesn't cause the whole process to die. This will have to be
fixed at some point for compatibility with programs that expect that
exitting the main thread kills all other threads in the process, at
which point pcid would break without the changes in this commit.
2024-07-20 15:11:34 +02:00
bjorn3
fd8dabd1bc
Use the new scheme format in most places
...
The graphics subsystem still uses the old format as orbital manually
parses the fpath result.
2024-07-11 21:14:45 +02:00
bjorn3
07aaf6ea94
pcid: Don't include source files in two different crates
...
This confuses rust-analyzer.
2024-06-16 15:29:09 +02:00
bjorn3
6d15fbba75
pcid: Move msi from pci to driver_interface
2024-06-16 15:23:32 +02:00
bjorn3
ba6224bc27
pcid: Move VendorSpecificCapability form pci to driver_interface
2024-06-16 15:21:51 +02:00
bjorn3
5c9bbb5c96
pcid: Move PciBar from pci to driver_interface
2024-06-16 15:20:52 +02:00
bjorn3
52d1c0fb4f
pcid: Move FullDeviceId from pci to driver_interface
2024-06-16 15:19:14 +02:00
bjorn3
b6a75d0a16
virtio: Support the modern transport on x86
2024-06-15 21:59:10 +02:00
bjorn3
2144eaa62c
Rustfmt pcid
2024-06-15 21:38:43 +02:00
bjorn3
23ac696491
pcid: Add PciFunctionHandle::map_bar method
...
This will enable the pcid driver interface to safely map the MSI-X table
in the future without having to worry about a BAR being mapped twice.
2024-06-15 15:47:48 +02:00
bjorn3
a3b957c2e5
pcid: Fetch config in PciFunctionHandle::connect_default()
2024-06-15 15:16:09 +02:00
bjorn3
fdb9ea816b
pcid: Rename PcidServerHandle to PciFunctionHandle
2024-06-15 15:05:59 +02:00
bjorn3
386a63df42
pcid: Replace get_capabilities with get_vendor_capabilities
...
While this stops returning raw MSI/MSI-X capabilities from
get_capabilities, the same info can be obtained using
fetch_all_features and feature_info.
2024-06-14 11:12:06 +02:00
bjorn3
4f583b1cfb
Store decoded MSI info instead of full capability in PciFeatureInfo
2024-06-11 16:48:43 +02:00
bjorn3
df66633111
pcid: Store decoded MsixInfo instead of full capability in PciFeatureInfo
2024-06-10 21:00:07 +02:00
bjorn3
588bbfe6a3
pcid: Stop returning feature enable status from fetch_all_features
...
For the same reason the feature_status method was removed.
2024-06-10 19:44:12 +02:00
bjorn3
e14e56349f
pcid: Remove method to get the current feature status
...
Devices should never change the feature status behind the back of the
driver, so storing the current status after setting it is fine. Drivers
should reset all state when they start to recover from a crashed driver,
so they shouldn't need to get the current feature status at startup
either.
2024-06-10 19:44:12 +02:00
bjorn3
3737a70cc1
pcid: Reduce visibility of server handle send/recv
2024-06-09 14:03:16 +02:00
bjorn3
6825d9b2ba
pcid: Remove support for connecting to non-default server
2024-06-09 14:03:16 +02:00
Jeremy Soller
de2fae8183
Do not compile MSI-X function for x86 32-bit
2024-02-16 20:52:37 -07:00
bjorn3
67d3015e2e
Add helper for allocating a single MSI/MSI-X interrupt vector
...
It doesn't actually configure the device to emit it though, but does
make this easier to do.
2024-01-25 14:43:44 +01:00
bjorn3
354c351b19
Unify device info printing between drivers
2024-01-23 13:01:40 +01:00
bjorn3
ad23ad5d93
Introduce irq_handle helper for legacy interrupts
2024-01-22 19:35:18 +01:00
bjorn3
bd6716efe4
Make legacy_interrupt_line an Option
...
Drivers don't need to know the exact legacy_interrupt_pin in use.
Just if legacy interrupts are enabled and if so which
legacy_interrupt_line is used.
2024-01-22 19:35:06 +01:00
bjorn3
a5d0c7c354
Use pci_types for reading BARs
...
This simplifies a lot of code and adds support for 64bit BARs.
2024-01-22 15:54:18 +01:00
bjorn3
0b611dca04
Start using the pci_types crate
2024-01-22 11:25:43 +01:00
bjorn3
be0e6b9dd7
Pass self instead of &self to PciFeature methods
...
PciFeature is Copy, so passing it behind a reference is not necessary.
2024-01-21 20:46:00 +01:00
bjorn3
d0e90f5ded
Remove fetch_header from pcid_interface
...
Most things are already stored in SubdriverArguments and the couple of
things that aren't may change over time and thus should be read again
each time they are accessed, while fetch_header would receive a fixed
copy from pcid.
2024-01-21 19:35:39 +01:00
bjorn3
1890293e86
Introduce a FullDeviceId type and pass it in pcid_interface
2024-01-21 15:18:56 +01:00
bjorn3
2b5ed69a06
Use PciAddress in a couple more places
2024-01-19 12:40:54 +01:00
Anhad Singh
7e5a3196c2
pcid::server_handle: add get_capabilities
...
This commit adds the `get_capabilities` function to `PcidServerHandle`
which returns all of the `Capability`s (raw representation) of the PCI
device.
Signed-off-by: Anhad Singh <andypython@protonmail.com >
2023-06-19 12:18:56 +10:00
Jeremy Soller
a6bafa17b0
Add pcid methods to read/write pci config region
2022-09-12 21:47:16 -06:00
Jeremy Soller
e2a8255547
Allow reading PCI header through pcid socket
2022-09-07 12:15:41 -06:00
Wren Turkal
dadc0c6c10
Remove unused imports.
...
Signed-off-by: Wren Turkal <wt@penguintechs.org >
2020-08-01 12:48:06 -07:00
4lDO2
cea6ce7d7a
Move the setrens to a later position, in nvmed.
2020-05-02 00:05:04 +02:00
4lDO2
7b69d5b9b5
WIP: Use the enhanced pcid IPC.
2020-04-22 21:21:55 +02:00
4lDO2
85691b8f4e
Fix xhcid.
2020-04-22 14:43:06 +02:00
4lDO2
cafee6ad7b
Allow per-cpu IRQ allocation.
2020-04-22 13:43:53 +02:00
4lDO2
4f62888bb4
Various fixes.
2020-04-21 15:42:51 +02:00