Qingsong Chen
9e2f5adf9b
Add partition support for block device
2025-11-20 10:43:24 +08:00
Ruihan Li
24502ac3d4
Add `InodeIo` to simplify `FileIo` and `Inode`
2025-11-19 10:33:51 +08:00
Ruihan Li
08dfe533c4
Use `Box<FileIo>` instead of `Arc<FileIo>`
2025-11-19 10:33:51 +08:00
Ruihan Li
7ebee6d8a1
Fix TTY's HUP events
2025-11-18 14:49:19 +08:00
jiangjianfeng
2f568d5e73
Read pty master should block if no pty slave is opened
2025-11-18 09:48:32 +08:00
Qingsong Chen
bb48b3814f
Move DeviceId to separate device-id crate
2025-11-13 11:04:30 +08:00
jiangjianfeng
cef527f372
Open /dev/tty should also increase pty slave count
2025-11-07 20:22:16 +08:00
jiangjianfeng
49485058ec
Correct the device major ID for pty slave
2025-11-07 20:22:16 +08:00
jiangjianfeng
a41db92b4e
Support nonblocking mode for tty and pty
2025-11-07 20:22:16 +08:00
jiangjianfeng
cd981a0a8d
Correct the behavior about closing pty
2025-11-07 20:22:16 +08:00
Chen Chengjun
d42b006e1a
Refactor named pipe to correct its opening and blocking behaviors
2025-11-03 09:57:48 +08:00
Chen Chengjun
5eddf21596
Introduce open API for Inode trait to replace as_* APIs
2025-11-03 09:57:48 +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
Wei Zhang
66d9dd41b9
Correct /dev/tty1 major number to 4
...
The major number for /dev/tty1 must be 4, as this value is hardcoded
in Linux and Linux syscall-compatible operating systems. Xorg uses
this major number directly, and incorrect values lead to confusion
and operational failures.
This change ensures compatibility with Xorg's expectations and
maintains system consistency.
2025-10-27 16:28:35 +08:00
Ruihan Li
b2f17d11c6
Remove common enum suffixes
2025-08-26 18:02:56 +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
71e08b3942
Clean up TTY termios definitions
2025-06-10 14:30:02 +08:00
jiangjianfeng
597139a7f7
Fix a clippy error
2025-06-09 17:22:14 +08:00
Ruihan Li
fe6b78058c
Correct the blocking behavior
2025-06-09 13:10:34 +08:00
Ruihan Li
67065835ef
Redefine the TTY driver interface
2025-06-09 13:10:34 +08:00
Ruihan Li
5a9a63e1a7
Use one lock for `LineDiscipline`
2025-06-09 13:10:34 +08:00
Ruihan Li
45258d0475
Unpack `LineDiscipline` from `Arc`
2025-06-09 13:10:34 +08:00
Ruihan Li
ff907d1131
Implement race-free job control
2025-05-09 17:12:31 +08:00
jiangjianfeng
89e8cd5936
Move functions related to spawning the init process to a seperate module
2025-05-09 13:19:57 +08:00
Ruihan Li
5e13e0c325
Resolve lints in the TTY module
2025-05-06 11:55:06 +08:00
Ruihan Li
0dca168717
Use `#[expect(lint)]`, not `#[allow(lint)]`
2025-02-08 15:10:04 +08:00
Ruize Tang
1b65ae6255
Fix deadlock in `line_discipline.rs`
2024-11-29 16:31:44 +08:00
Ruihan Li
ec2c6ab7a3
Make `Pollee` semi-stateless
2024-11-20 16:39:18 +08:00
Ruihan Li
fab61f5f66
Make `Pollee` stateless
2024-11-20 16:39:18 +08:00
Ruihan Li
39d303c72f
Rename `get_current_userspace` to `current_userspace`
2024-11-15 13:24:58 +08:00
Ruihan Li
f12e502ab0
Rename `Poller` to `PollHandle`
2024-11-13 14:15:44 +08:00
Ruihan Li
7ddfd42baa
Make `wait_events` support timeout
2024-11-01 13:00:40 +08:00
Ruihan Li
f21394c679
Use more `wait_events`
2024-11-01 13:00:40 +08:00
Ruihan Li
bbfc2cd12d
Make `FileIo` pollable
2024-11-01 13:00:40 +08:00
Chen Chengjun
846b3ba169
Use LinkedList to store WorkItem to avoid additional heap allocation
2024-11-01 11:24:09 +08:00
jiangjianfeng
002a67451d
Update line discipline pollee immediately
2024-10-14 16:39:34 +08:00
Zhang Junyang
9e4257b655
Fix multiple issues pointed out by the new compiler
2024-10-13 22:32:05 +08:00
Jianfeng Jiang
fb718fd440
Optimize the latency of lat-sig-install
2024-09-25 17:29:20 +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
Zhang Junyang
dafd16075f
Remove the shim kernel crate
2024-08-23 23:37:50 +08:00