mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-08 14:16:47 +00:00
解决O3下,printk在ap处理器中打印的信息会出现滚动的bug
This commit is contained in:
parent
23fa428274
commit
aa7dc4daa5
2
Makefile
2
Makefile
@ -7,7 +7,7 @@ export ARCH=__x86_64__
|
||||
export ROOT_PATH=$(shell pwd)
|
||||
|
||||
export DEBUG=DEBUG
|
||||
export GLOBAL_CFLAGS := -mcmodel=large -fno-builtin -m64 -fno-stack-protector -D $(ARCH)
|
||||
export GLOBAL_CFLAGS := -mcmodel=large -fno-builtin -m64 -fno-stack-protector -D $(ARCH) -O1
|
||||
|
||||
ifeq ($(DEBUG), DEBUG)
|
||||
GLOBAL_CFLAGS += -g
|
||||
|
@ -10,7 +10,7 @@ LIB_FILES := $(foreach DIR,$(DIR_LIB),$(addprefix $(DIR)/,$(lib_patterns)))
|
||||
|
||||
# 控制操作系统使用的中断控制器 _INTR_8259A_ _INTR_APIC_
|
||||
PIC := _INTR_APIC_
|
||||
CFLAGS = $(GLOBAL_CFLAGS) -D $(PIC) -I $(shell pwd) -O3
|
||||
CFLAGS = $(GLOBAL_CFLAGS) -D $(PIC) -I $(shell pwd)
|
||||
|
||||
export ASFLAGS := --64
|
||||
|
||||
|
@ -10,8 +10,7 @@
|
||||
#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;
|
||||
@ -46,6 +45,8 @@ static uint *get_pos_VBE_FB_addr();
|
||||
*/
|
||||
static int cls();
|
||||
|
||||
#pragma GCC push_options
|
||||
#pragma GCC optimize("O0")
|
||||
/**
|
||||
* @brief 滚动窗口(尚不支持向下滚动)
|
||||
*
|
||||
@ -54,7 +55,7 @@ static int cls();
|
||||
* @param animation 是否包含滑动动画
|
||||
*/
|
||||
static int scroll(bool direction, int pixels, bool animation);
|
||||
|
||||
#pragma GCC pop_options
|
||||
/**
|
||||
* @brief 将数字按照指定的要求转换成对应的字符串(2~36进制)
|
||||
*
|
||||
@ -960,4 +961,3 @@ int sprintk(char *buf, const char *fmt, ...)
|
||||
return count;
|
||||
}
|
||||
|
||||
#pragma GCC pop_options
|
Loading…
x
Reference in New Issue
Block a user