]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg/ArmExceptionLib: Follow new CpuExceptionHandlerLib APIs
authorRay Ni <ray.ni@intel.com>
Mon, 13 Jun 2022 01:51:06 +0000 (09:51 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 14 Jun 2022 02:59:22 +0000 (02:59 +0000)
CpuExceptionHandlerLib has been refactored with following changes:
1. Removed InitializeCpuInterruptHandlers in 2a09527ebcb459b40
2. Removed InitializeCpuExceptionHandlersEx and
   added InitializeSeparateExceptionStacks in e7abb94d1fb8a0e7

The patch updates ARM version of CpuExceptionHandlerLib to follow
the API changes.

The functionality to ARM platforms should be none.

Signed-off-by: Ray Ni <ray.ni@intel.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c

index 1904816c1632e43c86c19d1ebc50a134bcc8560f..2c7bc66aa72946290439bf1bcaa585a1b3988afc 100644 (file)
@@ -4,6 +4,7 @@
 *  Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
 *  Copyright (c) 2011-2021, Arm Limited. All rights reserved.<BR>\r
 *  Copyright (c) 2016 HP Development Company, L.P.\r
+*  Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>\r
 *\r
 *  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 *\r
@@ -194,32 +195,6 @@ CopyExceptionHandlers (
   return RETURN_SUCCESS;\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
-  // not needed, this is what the CPU driver is for\r
-  return EFI_UNSUPPORTED;\r
-}\r
-\r
 /**\r
 Registers a function to be called from the processor exception handler. (On ARM/AArch64 this only\r
 provides exception handlers, not interrupt handling which is provided through the Hardware Interrupt\r
@@ -229,8 +204,8 @@ This function registers and enables the handler specified by ExceptionHandler fo
 interrupt or exception type specified by ExceptionType. If ExceptionHandler is NULL, then the\r
 handler for the processor interrupt or exception type specified by ExceptionType 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
+NOTE: This function should be invoked after InitializeCpuExceptionHandlers() is invoked,\r
+otherwise EFI_UNSUPPORTED returned.\r
 \r
 @param[in]  ExceptionType     Defines which interrupt or exception to hook.\r
 @param[in]  ExceptionHandler  A pointer to a function of type EFI_CPU_INTERRUPT_HANDLER that is called\r
@@ -312,33 +287,22 @@ CommonCExceptionHandler (
 }\r
 \r
 /**\r
-  Initializes all CPU exceptions entries with optional extra initializations.\r
-\r
-  By default, this method should include all functionalities implemented by\r
-  InitializeCpuExceptionHandlers(), plus extra initialization works, if any.\r
-  This could be done by calling InitializeCpuExceptionHandlers() directly\r
-  in this method besides the extra works.\r
+  Setup separate stacks for certain exception handlers.\r
 \r
-  InitData is optional and its use and content are processor arch dependent.\r
-  The typical usage of it is to convey resources which have to be reserved\r
-  elsewhere and are necessary for the extra initializations of exception.\r
+  InitData is optional and processor arch dependent.\r
 \r
-  @param[in]  VectorInfo    Pointer to reserved vector list.\r
-  @param[in]  InitData      Pointer to data optional for extra initializations\r
-                            of exception.\r
+  @param[in]  InitData      Pointer to data optional for information about how\r
+                            to assign stacks for certain exception handlers.\r
 \r
-  @retval EFI_SUCCESS             The exceptions have been successfully\r
-                                  initialized.\r
-  @retval EFI_INVALID_PARAMETER   VectorInfo or InitData contains invalid\r
-                                  content.\r
+  @retval EFI_SUCCESS             The stacks are assigned successfully.\r
+  @retval EFI_UNSUPPORTED         This function is not supported.\r
 \r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
-InitializeCpuExceptionHandlersEx (\r
-  IN EFI_VECTOR_HANDOFF_INFO  *VectorInfo OPTIONAL,\r
+InitializeSeparateExceptionStacks (\r
   IN CPU_EXCEPTION_INIT_DATA  *InitData OPTIONAL\r
   )\r
 {\r
-  return InitializeCpuExceptionHandlers (VectorInfo);\r
+  return EFI_SUCCESS;\r
 }\r