2 PE/Coff Extra Action library instances, it will report image debug info.
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.
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.
15 #ifndef _PE_COFF_EXTRA_ACTION_LIB_H_
16 #define _PE_COFF_EXTRA_ACTION_LIB_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>
26 #include <ImageDebugSupport.h>
28 #define DEBUG_LOAD_IMAGE_METHOD_IO_HW_BREAKPOINT 1
29 #define DEBUG_LOAD_IMAGE_METHOD_SOFT_INT3 2
31 #define IO_HW_BREAKPOINT_VECTOR_NUM 1
32 #define SOFT_INT_VECTOR_NUM 3
34 extern UINTN AsmInterruptHandle
;
37 Read IDT entry to check if IDT entries are setup by Debug Agent.
39 @param[in] IdtDescriptor Pointer to IDT Descriptor.
40 @param[in] InterruptType Interrupt type.
42 @retval TRUE IDT entries were setup by Debug Agent.
43 @retval FALSE IDT entries were not setuo by Debug Agent.
47 CheckDebugAgentHandler (
48 IN IA32_DESCRIPTOR
*IdtDescriptor
,
49 IN UINTN InterruptType
53 Save IDT entry for INT1 and update it.
55 @param[in] IdtDescriptor Pointer to IDT Descriptor.
56 @param[out] SavedIdtEntry Original IDT entry returned.
60 SaveAndUpdateIdtEntry1 (
61 IN IA32_DESCRIPTOR
*IdtDescriptor
,
62 OUT IA32_IDT_GATE_DESCRIPTOR
*SavedIdtEntry
66 Restore IDT entry for INT1.
68 @param[in] IdtDescriptor Pointer to IDT Descriptor.
69 @param[in] RestoredIdtEntry IDT entry to be restored.
74 IN IA32_DESCRIPTOR
*IdtDescriptor
,
75 IN IA32_IDT_GATE_DESCRIPTOR
*RestoredIdtEntry