Add X64 support for DebugSupport driver.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2067 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
klu2
2006-12-07 08:31:19 +00:00
parent b2b5e78fbb
commit 5fd59c656c
10 changed files with 2051 additions and 217 deletions

View File

@ -1,4 +1,5 @@
/*++
/**@file
IA32 specific debug support macros, typedefs and prototypes.
Copyright (c) 2006, Intel Corporation
All rights reserved. This program and the accompanying materials
@ -9,17 +10,7 @@ http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
plDebugSupport.h
Abstract:
IA32 specific debug support macros, typedefs and prototypes.
Revision History
--*/
**/
#ifndef _PLDEBUG_SUPPORT_H
#define _PLDEBUG_SUPPORT_H
@ -58,7 +49,7 @@ CommonIdtEntry (
Routine Description:
TODO: Add function description
Generic IDT entry
Arguments:
@ -66,11 +57,12 @@ Arguments:
Returns:
TODO: add return values
None
--*/
;
BOOLEAN
FxStorSupport (
VOID
@ -79,7 +71,7 @@ FxStorSupport (
Routine Description:
TODO: Add function description
Check whether FXSTOR is supported
Arguments:
@ -87,7 +79,8 @@ Arguments:
Returns:
TODO: add return values
TRUE - supported
FALSE - not supported
--*/
;
@ -100,7 +93,7 @@ GetIdtr (
Routine Description:
TODO: Add function description
Return the physical address of IDTR
Arguments:
@ -108,7 +101,7 @@ Arguments:
Returns:
TODO: add return values
The physical address of IDTR
--*/
;
@ -122,16 +115,16 @@ Vect2Desc (
Routine Description:
TODO: Add function description
Encodes an IDT descriptor with the given physical address
Arguments:
DestDesc - TODO: add argument description
) - TODO: add argument description
DestDesc - The IDT descriptor address
Vector - The interrupt vector entry
Returns:
TODO: add return values
None
--*/
;
@ -144,15 +137,16 @@ WriteInterruptFlag (
Routine Description:
TODO: Add function description
Programs interrupt flag to the requested state and returns previous
state.
Arguments:
NewState - TODO: add argument description
NewState - New interrupt status
Returns:
TODO: add return values
Old interrupt status
--*/
;
@ -164,16 +158,18 @@ plInitializeDebugSupportDriver (
/*++
Routine Description:
Initializes driver's handler registration database.
TODO: Add function description
This code executes in boot services context.
Arguments:
None
Returns:
TODO: add return values
EFI_SUCCESS
EFI_UNSUPPORTED - if IA32 processor does not support FXSTOR/FXRSTOR instructions,
the context save will fail, so these processor's are not supported.
EFI_OUT_OF_RESOURCES - not resource to finish initialization
--*/
;
@ -186,16 +182,18 @@ plUnloadDebugSupportDriver (
/*++
Routine Description:
This is the callback that is written to the LoadedImage protocol instance
on the image handle. It uninstalls all registered handlers and frees all entry
stub memory.
TODO: Add function description
This code executes in boot services context.
Arguments:
ImageHandle - TODO: add argument description
ImageHandle - The image handle of the unload handler
Returns:
TODO: add return values
EFI_SUCCESS - always return success
--*/
;
@ -211,18 +209,14 @@ GetMaximumProcessorIndex (
)
/*++
Routine Description:
TODO: Add function description
Routine Description: This is a DebugSupport protocol member function.
Arguments:
This - TODO: add argument description
MaxProcessorIndex - TODO: add argument description
This - The DebugSupport instance
MaxProcessorIndex - The maximuim supported processor index
Returns:
TODO: add return values
Always returns EFI_SUCCESS with *MaxProcessorIndex set to 0
--*/
;
@ -236,19 +230,21 @@ RegisterPeriodicCallback (
)
/*++
Routine Description:
TODO: Add function description
Routine Description: This is a DebugSupport protocol member function.
Arguments:
This - TODO: add argument description
ProcessorIndex - TODO: add argument description
PeriodicCallback - TODO: add argument description
This - The DebugSupport instance
ProcessorIndex - Which processor the callback applies to.
PeriodicCallback - Callback function
Returns:
TODO: add return values
EFI_SUCCESS
EFI_INVALID_PARAMETER - requested uninstalling a handler from a vector that has
no handler registered for it
EFI_ALREADY_STARTED - requested install to a vector that already has a handler registered.
Other possible return values are passed through from UnHookEntry and HookEntry.
--*/
;
@ -264,19 +260,24 @@ RegisterExceptionCallback (
/*++
Routine Description:
This is a DebugSupport protocol member function.
TODO: Add function description
This code executes in boot services context.
Arguments:
This - TODO: add argument description
ProcessorIndex - TODO: add argument description
NewCallback - TODO: add argument description
ExceptionType - TODO: add argument description
This - The DebugSupport instance
ProcessorIndex - Which processor the callback applies to.
NewCallback - Callback function
ExceptionType - Which exception to hook
Returns:
TODO: add return values
EFI_SUCCESS
EFI_INVALID_PARAMETER - requested uninstalling a handler from a vector that has
no handler registered for it
EFI_ALREADY_STARTED - requested install to a vector that already has a handler registered.
Other possible return values are passed through from UnHookEntry and HookEntry.
--*/
;
@ -292,19 +293,18 @@ InvalidateInstructionCache (
/*++
Routine Description:
TODO: Add function description
This is a DebugSupport protocol member function.
Calls assembly routine to flush cache.
Arguments:
This - TODO: add argument description
ProcessorIndex - TODO: add argument description
Start - TODO: add argument description
Length - TODO: add argument description
This - The DebugSupport instance
ProcessorIndex - Which processor the callback applies to.
Start - Physical base of the memory range to be invalidated
Length - mininum number of bytes in instruction cache to invalidate
Returns:
TODO: add return values
EFI_SUCCESS - always return success
--*/
;