Commit Graph

1103 Commits

Author SHA1 Message Date
Jeremy Soller 8d65e05a28 Merge branch 'move_drivers' into 'master'
Move all drivers to /usr/lib/drivers

See merge request redox-os/drivers!179
2024-06-22 16:55:02 +00:00
Jeremy Soller ab0b156159 ps2d: reduce timeouts 2024-06-17 12:42:23 -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
Jeremy Soller a9bb925f25 Merge branch 'pcid_cleanup9' into 'master'
Don't include source files in two different crates for pcid

See merge request redox-os/drivers!178
2024-06-16 13:32:36 +00: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
Jeremy Soller 434c3aed7a Merge branch 'pcid_cleanup8' into 'master'
Get rid of PciHeader

See merge request redox-os/drivers!177
2024-06-16 13:05:12 +00: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
Jeremy Soller 2be445d6d7 Merge branch 'xhcid_slower_polling' into 'master'
Sleep for 2ms on every poll loop in xhcid

See merge request redox-os/drivers!176
2024-06-16 11:21:32 +00:00
bjorn3 160acff5a8 pcid: Move the code in PciHeader::display to other places 2024-06-16 13:20:16 +02:00
Jeremy Soller d3496f4bd4 Merge branch 'virtio_remove_legacy_transport' into 'master'
Remove virtio legacy transport support

See merge request redox-os/drivers!175
2024-06-16 11:19:14 +00:00
Jeremy Soller 073b837a5e Merge branch 'lived' into 'master'
Make lived stateless.

See merge request redox-os/drivers!174
2024-06-16 11:17:51 +00: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 0d926fb3f7 xhcid: Sleep for 2ms on every poll loop
This significantly reduces cpu usage. On my laptop before this change a
single core would be fully loaded while running at 3-4GHz. With this
change it would only be loaded for about 50% while running at 1-2GHz.
This improves battery lifetime while also preventing the fan from
spinning up to a distracting level.

This shouldn't noticably affect latency given that most keyboards and
mice don't support polling at 500Hz anyway.
2024-06-16 12:04:05 +02:00
bjorn3 fc9331b16a virtio: Remove legacy transport support
Transitional virtio devices (which have both legacy and virtio 1.0
support) have been the default since QEMU 2.7.0, which was released
8 years ago. Basically every non-commercial Linux distro with an older
QEMU has been EOL already.

The legacy transport is also one of the few places where port I/O is
necessary, which is non-trivial to sandbox even once we have IOMMU
support. As it isn't possible to distinguish legacy and modern virtio
devices for pcid, this would mean that all virtio drivers have to be
started as privileged even if it turns out the modern transport is
supported by the VMM.
2024-06-16 11:49:11 +02:00
4lDO2 dd10d77350 Make lived stateless. 2024-06-16 11:27:24 +02:00
Jeremy Soller e1a2e21735 Merge branch 'x86_virtio_modern_transport' into 'master'
Support the modern virtio transport on x86

See merge request redox-os/drivers!173
2024-06-15 21:37:44 +00:00
bjorn3 359f4482dd virtio: Merge the x86 and x86_64 platform specific code 2024-06-15 21:59:10 +02:00
bjorn3 b6a75d0a16 virtio: Support the modern transport on x86 2024-06-15 21:59:10 +02:00
Jeremy Soller be02d70c60 Merge branch 'rustfmt_pcid' into 'master'
Rustfmt pcid

See merge request redox-os/drivers!172
2024-06-15 19:41:09 +00:00
bjorn3 2144eaa62c Rustfmt pcid 2024-06-15 21:38:43 +02:00
Jeremy Soller cd498c1826 Merge branch 'pcid_int_rework' into 'master'
Add PciFunctionHandle::map_bar method

See merge request redox-os/drivers!171
2024-06-15 13:51:20 +00: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
Jeremy Soller aaa3b89a1d Merge branch 'pcid_cleanup7' into 'master'
Use pci_types for parsing capabilties

See merge request redox-os/drivers!170
2024-06-15 11:55:03 +00: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
Jeremy Soller ac5f839ded Merge branch 'ided' into 'master'
Switch ided to v2 scheme protocol.

See merge request redox-os/drivers!169
2024-06-15 11:29:47 +00:00
4lDO2 ccbc1d6d69 Switch ided to v2 scheme protocol. 2024-06-15 12:14:18 +02:00
Jeremy Soller cec242c73d Merge branch 'schemev2plus' into 'master'
Use new positioned IO interface in disk drivers

See merge request redox-os/drivers!168
2024-06-14 12:31:50 +00:00
4lDO2 05ec7464ea Update syscall. 2024-06-14 14:22:01 +02:00
4lDO2 2b146f8778 Properly pass POSITIONED new fd flag. 2024-06-14 13:51:13 +02:00
4lDO2 0058d7c948 Positioned IO. 2024-06-14 13:51:13 +02:00
4lDO2 a366841777 Switch remaining storage daemons to schemev2. 2024-06-14 13:51:13 +02:00
4lDO2 9dee2c12ae Migrate nvmed to schemev2. 2024-06-14 13:51:13 +02:00
4lDO2 0ccf87f357 Use schemev2 for ahcid. 2024-06-14 13:51:08 +02:00
Jeremy Soller 4f86767f03 Merge branch 'initfs_hex_pci_id' into 'master'
Use hex pci id's in initfs.toml

See merge request redox-os/drivers!166
2024-06-14 11:23:30 +00:00
Jeremy Soller 0e5977b868 Merge branch 'pcid_cleanup6' into 'master'
pcid: Replace get_capabilities with get_vendor_capabilities

See merge request redox-os/drivers!167
2024-06-14 11:23:00 +00:00
Jeremy Soller 9d3361d4dd Merge branch 'virtio' into 'master'
Fix vga=virtio by using a scatter-gather list for the framebuffer.

See merge request redox-os/drivers!165
2024-06-14 11:21:46 +00: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