| Crates.io | tg-sbi |
| lib.rs | tg-sbi |
| version | 0.1.0-preview.1 |
| created_at | 2026-01-24 16:01:43.199514+00 |
| updated_at | 2026-01-24 16:01:43.199514+00 |
| description | SBI (Supervisor Binary Interface) call wrappers for rCore tutorial OS. |
| homepage | https://github.com/rcore-os/rCore-Tutorial-in-single-workspace |
| repository | https://github.com/rcore-os/rCore-Tutorial-in-single-workspace |
| max_upload_size | |
| id | 2066928 |
| size | 16,234 |
SBI (Supervisor Binary Interface) 调用封装模块,为 rCore 教学操作系统提供 SBI 接口。
-bios none 启动)no_std 环境支持use tg_sbi::{console_putchar, set_timer, shutdown};
// 输出字符
console_putchar(b'H');
// 设置定时器中断
set_timer(1000000);
// 关闭系统
shutdown(false);
nobios: 启用内置的 M-Mode SBI 实现。当使用 QEMU 的 -bios none 选项启动时,
此 feature 提供基本的 SBI 服务,包括 UART 控制台、定时器和系统重置功能。nobios feature 专为 QEMU virt 机器设计,假设以下 MMIO 地址:
0x1000_00000x200_40000x10_0000Licensed under either of Apache License, Version 2.0 or MIT license at your option.