]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1. DxeIplPeim will locate Vector Handoff Table PPI and build GUIDed HOB if it has.
authorJeff Fan <jeff.fan@intel.com>
Fri, 22 Nov 2013 06:15:51 +0000 (06:15 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 22 Nov 2013 06:15:51 +0000 (06:15 +0000)
2. DxeMain will get Vector Handoff Table GUIDed HOB to install configuration table if it has.
3. Updated CPU Exception Handler Library to provide 3 new APIs to replace original one API and updated NULL instance accordingly.
4. Updated DxeMain/CapsuleX64/BootSriptExectorDxe to use the new API in CPU Exception Handler Lib.

Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14884 6f19259b-4bc3-4df7-8a09-765794883524

13 files changed:
MdeModulePkg/Core/Dxe/DxeMain.h
MdeModulePkg/Core/Dxe/DxeMain.inf
MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c
MdeModulePkg/Include/Library/CpuExceptionHandlerLib.h
MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.c
MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.inf
MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/IA32/SetIdtEntry.c
MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c
MdeModulePkg/Universal/CapsulePei/X64/X64Entry.c

index 1e057a5d9376aceff624e2d21bf973a67998c837..3b2b11d2760f456bfecd93a9a5f8c289b522611e 100644 (file)
@@ -67,6 +67,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Guid/EventExitBootServiceFailed.h>\r
 #include <Guid/LoadModuleAtFixedAddress.h>\r
 #include <Guid/IdleLoopEvent.h>\r
+#include <Guid/VectorHandoffTable.h>\r
+#include <Ppi/VectorHandoffInfo.h>\r
 \r
 #include <Library/DxeCoreEntryPoint.h>\r
 #include <Library/DebugLib.h>\r
index 58a4dd9b52e83bf0bd98085f2c2afaaf20379fe2..bd9a4bd56d38ac280298d03f85d75f73ea1e7692 100644 (file)
@@ -2,7 +2,7 @@
 #  This is core module in DXE phase. It provides an implementation of DXE Core that is\r
 #  compliant with DXE CIS.  \r
 #  \r
-#  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2006 - 2013, 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
   gLoadFixedAddressConfigurationTableGuid       ## SOMETIMES_CONSUMES\r
   gIdleLoopEventGuid                            ## CONSUMES ## GUID\r
   gEventExitBootServicesFailedGuid              ## CONSUMES ## GUID\r
+  gEfiVectorHandoffTableGuid                    ## SOMETIMES_PRODUCES ## Configuration\r
+\r
+[Ppis]\r
+  gEfiVectorHandoffInfoPpiGuid                  ## UNDEFINED\r
 \r
 [Protocols]\r
   gEfiStatusCodeRuntimeProtocolGuid             ## SOMETIMES_CONSUMES\r
index ed5a3c9e177a66d744c1fac4728b49bd5a70b0c3..6d2ff8202398d97ead451f8d03f7e9af9d633cfa 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   DXE Core Main Entry Point\r
 \r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, 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
@@ -242,11 +242,21 @@ DxeMain (
   EFI_PHYSICAL_ADDRESS          MemoryBaseAddress;\r
   UINT64                        MemoryLength;\r
   PE_COFF_LOADER_IMAGE_CONTEXT  ImageContext;\r
+  UINTN                         Index;\r
+  EFI_HOB_GUID_TYPE             *GuidHob;\r
+  EFI_VECTOR_HANDOFF_INFO       *VectorInfoList;\r
+  EFI_VECTOR_HANDOFF_INFO       *VectorInfo;\r
 \r
   //\r
   // Setup the default exception handlers\r
   //\r
-  SetupCpuExceptionHandlers ();\r
+  VectorInfoList = NULL;\r
+  GuidHob = GetNextGuidHob (&gEfiVectorHandoffInfoPpiGuid, HobStart);\r
+  if (GuidHob != NULL) {\r
+    VectorInfoList = (EFI_VECTOR_HANDOFF_INFO *) (GET_GUID_HOB_DATA(GuidHob));\r
+  }\r
+  Status = InitializeCpuExceptionHandlers (VectorInfoList);\r
+  ASSERT_EFI_ERROR (Status);\r
   \r
   //\r
   // Initialize Debug Agent to support source level debug in DXE phase\r
@@ -371,6 +381,24 @@ DxeMain (
   Status = CoreInitializeEventServices ();\r
   ASSERT_EFI_ERROR (Status);\r
 \r
+  //\r
+  // Get persisted vector hand-off info from GUIDeed HOB again due to HobStart may be updated,\r
+  // and install configuration table\r
+  //\r
+  GuidHob = GetNextGuidHob (&gEfiVectorHandoffInfoPpiGuid, HobStart);\r
+  if (GuidHob != NULL) {\r
+    VectorInfoList = (EFI_VECTOR_HANDOFF_INFO *) (GET_GUID_HOB_DATA(GuidHob));\r
+    VectorInfo = VectorInfoList;\r
+    Index = 1;\r
+    while (VectorInfo->Attribute != EFI_VECTOR_HANDOFF_LAST_ENTRY) {\r
+      VectorInfo ++;\r
+      Index ++;\r
+    }\r
+    VectorInfo = AllocateCopyPool (sizeof (EFI_VECTOR_HANDOFF_INFO) * Index, (VOID *) VectorInfoList);\r
+    ASSERT (VectorInfo != NULL);\r
+    Status = CoreInstallConfigurationTable (&gEfiVectorHandoffTableGuid, (VOID *) VectorInfo);\r
+    ASSERT_EFI_ERROR (Status);\r
+  }\r
 \r
   //\r
   // Get the Protocols that were passed in from PEI to DXE through GUIDed HOBs\r
index 97086345ad9d2fc03e27fb5cbbbe73d6189a8eeb..75372ace8dd6890c0d53da50bfed0e1893a9fd08 100644 (file)
@@ -2,7 +2,7 @@
   Master header file for DxeIpl PEIM. All source files in this module should\r
   include this file for common definitions.\r
 \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, 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
@@ -27,6 +27,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Ppi/LoadFile.h>\r
 #include <Ppi/S3Resume2.h>\r
 #include <Ppi/RecoveryModule.h>\r
+#include <Ppi/VectorHandoffInfo.h>\r
 \r
 #include <Guid/MemoryTypeInformation.h>\r
 #include <Guid/MemoryAllocationHob.h>\r
index 986250bdcc4b69eabf38614e75dfed0452398caf..85d0069c2ebdcf44357f0bdb5f02c5525d967750 100644 (file)
@@ -5,7 +5,7 @@
 #  PPI to discover and dispatch the DXE Foundation and components that are\r
 #  needed to run the DXE Foundation.\r
 #\r
-#  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2006 - 2013, 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
@@ -83,6 +83,7 @@
   gEfiPeiLoadFilePpiGuid            ## CONSUMES\r
   gEfiPeiS3Resume2PpiGuid           ## SOMETIMES_CONSUMES(Consumed on S3 boot path)\r
   gEfiPeiRecoveryModulePpiGuid      ## SOMETIMES_CONSUMES(Consumed on recovery boot path)\r
+  gEfiVectorHandoffInfoPpiGuid      ## SOMETIMES_CONSUMES\r
 \r
 [Guids]\r
   gEfiMemoryTypeInformationGuid     ## SOMETIMES_CONSUMES ## Variable:L"MemoryTypeInformation"\r
index b121e2439bb67e3547af74d1d07dec723b288722..38832cc364e35ebade3e51ee8589244f131e635b 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Ia32-specific functionality for DxeLoad.\r
 \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, 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
@@ -83,6 +83,8 @@ HandOffToDxeCore (
   EFI_PHYSICAL_ADDRESS      VectorAddress;\r
   UINT32                    Index;\r
   X64_IDT_TABLE             *IdtTableForX64;\r
+  EFI_VECTOR_HANDOFF_INFO   *VectorInfo;\r
+  EFI_PEI_VECTOR_HANDOFF_INFO_PPI *VectorHandoffInfoPpi;\r
 \r
   Status = PeiServicesAllocatePages (EfiBootServicesData, EFI_SIZE_TO_PAGES (STACK_SIZE), &BaseOfStack);\r
   ASSERT_EFI_ERROR (Status);\r
@@ -182,6 +184,30 @@ HandOffToDxeCore (
       TopOfStack\r
       );\r
   } else {\r
+    //\r
+    // Get Vector Hand-off Info PPI and build Guided HOB\r
+    //\r
+    Status = PeiServicesLocatePpi (\r
+               &gEfiVectorHandoffInfoPpiGuid,\r
+               0,\r
+               NULL,\r
+               (VOID **)&VectorHandoffInfoPpi\r
+               );\r
+    if (Status == EFI_SUCCESS) {\r
+      DEBUG ((EFI_D_INFO, "Vector Hand-off Info PPI is gotten, GUIDed HOB is created!\n"));\r
+      VectorInfo = VectorHandoffInfoPpi->Info;\r
+      Index = 1;\r
+      while (VectorInfo->Attribute != EFI_VECTOR_HANDOFF_LAST_ENTRY) {\r
+        VectorInfo ++;\r
+        Index ++;\r
+      }\r
+      BuildGuidDataHob (\r
+        &gEfiVectorHandoffInfoPpiGuid,\r
+        VectorHandoffInfoPpi->Info,\r
+        sizeof (EFI_VECTOR_HANDOFF_INFO) * Index\r
+        );\r
+    }\r
+\r
     //\r
     // Compute the top of the stack we were allocated. Pre-allocate a UINTN\r
     // for safety.\r
index a6e5c28046ef7c05075fdc3b2e473ac167ecab9e..88f1f47461e01922649e562a97d3c7bf8fade12e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   x64-specifc functionality for DxeLoad.\r
 \r
-Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, 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
@@ -34,10 +34,37 @@ HandOffToDxeCore (
   IN EFI_PEI_HOB_POINTERS   HobList\r
   )\r
 {\r
-  VOID                *BaseOfStack;\r
-  VOID                *TopOfStack;\r
-  EFI_STATUS          Status;\r
-  UINTN               PageTables;\r
+  VOID                            *BaseOfStack;\r
+  VOID                            *TopOfStack;\r
+  EFI_STATUS                      Status;\r
+  UINTN                           PageTables;\r
+  UINT32                          Index;\r
+  EFI_VECTOR_HANDOFF_INFO         *VectorInfo;\r
+  EFI_PEI_VECTOR_HANDOFF_INFO_PPI *VectorHandoffInfoPpi;\r
+\r
+  //\r
+  // Get Vector Hand-off Info PPI and build Guided HOB\r
+  //\r
+  Status = PeiServicesLocatePpi (\r
+             &gEfiVectorHandoffInfoPpiGuid,\r
+             0,\r
+             NULL,\r
+             (VOID **)&VectorHandoffInfoPpi\r
+             );\r
+  if (Status == EFI_SUCCESS) {\r
+    DEBUG ((EFI_D_INFO, "Vector Hand-off Info PPI is gotten, GUIDed HOB is created!\n"));\r
+    VectorInfo = VectorHandoffInfoPpi->Info;\r
+    Index = 1;\r
+    while (VectorInfo->Attribute != EFI_VECTOR_HANDOFF_LAST_ENTRY) {\r
+      VectorInfo ++;\r
+      Index ++;\r
+    }\r
+    BuildGuidDataHob (\r
+      &gEfiVectorHandoffInfoPpiGuid,\r
+      VectorHandoffInfoPpi->Info,\r
+      sizeof (EFI_VECTOR_HANDOFF_INFO) * Index\r
+      );\r
+  }\r
 \r
   //\r
   // Allocate 128KB for the Stack\r
index 6be32b23264e58830eb1d86eb7504c4c8755aa9d..16384f83168edcceecca6835110eeb25760f6e14 100644 (file)
@@ -1,7 +1,8 @@
 /** @file\r
-  CPU Exception library provides the CPU exception handler.\r
+  CPU Exception library provides the default CPU interrupt/exception handler.\r
+  It also provides capability to register user interrupt/exception handler.\r
 \r
-  Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2012 - 2013, 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
 \r
 **/\r
 \r
-#ifndef __CPU_EXCEPTION_LIB_H__\r
-#define __CPU_EXCEPTION_LIB_H__\r
+#ifndef __CPU_EXCEPTION_HANDLER_LIB_H__\r
+#define __CPU_EXCEPTION_HANDLER_LIB_H__\r
+\r
+#include <Ppi/VectorHandoffInfo.h>\r
+#include <Protocol/Cpu.h>\r
 \r
 /**\r
-  Setup CPU exception handlers.\r
\r
+  Initializes all CPU exceptions entries and provides the default exception handlers.\r
+  \r
+  Caller should try to get an array of interrupt and/or exception vectors that are in use and need to\r
+  persist by EFI_VECTOR_HANDOFF_INFO defined in PI 1.3 specification.\r
+  If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL. \r
+  If VectorInfo is not NULL, the exception vectors will be initialized per vector attribute accordingly.\r
+\r
+  @param[in]  VectorInfo    Pointer to reserved vector list.\r
+  \r
+  @retval EFI_SUCCESS           CPU Exception Entries have been successfully initialized \r
+                                with default exception handlers.\r
+  @retval EFI_INVALID_PARAMETER VectorInfo includes the invalid content if VectorInfo is not NULL.\r
+  @retval EFI_UNSUPPORTED       This function is not supported.\r
+\r
 **/\r
-VOID\r
+EFI_STATUS\r
+EFIAPI\r
+InitializeCpuExceptionHandlers (\r
+  IN EFI_VECTOR_HANDOFF_INFO       *VectorInfo OPTIONAL\r
+  );\r
+\r
+/**\r
+  Initializes all CPU interrupt/exceptions entries and provides the default interrupt/exception handlers.\r
+  \r
+  Caller should try to get an array of interrupt and/or exception vectors that are in use and need to\r
+  persist by EFI_VECTOR_HANDOFF_INFO defined in PI 1.3 specification.\r
+  If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL. \r
+  If VectorInfo is not NULL, the exception vectors will be initialized per vector attribute accordingly.\r
+\r
+  @param[in]  VectorInfo    Pointer to reserved vector list.\r
+  \r
+  @retval EFI_SUCCESS           All CPU interrupt/exception entries have been successfully initialized \r
+                                with default interrupt/exception handlers.\r
+  @retval EFI_INVALID_PARAMETER VectorInfo includes the invalid content if VectorInfo is not NULL.\r
+  @retval EFI_UNSUPPORTED       This function is not supported.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+InitializeCpuInterruptHandlers (\r
+  IN EFI_VECTOR_HANDOFF_INFO       *VectorInfo OPTIONAL\r
+  );\r
+\r
+/**\r
+  Registers a function to be called from the processor interrupt handler.\r
+\r
+  This function registers and enables the handler specified by InterruptHandler for a processor \r
+  interrupt or exception type specified by InterruptType. If InterruptHandler is NULL, then the \r
+  handler for the processor interrupt or exception type specified by InterruptType is uninstalled. \r
+  The installed handler is called once for each processor interrupt or exception.\r
+  NOTE: This function should be invoked after InitializeCpuExceptionHandlers() or\r
+  InitializeCpuInterruptHandlers() invoked, otherwise EFI_UNSUPPORTED returned.\r
+\r
+  @param[in]  InterruptType     Defines which interrupt or exception to hook.\r
+  @param[in]  InterruptHandler  A pointer to a function of type EFI_CPU_INTERRUPT_HANDLER that is called\r
+                                when a processor interrupt occurs. If this parameter is NULL, then the handler\r
+                                will be uninstalled.\r
+\r
+  @retval EFI_SUCCESS           The handler for the processor interrupt was successfully installed or uninstalled.\r
+  @retval EFI_ALREADY_STARTED   InterruptHandler is not NULL, and a handler for InterruptType was\r
+                                previously installed.\r
+  @retval EFI_INVALID_PARAMETER InterruptHandler is NULL, and a handler for InterruptType was not\r
+                                previously installed.\r
+  @retval EFI_UNSUPPORTED       The interrupt specified by InterruptType is not supported,\r
+                                or this function is not supported.\r
+*/\r
+EFI_STATUS\r
 EFIAPI\r
-SetupCpuExceptionHandlers (\r
-  VOID\r
+RegisterCpuInterruptHandler (\r
+  IN EFI_EXCEPTION_TYPE            InterruptType,\r
+  IN EFI_CPU_INTERRUPT_HANDLER     InterruptHandler\r
   );\r
 \r
 #endif\r
index 3dd9da8b85f486146d60d53d5819554b7fd2a22e..ded14a335e7f331d30c5ef56c04f1a35d743543d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   CPU Exception Handler library implementition with empty functions.\r
 \r
-  Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2012 - 2013, 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
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
+#include <PiPei.h>\r
+#include <Library/CpuExceptionHandlerLib.h>\r
 \r
+/**\r
+  Initializes all CPU exceptions entries and provides the default exception handlers.\r
+  \r
+  Caller should try to get an array of interrupt and/or exception vectors that are in use and need to\r
+  persist by EFI_VECTOR_HANDOFF_INFO defined in PI 1.3 specification.\r
+  If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL. \r
+  If VectorInfo is not NULL, the exception vectors will be initialized per vector attribute accordingly.\r
+\r
+  @param[in]  VectorInfo    Pointer to reserved vector list.\r
+  \r
+  @retval EFI_SUCCESS           CPU Exception Entries have been successfully initialized \r
+                                with default exception handlers.\r
+  @retval EFI_INVALID_PARAMETER VectorInfo includes the invalid content if VectorInfo is not NULL.\r
+  @retval EFI_UNSUPPORTED       This function is not supported.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+InitializeCpuExceptionHandlers (\r
+  IN EFI_VECTOR_HANDOFF_INFO       *VectorInfo OPTIONAL\r
+  )\r
+{\r
+  return EFI_SUCCESS;\r
+}\r
 \r
 /**\r
-  Setup CPU exception handlers.\r
\r
+  Initializes all CPU interrupt/exceptions entries and provides the default interrupt/exception handlers.\r
+  \r
+  Caller should try to get an array of interrupt and/or exception vectors that are in use and need to\r
+  persist by EFI_VECTOR_HANDOFF_INFO defined in PI 1.3 specification.\r
+  If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL. \r
+  If VectorInfo is not NULL, the exception vectors will be initialized per vector attribute accordingly.\r
+\r
+  @param[in]  VectorInfo    Pointer to reserved vector list.\r
+  \r
+  @retval EFI_SUCCESS           All CPU interrupt/exception entries have been successfully initialized \r
+                                with default interrupt/exception handlers.\r
+  @retval EFI_INVALID_PARAMETER VectorInfo includes the invalid content if VectorInfo is not NULL.\r
+  @retval EFI_UNSUPPORTED       This function is not supported.\r
+\r
 **/\r
-VOID\r
+EFI_STATUS\r
+EFIAPI\r
+InitializeCpuInterruptHandlers (\r
+  IN EFI_VECTOR_HANDOFF_INFO       *VectorInfo OPTIONAL\r
+  )\r
+{\r
+  return EFI_SUCCESS;\r
+}\r
+\r
+/**\r
+  Registers a function to be called from the processor interrupt handler.\r
+\r
+  This function registers and enables the handler specified by InterruptHandler for a processor \r
+  interrupt or exception type specified by InterruptType. If InterruptHandler is NULL, then the \r
+  handler for the processor interrupt or exception type specified by InterruptType is uninstalled. \r
+  The installed handler is called once for each processor interrupt or exception.\r
+  NOTE: This function should be invoked after InitializeCpuExceptionHandlers() or\r
+  InitializeCpuInterruptHandlers() invoked, otherwise EFI_UNSUPPORTED returned.\r
+\r
+  @param[in]  InterruptType     Defines which interrupt or exception to hook.\r
+  @param[in]  InterruptHandler  A pointer to a function of type EFI_CPU_INTERRUPT_HANDLER that is called\r
+                                when a processor interrupt occurs. If this parameter is NULL, then the handler\r
+                                will be uninstalled.\r
+\r
+  @retval EFI_SUCCESS           The handler for the processor interrupt was successfully installed or uninstalled.\r
+  @retval EFI_ALREADY_STARTED   InterruptHandler is not NULL, and a handler for InterruptType was\r
+                                previously installed.\r
+  @retval EFI_INVALID_PARAMETER InterruptHandler is NULL, and a handler for InterruptType was not\r
+                                previously installed.\r
+  @retval EFI_UNSUPPORTED       The interrupt specified by InterruptType is not supported,\r
+                                or this function is not supported.\r
+*/\r
+EFI_STATUS\r
 EFIAPI\r
-SetupCpuExceptionHandlers (\r
-  VOID\r
+RegisterCpuInterruptHandler (\r
+  IN EFI_EXCEPTION_TYPE            InterruptType,\r
+  IN EFI_CPU_INTERRUPT_HANDLER     InterruptHandler\r
   )\r
-{  \r
+{\r
+  return EFI_SUCCESS;\r
 }\r
 \r
index 47e55feee319bd102a8447ec8105f83ec346f285..0ec02ac41141a844f0d3410ad7040ad111259e64 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # Null instance of CPU Exception Handler Library with empty functions.\r
 #\r
-#  Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2012 - 2013, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -16,7 +16,7 @@
   INF_VERSION                    = 0x00010005\r
   BASE_NAME                      = CpuExceptionHandlerLibNull\r
   FILE_GUID                      = 3175E6B9-4B01-496a-9A2B-64AF02D87E34\r
-  MODULE_TYPE                    = BASE\r
+  MODULE_TYPE                    = PEIM\r
   VERSION_STRING                 = 1.0\r
   LIBRARY_CLASS                  = CpuExceptionHandlerLib\r
 \r
index 04eba0d75678d843edd7679f5f760a485f5b3216..63b06ba5d64986b372526ea8c7f8f71dc51b6f97 100644 (file)
@@ -3,7 +3,7 @@
 \r
   Set a IDT entry for interrupt vector 3 for debug purpose for IA32 platform\r
 \r
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
 \r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -30,6 +30,7 @@ SetIdtEntry (
   IA32_IDT_GATE_DESCRIPTOR                      *IdtEntry;\r
   IA32_DESCRIPTOR                               *IdtDescriptor;\r
   UINTN                                         S3DebugBuffer;\r
+  EFI_STATUS                                    Status;\r
 \r
   //\r
   // Restore IDT for debug\r
@@ -40,7 +41,8 @@ SetIdtEntry (
   //\r
   // Setup the default CPU exception handlers\r
   //\r
-  SetupCpuExceptionHandlers ();\r
+  Status = InitializeCpuExceptionHandlers (NULL);\r
+  ASSERT_EFI_ERROR (Status);\r
 \r
   DEBUG_CODE (\r
     //\r
index a8944e600c64b711073db916b9ee920cc8944ea2..2d15f5b5d122ab72dfa4e3f4b2cabd16ecbc7988 100644 (file)
@@ -99,6 +99,7 @@ SetIdtEntry (
   IA32_IDT_GATE_DESCRIPTOR                      *IdtEntry;\r
   IA32_DESCRIPTOR                               *IdtDescriptor;\r
   UINTN                                         S3DebugBuffer;\r
+  EFI_STATUS                                    Status;\r
 \r
   //\r
   // Restore IDT for debug\r
@@ -109,7 +110,8 @@ SetIdtEntry (
   //\r
   // Setup the default CPU exception handlers\r
   //\r
-  SetupCpuExceptionHandlers ();\r
+  Status = InitializeCpuExceptionHandlers (NULL);\r
+  ASSERT_EFI_ERROR (Status);\r
 \r
   DEBUG_CODE (\r
     //\r
index 56913e6b03b8d420ceeed77e80bc5593c72c0cc0..88cfc8fe9e6f8e17e03ad24438a289f8bd2bac17 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The X64 entrypoint is used to process capsule in long mode.\r
 \r
-Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2013, 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
@@ -58,7 +58,8 @@ _ModuleEntryPoint (
   //\r
   // Setup the default CPU exception handlers\r
   //\r
-  SetupCpuExceptionHandlers ();                \r
+  Status = InitializeCpuExceptionHandlers (NULL);\r
+  ASSERT_EFI_ERROR (Status);\r
   \r
   //\r
   // Initialize Debug Agent to support source level debug\r