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
Jeremy Soller
e7781dcced
Fix compilation on aarch64
2024-06-24 11:43:17 -06:00
bjorn3
4ffed8096d
Move all drivers to /usr/lib/drivers
...
This makes them harder to accidentally run them from the shell, which
would not work. In the future this may also allow embedding the driver
config in the driver executable itself without having to look at all
non-driver executables too.
2024-06-16 17:02:14 +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
16819bc693
pcid: Get rid of PciHeader
...
It is a reminant of when pci_types wasn't used yet and doesn't simplify
things a lot anymore.
2024-06-16 13:42:45 +02:00
bjorn3
a34266b029
pcid: Remove all PciEndpointHeader methods
2024-06-16 13:33:55 +02:00
bjorn3
6c2fdae08c
pcid: Remove all tests of PciHeader
2024-06-16 13:32:11 +02:00
bjorn3
de4d79e69e
pcid: Inline PciEndpointHeader::bars
2024-06-16 13:23:27 +02:00
bjorn3
160acff5a8
pcid: Move the code in PciHeader::display to other places
2024-06-16 13:20:16 +02:00
bjorn3
1179d01e76
pcid: Add pretty string for the NVME device type
2024-06-16 13:12:52 +02:00
bjorn3
ae2240ef0f
pcid: Remove some PciHeader methods
2024-06-16 13:12:29 +02:00
bjorn3
56000cbd9c
pcid: Remove subsystem id from PciEndpointHeader
2024-06-16 13:03:58 +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
3299a070f2
pcid: Also return bar size from physmap_mem and use it in two more drivers
2024-06-15 14:01:06 +02:00
bjorn3
4bd978da7a
pcid: Use pci_types for parsing capabilties
2024-06-15 13:45:57 +02:00
bjorn3
2ab2fe7b5e
Update to pci_types 0.10.0
2024-06-15 13:41:51 +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
d2084e58cb
pcid: Remove PciFunc
2024-06-13 15:06:49 +02:00
bjorn3
d3dc2e0f80
pcid: Remove all PciFunc methods
2024-06-13 14:52:02 +02:00
bjorn3
f6a709ee5a
pcid: Simplify PciFunc::read_range
...
This also avoids UB caused by creating a slice of uninitialized u8.
2024-06-11 21:05:25 +02:00
bjorn3
8e02a87474
pcid: Reduce visibility of MsiCapability and MsixCapability methods
2024-06-11 16:57:58 +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
7c112c34dd
pcid: Remove some unused methods on MsixCapability
2024-06-10 19:44:12 +02:00
bjorn3
15c9ad1ba6
pcid: Ensure MSI and MSI-X are not enabled at the same time
2024-06-10 19:44:12 +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
123eef9635
pcid: Move capability offset into the Capability enum
...
This makes it easier to move to using pci_types for parsing PCI
capabilities.
2024-06-10 19:44:12 +02:00
bjorn3
027d952c39
pcid: Remove parsing of unused capabilities
...
This will make it easier to switch to pci_types for capability parsing
in the future.
2024-06-09 20:38:46 +02:00
bjorn3
8f9bbecd0c
pcid: Rustfmt main.rs
2024-06-09 20:38:46 +02:00
bjorn3
fd3cf79884
pcid: Move spawning and interacting with subdrivers out of main.rs
2024-06-09 20:38:46 +02:00
bjorn3
eb2e670cd6
pcid: Explain why PciBar is used instead of pcid_types::Bar
2024-06-09 18:53:19 +02:00
bjorn3
b04915673d
pcid: Remove ConfigReader and ConfigWriter traits
...
Only PciFunc implements this trait.
2024-06-09 18:51:55 +02:00
bjorn3
d70cf080bb
pcid: Remove with_pci_func_raw
2024-06-09 18:46:35 +02:00
bjorn3
9aed7d560e
pcid: Merge CapabilityOffsetsIter into CapabilitiesIter
2024-06-09 18:21:50 +02:00
bjorn3
9d37d15827
pcid: Avoid duplicate read of vendor and device id
2024-06-09 18:14:52 +02:00
bjorn3
1593884938
pcid: Use capability_pointer method instead of a raw read
2024-06-09 18:14:49 +02:00
bjorn3
7f5a340c83
pcid: Remove cap_pointer from PciHeader::PciToPci
...
It is never used.
2024-06-09 18:14:46 +02:00
bjorn3
ba6b91d561
pcid: Move print_pci_function to a PciHeader method
2024-06-09 16:46:59 +02:00
bjorn3
4b384066f2
Use pci_types for setting the interrupt line
2024-06-09 15:05:47 +02:00
bjorn3
7ddae5fa03
pcid: Add fixme
2024-06-09 14:03:32 +02:00
bjorn3
3737a70cc1
pcid: Reduce visibility of server handle send/recv
2024-06-09 14:03:16 +02:00