From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2D8D721E25685 for ; Wed, 24 Jan 2018 21:05:00 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jan 2018 21:10:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,409,1511856000"; d="scan'208";a="12886191" Received: from ray-dev.ccr.corp.intel.com ([10.239.9.19]) by orsmga008.jf.intel.com with ESMTP; 24 Jan 2018 21:10:27 -0800 From: Ruiyu Ni To: edk2-devel@lists.01.org Cc: Jiewen Yao Date: Thu, 25 Jan 2018 13:10:25 +0800 Message-Id: <20180125051025.367048-1-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.15.1.windows.2 Subject: [PATCH] UefiCpuPkg/CpuExceptionHandler: Init serial port before context dump X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jan 2018 05:05:00 -0000 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni Cc: Jiewen Yao --- UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c | 6 +++++- UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c index 0facfde5dd..1a382e88fb 100644 --- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c +++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/PeiDxeSmmCpuException.c @@ -1,7 +1,7 @@ /** @file CPU Exception Library provides PEI/DXE/SMM CPU common exception handler. -Copyright (c) 2012 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at @@ -99,6 +99,10 @@ CommonExceptionHandlerWorker ( CpuPause (); } // + // Initialize the serial port before dumping. + // + SerialPortInitialize (); + // // Display ExceptionType, CPU information and Image information // DumpImageAndCpuContent (ExceptionType, SystemContext); diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c index 13bf20d143..68b159e0ab 100644 --- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c +++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/SecPeiCpuException.c @@ -1,7 +1,7 @@ /** @file CPU exception handler library implemenation for SEC/PEIM modules. -Copyright (c) 2012 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at @@ -30,6 +30,10 @@ CommonExceptionHandler ( IN EFI_SYSTEM_CONTEXT SystemContext ) { + // + // Initialize the serial port before dumping. + // + SerialPortInitialize (); // // Display ExceptionType, CPU information and Image information // -- 2.15.1.windows.2