VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/SourceLevelDebugPkg/DebugAgentDxe/DebugAgentDxe.c@ 77599

最後變更 在這個檔案從77599是 58466,由 vboxsync 提交於 9 年 前

EFI/Firmware: Merged in the svn:eol-style, svn:mime-type and trailing whitespace cleanup that was done after the initial UDK2014.SP1 import: svn merge /vendor/edk2/UDK2014.SP1 /vendor/edk2/current .

  • 屬性 svn:eol-style 設為 native
檔案大小: 2.7 KB
 
1/** @file
2 Initialize Debug Agent in DXE by invoking Debug Agent Library.
3
4Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
5This program and the accompanying materials
6are licensed and made available under the terms and conditions of the BSD License
7which accompanies this distribution. The full text of the license may be found at
8http://opensource.org/licenses/bsd-license.php
9
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13**/
14
15#include <PiDxe.h>
16#include <Guid/EventGroup.h>
17#include <Library/UefiBootServicesTableLib.h>
18#include <Library/DebugAgentLib.h>
19
20EFI_EVENT mExitBootServiceEvent;
21
22/**
23 One notified function to disable Debug Timer interrupt when gBS->ExitBootServices() called.
24
25 @param[in] Event Pointer to this event
26 @param[in] Context Event handler private data
27
28**/
29VOID
30EFIAPI
31DisableDebugTimerExitBootService (
32 EFI_EVENT Event,
33 VOID *Context
34 )
35
36{
37 SaveAndSetDebugTimerInterrupt (FALSE);
38}
39
40/**
41 The Entry Point for Debug Agent Dxe driver.
42
43 It will invoke Debug Agent Library to enable source debugging feature in DXE phase.
44
45 @param[in] ImageHandle The firmware allocated handle for the EFI image.
46 @param[in] SystemTable A pointer to the EFI System Table.
47
48 @retval EFI_SUCCESS The entry point is executed successfully.
49 @retval other Some error occurs when initialzed Debug Agent.
50
51**/
52EFI_STATUS
53EFIAPI
54DebugAgentDxeInitialize(
55 IN EFI_HANDLE ImageHandle,
56 IN EFI_SYSTEM_TABLE *SystemTable
57 )
58{
59 EFI_STATUS Status;
60
61 Status = EFI_UNSUPPORTED;
62 InitializeDebugAgent (DEBUG_AGENT_INIT_DXE_LOAD, &Status, NULL);
63 if (EFI_ERROR (Status)) {
64 return Status;
65 }
66 //
67 // Create event to disable Debug Timer interrupt when exit boot service.
68 //
69 Status = gBS->CreateEventEx (
70 EVT_NOTIFY_SIGNAL,
71 TPL_NOTIFY,
72 DisableDebugTimerExitBootService,
73 NULL,
74 &gEfiEventExitBootServicesGuid,
75 &mExitBootServiceEvent
76 );
77 return Status;
78}
79
80/**
81 This is the unload handle for Debug Agent Dxe driver.
82
83 It will invoke Debug Agent Library to disable source debugging feature.
84
85 @param[in] ImageHandle The drivers' driver image.
86
87 @retval EFI_SUCCESS The image is unloaded.
88 @retval Others Failed to unload the image.
89
90**/
91EFI_STATUS
92EFIAPI
93DebugAgentDxeUnload (
94 IN EFI_HANDLE ImageHandle
95 )
96{
97 EFI_STATUS Status;
98
99 Status = EFI_UNSUPPORTED;
100 InitializeDebugAgent (DEBUG_AGENT_INIT_DXE_UNLOAD, &Status, NULL);
101
102 return Status;
103}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette