From 53addea304de09e0df457b690403ac652bbcea72 Mon Sep 17 00:00:00 2001 From: zff Date: Wed, 22 Dec 2021 16:22:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20LOS=5FPanic=E5=92=8C=E9=AD=94=E6=B3=95?= =?UTF-8?q?=E9=94=AE=E5=8A=9F=E8=83=BD=E4=B8=AD=E7=9A=84=E4=BD=BF=E7=94=A8?= =?UTF-8?q?PRINTK=E6=89=93=E5=8D=B0=EF=BC=8C=E4=BE=9D=E8=B5=96=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E8=B0=83=E5=BA=A6=EF=BC=8C=E7=89=B9=E6=AE=8A=E6=83=85?= =?UTF-8?q?=E5=86=B5=E4=B8=8B=E5=AD=98=E5=9C=A8=E6=89=93=E5=8D=B0=E4=B8=8D?= =?UTF-8?q?=E5=87=BA=E6=9D=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close: #I4NOC7 Signed-off-by: zff Change-Id: I7f28e79293d3388e2b1d7208c2b8ff8ff133528a --- arch/arm/arm/src/los_exc.c | 4 ++-- kernel/common/los_magickey.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/arm/src/los_exc.c b/arch/arm/arm/src/los_exc.c index ed575a85..cd85dbb6 100644 --- a/arch/arm/arm/src/los_exc.c +++ b/arch/arm/arm/src/los_exc.c @@ -1237,10 +1237,10 @@ __attribute__((noinline)) VOID LOS_Panic(const CHAR *fmt, ...) { va_list ap; va_start(ap, fmt); - UartVprintf(fmt, ap); + OsVprintf(fmt, ap, EXC_OUTPUT); va_end(ap); __asm__ __volatile__("swi 0"); - while (1); + while (1) {} } /* stack protector */ diff --git a/kernel/common/los_magickey.c b/kernel/common/los_magickey.c index 1c9cca76..fba1c059 100644 --- a/kernel/common/los_magickey.c +++ b/kernel/common/los_magickey.c @@ -112,7 +112,7 @@ STATIC VOID OsMagicPanic(VOID) STATIC VOID OsMagicMemCheck(VOID) { if (LOS_MemIntegrityCheck(m_aucSysMem1) == LOS_OK) { - PRINTK("system memcheck over, all passed!\n"); + PrintExcInfo("system memcheck over, all passed!\n"); } return; } @@ -130,9 +130,9 @@ INT32 CheckMagicKey(CHAR key, UINT16 consoleId) } else if (key == 0x12) { /* ctrl + r */ magicKeySwitch = ~magicKeySwitch; if (magicKeySwitch != 0) { - PRINTK("Magic key on\n"); + PrintExcInfo("Magic key on\n"); } else { - PRINTK("Magic key off\n"); + PrintExcInfo("Magic key off\n"); } return 1; }