Commit Graph

263 Commits

Author SHA1 Message Date
Zhe Tang 70eda539df Refactor IoMem acquisition to use appropriate cache policies across multiple components 2025-11-25 10:24:54 +08:00
Zhe Tang 0043cc7504 Implement the color map and the related `ioctl` handlers for the EFI framebuffer 2025-11-24 18:56:29 +08:00
Zhe Tang 3fd1ecd96f Add a helper method to retrieve the line size of the framebuffer 2025-11-24 18:56:29 +08:00
Zhe Tang c33c37b593 Add the basic framework of /dev/fb0
Co-authored-by: Wei Zhang <ruoyuan.zw@antgroup.com>
2025-11-24 18:56:29 +08:00
Qingsong Chen 7876b7127d Fix virtio-block request ID exhaustion panics with SyncIdAlloc 2025-11-20 10:43:24 +08:00
Qingsong Chen 9e2f5adf9b Add partition support for block device 2025-11-20 10:43:24 +08:00
Ruihan Li 668876aeee Check the existence of i8042 and RTC CMOS 2025-11-19 15:39:49 +08:00
Ruihan Li 9a8e6fd372 Simplify the code in `aster-time` 2025-11-19 15:39:49 +08:00
Ruihan Li bbe0e3f3bb Reimplement `RtcCmos` 2025-11-19 15:39:49 +08:00
Chen Chengjun 77fb73bdd7 Enable the process management for cgroup 2025-11-07 11:47:23 +08:00
Ruihan Li d487e42b7c Reunify the style of defining `arch` modules 2025-10-30 17:04:45 +08:00
Zejun Zhao 3353e53577 Add VirtIO device probing code on RISC-V platforms 2025-10-30 10:47:53 +08:00
Cautreoxit 43fc98dc77 Migrate virtio-input to input subsystem API 2025-10-28 17:37:13 +08:00
Cautreoxit ee960c5f45 Migrate i8042 keyboard to input subsystem API 2025-10-28 17:37:13 +08:00
Cautreoxit 329fb4728a Add framebuffer console handler 2025-10-28 17:37:13 +08:00
Cautreoxit 9c062b1350 Add input subsystem
Co-authored-by: TinaZhangZW <ruoyuan.zw@antgroup.com>
2025-10-28 17:37:13 +08:00
Ruihan Li 2d74e69b4b Add KDGKBMODE and KDSKBMODE ioctl support 2025-10-27 16:28:35 +08:00
Wei Zhang 2ba05a1673 Add KDGETMODE and KDSETMODE ioctl support
Add support for virtual console TTY mode management ioctls required by
Xorg and other display servers. The implementation includes:

- KDGETMODE: Query the current virtual console mode
- KDSETMODE: Switch between text and graphics modes

Virtual consoles utilize the framebuffer with two distinct modes:
- Text mode (default): Kernel renders text characters to framebuffer
- Graphics mode: User space applications gain full framebuffer control

Xorg requires KDSETMODE during initialization to switch to graphics
mode, preventing conflicts where both the kernel and Xorg would
simultaneously attempt to write to the framebuffer. This ensures
proper display handling and eliminates rendering artifacts.

