TianoCore EDK2 master
Loading...
Searching...
No Matches
SecPeiExceptionLib.c File Reference
#include <Library/BaseLib.h>
#include <Library/CpuLib.h>
#include <Library/CpuExceptionHandlerLib.h>
#include <Library/DebugLib.h>
#include <Library/SerialPortLib.h>
#include <Protocol/DebugSupport.h>
#include <Register/LoongArch64/Csr.h>
#include "ExceptionCommon.h"

Go to the source code of this file.

Functions

EFI_STATUS RegisterCpuInterruptHandler (IN EFI_EXCEPTION_TYPE InterruptType, IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler)
 
VOID EFIAPI CommonExceptionHandler (IN EFI_EXCEPTION_TYPE ExceptionType, IN OUT EFI_SYSTEM_CONTEXT SystemContext)
 
EFI_STATUS EFIAPI InitializeCpuExceptionHandlers (IN EFI_VECTOR_HANDOFF_INFO *VectorInfo OPTIONAL)
 

Detailed Description

LoongArch exception library implemenation for PEI and SEC modules.

Copyright (c) 2024, Loongson Technology Corporation Limited. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file SecPeiExceptionLib.c.

Function Documentation

◆ CommonExceptionHandler()

VOID EFIAPI CommonExceptionHandler ( IN EFI_EXCEPTION_TYPE  ExceptionType,
IN OUT EFI_SYSTEM_CONTEXT  SystemContext 
)

Common exception handler.

Parameters
ExceptionTypeException type.
SystemContextPointer to EFI_SYSTEM_CONTEXT.

Definition at line 52 of file SecPeiExceptionLib.c.

◆ InitializeCpuExceptionHandlers()

EFI_STATUS EFIAPI InitializeCpuExceptionHandlers ( IN EFI_VECTOR_HANDOFF_INFO *VectorInfo  OPTIONAL)

Initializes all CPU exceptions entries and provides the default exception handlers.

Always return EFI_SUCCESS in the SEC exception initialization module.

Parameters
[in]VectorInfoPointer to reserved vector list.
Return values
EFI_SUCCESSCPU Exception Entries have been successfully initialized with default exception handlers.

Definition at line 97 of file SecPeiExceptionLib.c.

◆ RegisterCpuInterruptHandler()

EFI_STATUS RegisterCpuInterruptHandler ( IN EFI_EXCEPTION_TYPE  InterruptType,
IN EFI_CPU_INTERRUPT_HANDLER  InterruptHandler 
)

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

Always return EFI_UNSUPPORTED in the SEC exception initialization module.

Parameters
InterruptTypeA pointer to the processor's current interrupt state. Set to TRUE if interrupts are enabled and FALSE if interrupts are disabled.
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.
Return values
EFI_UNSUPPORTEDThe interrupt specified by InterruptType is not supported.

Definition at line 35 of file SecPeiExceptionLib.c.