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

IA32 CPU Exception Handler functons.

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 91 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 52 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.

Definition at line 119 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 20 of file ArchExceptionHandler.c.

◆ DumpCpuContext()

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

Display processor context.

Parameters
[in]ExceptionTypeException type.
[in]SystemContextProcessor context to be display.

Definition at line 298 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 403 of file ArchExceptionHandler.c.