beautypg.com

Registerexceptioncallback(), See t – Intel Extensible Firmware Interface User Manual

Page 724

background image

Extensible Firmware Interface Specification

16-10

12/01/02

Version 1.10

EFI_DEBUG_SUPPORT_PROTOCOL.RegisterExceptionCallback()

Summary

Registers a function to be called when a given processor exception occurs.

Prototype

typedef
EFI_STATUS
(EFIAPI

*REGISTER_EXCEPTION_CALLBACK) (

IN EFI_DEBUG_SUPPORT_PROTOCOL

*This,

IN UINTN

ProcessorIndex,

IN EFI_EXCEPTION_CALLBACK

ExceptionCallback,

IN EFI_EXCEPTION_TYPE

ExceptionType

);

Parameters

This

A pointer to the

EFI_DEBUG_SUPPORT_PROTOCOL

instance.

Type

EFI_DEBUG_SUPPORT_PROTOCOL

is defined in

Section 16.2.

ProcessorIndex

Specifies which processor the callback function applies to.

ExceptionCallback

A pointer to a function of type

EXCEPTION_CALLBACK

that is

called when the processor exception specified by

ExceptionType

occurs. Passing

NULL

unregisters any previously registered function

associated with

ExceptionType

.

ExceptionType

Specifies which processor exception to hook.

Related Definitions

typedef
VOID (*EFI_EXCEPTION_CALLBACK) (
IN EFI_EXCEPTION_TYPE

ExceptionType,

IN OUT EFI_SYSTEM_CONTEXT

SystemContext

);

typedef INTN EFI_EXCEPTION_TYPE;

// EBC Exception types
#define EXCEPT_EBC_UNDEFINED 0
#define EXCEPT_EBC_DIVIDE_ERROR 1
#define EXCEPT_EBC_DEBUG 2
#define EXCEPT_EBC_BREAKPOINT 3
#define EXCEPT_EBC_OVERFLOW 4
#define EXCEPT_EBC_INVALID_OPCODE 5