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

Go to the source code of this file.

Functions

VOID ArchUpdateIdtEntry (OUT IA32_IDT_GATE_DESCRIPTOR *IdtEntry, IN UINTN InterruptHandler)
 
UINTN ArchGetIdtHandler (IN IA32_IDT_GATE_DESCRIPTOR *IdtEntry)
 
VOID ArchSaveExceptionContext (IN UINTN ExceptionType, IN EFI_SYSTEM_CONTEXT SystemContext, IN EXCEPTION_HANDLER_DATA *ExceptionHandlerData)
 
VOID ArchRestoreExceptionContext (IN UINTN ExceptionType, IN EFI_SYSTEM_CONTEXT SystemContext, IN EXCEPTION_HANDLER_DATA *ExceptionHandlerData)
 
EFI_STATUS ArchSetupExceptionStack (IN VOID *Buffer, IN OUT UINTN *BufferSize)
 
VOID EFIAPI DumpCpuContext (IN EFI_EXCEPTION_TYPE ExceptionType, IN EFI_SYSTEM_CONTEXT SystemContext)
 
VOID DumpImageAndCpuContent (IN EFI_EXCEPTION_TYPE ExceptionType, IN EFI_SYSTEM_CONTEXT SystemContext)
 

Detailed Description

x64 CPU Exception Handler.

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

Definition in file ArchExceptionHandler.c.

Function Documentation

◆ ArchGetIdtHandler()

UINTN ArchGetIdtHandler ( IN IA32_IDT_GATE_DESCRIPTOR *  IdtEntry)

Read IDT handler value from IDT entry.

Parameters
IdtEntryPointer to IDT entry to be read.

Definition at line 37 of file ArchExceptionHandler.c.

◆ ArchRestoreExceptionContext()

VOID ArchRestoreExceptionContext ( IN UINTN  ExceptionType,
IN EFI_SYSTEM_CONTEXT  SystemContext,
IN EXCEPTION_HANDLER_DATA ExceptionHandlerData 
)

Restore CPU exception context when handling EFI_VECTOR_HANDOFF_HOOK_AFTER case.

Parameters
[in]ExceptionTypeException type.
[in]SystemContextPointer to EFI_SYSTEM_CONTEXT.
[in]ExceptionHandlerDataPointer to exception handler data.

Definition at line 94 of file ArchExceptionHandler.c.

◆ ArchSaveExceptionContext()

VOID ArchSaveExceptionContext ( IN UINTN  ExceptionType,
IN EFI_SYSTEM_CONTEXT  SystemContext,
IN EXCEPTION_HANDLER_DATA ExceptionHandlerData 
)

Save CPU exception context when handling EFI_VECTOR_HANDOFF_HOOK_AFTER case.

Parameters
[in]ExceptionTypeException type.
[in]SystemContextPointer to EFI_SYSTEM_CONTEXT.
[in]ExceptionHandlerDataPointer to exception handler data.

Definition at line 53 of file ArchExceptionHandler.c.

◆ ArchSetupExceptionStack()

EFI_STATUS ArchSetupExceptionStack ( IN VOID *  Buffer,
IN OUT UINTN BufferSize 
)

Setup separate stacks for certain exception handlers.

Parameters
[in]BufferPoint to buffer used to separate exception stack.
[in,out]BufferSizeOn input, it indicates the byte size of Buffer. If the size is not enough, the return status will be EFI_BUFFER_TOO_SMALL, and output BufferSize will be the size it needs.
Return values
EFI_SUCCESSThe stacks are assigned successfully.
EFI_BUFFER_TOO_SMALLThis BufferSize is too small.
EFI_UNSUPPORTEDThis function is not supported.

Definition at line 125 of file ArchExceptionHandler.c.

◆ ArchUpdateIdtEntry()

VOID ArchUpdateIdtEntry ( OUT IA32_IDT_GATE_DESCRIPTOR *  IdtEntry,
IN UINTN  InterruptHandler 
)

Return address map of exception handler template so that C code can generate exception tables.

Parameters
IdtEntryPointer to IDT entry to be updated.
InterruptHandlerIDT handler value.

Definition at line 19 of file ArchExceptionHandler.c.

◆ DumpCpuContext()

VOID EFIAPI DumpCpuContext ( IN EFI_EXCEPTION_TYPE  ExceptionType,
IN EFI_SYSTEM_CONTEXT  SystemContext 
)

Display CPU information.

Parameters
ExceptionTypeException type.
SystemContextPointer to EFI_SYSTEM_CONTEXT.

Definition at line 273 of file ArchExceptionHandler.c.

◆ DumpImageAndCpuContent()

VOID DumpImageAndCpuContent ( IN EFI_EXCEPTION_TYPE  ExceptionType,
IN EFI_SYSTEM_CONTEXT  SystemContext 
)

Display CPU information.

Parameters
ExceptionTypeException type.
SystemContextPointer to EFI_SYSTEM_CONTEXT.

Definition at line 405 of file ArchExceptionHandler.c.