\r
BOOLEAN mInHandler = FALSE;\r
\r
-typedef struct {\r
- UINT64 low;\r
- UINT64 high;\r
-} BUNDLE;\r
-\r
//\r
// number of bundles to swap in ivt\r
//\r
UINT8 PatchSaveBuffer[0x400];\r
UINTN ExternalInterruptCount;\r
\r
-/**\r
- This is the worker function that uninstalls and removes all handlers.\r
-\r
- @param ExceptionType Exception Type\r
- @param NewBundles New Boundles\r
- @param NewCallback New Callback\r
-\r
- @retval EFI_ALEADY_STARTED Ivt already hooked.\r
- @retval others Indicates the request was not satisfied.\r
- @retval EFI_SUCCESS Successfully uninstalled.\r
-\r
-**/\r
-EFI_STATUS\r
-ManageIvtEntryTable (\r
- IN EFI_EXCEPTION_TYPE ExceptionType,\r
- IN BUNDLE NewBundles[4],\r
- IN VOID (*NewCallback) ()\r
- );\r
-\r
-/**\r
- Saves original IVT contents and inserts a few new bundles which are fixed up\r
- to store the ExceptionType and then call the common handler.\r
-\r
- @param ExceptionType Exception Type\r
- @param NewBundles New Boundles\r
- @param NewCallback New Callback\r
-\r
-**/\r
-VOID\r
-HookEntry (\r
- IN EFI_EXCEPTION_TYPE ExceptionType,\r
- IN BUNDLE NewBundles[4],\r
- IN VOID (*NewCallback) ()\r
- );\r
-\r
-/**\r
- Restores original IVT contents when unregistering a callback function.\r
-\r
- @param ExceptionType Exception Type\r
-\r
-**/\r
-VOID\r
-UnhookEntry (\r
- IN EFI_EXCEPTION_TYPE ExceptionType\r
- );\r
-\r
-/**\r
- Sets up cache flush and calls assembly function to chain external interrupt.\r
-\r
- Records new callback in IvtEntryTable.\r
-\r
- @param NewCallback New Callback.\r
-\r
-**/\r
-VOID\r
-ChainExternalInterrupt (\r
- IN VOID (*NewCallback) ()\r
- );\r
-\r
-/**\r
- Sets up cache flush and calls assembly function to restore external interrupt.\r
- Removes registered callback from IvtEntryTable.\r
-\r
-**/\r
-VOID\r
-UnchainExternalInterrupt (\r
- VOID\r
- );\r
-\r
-/**\r
- Given an integer number, return the physical address of the entry point in the IFT.\r
-\r
- @param HandlerIndex Index of the Handler \r
- @param EntryPoint IFT Entrypoint\r
-\r
-**/\r
-VOID\r
-GetHandlerEntryPoint (\r
- UINTN HandlerIndex,\r
- VOID **EntryPoint\r
- );\r
-\r
\r
/**\r
IPF specific DebugSupport driver initialization. \r