2 Initialize Debug Agent in DXE by invoking Debug Agent Library.
4 Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #include <Guid/EventGroup.h>
17 #include <Library/UefiBootServicesTableLib.h>
18 #include <Library/DebugAgentLib.h>
20 EFI_EVENT mExitBootServiceEvent
;
23 One notified function to disable Debug Timer interrupt when gBS->ExitBootServices() called.
25 @param[in] Event Pointer to this event
26 @param[in] Context Event handler private data
31 DisableDebugTimerExitBootService (
37 SaveAndSetDebugTimerInterrupt (FALSE
);
41 The Entry Point for Debug Agent Dxe driver.
43 It will invoke Debug Agent Library to enable source debugging feature in DXE phase.
45 @param[in] ImageHandle The firmware allocated handle for the EFI image.
46 @param[in] SystemTable A pointer to the EFI System Table.
48 @retval EFI_SUCCESS The entry point is executed successfully.
49 @retval other Some error occurs when initialzed Debug Agent.
54 DebugAgentDxeInitialize(
55 IN EFI_HANDLE ImageHandle
,
56 IN EFI_SYSTEM_TABLE
*SystemTable
61 Status
= EFI_UNSUPPORTED
;
62 InitializeDebugAgent (DEBUG_AGENT_INIT_DXE_LOAD
, &Status
, NULL
);
63 if (EFI_ERROR (Status
)) {
67 // Create event to disable Debug Timer interrupt when exit boot service.
69 Status
= gBS
->CreateEventEx (
72 DisableDebugTimerExitBootService
,
74 &gEfiEventExitBootServicesGuid
,
75 &mExitBootServiceEvent
81 This is the unload handle for Debug Agent Dxe driver.
83 It will invoke Debug Agent Library to disable source debugging feature.
85 @param[in] ImageHandle The drivers' driver image.
87 @retval EFI_SUCCESS The image is unloaded.
88 @retval Others Failed to unload the image.
94 IN EFI_HANDLE ImageHandle
99 Status
= EFI_UNSUPPORTED
;
100 InitializeDebugAgent (DEBUG_AGENT_INIT_DXE_UNLOAD
, &Status
, NULL
);