3 Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
4 SPDX-License-Identifier: BSD-2-Clause-Patent
13 Check the Hook flag, and trigger exception if match.
15 @param VmPtr - EbcDebuggerCheckHookFlag
16 @param Flag - Feature flag
20 EbcDebuggerCheckHookFlag (
25 if ((mDebuggerPrivate
.FeatureFlags
& Flag
) == Flag
) {
26 mDebuggerPrivate
.StatusFlags
= Flag
;
27 EbcDebugSignalException (
28 EXCEPT_EBC_BREAKPOINT
,
39 It will record soruce address for Callstack entry.
41 @param SourceEntry - Source address
42 @param Type - Branch type
46 EbcDebuggerPushCallstackSource (
47 IN UINT64 SourceEntry
,
48 IN EFI_DEBUGGER_BRANCH_TYPE Type
51 if (mDebuggerPrivate
.CallStackEntryCount
> EFI_DEBUGGER_CALLSTACK_MAX
) {
53 mDebuggerPrivate
.CallStackEntryCount
= EFI_DEBUGGER_CALLSTACK_MAX
;
57 // Record the new callstack entry
59 mDebuggerPrivate
.CallStackEntry
[mDebuggerPrivate
.CallStackEntryCount
].SourceAddress
= SourceEntry
;
60 mDebuggerPrivate
.CallStackEntry
[mDebuggerPrivate
.CallStackEntryCount
].Type
= Type
;
63 // Do not change CallStackEntryCount
71 It will record parameter for Callstack entry.
73 @param ParameterAddress - The address for the parameter
74 @param Type - Branch type
78 EbcDebuggerPushCallstackParameter (
79 IN UINT64 ParameterAddress
,
80 IN EFI_DEBUGGER_BRANCH_TYPE Type
83 if (mDebuggerPrivate
.CallStackEntryCount
> EFI_DEBUGGER_CALLSTACK_MAX
) {
85 mDebuggerPrivate
.CallStackEntryCount
= EFI_DEBUGGER_CALLSTACK_MAX
;
89 // Record the new callstack parameter
91 mDebuggerPrivate
.CallStackEntry
[mDebuggerPrivate
.CallStackEntryCount
].ParameterAddr
= (UINTN
)ParameterAddress
;
93 mDebuggerPrivate
.CallStackEntry
[mDebuggerPrivate
.CallStackEntryCount
].Parameter
,
94 (VOID
*)(UINTN
)ParameterAddress
,
95 sizeof (mDebuggerPrivate
.CallStackEntry
[mDebuggerPrivate
.CallStackEntryCount
].Parameter
)
99 // Do not change CallStackEntryCount
107 It will record source address for callstack entry.
109 @param DestEntry - Source address
110 @param Type - Branch type
114 EbcDebuggerPushCallstackDest (
116 IN EFI_DEBUGGER_BRANCH_TYPE Type
121 if (mDebuggerPrivate
.CallStackEntryCount
< EFI_DEBUGGER_CALLSTACK_MAX
) {
123 // If there is empty entry for callstack, add it
125 ASSERT (mDebuggerPrivate
.CallStackEntry
[mDebuggerPrivate
.CallStackEntryCount
].Type
== Type
);
126 mDebuggerPrivate
.CallStackEntry
[mDebuggerPrivate
.CallStackEntryCount
].DestAddress
= DestEntry
;
127 mDebuggerPrivate
.CallStackEntryCount
++;
130 // If there is no empty entry for callstack, throw the oldest one
132 ASSERT (mDebuggerPrivate
.CallStackEntry
[EFI_DEBUGGER_TRACE_MAX
].Type
== Type
);
133 for (Index
= 0; Index
< EFI_DEBUGGER_CALLSTACK_MAX
; Index
++) {
135 &mDebuggerPrivate
.CallStackEntry
[Index
],
136 &mDebuggerPrivate
.CallStackEntry
[Index
+ 1],
137 sizeof (mDebuggerPrivate
.CallStackEntry
[Index
])
141 mDebuggerPrivate
.CallStackEntry
[EFI_DEBUGGER_CALLSTACK_MAX
- 1].DestAddress
= DestEntry
;
142 mDebuggerPrivate
.CallStackEntryCount
= EFI_DEBUGGER_CALLSTACK_MAX
;
150 It will throw the newest Callstack entry.
154 EbcDebuggerPopCallstack (
158 if ((mDebuggerPrivate
.CallStackEntryCount
> 0) &&
159 (mDebuggerPrivate
.CallStackEntryCount
<= EFI_DEBUGGER_CALLSTACK_MAX
))
162 // Throw the newest one
164 mDebuggerPrivate
.CallStackEntryCount
--;
165 mDebuggerPrivate
.CallStackEntry
[mDebuggerPrivate
.CallStackEntryCount
].SourceAddress
= 0;
166 mDebuggerPrivate
.CallStackEntry
[mDebuggerPrivate
.CallStackEntryCount
].DestAddress
= 0;
167 } else if (mDebuggerPrivate
.CallStackEntryCount
== 0) {
169 // NOT assert here because it is reasonable, because when we start to build
170 // callstack, we do not know how many function already called.
181 It will record source address for trace entry.
183 @param SourceEntry - Source address
184 @param Type - Branch type
188 EbcDebuggerPushTraceSourceEntry (
189 IN UINT64 SourceEntry
,
190 IN EFI_DEBUGGER_BRANCH_TYPE Type
193 if (mDebuggerPrivate
.TraceEntryCount
> EFI_DEBUGGER_TRACE_MAX
) {
195 mDebuggerPrivate
.TraceEntryCount
= EFI_DEBUGGER_TRACE_MAX
;
199 // Record the new trace entry
201 mDebuggerPrivate
.TraceEntry
[mDebuggerPrivate
.TraceEntryCount
].SourceAddress
= SourceEntry
;
202 mDebuggerPrivate
.TraceEntry
[mDebuggerPrivate
.TraceEntryCount
].Type
= Type
;
205 // Do not change TraceEntryCount
213 It will record destination address for trace entry.
215 @param DestEntry - Destination address
216 @param Type - Branch type
220 EbcDebuggerPushTraceDestEntry (
222 IN EFI_DEBUGGER_BRANCH_TYPE Type
227 if (mDebuggerPrivate
.TraceEntryCount
< EFI_DEBUGGER_TRACE_MAX
) {
229 // If there is empty entry for trace, add it
231 ASSERT (mDebuggerPrivate
.TraceEntry
[mDebuggerPrivate
.TraceEntryCount
].Type
== Type
);
232 mDebuggerPrivate
.TraceEntry
[mDebuggerPrivate
.TraceEntryCount
].DestAddress
= DestEntry
;
233 mDebuggerPrivate
.TraceEntryCount
++;
236 // If there is no empty entry for trace, throw the oldest one
238 ASSERT (mDebuggerPrivate
.TraceEntry
[EFI_DEBUGGER_TRACE_MAX
].Type
== Type
);
239 for (Index
= 0; Index
< EFI_DEBUGGER_TRACE_MAX
; Index
++) {
241 &mDebuggerPrivate
.TraceEntry
[Index
],
242 &mDebuggerPrivate
.TraceEntry
[Index
+ 1],
243 sizeof (mDebuggerPrivate
.TraceEntry
[Index
])
247 mDebuggerPrivate
.TraceEntry
[EFI_DEBUGGER_CALLSTACK_MAX
- 1].DestAddress
= DestEntry
;
248 mDebuggerPrivate
.TraceEntryCount
= EFI_DEBUGGER_TRACE_MAX
;
256 It will record address for StepEntry, if STEPOVER or STEPOUT is enabled.
258 @param Entry - Break Address
259 @param FramePtr - Break Frame pointer
260 @param Flag - for STEPOVER or STEPOUT
264 EbcDebuggerPushStepEntry (
273 if ((Flag
== EFI_DEBUG_FLAG_EBC_STEPOVER
) &&
274 ((mDebuggerPrivate
.FeatureFlags
& EFI_DEBUG_FLAG_EBC_STEPOVER
) == EFI_DEBUG_FLAG_EBC_STEPOVER
))
276 mDebuggerPrivate
.StepContext
.BreakAddress
= Entry
;
277 mDebuggerPrivate
.StepContext
.FramePointer
= FramePtr
;
278 mDebuggerPrivate
.FeatureFlags
&= ~EFI_DEBUG_FLAG_EBC_B_STEPOVER
;
284 if ((Flag
== EFI_DEBUG_FLAG_EBC_STEPOUT
) &&
285 ((mDebuggerPrivate
.FeatureFlags
& EFI_DEBUG_FLAG_EBC_STEPOUT
) == EFI_DEBUG_FLAG_EBC_STEPOUT
))
287 mDebuggerPrivate
.StepContext
.BreakAddress
= Entry
;
288 mDebuggerPrivate
.StepContext
.FramePointer
= FramePtr
;
289 mDebuggerPrivate
.FeatureFlags
&= ~EFI_DEBUG_FLAG_EBC_B_STEPOUT
;
294 Notify the callback function when an event is triggered.
296 @param Event Indicates the event that invoke this function.
297 @param Context Indicates the calling context.
302 EbcDebuggerBreakEventFunc (
309 if ((mDebuggerPrivate
.FeatureFlags
& EFI_DEBUG_FLAG_EBC_BOK
) != EFI_DEBUG_FLAG_EBC_BOK
) {
313 Status
= gBS
->CheckEvent (gST
->ConIn
->WaitForKey
);
314 if (Status
== EFI_SUCCESS
) {
315 mDebuggerPrivate
.StatusFlags
= EFI_DEBUG_FLAG_EBC_BOK
;
321 The hook in InitializeEbcDriver.
322 It will init the EbcDebuggerPrivate data structure.
324 @param Handle - The EbcDebugProtocol handle.
325 @param EbcDebugProtocol - The EbcDebugProtocol interface.
329 EbcDebuggerHookInit (
330 IN EFI_HANDLE Handle
,
331 IN EFI_DEBUG_SUPPORT_PROTOCOL
*EbcDebugProtocol
336 EFI_DEBUGGER_SYMBOL_OBJECT
*Object
;
337 EFI_DEBUGGER_SYMBOL_ENTRY
*Entry
;
340 // Register all exception handler
342 for (Index
= EXCEPT_EBC_UNDEFINED
; Index
<= EXCEPT_EBC_STEP
; Index
++) {
343 EbcDebugProtocol
->RegisterExceptionCallback (
349 EbcDebugProtocol
->RegisterExceptionCallback (
360 Object
= AllocateZeroPool (sizeof (EFI_DEBUGGER_SYMBOL_OBJECT
) * EFI_DEBUGGER_SYMBOL_OBJECT_MAX
);
361 ASSERT (Object
!= NULL
);
362 mDebuggerPrivate
.DebuggerSymbolContext
.Object
= Object
;
363 mDebuggerPrivate
.DebuggerSymbolContext
.ObjectCount
= 0;
364 mDebuggerPrivate
.DebuggerSymbolContext
.MaxObjectCount
= EFI_DEBUGGER_SYMBOL_OBJECT_MAX
;
365 for (Index
= 0; Index
< EFI_DEBUGGER_SYMBOL_OBJECT_MAX
; Index
++) {
366 Entry
= AllocateZeroPool (sizeof (EFI_DEBUGGER_SYMBOL_ENTRY
) * EFI_DEBUGGER_SYMBOL_ENTRY_MAX
);
367 ASSERT (Entry
!= NULL
);
368 Object
[Index
].Entry
= Entry
;
369 Object
[Index
].MaxEntryCount
= EFI_DEBUGGER_SYMBOL_ENTRY_MAX
;
370 Object
[Index
].SourceBuffer
= AllocateZeroPool (sizeof (VOID
*) * (EFI_DEBUGGER_SYMBOL_ENTRY_MAX
+ 1));
371 ASSERT (Object
[Index
].SourceBuffer
!= NULL
);
375 // locate PciRootBridgeIo
377 Status
= gBS
->LocateProtocol (
378 &gEfiPciRootBridgeIoProtocolGuid
,
380 (VOID
**)&mDebuggerPrivate
.PciRootBridgeIo
384 // locate DebugImageInfoTable
386 Status
= EfiGetSystemConfigurationTable (
387 &gEfiDebugImageInfoTableGuid
,
388 (VOID
**)&mDebuggerPrivate
.DebugImageInfoTableHeader
392 // Register Debugger Configuration Protocol, for config in shell
394 Status
= gBS
->InstallProtocolInterface (
396 &gEfiDebuggerConfigurationProtocolGuid
,
397 EFI_NATIVE_INTERFACE
,
398 &mDebuggerPrivate
.DebuggerConfiguration
403 // Create break event
405 Status
= gBS
->CreateEvent (
406 EVT_TIMER
| EVT_NOTIFY_SIGNAL
,
408 EbcDebuggerBreakEventFunc
,
410 &mDebuggerPrivate
.BreakEvent
412 if (!EFI_ERROR (Status
)) {
413 Status
= gBS
->SetTimer (
414 mDebuggerPrivate
.BreakEvent
,
416 EFI_DEBUG_BREAK_TIMER_INTERVAL
425 The hook in UnloadImage for EBC Interpreter.
426 It clean up the environment.
430 EbcDebuggerHookUnload (
436 EFI_DEBUGGER_SYMBOL_OBJECT
*Object
;
439 // Close the break event
441 if (mDebuggerPrivate
.BreakEvent
!= NULL
) {
442 gBS
->CloseEvent (mDebuggerPrivate
.BreakEvent
);
446 // Clean up the symbol
448 Object
= mDebuggerPrivate
.DebuggerSymbolContext
.Object
;
449 for (Index
= 0; Index
< EFI_DEBUGGER_SYMBOL_OBJECT_MAX
; Index
++) {
453 gBS
->FreePool (Object
[Index
].Entry
);
454 Object
[Index
].Entry
= NULL
;
455 Object
[Index
].EntryCount
= 0;
457 // Clean up source buffer
459 for (SubIndex
= 0; Object
[Index
].SourceBuffer
[SubIndex
] != NULL
; SubIndex
++) {
460 gBS
->FreePool (Object
[Index
].SourceBuffer
[SubIndex
]);
461 Object
[Index
].SourceBuffer
[SubIndex
] = NULL
;
464 gBS
->FreePool (Object
[Index
].SourceBuffer
);
465 Object
[Index
].SourceBuffer
= NULL
;
471 gBS
->FreePool (Object
);
472 mDebuggerPrivate
.DebuggerSymbolContext
.Object
= NULL
;
473 mDebuggerPrivate
.DebuggerSymbolContext
.ObjectCount
= 0;
483 The hook in EbcUnloadImage.
484 Currently do nothing here.
486 @param Handle - The EbcImage handle.
490 EbcDebuggerHookEbcUnloadImage (
499 The hook in ExecuteEbcImageEntryPoint.
500 It will record the call-stack entry. (-1 means EbcImageEntryPoint call)
501 and trigger Exception if BOE enabled.
504 @param VmPtr - pointer to VM context.
508 EbcDebuggerHookExecuteEbcImageEntryPoint (
512 EbcDebuggerPushCallstackSource ((UINT64
)(UINTN
)-1, EfiDebuggerBranchTypeEbcCall
);
513 EbcDebuggerPushCallstackParameter ((UINT64
)(UINTN
)VmPtr
->Gpr
[0], EfiDebuggerBranchTypeEbcCall
);
514 EbcDebuggerPushCallstackDest ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCall
);
515 EbcDebuggerCheckHookFlag (VmPtr
, EFI_DEBUG_FLAG_EBC_BOE
);
521 The hook in ExecuteEbcImageEntryPoint.
522 It will record the call-stack entry. (-2 means EbcInterpret call)
523 and trigger Exception if BOT enabled.
525 @param VmPtr - pointer to VM context.
529 EbcDebuggerHookEbcInterpret (
533 EbcDebuggerPushCallstackSource ((UINT64
)(UINTN
)-2, EfiDebuggerBranchTypeEbcCall
);
534 EbcDebuggerPushCallstackParameter ((UINT64
)(UINTN
)VmPtr
->Gpr
[0], EfiDebuggerBranchTypeEbcCall
);
535 EbcDebuggerPushCallstackDest ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCall
);
536 EbcDebuggerCheckHookFlag (VmPtr
, EFI_DEBUG_FLAG_EBC_BOT
);
542 The hook in EbcExecute, before ExecuteFunction.
543 It will trigger Exception if GoTil, StepOver, or StepOut hit.
545 @param VmPtr - pointer to VM context.
549 EbcDebuggerHookExecuteStart (
556 // Check Ip for GoTil
558 if (mDebuggerPrivate
.GoTilContext
.BreakAddress
== (UINT64
)(UINTN
)VmPtr
->Ip
) {
559 mDebuggerPrivate
.StatusFlags
= EFI_DEBUG_FLAG_EBC_GT
;
560 mDebuggerPrivate
.GoTilContext
.BreakAddress
= 0;
561 EbcDebugSignalException (
562 EXCEPT_EBC_BREAKPOINT
,
566 mDebuggerPrivate
.StatusFlags
&= ~EFI_DEBUG_FLAG_EBC_B_GT
;
571 // Check ReturnAddress for StepOver
573 if ((mDebuggerPrivate
.StepContext
.BreakAddress
== (UINT64
)(UINTN
)VmPtr
->Ip
) &&
574 (mDebuggerPrivate
.StepContext
.FramePointer
== (UINT64
)(UINTN
)VmPtr
->FramePtr
))
576 mDebuggerPrivate
.StatusFlags
= EFI_DEBUG_FLAG_EBC_STEPOVER
;
577 mDebuggerPrivate
.StepContext
.BreakAddress
= 0;
578 mDebuggerPrivate
.StepContext
.FramePointer
= 0;
579 EbcDebugSignalException (
580 EXCEPT_EBC_BREAKPOINT
,
584 mDebuggerPrivate
.StatusFlags
&= ~EFI_DEBUG_FLAG_EBC_B_STEPOVER
;
588 // Check FramePtr for StepOut
590 if (mDebuggerPrivate
.StepContext
.BreakAddress
== (UINT64
)(UINTN
)VmPtr
->FramePtr
) {
591 mDebuggerPrivate
.StatusFlags
= EFI_DEBUG_FLAG_EBC_STEPOUT
;
592 mDebuggerPrivate
.StepContext
.BreakAddress
= 0;
593 mDebuggerPrivate
.StepContext
.FramePointer
= 0;
594 EbcDebugSignalException (
595 EXCEPT_EBC_BREAKPOINT
,
599 mDebuggerPrivate
.StatusFlags
&= ~EFI_DEBUG_FLAG_EBC_B_STEPOUT
;
603 // Check Flags for BreakOnKey
605 if (mDebuggerPrivate
.StatusFlags
== EFI_DEBUG_FLAG_EBC_BOK
) {
607 // Only break when the current TPL <= TPL_APPLICATION
609 CurrentTpl
= gBS
->RaiseTPL (TPL_HIGH_LEVEL
);
610 gBS
->RestoreTPL (CurrentTpl
);
611 if (CurrentTpl
<= TPL_APPLICATION
) {
612 EbcDebugSignalException (
613 EXCEPT_EBC_BREAKPOINT
,
617 mDebuggerPrivate
.StatusFlags
&= ~EFI_DEBUG_FLAG_EBC_B_BOK
;
626 The hook in EbcExecute, after ExecuteFunction.
627 It will record StepOut Entry if need.
629 @param VmPtr - pointer to VM context.
633 EbcDebuggerHookExecuteEnd (
640 // Use FramePtr as checkpoint for StepOut
642 CopyMem (&Address
, (VOID
*)((UINTN
)VmPtr
->FramePtr
), sizeof (Address
));
643 EbcDebuggerPushStepEntry (Address
, (UINT64
)(UINTN
)VmPtr
->FramePtr
, EFI_DEBUG_FLAG_EBC_STEPOUT
);
650 The hook in ExecuteCALL, before move IP.
651 It will trigger Exception if BOC enabled,
652 and record Callstack, and trace information.
654 @param VmPtr - pointer to VM context.
658 EbcDebuggerHookCALLStart (
662 EbcDebuggerCheckHookFlag (VmPtr
, EFI_DEBUG_FLAG_EBC_BOC
);
663 EbcDebuggerPushCallstackSource ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCall
);
664 EbcDebuggerPushCallstackParameter ((UINT64
)(UINTN
)VmPtr
->Gpr
[0], EfiDebuggerBranchTypeEbcCall
);
665 EbcDebuggerPushTraceSourceEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCall
);
671 The hook in ExecuteCALL, after move IP.
672 It will record Callstack, trace information
673 and record StepOver/StepOut Entry if need.
675 @param VmPtr - pointer to VM context.
679 EbcDebuggerHookCALLEnd (
686 EbcDebuggerPushCallstackDest ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCall
);
687 EbcDebuggerPushTraceDestEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCall
);
692 CopyMem (&FramePtr
, (VOID
*)((UINTN
)VmPtr
->FramePtr
), sizeof (FramePtr
));
695 // Use ReturnAddress as checkpoint for StepOver
697 CopyMem (&Address
, (VOID
*)(UINTN
)VmPtr
->Gpr
[0], sizeof (Address
));
698 EbcDebuggerPushStepEntry (Address
, FramePtr
, EFI_DEBUG_FLAG_EBC_STEPOVER
);
701 // Use FramePtr as checkpoint for StepOut
704 CopyMem (&Address
, (VOID
*)(FramePtr
), sizeof (UINTN
));
705 EbcDebuggerPushStepEntry (Address
, FramePtr
, EFI_DEBUG_FLAG_EBC_STEPOUT
);
712 The hook in ExecuteCALL, before call EbcLLCALLEX.
713 It will trigger Exception if BOCX enabled,
714 and record Callstack information.
716 @param VmPtr - pointer to VM context.
720 EbcDebuggerHookCALLEXStart (
724 EbcDebuggerCheckHookFlag (VmPtr
, EFI_DEBUG_FLAG_EBC_BOCX
);
725 // EbcDebuggerPushCallstackSource ((UINT64)(UINTN)VmPtr->Ip, EfiDebuggerBranchTypeEbcCallEx);
726 // EbcDebuggerPushCallstackParameter ((UINT64)(UINTN)VmPtr->R[0], EfiDebuggerBranchTypeEbcCallEx);
727 EbcDebuggerPushTraceSourceEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCallEx
);
733 The hook in ExecuteCALL, after call EbcLLCALLEX.
734 It will record trace information.
736 @param VmPtr - pointer to VM context.
740 EbcDebuggerHookCALLEXEnd (
744 // EbcDebuggerPushCallstackDest ((UINT64)(UINTN)VmPtr->Ip, EfiDebuggerBranchTypeEbcCallEx);
745 EbcDebuggerPushTraceDestEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcCallEx
);
751 The hook in ExecuteRET, before move IP.
752 It will trigger Exception if BOR enabled,
753 and record Callstack, and trace information.
755 @param VmPtr - pointer to VM context.
759 EbcDebuggerHookRETStart (
763 EbcDebuggerCheckHookFlag (VmPtr
, EFI_DEBUG_FLAG_EBC_BOR
);
764 EbcDebuggerPopCallstack ();
765 EbcDebuggerPushTraceSourceEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcRet
);
771 The hook in ExecuteRET, after move IP.
772 It will record trace information.
774 @param VmPtr - pointer to VM context.
778 EbcDebuggerHookRETEnd (
782 EbcDebuggerPushTraceDestEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcRet
);
788 The hook in ExecuteJMP, before move IP.
789 It will record trace information.
791 @param VmPtr - pointer to VM context.
795 EbcDebuggerHookJMPStart (
799 EbcDebuggerPushTraceSourceEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcJmp
);
805 The hook in ExecuteJMP, after move IP.
806 It will record trace information.
808 @param VmPtr - pointer to VM context.
812 EbcDebuggerHookJMPEnd (
816 EbcDebuggerPushTraceDestEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcJmp
);
822 The hook in ExecuteJMP8, before move IP.
823 It will record trace information.
825 @param VmPtr - pointer to VM context.
829 EbcDebuggerHookJMP8Start (
833 EbcDebuggerPushTraceSourceEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcJmp8
);
839 The hook in ExecuteJMP8, after move IP.
840 It will record trace information.
842 @param VmPtr - pointer to VM context.
846 EbcDebuggerHookJMP8End (
850 EbcDebuggerPushTraceDestEntry ((UINT64
)(UINTN
)VmPtr
->Ip
, EfiDebuggerBranchTypeEbcJmp8
);