summaryrefslogtreecommitdiffstats
path: root/ArmPkg/Library/ArmExceptionLib
diff options
context:
space:
mode:
authorJian J Wang <jian.j.wang@intel.com>2017-12-07 20:16:04 +0800
committerStar Zeng <star.zeng@intel.com>2017-12-08 14:38:49 +0800
commit4cb21e1e728cebce5b9ec4a6509ec67598719ba0 (patch)
tree1e3c4c8cbf33907258bbd74648a1e19d10b563ad /ArmPkg/Library/ArmExceptionLib
parent2da89195f5a8efc7c085316c706728459126391c (diff)
downloadedk2-4cb21e1e728cebce5b9ec4a6509ec67598719ba0.tar.gz
edk2-4cb21e1e728cebce5b9ec4a6509ec67598719ba0.tar.bz2
edk2-4cb21e1e728cebce5b9ec4a6509ec67598719ba0.zip
ArmPkg/ArmExceptionLib: Add implementation of new API
This patch add implementation of following new API introduced into CpuExceptionHandlerLib. Since this lib hasn't support Stack Guard and stack switch, the new method just calls original InitializeCpuExceptionHandlers. EFI_STATUS EFIAPI InitializeCpuExceptionHandlersEx ( IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL, IN CPU_EXCEPTION_INIT_DATA *InitDataEx OPTIONAL ); Cc: Leif Lindholm <leif.lindholm@linaro.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jiewen Yao <jiewen.yao@intel.com> Suggested-by: Ayellet Wolman <ayellet.wolman@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Jian J Wang <jian.j.wang@intel.com> Reviewed-by: Jeff Fan <vanjeff_919@hotmail.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'ArmPkg/Library/ArmExceptionLib')
-rw-r--r--ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c b/ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c
index e8ea1f159d..cebb26a4ce 100644
--- a/ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c
+++ b/ArmPkg/Library/ArmExceptionLib/ArmExceptionLib.c
@@ -320,3 +320,36 @@ CommonCExceptionHandler(
DefaultExceptionHandler(ExceptionType, SystemContext);
}
+
+/**
+ Initializes all CPU exceptions entries with optional extra initializations.
+
+ By default, this method should include all functionalities implemented by
+ InitializeCpuExceptionHandlers(), plus extra initialization works, if any.
+ This could be done by calling InitializeCpuExceptionHandlers() directly
+ in this method besides the extra works.
+
+ InitData is optional and its use and content are processor arch dependent.
+ The typical usage of it is to convey resources which have to be reserved
+ elsewhere and are necessary for the extra initializations of exception.
+
+ @param[in] VectorInfo Pointer to reserved vector list.
+ @param[in] InitData Pointer to data optional for extra initializations
+ of exception.
+
+ @retval EFI_SUCCESS The exceptions have been successfully
+ initialized.
+ @retval EFI_INVALID_PARAMETER VectorInfo or InitData contains invalid
+ content.
+
+**/
+EFI_STATUS
+EFIAPI
+InitializeCpuExceptionHandlersEx (
+ IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL,
+ IN CPU_EXCEPTION_INIT_DATA *InitData OPTIONAL
+ )
+{
+ return InitializeCpuExceptionHandlers (VectorInfo);
+}
+