From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 752D981E8D for ; Wed, 16 Nov 2016 06:33:45 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP; 16 Nov 2016 06:33:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,500,1473145200"; d="scan'208";a="32021289" Received: from jfan12-desk.ccr.corp.intel.com ([10.239.9.5]) by fmsmga005.fm.intel.com with ESMTP; 16 Nov 2016 06:33:49 -0800 From: Jeff Fan To: edk2-devel@lists.01.org Cc: Feng Tian , Michael D Kinney Date: Wed, 16 Nov 2016 22:33:42 +0800 Message-Id: <20161116143343.15432-2-jeff.fan@intel.com> X-Mailer: git-send-email 2.9.3.windows.2 In-Reply-To: <20161116143343.15432-1-jeff.fan@intel.com> References: <20161116143343.15432-1-jeff.fan@intel.com> Subject: [PATCH 1/2] MdeModulePkg/CpuExceptionHanderLibNull: RegisterCpuInterruptHandler() X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Nov 2016 14:33:45 -0000 Current CpuExceptionHanderLibNull instance returns EFI_SUCCESS for all three services. If platform does not want to hook the Exception vector for some modules (For example DxeCore), it could select this NULL instance in DSC file for those module. But some modules that want to consume RegisterCpuInterruptHandler() cannot use NULL instance. If platform does not select the correct library instance, it will does work. But the caller does not recognize it. This update is to return EFI_UNSUPPORTED on RegisterCpuInterruptHandler() in NULL instance instead of return EFI_SUCCESS. Once platform selects this NULL instance, the caller could know it from return status. Cc: Feng Tian Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan --- .../Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.c b/MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.c index 2fea24a..68ee9a9 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 - 2013, Intel Corporation. All rights reserved.
+ Copyright (c) 2012 - 2016, 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 @@ -94,6 +94,6 @@ RegisterCpuInterruptHandler ( IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler ) { - return EFI_SUCCESS; + return EFI_UNSUPPORTED; } -- 2.9.3.windows.2