Commit Graph

32 Commits

Author SHA1 Message Date
Ruihan Li de0f8d1e54 Lazily acquire I/O memory 2026-01-28 16:48:58 +08:00
Ruihan Li 073aedb324 Prefer to return `Option<&Type>` 2026-01-28 16:48:57 +08:00
Ruihan Li a599a2c563 Disable BAR decoding when sizing PCI BARs 2026-01-27 23:05:02 -08:00
Ruihan Li eefdaf4de9 Fix minor problems in PCI 2026-01-27 23:05:02 -08:00
Ruihan Li b11fcdcf0b Remove unused code in PCI 2026-01-27 23:05:02 -08:00
Ruihan Li a82d185154 Use PCI ECAM in x86 if possible 2026-01-27 16:24:07 -08:00
Ruihan Li a09de99c1d Ensure PCI access atomicity 2026-01-27 16:24:07 -08:00
Ruihan Li f055a387a7 Get the PCI bus number range 2026-01-27 16:24:07 -08:00
Ruihan Li a3314c6432 Ignore high bits in PCI BAR sizes 2026-01-26 17:19:10 -08:00
Yuke Peng 4213908366 pci: Improves PCI device enumeration by suppporting multi-function detection 2026-01-05 19:08:34 -08:00
Yuke Peng c825c0d2c8 pci: Add `PciHeaderType` & `PciDeviceType` and refactor `BarManager` 2026-01-05 19:08:34 -08:00
Yuke Peng 7634a27ba6 pci: Split the configuration space offset into device-specific 2026-01-05 19:08:34 -08:00
Zhang Junyang c7a2c81366 Miscellaneous clippy fixes for Rust 2024 2025-12-09 09:23:58 +08:00
Zhang Junyang fc9f47a019 Fix manual implementations of `.is_multiple_of()` 2025-12-09 09:23:58 +08:00
Zhang Junyang dd410444e5 Format with new `rustfmt` 2025-12-09 09:23:58 +08:00
Ruihan Li 6ac45fe406 Add methods to allow overlapping I/O ports 2025-12-08 11:12:05 +08:00
Zhe Tang 70eda539df Refactor IoMem acquisition to use appropriate cache policies across multiple components 2025-11-25 10:24:54 +08:00
Ruihan Li d487e42b7c Reunify the style of defining `arch` modules 2025-10-30 17:04:45 +08:00
Ruihan Li 4c26a7a7c5 Fix a typo in the PCI bar detection 2025-09-24 15:41:07 +08:00
Ruihan Li 472edcf795 Clean up unnecessary features 2025-09-24 15:41:07 +08:00
Yuke Peng 701b8f6f92 pci: Refactor ptr alignment 2025-09-21 10:32:23 +08:00
Yuke Peng ecdc8c3fe7 Remove unsafe in x86 PCI code 2025-09-21 10:32:23 +08:00
Yuke Peng a8070a62b6 Extract platform-specific code from ostd into PCI component 2025-09-21 10:32:23 +08:00
Yuke Peng bb15d4591a Extract `PciDeviceLocation` in ostd into PCI component 2025-09-21 10:32:23 +08:00
Yuke Peng f34c37f6c4 Acquire IoMem only when r/w happened 2025-09-21 10:32:23 +08:00
Yuke Peng d60e2e2a6b Align cap_ptr in PCI 2025-09-21 10:32:23 +08:00
Yuke Peng 48376efa52 Extract MSIX in ostd into PCI component 2025-09-21 10:32:23 +08:00
Yuke Peng 1e324d2228 Fix import error in PCI component 2025-09-21 10:32:23 +08:00
Yuke Peng 28d4d0e3ad Use `IoMem::acquire` to get the MemoryBar access 2025-09-21 10:32:23 +08:00
Yuke Peng faee9e9808 Disable IoPort read/write in IoBar 2025-09-21 10:32:23 +08:00
Yuke Peng 1a86bd2471 Move PCI bus in OSTD into PCI component 2025-09-21 10:32:23 +08:00
Yuke Peng f2d1cbdf57 Init PCI compoment 2025-09-21 10:32:23 +08:00