重构内存分配器、增加中断支持、整理rust运行时环境 #4

Merged
pointer-to-bios merged 39 commits from downstream into main 2024-04-11 00:36:14 +08:00
2 changed files with 18 additions and 7 deletions
Showing only changes of commit ba6e23ee99 - Show all commits

View File

@ -121,6 +121,16 @@ void tty_set_framebuffer(tty *ttyx, framebuffer *fb);
void tty_text_print(tty *ttyx, char *string, u32 color, u32 bgcolor); void tty_text_print(tty *ttyx, char *string, u32 color, u32 bgcolor);
#define gen_color(r, g, b) (((r) << 16) | ((g) << 8) | (b)) #define gen_color(r, g, b) (((r) << 16) | ((g) << 8) | (b))
#define WHITE gen_color(0xee, 0xee, 0xee)
#define BLACK gen_color(0, 0, 0)
#define RED gen_color(0xee, 0x22, 0x22)
#define GREEN gen_color(0x22, 0xee, 0x22)
#define BLUE gen_color(0x22, 0x22, 0xee)
#define YELLOW gen_color(0xee, 0xee, 0x22)
#define ORANGE gen_color(0xee, 0xaa, 0x22)
#define PURPLE gen_color(0xee, 0, 0xee)
#define PINK gen_color(0xee, 0x44, 0x66)
#define GRAY gen_color(0xaa, 0xaa, 0xaa)
usize tty_get_width(tty *ttyx); usize tty_get_width(tty *ttyx);
usize tty_get_height(tty *ttyx); usize tty_get_height(tty *ttyx);

View File

@ -150,10 +150,11 @@ impl Color {
pub const RED: Color = Color(0xee, 0x22, 0x22); pub const RED: Color = Color(0xee, 0x22, 0x22);
pub const GREEN: Color = Color(0x22, 0xee, 0x22); pub const GREEN: Color = Color(0x22, 0xee, 0x22);
pub const BLUE: Color = Color(0x22, 0x22, 0xee); pub const BLUE: Color = Color(0x22, 0x22, 0xee);
pub const YELLOW: Color = Color(0xee, 0x22, 0x22); pub const YELLOW: Color = Color(0xee, 0xee, 0x22);
pub const ORANGE: Color = Color(0xee, 0xee, 0x22); pub const ORANGE: Color = Color(0xee, 0xaa, 0x22);
pub const PURPLE: Color = Color(0xee, 0, 0xee); pub const PURPLE: Color = Color(0xee, 0x22, 0xee);
pub const PINK: Color = Color(0xee, 0x44, 0x66); pub const PINK: Color = Color(0xee, 0x44, 0x66);
pub const GRAY: Color = Color(0xaa, 0xaa, 0xaa);
} }
impl From<Color> for u32 { impl From<Color> for u32 {