Commit Graph

897 Commits

Author SHA1 Message Date
Jeremy Soller e2976d0f52 Merge branch 'pci_force_pcid_interface' into 'master'
Migrate all PCI drivers to pcid_interface

See merge request redox-os/drivers!133
2024-01-20 23:08:12 +00:00
Jeremy Soller a4acf55ad8 Merge branch 'pci_cleanup' into 'master'
Couple more pcid cleanups

See merge request redox-os/drivers!132
2024-01-20 23:07:34 +00:00
bjorn3 dc13752d74 Force usage of pcid_interface 2024-01-20 19:42:06 +01:00
bjorn3 3b4d0e858f Migrate vboxd to pcid_interface (untested) 2024-01-20 19:26:46 +01:00
bjorn3 878a02f29f Migrate ixgbed to pcid_interface (untested) 2024-01-20 19:13:27 +01:00
bjorn3 075e28339f Migrate e1000d to pcid_interface 2024-01-20 19:04:15 +01:00
bjorn3 d950e33184 Migrate ac97d to pcid_interface 2024-01-20 18:58:09 +01:00
bjorn3 f9f3407f36 Migrate ahacid to pcid_interface 2024-01-20 18:51:29 +01:00
bjorn3 558f11b3eb Migrate bgad to pcid_interface 2024-01-20 18:34:40 +01:00
bjorn3 de7677604e Use hex instead of decimal in all config.toml
This matches the way basically everyone prints PCI ids
2024-01-20 17:59:38 +01:00
bjorn3 382047b14e Rename the pcie module to cfg_access 2024-01-20 16:04:18 +01:00
bjorn3 d832717bf9 Remove a bit of dead code 2024-01-20 14:42:29 +01:00
bjorn3 20eb92ae02 Assert PCI config space accesses are aligned 2024-01-20 14:36:37 +01:00
bjorn3 cb7dc2abd2 Only set iopl for helper threads when actually necessary 2024-01-20 14:17:51 +01:00
bjorn3 3cbfbf6442 Move the IO port based fallback for PCI out of the pci module
The pci module is included in the pcid_interface library, which never
needs it.
2024-01-20 14:07:31 +01:00
bjorn3 4f20b90fc3 Remove PciBus and PciDev types
They weren't used in a load bearing way. If we want to keep persistent
state about buses and devices in the future they would probably get a
different shape.
2024-01-20 13:38:45 +01:00
Jeremy Soller 46b83bac04 Merge branch 'pci_perf' into 'master'
Improve performance of PCIe MMIO config space accesses

See merge request redox-os/drivers!131
2024-01-19 22:25:15 +00:00
bjorn3 cf7fbacdaf Stop leaking Mcfg again
We don't need it after Pcie::new anymore
2024-01-19 19:53:39 +01:00
bjorn3 529b4935ee Physmap all buses upfront
This avoids a costly Mutex lock and BTreeMap lookup for each config
space access.
2024-01-19 19:50:11 +01:00
bjorn3 23d963361a Fix a couple of warnings 2024-01-19 19:14:22 +01:00
bjorn3 cb9edcb7d6 Reduce log verbosity of Capability::parse_vendor by combining some logs 2024-01-19 19:11:05 +01:00
bjorn3 8d87b701ba Remove Mcfgs type
This wrapper was only useful back when we accepted multiple MCFG tables.
2024-01-19 19:10:35 +01:00
bjorn3 ae7e2dac9f Only parse a single MCFG ACPI table
There should only be one and Linux only parses the first one too.
2024-01-19 18:41:28 +01:00
bjorn3 07c029ec21 Add a fixme for using ACPI 2024-01-19 18:10:57 +01:00
Jeremy Soller b014145232 Merge branch 'pci_types' into 'master'
A bunch of pci improvements

