TianoCore EDK2 master
Loading...
Searching...
No Matches
PlDebugSupportX64.c File Reference
#include "PlDebugSupport.h"

Go to the source code of this file.

Functions

UINTN GetInterruptHandleFromIdt (IN IA32_IDT_GATE_DESCRIPTOR *IdtGateDecriptor)
 
VOID CreateEntryStub (IN EFI_EXCEPTION_TYPE ExceptionType, OUT VOID **Stub)
 
EFI_STATUS ManageIdtEntryTable (CALLBACK_FUNC NewCallback, EFI_EXCEPTION_TYPE ExceptionType)
 

Variables

IA32_IDT_GATE_DESCRIPTOR NullDesc
 

Detailed Description

X64 specific functions to support Debug Support protocol.

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

Definition in file PlDebugSupportX64.c.

Function Documentation

◆ CreateEntryStub()

VOID CreateEntryStub ( IN EFI_EXCEPTION_TYPE  ExceptionType,
OUT VOID **  Stub 
)

Allocate pool for a new IDT entry stub.

Copy the generic stub into the new buffer and fixup the vector number and jump target address.

Parameters
ExceptionTypeThis is the exception type that the new stub will be created for.
StubOn successful exit, *Stub contains the newly allocated entry stub.

Definition at line 54 of file PlDebugSupportX64.c.

◆ GetInterruptHandleFromIdt()

UINTN GetInterruptHandleFromIdt ( IN IA32_IDT_GATE_DESCRIPTOR *  IdtGateDecriptor)

Get Interrupt Handle from IDT Gate Descriptor.

Parameters
IdtGateDecriptorIDT Gate Descriptor.
Returns
Interrupt Handle stored in IDT Gate Descriptor.

Definition at line 24 of file PlDebugSupportX64.c.

◆ ManageIdtEntryTable()

EFI_STATUS ManageIdtEntryTable ( CALLBACK_FUNC  NewCallback,
EFI_EXCEPTION_TYPE  ExceptionType 
)

This is the main worker function that manages the state of the interrupt handlers. It both installs and uninstalls interrupt handlers based on the value of NewCallback. If NewCallback is NULL, then uninstall is indicated. If NewCallback is non-NULL, then install is indicated.

Parameters
NewCallbackIf non-NULL, NewCallback specifies the new handler to register. If NULL, specifies that the previously registered handler should be uninstalled.
ExceptionTypeIndicates which entry to manage.
Return values
EFI_SUCCESSProcess is ok.
EFI_INVALID_PARAMETERRequested uninstalling a handler from a vector that has no handler registered for it
EFI_ALREADY_STARTEDRequested install to a vector that already has a handler registered.
othersPossible return values are passed through from UnHookEntry and HookEntry.

Definition at line 106 of file PlDebugSupportX64.c.

Variable Documentation

◆ NullDesc

IA32_IDT_GATE_DESCRIPTOR NullDesc
Initial value:
= {
{ 0, 0 }
}

Definition at line 11 of file PlDebugSupportX64.c.