v0.3.0Rustx86_64
Channel/Handle IPC · 用户空间服务 · ELF 加载器
Channel/Handle IPC
基于能力的 IPC 机制,支持同步会合、Handle 传递、原子 RPC。
用户空间服务
Console 服务运行在 Ring 3,通过 Channel 与内核通信。
ELF 加载器
从 initrd 加载 ELF64 可执行文件,支持 Ring 3 切换。
================================= OpenOS Microkernel v0.3.0=================================
[...] Initializing IPC subsystem[OK] IPC subsystem initialized[...] Initializing task scheduler[OK] Task scheduler initialized[OK] Kernel initialization complete[...] Ramdisk loaded (12984 bytes)[...] Channel: handle_a=0x103ff00000001, handle_b=0x103ff00000002[...] Kernel sent message to channel[...] Launching console service (user-space)[SYSCALL] channel_receive: got 31 bytesHello from user-space service!
[SYS_EXIT] status=0[OK] Kernel halted系统调用(已实现)
Section titled “系统调用(已实现)”| 编号 | 名称 | 说明 |
|---|---|---|
| 0x01 | channel_create | 创建 Channel,返回两个 Handle |
| 0x02 | channel_send | 发送消息,同步会合 |
| 0x03 | channel_receive | 接收消息,阻塞等待 |
| 0x04 | channel_call | 原子 RPC(send + block for reply) |
| 0x05 | channel_reply | 回复消息,解除 call 阻塞 |
| 0x10 | handle_close | 关闭 Handle |
| 0x11 | handle_duplicate | 克隆 Handle,可收窄权限 |
| 0x12 | handle_transfer | 传递 Handle 到其他进程 |
| 0x32 | process_exit | 终止当前进程 |
| 0x42 | thread_yield | 让出 CPU |
| 0xF0 | console_write | 调试输出到串口 |
已完成
- Channel/Handle IPC 系统
- 用户空间 Ring 3 切换
- ELF64 加载器 + initrd
- Console 用户空间服务
- Handle 表 + Rights 系统
- 上下文切换基础设施
计划中
- Process/Thread 系统调用
- Event/Timer 系统调用
- Job 进程组管理
- Endpoint 服务发现
- 文件系统
- 网络栈