]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/CpuExceptionHanderLibNull: RegisterCpuInterruptHandler()
authorJeff Fan <jeff.fan@intel.com>
Wed, 16 Nov 2016 14:18:11 +0000 (22:18 +0800)
committerJeff Fan <jeff.fan@intel.com>
Fri, 18 Nov 2016 01:43:51 +0000 (09:43 +0800)
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 <feng.tian@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.c

index 2fea24ac3180ce39fe4f604f9762342c817d5209..68ee9a93d7d1f101ba2ad2e13fab9a71ef1334b7 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   CPU Exception Handler library implementition with empty functions.\r
 \r
-  Copyright (c) 2012 - 2013, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -94,6 +94,6 @@ RegisterCpuInterruptHandler (
   IN EFI_CPU_INTERRUPT_HANDLER     InterruptHandler\r
   )\r
 {\r
-  return EFI_SUCCESS;\r
+  return EFI_UNSUPPORTED;\r
 }\r
 \r