4lDO2
ba661f9719
Replace SYS_PIPE2 with libc::pipe in pcid.
2023-08-31 21:20:23 +02:00
Ron Williams
156be64a9d
pcid: replace add that should allow wrapping with explicit wrapping_add
2023-07-27 01:22:56 -07:00
4lDO2
e0a0e2a532
Remove physmap in pcid.
2023-07-18 11:01:16 +02: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
4lDO2
a5a3f3341f
Remove all usages of physunmap.
2023-06-11 11:33:27 +02:00
Jeremy Soller
96246acca5
pcid: Optimize PCI bus scanning
2023-02-15 20:05:25 -07:00
Jeremy Soller
5bbe2e3f4c
ahci, ihda, pci, xhci: logging adjustments
2023-02-15 19:30:59 -07:00
Jeremy Soller
625064004d
Update for new Rust nightly
2023-02-11 14:37:22 -07: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
Jeremy Soller
4bca3e55d3
Fix xhcid compilation
2022-08-31 08:49:39 -06:00
Jeremy Soller
0e85c01ea3
Implement 64-bit BARs
2022-08-31 08:46:53 -06:00
4lDO2
21e30b7339
Replace syscall::clone() with libc::fork().
2022-07-27 16:25:01 +02:00
Jeremy Soller
da8ecef8a7
Workarounds for aarch64 support
2022-07-26 16:11:45 -06:00
4lDO2
d426ffacea
Update toolchain to 2022-03-18.
2022-03-19 15:06:29 +01:00
Jeremy Soller
5e42b0697e
Skip parsing vendor caps with length 0
2022-02-11 09:23:48 -07:00
4lDO2
00b7674321
Use correct syscall when dropping PCIe context.
2021-03-08 14:37:38 +01:00
Jeremy Soller
31bae74334
Merge branch 'code_hygiene' into 'master'
...
Code hygiene
See merge request redox-os/drivers!72
2020-08-08 12:55:24 +00:00
Jeremy Soller
be101621cc
Update to newer syscall
2020-08-02 15:25:03 -06:00
Wren Turkal
6018b6fc49
Fix lint issues from rustc.
...
Signed-off-by: Wren Turkal <wt@penguintechs.org >
2020-08-01 16:52:47 -07:00
Wren Turkal
dadc0c6c10
Remove unused imports.
...
Signed-off-by: Wren Turkal <wt@penguintechs.org >
2020-08-01 12:48:06 -07:00
Jeremy Soller
63dc11fbb9
Merge branch 'add_pci_vendor_specific_capability' into 'master'
...
Add pci vendor specific capability.
See merge request redox-os/drivers!71
2020-08-01 18:18:31 +00:00
Jeremy Soller
7b8485a582
Merge branch 'pci_ids_info' into 'master'
...
Add more structure cli to pcid.
See merge request redox-os/drivers!67
2020-08-01 18:16:31 +00:00
Wren Turkal
65982d5e02
Add more structure cli to pcid.
...
This change adds a structopt commandline interface to the pcid tool.
This add some help for the arguments that pcid takes.
Signed-off-by: Wren Turkal <wt@penguintechs.org >
2020-08-01 18:16:31 +00:00
Wren Turkal
39fea64403
Add pci vendor specific capability.
...
Signed-off-by: Wren Turkal <wt@penguintechs.org >
2020-08-01 00:40:30 -07:00
Wren Turkal
5db50db7a9
Fix buggy assertion in pcid capability parser.
...
The pcid capability parsing code has an assertion that checks for dword
alignment. Unfortunately, the check was previously checking for
alignment to qwords. This fixes that.
I found this issue by using qemu to emulate adding different pci
devices. I managed to come across a device that had a capability
aligned on dword, but not qword. That exposed the bug.
Signed-off-by: Wren Turkal <wt@penguintechs.org >
2020-07-31 21:39:21 -07:00
Wren Turkal
5dfd5f7e7c
Fixed PCI bus scan to scan bus 0xFF.
...
Previously, the PCI bus scan was skipping bus 0xFF. Now it does not.
I used a match expression to make sure that all cases are accounted for.
I also changed the PCI dev scan and PCI func scan to use a match
expression in a similar way to make sure all cases are account. While
this is functionally the same as before, the match expression will not
allow unhandled cases and should be easier to read and make it harder
to introduce bugs.
Signed-off-by: Wren Turkal <wt@penguintechs.org >
2020-07-27 22:49:39 -07:00
Jeremy Soller
24aa9192cb
pcid: Fix extra newlines in log
2020-07-15 22:23:34 -06:00
4lDO2
146265682a
Improved PCI capability parsing.
2020-05-21 12:16:22 +00:00
4lDO2
cea6ce7d7a
Move the setrens to a later position, in nvmed.
2020-05-02 00:05:04 +02:00
4lDO2
c61e886108
Refactor and rustfmt the nvme driver.
2020-05-01 11:57:55 +02:00
4lDO2
d485176bd6
Improve startup interrupt initialization.
2020-04-27 15:59:06 +02:00
4lDO2
4016b0c7b8
Fix failing pcid config parsing.
2020-04-23 15:35:44 +02:00
4lDO2
7b69d5b9b5
WIP: Use the enhanced pcid IPC.
2020-04-22 21:21:55 +02:00
4lDO2
07d4ae0e60
Recognize the AHCI-specific SATA PCI capability.
2020-04-22 18:52:51 +02:00
4lDO2
fe95c942ac
Add pcid logging.
2020-04-22 18:27:43 +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
4lDO2
afe9c88f37
Allow every settable MSI field to be set.
2020-04-21 15:42:51 +02:00
4lDO2
cee5a39ccc
Fix pcie memory destructor.
2020-04-19 17:32:45 +02:00
4lDO2
14206f0e5c
Successfully read config space with PCIe MMIO*.
...
*to the extent where all the subdriver appear to function as normal.
2020-04-19 17:32:45 +02:00
4lDO2
31d5a95cf9
Add MCFG parsing for PCIe.
2020-04-19 17:32:45 +02:00
4lDO2
81afdb2750
Remove two todo comments.
2020-04-19 14:45:46 +02:00
4lDO2
443b160b6d
Add internal locking to the Xhci struct.
2020-04-19 14:45:46 +02:00
4lDO2
cfc4d65d48
THE INTERRUPTS ARE GETTING GENERATED!
2020-04-19 14:45:46 +02:00
4lDO2
cb5a72fbc1
Successfully recognize (only one) MSI-X IRQ.
...
Somehow it only happens once though.
2020-04-19 14:45:46 +02:00
4lDO2
fa594155c9
Allow subdrivers to get the capability structs.
2020-04-19 14:45:46 +02:00
4lDO2
735c55f656
Rebase.
2020-04-19 14:45:46 +02:00
4lDO2
7536048ceb
Parse some of the PCI capabilities, and setup IPC.
2020-04-19 14:45:46 +02:00