]>
Commit | Line | Data |
---|---|---|
c8ad2d7a LG |
1 | /** @file\r |
2 | EBC Simple Debugger protocol for debug EBC code.\r | |
3 | \r | |
d1102dba | 4 | Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r |
c8ad2d7a | 5 | \r |
9d510e61 | 6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
c8ad2d7a LG |
7 | \r |
8 | **/\r | |
9 | \r | |
10 | #ifndef _EBC_SIMPLE_DEBUGGER_PROTOCOL_H_\r | |
11 | #define _EBC_SIMPLE_DEBUGGER_PROTOCOL_H_\r | |
12 | \r | |
89a90ae6 LG |
13 | #include <Protocol/DebugSupport.h>\r |
14 | #include <Protocol/EbcVmTest.h>\r | |
c8ad2d7a LG |
15 | \r |
16 | #define EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL_GUID \\r | |
17 | { \\r | |
18 | 0x2a72d11e, 0x7376, 0x40f6, { 0x9c, 0x68, 0x23, 0xfa, 0x2f, 0xe3, 0x63, 0xf1 } \\r | |
19 | }\r | |
20 | \r | |
21 | //\r | |
22 | // Defines for a simple EBC debugger interface\r | |
23 | //\r | |
24 | typedef struct _EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL;\r | |
25 | \r | |
26 | /**\r | |
27 | Trig Exception on EBC VM.\r | |
28 | \r | |
29 | @param[in] This A pointer to the EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL structure.\r | |
30 | @param[in] VmPtr A pointer to a VM context.\r | |
31 | @param[in] ExceptionType Exception to be trigged.\r | |
32 | \r | |
33 | @retval EFI_UNSUPPORTED No support for it.\r | |
34 | @retval EFI_SUCCESS Exception is trigged.\r | |
35 | \r | |
36 | **/\r | |
37 | typedef\r | |
38 | EFI_STATUS\r | |
1436aea4 | 39 | (EFIAPI *EBC_DEBUGGER_SIGNAL_EXCEPTION)(\r |
c8ad2d7a LG |
40 | IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL *This,\r |
41 | IN VM_CONTEXT *VmPtr,\r | |
42 | IN EFI_EXCEPTION_TYPE ExceptionType\r | |
43 | );\r | |
44 | \r | |
45 | /**\r | |
46 | Given a pointer to a new VM context, debug one or more instructions.\r | |
47 | \r | |
48 | @param[in] This A pointer to the EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL structure.\r | |
49 | @param[in] VmPtr A pointer to a VM context.\r | |
50 | \r | |
51 | @retval EFI_UNSUPPORTED No support for it.\r | |
52 | @retval EFI_SUCCESS Debug one or more instructions.\r | |
53 | \r | |
54 | **/\r | |
55 | typedef\r | |
56 | VOID\r | |
1436aea4 | 57 | (EFIAPI *EBC_DEBUGGER_DEBUG)(\r |
c8ad2d7a LG |
58 | IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL *This,\r |
59 | IN VM_CONTEXT *VmPtr\r | |
60 | );\r | |
61 | \r | |
62 | /**\r | |
63 | Given a pointer to a new VM context, dump one or more instructions.\r | |
64 | \r | |
65 | @param[in] This A pointer to the EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL structure.\r | |
66 | @param[in] VmPtr A pointer to a VM context.\r | |
d1102dba | 67 | @param[in] DasmString Dump string buffer.\r |
c8ad2d7a LG |
68 | @param[in] DasmStringSize Dump string size.\r |
69 | \r | |
70 | @retval EFI_UNSUPPORTED No support for it.\r | |
71 | @retval EFI_SUCCESS Dump one or more instructions.\r | |
72 | \r | |
73 | **/\r | |
74 | typedef\r | |
75 | UINT32\r | |
1436aea4 | 76 | (EFIAPI *EBC_DEBUGGER_DASM)(\r |
c8ad2d7a LG |
77 | IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL *This,\r |
78 | IN VM_CONTEXT *VmPtr,\r | |
79 | IN UINT16 *DasmString OPTIONAL,\r | |
80 | IN UINT32 DasmStringSize\r | |
81 | );\r | |
82 | \r | |
83 | /**\r | |
84 | This interface allows you to configure the EBC debug support\r | |
85 | driver. For example, turn on or off saving and printing of\r | |
86 | delta VM even if called. Or to even disable the entire interface,\r | |
87 | in which case all functions become no-ops.\r | |
88 | \r | |
89 | @param[in] This A pointer to the EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL structure.\r | |
90 | @param[in] ConfigId ID to be configured.\r | |
91 | @param[in] ConfigValue Value to be set.\r | |
92 | \r | |
93 | @retval EFI_UNSUPPORTED No support for it.\r | |
94 | @retval EFI_SUCCESS Configure EBC debug.\r | |
95 | \r | |
96 | **/\r | |
97 | typedef\r | |
98 | EFI_STATUS\r | |
1436aea4 | 99 | (EFIAPI *EBC_DEBUGGER_CONFIGURE)(\r |
c8ad2d7a LG |
100 | IN EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL *This,\r |
101 | IN UINT32 ConfigId,\r | |
102 | IN UINTN ConfigValue\r | |
103 | );\r | |
104 | \r | |
105 | //\r | |
106 | // Prototype for the actual EBC debug support protocol interface\r | |
107 | //\r | |
108 | struct _EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL {\r | |
1436aea4 MK |
109 | EBC_DEBUGGER_DEBUG Debugger;\r |
110 | EBC_DEBUGGER_SIGNAL_EXCEPTION SignalException;\r | |
111 | EBC_DEBUGGER_DASM Dasm;\r | |
112 | EBC_DEBUGGER_CONFIGURE Configure;\r | |
c8ad2d7a LG |
113 | };\r |
114 | \r | |
1436aea4 | 115 | extern EFI_GUID gEfiEbcSimpleDebuggerProtocolGuid;\r |
c8ad2d7a LG |
116 | \r |
117 | #endif\r |