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

Go to the source code of this file.

Functions

UINTN GetInterruptHandleFromIdt (IN IA32_IDT_GATE_DESCRIPTOR *IdtGateDescriptor)
 
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

IA32 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 PlDebugSupportIa32.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 52 of file PlDebugSupportIa32.c.

◆ GetInterruptHandleFromIdt()

UINTN GetInterruptHandleFromIdt ( IN IA32_IDT_GATE_DESCRIPTOR *  IdtGateDescriptor)

Get Interrupt Handle from IDT Gate Descriptor.

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

Definition at line 24 of file PlDebugSupportIa32.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_SUCCESSInstalling or Uninstalling operation 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.

Definition at line 105 of file PlDebugSupportIa32.c.

Variable Documentation

◆ NullDesc

IA32_IDT_GATE_DESCRIPTOR NullDesc
Initial value:
= {
{ 0 }
}

Definition at line 11 of file PlDebugSupportIa32.c.