+/**\r
+ Internal worker function to initialize exception handler.\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
+InitializeCpuExceptionHandlersWorker (\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
+ @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
+RegisterCpuInterruptHandlerWorker (\r
+ IN EFI_EXCEPTION_TYPE InterruptType,\r
+ IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler\r
+ );\r
+\r
+/**\r
+ Internal worker function to update IDT entries accordling to vector attributes.\r
+\r
+ @param[in] IdtTable Pointer to IDT table.\r
+ @param[in] TemplateMap Pointer to a buffer where the address map is returned.\r
+ @param[in] IdtEntryCount IDT entries number to be updated.\r
+\r
+**/\r
+VOID\r
+UpdateIdtTable (\r
+ IN IA32_IDT_GATE_DESCRIPTOR *IdtTable,\r
+ IN EXCEPTION_HANDLER_TEMPLATE_MAP *TemplateMap,\r
+ IN UINTN IdtEntryCount\r
+ );\r
+\r
+/**\r
+ Save CPU exception context when handling EFI_VECTOR_HANDOFF_HOOK_AFTER case.\r
+\r
+ @param[in] ExceptionType Exception type.\r
+ @param[in] SystemContext Pointer to EFI_SYSTEM_CONTEXT.\r
+\r
+**/\r
+VOID\r
+ArchSaveExceptionContext (\r
+ IN UINTN ExceptionType,\r
+ IN EFI_SYSTEM_CONTEXT SystemContext \r
+ );\r
+\r
+/**\r
+ Restore CPU exception context when handling EFI_VECTOR_HANDOFF_HOOK_AFTER case.\r
+\r
+ @param[in] ExceptionType Exception type.\r
+ @param[in] SystemContext Pointer to EFI_SYSTEM_CONTEXT.\r
+\r
+**/\r
+VOID\r
+ArchRestoreExceptionContext (\r
+ IN UINTN ExceptionType,\r
+ IN EFI_SYSTEM_CONTEXT SystemContext \r
+ );\r
+\r
+/**\r
+ Fix up the vector number in the vector code.\r
+ \r
+ @param[in] VectorBase Base address of the vector handler.\r
+ @param[in] VectorNum Index of vector.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+AsmVectorNumFixup (\r
+ IN VOID *VectorBase,\r
+ IN UINT8 VectorNum\r
+ );\r
+\r
+/**\r
+ Read and save reserved vector information\r
+ \r
+ @param[in] VectorInfo Pointer to reserved vector list.\r
+ @param[out] ReservedVector Pointer to reserved vector data buffer.\r
+ @param[in] VectorCount Vector number to be updated.\r
+ \r
+ @return EFI_SUCCESS Read and save vector info successfully.\r
+ @retval EFI_INVALID_PARAMETER VectorInfo includes the invalid content if VectorInfo is not NULL.\r
+\r
+**/\r
+EFI_STATUS\r
+ReadAndVerifyVectorInfo (\r
+ IN EFI_VECTOR_HANDOFF_INFO *VectorInfo,\r
+ OUT RESERVED_VECTORS_DATA *ReservedVector,\r
+ IN UINTN VectorCount\r
+ );\r
+\r