Commit Graph

227 Commits

Author SHA1 Message Date
Ruihan Li 54bd64269b Rename `systree` to `aster-systree` 2025-05-03 18:22:11 +08:00
Ruihan Li f720c05706 Fail the CI if workspace lints are not enabled 2025-05-03 18:22:11 +08:00
Qingsong Chen 88f08de3af Refactor framebuffer 2025-04-29 19:48:45 +08:00
Fabing Li 63831dc2df Add ktest cases 2025-04-24 20:03:54 +08:00
Fabing Li 79b0866259 Add sysfs implementation 2025-04-24 20:03:54 +08:00
Zejun Zhao 3aa1079ca6 Clarify the usage of ostd::arch 2025-04-18 13:26:16 +08:00
Ruihan Li d6e40933b8 Move the log lock to a better location 2025-04-16 21:59:24 +08:00
jiangjianfeng 7d24e63216 Move network polling code to bottom half 2025-04-15 14:54:51 +08:00
jiangjianfeng 9804f053f2 Add guard which disables bottom half 2025-04-15 14:54:51 +08:00
Ruihan Li a1f81df263 Remove `ostd/src/mm/offset.rs` 2025-04-15 09:15:22 +08:00
Chen Chengjun a21e895102 Enable RCU to read reference to stored pointers 2025-04-10 14:42:51 +08:00
Cautreoxit b4a1dc03f3 Delete useless visibility for BARs 2025-03-27 18:44:15 +08:00
Cautreoxit 4fff7cdc22 Add an API for BioRequest to return the number of sectors 2025-03-26 10:38:24 +08:00
jiangjianfeng 0e1c660225 Make VmReader's several methods accept `&mut self` 2025-03-25 14:25:08 +08:00
Yuke Peng 1f03955f51 Change IoMem directory 2025-03-22 17:38:30 +08:00
Ruihan Li 9e1c939a3f Remove `static_assertions` 2025-03-06 16:35:21 +08:00
Ruihan Li 0d36375dfa Avoid `generic_const_exprs` feature 2025-03-06 16:35:21 +08:00
Yuke Peng 96d83e43b4 Make VirtioConsolesPrinter heapless 2025-03-05 20:24:59 +08:00
Zhang Junyang 55ee4bda2c Use RCU for console device callbacks 2025-03-03 09:24:49 +08:00
Fabing Li cbb4b4e631 Fix lint errors 2025-02-27 11:36:41 +08:00
Qingsong Chen 04be02efb7 Add init_component for mlsdisk 2025-02-11 11:38:43 +08:00
Qingsong Chen f6e040ec94 Add a basic ktest for mlsdisk 2025-02-11 11:38:43 +08:00
Qingsong Chen d8dc153be9 Fix deadlock of `CurrentTx` in mlsdisk 2025-02-11 11:38:43 +08:00
Qingsong Chen c040df72b3 Rename `SwornDisk` to `MlsDisk` 2025-02-11 11:38:43 +08:00
jiangjianfeng 55713b88c4 Remove unused dependencies 2025-02-10 10:36:56 +08:00
Ruihan Li 95bbc7f367 Enforce `#[expect(lint)]` 2025-02-08 15:10:04 +08:00
Ruihan Li 0dca168717 Use `#[expect(lint)]`, not `#[allow(lint)]` 2025-02-08 15:10:04 +08:00
Ruihan Li 1c4e88e648 Fix `#[allow(dead_code)]` in virtio 2025-02-08 15:10:04 +08:00
Ruihan Li b415538097 Remove useless `#[allow(lint)]` 2025-02-08 15:10:04 +08:00
Zhang Junyang 397ce9652f Refactor boot modules to make heap allocation explicit 2025-01-02 10:41:51 +08:00
Zhang Junyang 51349a3da1 Heapless memory region initialization 2025-01-02 10:41:51 +08:00
Qingsong Chen 56a137dc56 Add mlsdisk as a component
Co-authored-by: Shaowei Song <songshaowei.ssw@antgroup.com>
2025-01-01 09:19:32 +08:00
Zhang Junyang 983a6af3cc Polish the doc and rename variables in `ostd::mm` 2024-12-27 12:12:51 +08:00
Zhang Junyang cdac59beda Implement a new set of physical page APIs 2024-12-27 12:12:51 +08:00
Zhang Junyang c9a37ccab1 Renaming concepts around pages and frames
This commit renames `Frame` -> `UntypedFrame` and `Page` -> `Frame`.
So do other concepts in the following list:
 - `Segment` -> `UntypedSegment`,
 - `ContPages` -> `Segment`,
 - `DynPage` -> `AnyFrame`,
 - `PageMeta` -> `FrameMeta`,
 - `FrameMeta` -> `UntypedMeta`.

