提交 53addea3 编写于 作者: Z zff

fix: LOS_Panic和魔法键功能中的使用PRINTK打印,依赖任务调度,特殊情况下存在打印不出来的问题

close: #I4NOC7
Signed-off-by: Nzff <zhangfanfan2@huawei.com>
Change-Id: I7f28e79293d3388e2b1d7208c2b8ff8ff133528a
上级 954e7eb0
...@@ -1237,10 +1237,10 @@ __attribute__((noinline)) VOID LOS_Panic(const CHAR *fmt, ...) ...@@ -1237,10 +1237,10 @@ __attribute__((noinline)) VOID LOS_Panic(const CHAR *fmt, ...)
{ {
va_list ap; va_list ap;
va_start(ap, fmt); va_start(ap, fmt);
UartVprintf(fmt, ap); OsVprintf(fmt, ap, EXC_OUTPUT);
va_end(ap); va_end(ap);
__asm__ __volatile__("swi 0"); __asm__ __volatile__("swi 0");
while (1); while (1) {}
} }
/* stack protector */ /* stack protector */
......
...@@ -112,7 +112,7 @@ STATIC VOID OsMagicPanic(VOID) ...@@ -112,7 +112,7 @@ STATIC VOID OsMagicPanic(VOID)
STATIC VOID OsMagicMemCheck(VOID) STATIC VOID OsMagicMemCheck(VOID)
{ {
if (LOS_MemIntegrityCheck(m_aucSysMem1) == LOS_OK) { if (LOS_MemIntegrityCheck(m_aucSysMem1) == LOS_OK) {
PRINTK("system memcheck over, all passed!\n"); PrintExcInfo("system memcheck over, all passed!\n");
} }
return; return;
} }
...@@ -130,9 +130,9 @@ INT32 CheckMagicKey(CHAR key, UINT16 consoleId) ...@@ -130,9 +130,9 @@ INT32 CheckMagicKey(CHAR key, UINT16 consoleId)
} else if (key == 0x12) { /* ctrl + r */ } else if (key == 0x12) { /* ctrl + r */
magicKeySwitch = ~magicKeySwitch; magicKeySwitch = ~magicKeySwitch;
if (magicKeySwitch != 0) { if (magicKeySwitch != 0) {
PRINTK("Magic key on\n"); PrintExcInfo("Magic key on\n");
} else { } else {
PRINTK("Magic key off\n"); PrintExcInfo("Magic key off\n");
} }
return 1; return 1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册