Co-authored-by: Ruihan Li <lrh2000@pku.edu.cn>
2025-10-27 16:28:35 +08:00
Ruihan Li 38a217d201 Enhance `TtyDriver` to get the console 2025-10-27 16:28:35 +08:00
Zejun Zhao fe90e3051b Add fallback for RTC device 2025-10-27 09:50:46 +08:00
Zejun Zhao 8251d48bf2 Add RISC-V PLIC support 2025-10-24 16:28:41 +08:00
Ruihan Li 8be8397a67 Make network callbacks and names related 2025-10-20 20:56:55 +08:00
Ruihan Li bc6ef5231b Reorangize `ostd::arch::irq` 2025-10-16 21:46:40 +09:00
Ruihan Li 0be36ee2c1 Fix virtio-mmio interrupt handling 2025-10-14 00:48:09 +09:00
Chen Chengjun fc69af3e95 Support the basic configfs 2025-10-09 17:38:08 +08:00
Chen Chengjun 6dd4899d4a Supports multiple systree instances 2025-10-09 17:38:08 +08:00
Ruihan Li 56d78ab649 Fix some minor style issues 2025-10-06 14:46:23 +08:00
Yang Zhichao a9673282e6 Complete the counting for Softirq and IRQ. 2025-09-27 21:02:23 +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
Ruihan Li 391f11f1aa Make per-CPU callbacks explicit 2025-09-20 11:50:50 +08:00
Ruihan Li 421f36cc26 Make timer callbacks arch-agnostic 2025-09-20 11:50:50 +08:00
Tate, Hongliang Tian ee21f2bdb6 Refactor OSTD irq module for improved clarity 2025-09-19 15:05:50 +08:00
Tate, Hongliang Tian c485d512f6 Rename ostd::trap to ostd::irq 2025-09-19 15:05:50 +08:00
Qingsong Chen f6a55e0af3 Handle 8-bit/24-bit ANSI color codes for framebuffer 2025-09-17 22:43:22 +08:00
Chen Chengjun 8c36964bb9 Introduce VmPrinter to write kernel generated data 2025-09-10 21:07:14 +08:00
Chen Chengjun 12f2f6bb54 Correct the misuse of some AttributeErrors 2025-09-10 21:07:14 +08:00
Ruihan Li 3b606f5b6c Use `size_of`/`align_of` in the prelude 2025-09-04 09:26:56 +08:00
Zhang Junyang 9e2d8e9f08 Use device addresses instead of physical addresses 2025-09-02 17:53:55 +08:00
Zhang Junyang 4e2bdc65de Refactor implicit `Arc` APIs for DMA 2025-09-02 17:53:55 +08:00
Zhang Junyang a6520880ab Unify memory object slicing 2025-09-02 17:53:55 +08:00
Zhang Junyang eb69aa4fb9 Unify address and size APIs for memory objects 2025-09-02 17:53:55 +08:00
Chen Chengjun fc5a12356a Fix LOONGARCH clippy warnings 2025-08-19 19:20:54 +08:00
Chen Chengjun 9507475102 Fix RISCV clippy warnings 2025-08-19 19:20:54 +08:00
Ruihan Li cdd28787ed Replace `write_vals` by `fill_zeros` in `VmIo` 2025-08-10 16:40:11 +08:00
Ruihan Li 2700d88bef Provide efficient `VmIo` with VM readers/writers 2025-08-10 16:40:11 +08:00
Ruihan Li d73f1016a1 Set softfloat targets for ARM/LoongArch/RISC-V 2025-07-29 11:13:59 +08:00
王英泰 434d75c0f0 Cancel the use of floating-point instructions in kernel log 2025-07-25 17:37:24 +08:00
王英泰 fc72398fbc Change the method to identify the legacy virtio device 2025-07-25 17:37:24 +08:00
王英泰 cc280272cc Add the RTC time comps for LoongArch 2025-07-25 17:37:24 +08:00
Cautreoxit 2e3d8ea867 Add extension support for keyboard 2025-07-22 15:16:12 +08:00
Cautreoxit b8b9d8bff6 Add release support for keyboard 2025-07-22 15:16:12 +08:00
Chen Chengjun b90b79810c Provide more powerful macros to assist in implementing the SysTree-related traits 2025-07-14 20:35:05 +08:00
Chen Chengjun 774291611c Add two error types in aster_systree::Error 2025-07-14 20:35:05 +08:00
Chen Chengjun 9c68d96fa2 Attach SysPerms to systree nodes and attributes 2025-07-14 20:35:05 +08:00
Chen Chengjun e229eb379b Enable getting path through SysObj 2025-07-14 20:35:05 +08:00
Ruihan Li a5e927b675 Make the framebuffer backspace work 2025-07-14 20:24:29 +08:00
Ruihan Li b1079c2bc5 Add support for font setting 2025-07-14 20:24:29 +08:00
Ruihan Li 9f82a0c89f Clean up the console crate 2025-07-14 20:24:29 +08:00
Ruihan Li 801ab865b7 Make paths of `TrapFrame` unique 2025-07-05 18:19:26 +08:00
Ruihan Li 706f62e299 Support ANSI escape sequences 2025-07-03 17:47:56 +08:00
Ruihan Li abbf152d74 Re-enable framebuffer 2025-07-03 17:47:56 +08:00
Qingsong Chen 5e3e23bf7c Add basic i8042 keyboard support 2025-06-27 12:56:55 +08:00
Ruihan Li b96c8f9ed2 Make `ostd::trap::irq` public 2025-06-23 22:53:35 +08:00
Hsy-Intel 65fd1aac81 Sync CVM guest feature dependencies between kernel and virtio components 2025-06-23 10:32:09 +08:00
Ruihan Li a3c5ab8cb4 Move virtio-mmio bus outside OSTD 2025-06-19 15:10:42 +08:00
Wang Siyuan d5b12532a8 Require `T: Send` for `CpuLocal<T, S>` 2025-06-16 12:09:13 +08:00
Ruihan Li 67065835ef Redefine the TTY driver interface 2025-06-09 13:10:34 +08:00
Chen Chengjun c56aee92f4 Re-organize some systree-related code 2025-06-09 11:13:48 +08:00
Chen Chengjun a67bd8cdc9 Add macros to help implementing SysObj trait 2025-06-09 11:13:48 +08:00
Chen Chengjun 1dd1c8c775 Enable read and write operations of the attribute to handle offset 2025-06-09 11:13:48 +08:00
Wang Siyuan dfd3042276 Add dynamically-allocated CPU-local objects 2025-06-03 23:24:32 +08:00
Zejun Zhao ffb4097436 Add RISC-V timer support 2025-05-29 19:51:02 +08:00
stuuupidcat 95744692a5 Remove unnecessary #[inline] attributes 2025-05-22 12:19:21 +08:00
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