Commit Graph

883 Commits

Author SHA1 Message Date
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
bjorn3 b3b1fb1726 Remove VtMode::Text
It isn't used anywhere.
2024-01-13 19:36:08 +01:00
bjorn3 5c591cf475 Merge Display into GraphicScreen 2024-01-13 19:32:24 +01:00
bjorn3 24d1f95de3 Minor change 2024-01-13 19:25:49 +01:00
bjorn3 5f6edc7adc Fix warnings 2024-01-13 19:20:37 +01:00
bjorn3 5375d9e97d Remove some GraphicScreen direct fields accesses from TextScreen 2024-01-13 19:17:25 +01:00
bjorn3 6be07a3015 Use GraphicScreen inside TextScreen
In preparation for moving TextScreen to a separate daemon.
2024-01-13 17:30:52 +01:00
bjorn3 1a698dec98 Move text rendering to vesad::screen::text 2024-01-13 16:24:34 +01:00
bjorn3 ee2a36b889 Remove rusttype support from vesad
It is never enabled and would add a fair amount of complexity to a
system service which has effective root access despite sandboxing due to
being able to read and write display contents and input device events.
2024-01-13 16:11:36 +01:00
Jeremy Soller 87dc1d3e48 Merge branch 'fix_usbhidd' into 'master'
Fix usbhidd

See merge request redox-os/drivers!127
2024-01-12 18:44:08 +00:00
bjorn3 1ac2fdc572 Write events in usbhidd to input:producer
Writing to display.vesa:input seems to get ignored by orbital.
2024-01-12 19:35:35 +01:00
bjorn3 6561685af8 Fix MouseEvent for usbhidd 2024-01-12 19:35:35 +01:00
Jeremy Soller ce86aca558 Merge branch 'fix_absolute_mouse_events' into 'master'
Switch to absolute mouse events by default when running in a VM

See merge request redox-os/drivers!126
2024-01-12 17:58:50 +00:00
bjorn3 7a21573ebd Switch to absolute mouse events by default when running in a VM
This will transparently release the mouse grab of the VM when leaving
the screen edge, making it much easier to quickly switch between the VM
and other apps running on the host.
2024-01-12 18:33:29 +01:00
bjorn3 c2fd9125a7 Fix absolute mouse events with vmmouse
It is no longer possible to query the display size from inputd, so defer
conversion to display pixel coordinates to orbital instead. This also
avoids a lot of work every mouse event to query the display size as
orbital saves this information already.
2024-01-12 18:31:08 +01:00