-/*++\r
+/**@file\r
+ IPF specific debug support functions\r
\r
Copyright (c) 2006, Intel Corporation \r
All rights reserved. This program and the accompanying materials \r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
\r
-Module Name:\r
-\r
- PlDebugSupport.c\r
-\r
-Abstract:\r
-\r
- IPF specific debug support functions\r
-\r
-Revision History\r
-\r
---*/\r
-\r
-//\r
-// Master EFI header file\r
-//\r
-#include "Tiano.h"\r
-\r
-//\r
-// Common library header files\r
-//\r
-#include "EfiDriverLib.h"\r
-\r
-//\r
-// Produced protocols\r
-//\r
-#include EFI_PROTOCOL_DEFINITION (DebugSupport)\r
+**/\r
\r
//\r
// private header files\r
used by the driver. Must be public because it's referenced from DebugSuport.c\r
\r
Arguments:\r
- IN EFI_HANDLE ImageHandle\r
+ ImageHandle - Image handle\r
\r
Returns:\r
\r
EFI_STATUS - anything other than EFI_SUCCESS indicates the callback was not registered.\r
\r
--*/\r
-// TODO: ImageHandle - add argument and description to function comment\r
{\r
EFI_EXCEPTION_TYPE ExceptionType;\r
\r
exception dispatcher. Must be public because it's referenced from AsmFuncs.s.\r
\r
Arguments:\r
- IN EFI_EXCEPTION_TYPE ExceptionType,\r
- IN EFI_SYSTEM_CONTEXT Context\r
+ ExceptionType - Exception Type\r
+ Context - System Context\r
\r
Returns:\r
\r
Nothing\r
\r
--*/\r
-// TODO: ExceptionType - add argument and description to function comment\r
-// TODO: Context - add argument and description to function comment\r
{\r
static BOOLEAN InHandler = FALSE;\r
\r
DEBUG_CODE_BEGIN ();\r
if (InHandler) {\r
- EfiDebugPrint (EFI_D_GENERIC, "ERROR: Re-entered debugger!\n"\r
+ DEBUG ((EFI_D_INFO, "ERROR: Re-entered debugger!\n"\r
" ExceptionType == %X\n"\r
" Context == %X\n"\r
" Context.SystemContextIpf->CrIip == %X\n"\r
Context, \r
Context.SystemContextIpf->CrIip,\r
Context.SystemContextIpf->CrIpsr,\r
- InHandler);\r
+ InHandler));\r
}\r
DEBUG_CODE_END ();\r
\r
Given an integer number, return the physical address of the entry point in the IFT\r
\r
Arguments:\r
- UINTN HandlerIndex, \r
- VOID ** EntryPoint\r
+ HandlerIndex - Index of the Handler \r
+ EntryPoint - IFT Entrypoint\r
\r
Returns:\r
\r
Nothing\r
\r
--*/\r
-// TODO: HandlerIndex - add argument and description to function comment\r
-// TODO: EntryPoint - add argument and description to function comment\r
{\r
UINT8 *TempPtr;\r
\r
This is the worker function that installs and removes all handlers\r
\r
Arguments:\r
- IN EFI_EXCEPTION_TYPE ExceptionType,\r
- IN BUNDLE NewBundles[NUM_BUNDLES_IN_STUB],\r
- IN VOID (*NewCallback) ()\r
+ ExceptionType - Exception Type\r
+ NewBundles - New Boundles\r
+ NewCallback - New Callback\r
\r
Returns:\r
\r
EFI_STATUS - any return other than EFI_SUCCESS indicates the request was not\r
satisfied.\r
+ EFI_ALEADY_STARTED - Ivt already hooked.\r
\r
--*/\r
-// TODO: ExceptionType - add argument and description to function comment\r
-// TODO: ] - add argument and description to function comment\r
-// TODO: ) - add argument and description to function comment\r
-// TODO: EFI_ALREADY_STARTED - add return value to function comment\r
{\r
BUNDLE *B0Ptr;\r
UINT64 InterruptFlags;\r
to store the ExceptionType and then call the common handler.\r
\r
Arguments:\r
- IN EFI_EXCEPTION_TYPE ExceptionType,\r
- IN BUNDLE NewBundles[4],\r
- IN VOID (*NewCallback) ()\r
+ ExceptionType - Exception Type\r
+ NewBundles - New Boundles\r
+ NewCallback - New Callback\r
\r
Returns:\r
\r
Nothing\r
\r
--*/\r
-// TODO: ExceptionType - add argument and description to function comment\r
-// TODO: ] - add argument and description to function comment\r
-// TODO: ) - add argument and description to function comment\r
{\r
BUNDLE *FixupBundle;\r
BUNDLE *B0Ptr;\r
Restores original IVT contents when unregistering a callback function\r
\r
Arguments:\r
- IN EFI_EXCEPTION_TYPE ExceptionType,\r
+ ExceptionType - Exception Type\r
+ NewBundles - New Boundles\r
+ NewCallback - New Callback\r
\r
Returns:\r
\r
Nothing\r
\r
--*/\r
-// TODO: ExceptionType - add argument and description to function comment\r
{\r
BUNDLE *B0Ptr;\r
\r
Records new callback in IvtEntryTable.\r
\r
Arguments:\r
- IN VOID (*NewCallback) ()\r
+ NewCallback - New Callback\r
\r
Returns:\r
\r
Nothing\r
\r
--*/\r
-// TODO: ) - add argument and description to function comment\r
{\r
VOID *Start;\r
\r
coded to support only 1 processor for now.\r
\r
Arguments:\r
+ This - The DebugSupport instance\r
+ MaxProcessorIndex - The maximuim supported processor index\r
\r
-Returns: Always returns EFI_SUCCESS with *MaxProcessorIndex set to 0\r
+Returns:\r
+ Always returns EFI_SUCCESS with *MaxProcessorIndex set to 0\r
\r
--*/\r
-// TODO: This - add argument and description to function comment\r
-// TODO: MaxProcessorIndex - add argument and description to function comment\r
{\r
*MaxProcessorIndex = 0;\r
return (EFI_SUCCESS);\r
DebugSupport protocol member function\r
\r
Arguments:\r
- IN EFI_DEBUG_SUPPORT_PROTOCOL *This,\r
- IN UINTN ProcessorIndex,\r
- IN EFI_PERIODIC_CALLBACK NewPeriodicCallback\r
+ This - The DebugSupport instance\r
+ ProcessorIndex - Which processor the callback applies to.\r
+ PeriodicCallback - Callback function\r
\r
Returns:\r
\r
EFI_STATUS - anything other than EFI_SUCCESS indicates the callback was not registered.\r
\r
--*/\r
-// TODO: This - add argument and description to function comment\r
-// TODO: ProcessorIndex - add argument and description to function comment\r
-// TODO: NewPeriodicCallback - add argument and description to function comment\r
{\r
return ManageIvtEntryTable (EXCEPT_IPF_EXTERNAL_INTERRUPT, NULL, NewPeriodicCallback);\r
}\r
DebugSupport protocol member function\r
\r
Arguments:\r
- IN EFI_DEBUG_SUPPORT_PROTOCOL *This,\r
- IN EFI_EXCEPTION_CALLBACK NewCallback,\r
- IN EFI_EXCEPTION_TYPE ExceptionType\r
+ This - The DebugSupport instance\r
+ ProcessorIndex - Which processor the callback applies to.\r
+ NewCallback - Callback function\r
+ ExceptionType - Which exception to hook\r
\r
Returns:\r
\r
EFI_STATUS - anything other than EFI_SUCCESS indicates the callback was not registered.\r
\r
--*/\r
-// TODO: This - add argument and description to function comment\r
-// TODO: ProcessorIndex - add argument and description to function comment\r
-// TODO: NewCallback - add argument and description to function comment\r
-// TODO: ExceptionType - add argument and description to function comment\r
{\r
return ManageIvtEntryTable (\r
ExceptionType,\r
DebugSupport protocol member function. Calls assembly routine to flush cache.\r
\r
Arguments:\r
+ This - The DebugSupport instance\r
+ ProcessorIndex - Which processor the callback applies to.\r
+ Start - Physical base of the memory range to be invalidated\r
+ Length - mininum number of bytes in instruction cache to invalidate\r
\r
Returns:\r
EFI_SUCCESS\r
\r
--*/\r
-// TODO: This - add argument and description to function comment\r
-// TODO: ProcessorIndex - add argument and description to function comment\r
-// TODO: Start - add argument and description to function comment\r
-// TODO: Length - add argument and description to function comment\r
{\r
InstructionCacheFlush (Start, Length);\r
return (EFI_SUCCESS);\r