From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 4866B219392E6 for ; Sat, 1 Apr 2017 06:25:35 -0700 (PDT) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP; 01 Apr 2017 06:25:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,257,1486454400"; d="scan'208";a="242805979" Received: from jfan12-desk.ccr.corp.intel.com ([10.239.158.57]) by fmsmga004.fm.intel.com with ESMTP; 01 Apr 2017 06:25:34 -0700 From: Jeff Fan To: edk2-devel@lists.01.org Cc: Jiewen Yao , Michael Kinney , Feng Tian Date: Sat, 1 Apr 2017 21:25:23 +0800 Message-Id: <20170401132530.8340-3-jeff.fan@intel.com> X-Mailer: git-send-email 2.9.3.windows.2 In-Reply-To: <20170401132530.8340-1-jeff.fan@intel.com> References: <20170401132530.8340-1-jeff.fan@intel.com> Subject: [PATCH 2/9] MdeModulePkg/CpuExceptionHandlerLib: Add DumpCpuContext() X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Apr 2017 13:25:35 -0000 This API is used to display exception type and all processor context for debug purpose. Cc: Jiewen Yao Cc: Michael Kinney Cc: Feng Tian Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan --- MdeModulePkg/Include/Library/CpuExceptionHandlerLib.h | 15 ++++++++++++++- .../CpuExceptionHandlerLibNull.c | 16 +++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Include/Library/CpuExceptionHandlerLib.h b/MdeModulePkg/Include/Library/CpuExceptionHandlerLib.h index b3016ee..6cd8230 100644 --- a/MdeModulePkg/Include/Library/CpuExceptionHandlerLib.h +++ b/MdeModulePkg/Include/Library/CpuExceptionHandlerLib.h @@ -2,7 +2,7 @@ CPU Exception library provides the default CPU interrupt/exception handler. It also provides capability to register user interrupt/exception handler. - Copyright (c) 2012 - 2013, Intel Corporation. All rights reserved.
+ Copyright (c) 2012 - 2017, 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 which accompanies this distribution. The full text of the license may be found at @@ -93,4 +93,17 @@ RegisterCpuInterruptHandler ( IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler ); +/** + Display processor context. + + @param[in] ExceptionType Exception type. + @param[in] SystemContext Processor context to be display. +**/ +VOID +EFIAPI +DumpCpuContext ( + IN EFI_EXCEPTION_TYPE ExceptionType, + IN EFI_SYSTEM_CONTEXT SystemContext + ); + #endif diff --git a/MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.c b/MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.c index 68ee9a9..cbe4768 100644 --- a/MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.c +++ b/MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.c @@ -1,7 +1,7 @@ /** @file CPU Exception Handler library implementition with empty functions. - Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2012 - 2017, 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 which accompanies this distribution. The full text of the license may be found at @@ -97,3 +97,17 @@ RegisterCpuInterruptHandler ( return EFI_UNSUPPORTED; } +/** + Display processor context. + + @param[in] ExceptionType Exception type. + @param[in] SystemContext Processor context to be display. +**/ +VOID +EFIAPI +DumpCpuContext ( + IN EFI_EXCEPTION_TYPE ExceptionType, + IN EFI_SYSTEM_CONTEXT SystemContext + ) +{ +} -- 2.9.3.windows.2