}\r
\r
/**\r
- Initializes all CPU exceptions entries with optional extra initializations.\r
+ Setup separate stacks for certain exception handlers.\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
+ InitData is optional and processor arch dependent.\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
+ @param[in] InitData Pointer to data optional for information about how\r
+ to assign stacks for certain exception handlers.\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
-\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
- EFI_STATUS Status;\r
-\r
- //\r
- // To avoid repeat initialization of default handlers, the caller should pass\r
- // an extended init data with InitDefaultHandlers set to FALSE. There's no\r
- // need to call this method to just initialize default handlers. Call non-ex\r
- // version instead; or this method must be implemented as a simple wrapper of\r
- // non-ex version of it, if this version has to be called.\r
- //\r
- if ((InitData == NULL) || InitData->Ia32.InitDefaultHandlers) {\r
- Status = InitializeCpuExceptionHandlers (VectorInfo);\r
- } else {\r
- Status = EFI_SUCCESS;\r
- }\r
-\r
- if (!EFI_ERROR (Status)) {\r
- //\r
- // Initializing stack switch is only necessary for Stack Guard functionality.\r
- //\r
- if (PcdGetBool (PcdCpuStackGuard) && (InitData != NULL)) {\r
- Status = ArchSetupExceptionStack (InitData);\r
- }\r
+ if (InitData == NULL) {\r
+ return EFI_UNSUPPORTED;\r
}\r
\r
- return Status;\r
+ return ArchSetupExceptionStack (InitData);\r
}\r