o3能运行

This commit is contained in:
fslongjin
2022-08-01 20:40:27 +08:00
parent 58681fd34a
commit e806bbc0c8
23 changed files with 118 additions and 57 deletions

View File

@ -10,7 +10,8 @@
#include <driver/uart/uart.h>
#include <driver/video/video.h>
#include "math.h"
#pragma GCC push_options
#pragma GCC optimize("O0")
struct printk_screen_info pos;
extern ul VBE_FB_phys_addr; // 由bootloader传来的帧缓存区的物理地址
static spinlock_t printk_lock;
@ -184,7 +185,9 @@ static void auto_newline()
#endif
pos.y = pos.max_y;
int lines_to_scroll = 1;
barrier();
scroll(true, lines_to_scroll * pos.char_size_y, sw_show_scroll_animation);
barrier();
pos.y -= (lines_to_scroll - 1);
}
}
@ -835,7 +838,6 @@ static int scroll(bool direction, int pixels, bool animation)
int md = pixels % pos.char_size_y;
if (md)
pixels = pixels + pos.char_size_y - md;
if (animation == false)
return do_scroll(direction, pixels);
else
@ -956,4 +958,6 @@ int sprintk(char *buf, const char *fmt, ...)
va_end(args);
return count;
}
}
#pragma GCC pop_options