]> git.proxmox.com Git - mirror_edk2.git/blob - SourceLevelDebugPkg/Library/PeCoffExtraActionLibDebug/PeCoffExtraActionLib.h
ArmPkg: Added Aarch64 support
[mirror_edk2.git] / SourceLevelDebugPkg / Library / PeCoffExtraActionLibDebug / PeCoffExtraActionLib.h
1 /** @file
2 PE/Coff Extra Action library instances, it will report image debug info.
3
4 Copyright (c) 2013, 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.
9
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.
12
13 **/
14
15 #ifndef _PE_COFF_EXTRA_ACTION_LIB_H_
16 #define _PE_COFF_EXTRA_ACTION_LIB_H_
17
18 #include <Base.h>
19 #include <Library/PeCoffExtraActionLib.h>
20 #include <Library/DebugLib.h>
21 #include <Library/BaseLib.h>
22 #include <Library/IoLib.h>
23 #include <Library/PcdLib.h>
24 #include <Library/BaseMemoryLib.h>
25
26 #include <ImageDebugSupport.h>
27
28 #define DEBUG_LOAD_IMAGE_METHOD_IO_HW_BREAKPOINT 1
29 #define DEBUG_LOAD_IMAGE_METHOD_SOFT_INT3 2
30
31 extern UINTN AsmInterruptHandle;
32
33 /**
34 Read IDT entry to check if IDT entries are setup by Debug Agent.
35
36 @param[in] IdtDescriptor Pointer to IDT Descriptor.
37
38 @retval TRUE IDT entries were setup by Debug Agent.
39 @retval FALSE IDT entries were not setuo by Debug Agent.
40
41 **/
42 BOOLEAN
43 CheckDebugAgentHandler (
44 IN IA32_DESCRIPTOR *IdtDescriptor
45 );
46
47 /**
48 Save IDT entry for INT1 and update it.
49
50 @param[in] IdtDescriptor Pointer to IDT Descriptor.
51 @param[out] SavedIdtEntry Original IDT entry returned.
52
53 **/
54 VOID
55 SaveAndUpdateIdtEntry1 (
56 IN IA32_DESCRIPTOR *IdtDescriptor,
57 OUT IA32_IDT_GATE_DESCRIPTOR *SavedIdtEntry
58 );
59
60 /**
61 Restore IDT entry for INT1.
62
63 @param[in] IdtDescriptor Pointer to IDT Descriptor.
64 @param[in] RestoredIdtEntry IDT entry to be restored.
65
66 **/
67 VOID
68 RestoreIdtEntry1 (
69 IN IA32_DESCRIPTOR *IdtDescriptor,
70 IN IA32_IDT_GATE_DESCRIPTOR *RestoredIdtEntry
71 );
72
73 #endif
74