TianoCore EDK2 master
Loading...
Searching...
No Matches
PeiDxeSmmCpuException.c File Reference

Go to the source code of this file.

Functions

VOID CommonExceptionHandlerWorker (IN EFI_EXCEPTION_TYPE ExceptionType, IN EFI_SYSTEM_CONTEXT SystemContext, IN EXCEPTION_HANDLER_DATA *ExceptionHandlerData)
 
VOID UpdateIdtTable (IN IA32_IDT_GATE_DESCRIPTOR *IdtTable, IN EXCEPTION_HANDLER_TEMPLATE_MAP *TemplateMap, IN EXCEPTION_HANDLER_DATA *ExceptionHandlerData)
 
EFI_STATUS InitializeCpuExceptionHandlersWorker (IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL, IN OUT EXCEPTION_HANDLER_DATA *ExceptionHandlerData)
 
EFI_STATUS RegisterCpuInterruptHandlerWorker (IN EFI_EXCEPTION_TYPE InterruptType, IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler, IN EXCEPTION_HANDLER_DATA *ExceptionHandlerData)
 

Detailed Description

CPU Exception Library provides PEI/DXE/SMM CPU common exception handler.

Copyright (c) 2012 - 2022, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file PeiDxeSmmCpuException.c.

Function Documentation

◆ CommonExceptionHandlerWorker()

VOID CommonExceptionHandlerWorker ( IN EFI_EXCEPTION_TYPE  ExceptionType,
IN EFI_SYSTEM_CONTEXT  SystemContext,
IN EXCEPTION_HANDLER_DATA ExceptionHandlerData 
)

Internal worker function for common exception handler.

Parameters
ExceptionTypeException type.
SystemContextPointer to EFI_SYSTEM_CONTEXT.
ExceptionHandlerDataPointer to exception handler data.

Definition at line 21 of file PeiDxeSmmCpuException.c.

◆ InitializeCpuExceptionHandlersWorker()

EFI_STATUS InitializeCpuExceptionHandlersWorker ( IN EFI_VECTOR_HANDOFF_INFO *VectorInfo  OPTIONAL,
IN OUT EXCEPTION_HANDLER_DATA ExceptionHandlerData 
)

Internal worker function to initialize exception handler.

Parameters
[in]VectorInfoPointer to reserved vector list.
[in,out]ExceptionHandlerDataPointer to exception handler data.
Return values
EFI_SUCCESSCPU Exception Entries have been successfully initialized with default exception handlers.
EFI_INVALID_PARAMETERVectorInfo includes the invalid content if VectorInfo is not NULL.
EFI_UNSUPPORTEDThis function is not supported.

Definition at line 251 of file PeiDxeSmmCpuException.c.

◆ RegisterCpuInterruptHandlerWorker()

EFI_STATUS RegisterCpuInterruptHandlerWorker ( IN EFI_EXCEPTION_TYPE  InterruptType,
IN EFI_CPU_INTERRUPT_HANDLER  InterruptHandler,
IN EXCEPTION_HANDLER_DATA ExceptionHandlerData 
)

Registers a function to be called from the processor interrupt handler.

Parameters
[in]InterruptTypeDefines which interrupt or exception to hook.
[in]InterruptHandlerA pointer to a function of type EFI_CPU_INTERRUPT_HANDLER that is called when a processor interrupt occurs. If this parameter is NULL, then the handler will be uninstalled
[in]ExceptionHandlerDataPointer to exception handler data.
Return values
EFI_SUCCESSThe handler for the processor interrupt was successfully installed or uninstalled.
EFI_ALREADY_STARTEDInterruptHandler is not NULL, and a handler for InterruptType was previously installed.
EFI_INVALID_PARAMETERInterruptHandler is NULL, and a handler for InterruptType was not previously installed.
EFI_UNSUPPORTEDThe interrupt specified by InterruptType is not supported, or this function is not supported.

Definition at line 307 of file PeiDxeSmmCpuException.c.

◆ UpdateIdtTable()

VOID UpdateIdtTable ( IN IA32_IDT_GATE_DESCRIPTOR *  IdtTable,
IN EXCEPTION_HANDLER_TEMPLATE_MAP TemplateMap,
IN EXCEPTION_HANDLER_DATA ExceptionHandlerData 
)

Internal worker function to update IDT entries accordling to vector attributes.

Parameters
[in]IdtTablePointer to IDT table.
[in]TemplateMapPointer to a buffer where the address map is returned.
[in]ExceptionHandlerDataPointer to exception handler data.

Definition at line 176 of file PeiDxeSmmCpuException.c.