See merge request redox-os/drivers!130
2024-01-19 16:18:00 +00:00
bjorn3 101f062b56 Remove a couple of error conditions in Mcfgs::fetch()
* Every directory entry has to have a filename, so use unwrap
* Handle non-UTF-8 ACPI table filenames by using as_encoded_bytes
2024-01-19 14:58:09 +01:00
bjorn3 240e59e2bf Handle pci buses without a device at the first slot 2024-01-19 14:45:48 +01:00
bjorn3 c611988768 Fix MCFG parsing for PCIe 2024-01-19 13:19:53 +01:00
bjorn3 b317484d67 Simplify Mcfgs::fetch 2024-01-19 13:00:23 +01:00
bjorn3 15249127a5 Fix a couple of warnings 2024-01-19 12:47:42 +01:00
bjorn3 d010d03eef Fix pcid tests 2024-01-19 12:40:55 +01:00
bjorn3 2b5ed69a06 Use PciAddress in a couple more places 2024-01-19 12:40:54 +01:00
bjorn3 42b2f52d41 Directly store a PciAddress inside PciFunc instead of a PciDev + num 2024-01-19 12:29:22 +01:00
bjorn3 e5491a9e9a Inline several layers of read and write methods 2024-01-19 12:21:22 +01:00
bjorn3 336903b90a Introduce SharedPciHeader to deduplicate fields between the General and PciToPci variants 2024-01-19 12:14:02 +01:00
bjorn3 a7c5391c6c Introduce PciAddress type copied from the pci_types crate 2024-01-19 12:14:00 +01:00
bjorn3 07d5d730d2 Remove nolock CfgAccess methods
They are only called by the corresponding locked methods.
2024-01-18 22:14:04 +01:00
Jeremy Soller bf441b01f1 Merge branch 'virtio_cleanup' into 'master'
Couple of virtio cleanups

See merge request redox-os/drivers!129
2024-01-18 20:04:44 +00:00
bjorn3 fbcf01b413 Add a couple of FIXME 2024-01-18 19:03:10 +01:00
bjorn3 3f2f32de59 Add back VIRTIO_NET_F_MAC to virtio-netd 2024-01-18 18:48:25 +01:00
bjorn3 b06f0534aa Remove interrupt status register probing
It isn't used when MSI-X is used and we always use MSI-X interrupts.
2024-01-18 18:45:32 +01:00
bjorn3 fcc55507ea Move the notify_multiplier field into a separate PciCapabilityNotify type
It only exists for VIRTIO_PCI_CAP_NOTIFY_CFG and could conflict with
fields of other capability types.
2024-01-18 18:07:05 +01:00
bjorn3 380a416258 Reorganize virtio headers and add a couple of new fields
Also add a decent amount of comments from the virtio spec.
2024-01-18 17:17:39 +01:00
bjorn3 bd8b218174 Don't return Result from spawn_irq_thread
It never returns an error.
2024-01-18 15:29:06 +01:00
Jeremy Soller ca8d73fb32 Merge branch 'graphics_rework' into 'master'
Move text console handling from vesad to a new fbcond daemon

See merge request redox-os/drivers!128
2024-01-15 02:00:50 +00:00
bjorn3 ed69a8ef6d Open scheme in non-blocking mode and ensure events aren't lost 2024-01-14 21:20:42 +01:00
bjorn3 4f6f4d7267 Prevent a potential deadlock when writing to multiple text consoles 2024-01-14 19:29:02 +01:00
bjorn3 fe4f0880af Couple of minor cleanups
Among other things this removes the seek implementation as it doesn't
seem to be used and didn't do anything anyway.
2024-01-14 19:10:47 +01:00
bjorn3 f64a6e4c6f Remove text mode support from vesad
This is now handled by fbcond
2024-01-14 18:22:52 +01:00
bjorn3 bc1a068a4f Introduce fbcond to replace text console handling inside vesad
This will in the future allow switching between graphical mode and text
mode virtual terminals while keeping alternative graphics drivers like
virtio-gpud enabled at all times rather than having to reset back to VGA
mode every time.
2024-01-14 18:14:40 +01:00