This commit also re-organized the source in the `mm/page` and `mm/frame`
module to accommodate the changes.
2024-12-27 12:12:51 +08:00
jiangjianfeng 9a540d0fb6 Notify virtqueue in a batch manner 2024-12-19 14:49:56 +08:00
Shaowei Song 4cb85f0adb Fix dependency issue between components `logger` and `virtio` 2024-12-13 10:36:45 +08:00
Ruihan Li 28edc57dd0 Fix the nested bottom half 2024-12-05 13:42:12 +08:00
Chen Chengjun 0cb2ea562e Inject the logger for Asterinas 2024-12-04 13:24:06 +08:00
Shaowei Song ecad132ec9 Refactor the block layer by introducing `BioSegmentPool` 2024-12-02 13:25:20 +08:00
Shaowei Song d37da228ab Improve flexibility of `DmaStreamSlice` 2024-12-02 13:25:20 +08:00
Marsman1996 6d3bb5a9d0 Fix compile error caused by updated `Step::steps_between` in Rust 2024-12-01 18:56:28 +08:00
Qingsong Chen f762eb8913 Remove the `lazy_static` dependency 2024-11-28 15:28:30 +08:00
Qingsong Chen 81898362b6 Add virtio legacy interface 2024-11-21 19:10:06 +08:00
jiangjianfeng 495c93c2ad Refactor Rwlock to take type parameter 2024-11-21 15:46:10 +08:00
Jianfeng Jiang c8c9b9753e Make all network benchmark run with tap backend and vhost on 2024-11-20 20:24:03 +08:00
Cautreoxit 885950c2a4 Add VirtioBlockFeature to cache virtio-blk's features 2024-11-17 15:32:56 +08:00
Cautreoxit 3cb7f5b721 Rename the methods in the interface of VirtioTransport 2024-11-17 15:32:56 +08:00
Cautreoxit 32572e22d9 Implement flush for virtio-blk 2024-11-17 15:32:56 +08:00
jiangjianfeng 38682e3ed9 Assign callback to shared irq if there's no single irq line 2024-11-12 17:47:40 +08:00
jiangjianfeng 9965802f65 Disable send callback if sendqueue is not full 2024-11-12 17:47:40 +08:00
Shaowei Song aa52e3980e Minor fix on virtio-blk's config 2024-11-06 11:00:43 +08:00
Hsy-Intel b7d101b98c Fix MMIO read issue 2024-10-21 17:49:56 +08:00
Chen Chengjun 2f511069ee Move SoftIRQ implementations to softirq component 2024-10-18 09:35:40 +08:00
jiangjianfeng 090149eed7 Add tcp latency test over virtio-net 2024-10-14 20:59:25 +08:00
Zhang Junyang 9e4257b655 Fix multiple issues pointed out by the new compiler 2024-10-13 22:32:05 +08:00
Zhang Junyang 909639fd70 Separate `SegmentSlice` from `Segment` 2024-10-09 19:23:46 +08:00
Yuke Peng 7d5a2b7a79 [VirtIO] Correct the error code when device not match 2024-10-04 10:28:59 +08:00
jiangjianfeng f793259512 Avoiding busy loop in sending packet and optimize device caps 2024-09-30 15:03:58 +08:00
YanWQ-monad 4fa0e6334b Add RISC-V base support 2024-09-30 10:02:08 +08:00
YanWQ-monad 839c2a6689 Extract shared code from timer 2024-09-30 10:02:08 +08:00
Ruihan Li 51334c4a36 Clean up smoltcp dependencies 2024-09-26 15:22:16 +08:00
Zhang Junyang 9a79ecbcbe Clean up the frame buffer state in `ostd::mm` 2024-09-21 15:38:15 +08:00
Ruihan Li 2bda8d17c4 Rename some misleading method names 2024-09-17 17:46:56 +08:00
Ruihan Li cefeea7b50 Revise `IoMem::resize` into `IoMem::slice` 2024-09-17 17:46:56 +08:00
Ruihan Li c8ba695c85 Implement `VmIoOnce` for `IoMem` 2024-09-17 17:46:56 +08:00
Ruihan Li 1b9b76d27c Make use of new `SpinLock` APIs 2024-09-13 21:31:20 +08:00
Zhang Junyang 53ce7df53c Warn instead of panic on long clock update interval 2024-09-12 17:53:14 +08:00
Shaowei Song e6f465b553 Replace all the ring buffers with the new one 2024-08-29 00:33:47 +08:00
Cautreoxit 86f09eef75 Fix all spelling mistakes in history by typos tool 2024-08-27 12:19:48 +08:00
Yuke Peng bb4751741a Bump smoltcp to newest git version 2024-08-22 22:58:36 +08:00
Shaowei Song dce796cdde Refactor all io APIs of vfs based on `VmReader`/`VmWriter` 2024-08-22 22:54:30 +08:00
Shaowei Song 2102107be1 Refactor `VmReader`&`VmWriter` as given fallibility marker 2024-08-21 22:24:15 +08:00
Cautreoxit c44447d54b Refactor the API of spinlocks 2024-08-18 21:06:40 +08:00
Chen Chengjun 364ef48e2f Fix a concurrency bug in clocksource 2024-08-17 17:57:26 +08:00
YanWQ-monad 97fab9edea Prepare aster-time for platform-dependent implementations 2024-08-09 08:53:24 +08:00
Shaowei Song 8dce83605f Add sys_fallocate 2024-08-08 21:10:38 +08:00
Ruihan Li b1ea422efa Fix accesses to VirtIO queue DMA 2024-08-06 11:34:15 +08:00
Shaowei Song 20a856b07f Revise the naming of all sync/async io APIs 2024-07-30 20:58:07 +08:00
Zhang Junyang 870d542f60 Remove the error of `BlkFeatures::MQ` to support multi-processor startup
Co-authored-by: Chuandong Li <lichuand@pku.edu.cn>
2024-07-30 10:24:09 +08:00
Shaowei Song ff525112d0 Revise the `BlockDevice` trait 2024-07-29 13:54:13 +08:00
Shaowei Song b1cec501d8 [page_cache] Gap within one page should be filled with zeros in shrink case 2024-07-25 21:31:18 +08:00
Jianfeng Jiang f86583dbce Make essential changes for publishing OSTD 2024-07-18 18:18:05 +08:00
Ruihan Li 3d2a0c33af Clean up the virtio console IRQ handler a bit 2024-07-14 16:43:23 +08:00
Ruihan Li a465ec1346 Work around a QEMU bug in virtio console pasting 2024-07-14 16:43:23 +08:00
Yuke Peng d43fbd88ba Add documentation to bus 2024-07-09 19:42:15 +08:00
Yuke Peng 0970adb37b Add documentation to x86/device 2024-07-09 19:42:15 +08:00
Jianfeng Jiang 3de8a9330a Fix the OSDK CI failure 2024-06-27 15:45:49 +08:00
Jianfeng Jiang 59350a8578 Rename aster-frame to ostd 2024-06-27 15:45:49 +08:00
Shaocong Sun 1b22267a87 Add readahead for pagecache 2024-06-26 20:22:20 +08:00
Zhang Junyang cda8ffa7da Fix the usage of underscores in Cargo manifest keys 2024-06-21 10:57:08 +08:00
Zhang Junyang ab1d931cb7 Adjust for Rust unstable feature's stability change 2024-06-21 10:57:08 +08:00
Anmin Liu 9f67fcdc58 Reuse Rxbuffer and update `qemu_args.sh` for vsock 2024-06-11 17:51:36 +08:00
Anmin Liu 646406115e Optimize vsock code structure 2024-06-11 17:51:36 +08:00
Anmin Liu 60dd17fdd3 Support calling from inside via vsock 2024-06-11 17:51:36 +08:00
Anmin Liu 48f69c25a9 Support nonblocking option 2024-06-11 17:51:36 +08:00
Anmin Liu ad140cec3c Implement vsock socket layer 2024-06-11 17:51:36 +08:00
Anmin Liu 83a7937334 Make vsock device optional 2024-06-11 17:51:36 +08:00
Anmin Liu be45f0ee72 Fix format and clippy errors 2024-06-11 17:51:36 +08:00
Anmin Liu 52f808e315 Implement vsock driver 2024-06-11 17:51:36 +08:00
Jianfeng Jiang 33a7da9991 Fix typos in API documentation 2024-06-09 22:57:14 +08:00
LI Qing c6aa9f9ee8 Limit the number of segments in single bio request 2024-06-05 16:13:59 +08:00
Zhang Junyang 7095b37e7e Refactor the source structure in `aster_frame::mm` 2024-06-03 22:16:02 +08:00
Zhang Junyang 14e1b1a9fc Rename various concepts related to memory management 2024-06-03 22:16:02 +08:00
Chen Chengjun c02eacd50c Use deny(unsafe_code) instead of forbid(unsafe_code) 2024-05-31 16:05:58 +08:00
Chen Chengjun b226928349 Remove the timer module from the aster-frame and adjust the related code 2024-05-20 16:09:27 +08:00
Chen Chengjun c3d0c59041 Fix the logics for the coarse resolution clock id in VDSO. 2024-05-09 17:34:10 +08:00
Zhang Junyang d1990869ae Make ID allocator a separate crate and use it in the frame 2024-05-09 14:35:12 +08:00
Jianfeng Jiang cd3faa8123 Inherit HasDaddr for reference type 2024-04-29 20:33:57 +08:00
Jianfeng Jiang a482c87696 Remove add_buf from VirtQueue 2024-04-29 20:33:57 +08:00
Jianfeng Jiang 2256f6ae8a Extend Safeptr to support DmaStream 2024-04-29 20:33:57 +08:00
Jianfeng Jiang 345ab8f838 Add write_vals for VmIo 2024-04-29 20:33:57 +08:00
Jianfeng Jiang abb377b695 Replace SpinLock with RwLock in driver callbacks 2024-04-29 20:33:57 +08:00
Jianfeng Jiang cd1575bc6d Refactor virtio drivers with DMA APIs 2024-04-29 20:33:57 +08:00
LI Qing c875201c3f Fix deadlocks that may arise after converting virtio-blk to async
The IRQ part of the driver must NOT share a SpinLock with
the normal part of the driver unless the SpinLock is acquired
with IRQ disabled in the task context.
2024-04-26 14:36:46 +08:00
LI Qing 349d7baa24 Fix the algorithm error for recycling descriptors in `VirtQueue` 2024-04-26 14:36:46 +08:00
LI Qing b7131e721c Modify the virtio-blk to async 2024-04-26 14:36:46 +08:00
Fabing Li dac41e9a2f Support T:?Sized as type parameter for Mutex, SpinLock, RwLock, and RwMutex 2024-04-17 08:51:59 +08:00
LI Qing c3c6b0c19d Use Dma APIs for virtio-block driver 2024-04-11 15:22:18 +08:00
Jianfeng Jiang d8a841f88a Add DmaBuf for DMA-capable memory areas 2024-04-11 15:22:18 +08:00
Ruihan Li bd8be26b30 Access the console device table with IRQ disabled 2024-04-10 12:14:28 +08:00
Yingdi Shan 650c7dfbad Add exFAT file system 2024-03-19 16:26:55 +08:00
Zhang Junyang 52f07458f7 Understanding memory space and move higher the stack 2024-03-19 16:19:54 +08:00
Zhang Junyang b49e11a25e Fix all doc warnings 2024-03-17 19:12:33 +08:00
LI Qing e0d92b5203 Add support for converting from `VmFrame` to `VmSegment` 2024-03-07 10:56:20 +08:00
Zhang Junyang f415585dff Fix workspace clippy usage 2024-02-28 16:30:48 +08:00
Zhang Junyang e3c227ae06 Refactor project structure 2024-02-28 16:30:48 +08:00